Package com.adobe.xmp.path
Class XMPPathSegment
java.lang.Object
com.adobe.xmp.path.XMPPathSegment
Represents one segment in a path into the XMP tree.
Each segment has to be created through one of the factories and is immutable.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic XMPPathSegmentcreateArrayIndexSegment(String namespace, int index) Creates an array index path segment that denotes a specific element of an array.static XMPPathSegmentcreatePropertySegment(String namespace, String name) Creates a normal property path segment.static XMPPathSegmentcreateQualifierSegment(String namespace, String name) Creates a Qualifier path segment, which behaves like a normal propertystatic XMPPathSegmentcreateQualifierSelectorSegment(String namespace, String name, String value) Creates a path segment that selects a specific qualifier by its value.booleanintgetIndex()getName()getType()getValue()inthashCode()
-
Method Details
-
createPropertySegment
Creates a normal property path segment. These are essentially all properties (simple, struct and arrays).- Parameters:
namespace- Namespace URI of the propertyname- Local name of the property- Returns:
- a new immutable path segment
-
createArrayIndexSegment
Creates an array index path segment that denotes a specific element of an array. Such segments do not have an own name and inherits the namespace from the Array property itself- Parameters:
namespace- Namespace URI of the array propertyindex- Index of the element- Returns:
- a new immutable path segment
-
createQualifierSegment
Creates a Qualifier path segment, which behaves like a normal property- Parameters:
namespace- Namespace URI of the qualifier propertyname- Local name of the qualifier property- Returns:
- a new immutable path segment
-
createQualifierSelectorSegment
public static XMPPathSegment createQualifierSelectorSegment(String namespace, String name, String value) Creates a path segment that selects a specific qualifier by its value. For example a specific language in a alternative array of languages.- Parameters:
namespace- Namespace URI of the propertyname- Local name of the propertyvalue- The value that depicts the specific qualifier- Returns:
- a new immutable path segment
-
getNamespace
- Returns:
- the namespace
-
getName
- Returns:
- the name
-
getType
- Returns:
- the type
-
getIndex
public int getIndex() -
getValue
- Returns:
- the value
-
hashCode
public int hashCode() -
equals
-