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

        public int getIndex()
      • getValue

        public String getValue()
        Returns:
        the value