Class 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.
    • 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 property
        name - 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 property
        index - 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 property
        name - 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 property
        name - Local name of the property
        value - 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
      • getIndex

        public int getIndex()
      • getValue

        public java.lang.String getValue()
        Returns:
        the value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)