Package com.adobe.xmp.path
Class XMPPathSegment
- java.lang.Object
-
- com.adobe.xmp.path.XMPPathSegment
-
public class XMPPathSegment extends java.lang.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 class
XMPPathSegment.Type
Types of path segments
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XMPPathSegment
createArrayIndexSegment(java.lang.String namespace, int index)
Creates an array index path segment that denotes a specific element of an array.static XMPPathSegment
createPropertySegment(java.lang.String namespace, java.lang.String name)
Creates a normal property path segment.static XMPPathSegment
createQualifierSegment(java.lang.String namespace, java.lang.String name)
Creates a Qualifier path segment, which behaves like a normal propertystatic XMPPathSegment
createQualifierSelectorSegment(java.lang.String namespace, java.lang.String name, java.lang.String value)
Creates a path segment that selects a specific qualifier by its value.boolean
equals(java.lang.Object obj)
int
getIndex()
java.lang.String
getName()
java.lang.String
getNamespace()
XMPPathSegment.Type
getType()
java.lang.String
getValue()
int
hashCode()
-
-
-
Method Detail
-
createPropertySegment
public static XMPPathSegment createPropertySegment(java.lang.String namespace, java.lang.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(java.lang.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(java.lang.String namespace, java.lang.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(java.lang.String namespace, java.lang.String name, java.lang.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 java.lang.String getNamespace()
- Returns:
- the namespace
-
getName
public java.lang.String getName()
- Returns:
- the name
-
getType
public XMPPathSegment.Type getType()
- Returns:
- the type
-
getIndex
public int getIndex()
-
getValue
public java.lang.String getValue()
- Returns:
- the value
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
-