Package com.adobe.xmp.path
Class XMPPathSegment
- java.lang.Object
-
- com.adobe.xmp.path.XMPPathSegment
-
public class XMPPathSegment extends Object
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 Modifier and Type Class Description static classXMPPathSegment.TypeTypes of path segments
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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.booleanequals(Object obj)intgetIndex()StringgetName()StringgetNamespace()XMPPathSegment.TypegetType()StringgetValue()inthashCode()
-
-
-
Method Detail
-
createPropertySegment
public static XMPPathSegment createPropertySegment(String namespace, String name)
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
public static XMPPathSegment createArrayIndexSegment(String namespace, int index)
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
public static XMPPathSegment createQualifierSegment(String namespace, String name)
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
public String getNamespace()
- Returns:
- the namespace
-
getName
public String getName()
- Returns:
- the name
-
getType
public XMPPathSegment.Type getType()
- Returns:
- the type
-
getIndex
public int getIndex()
-
getValue
public String getValue()
- Returns:
- the value
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObject- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classObject- See Also:
Object.equals(java.lang.Object)
-
-