public class XMPPath extends Object implements List<XMPPathSegment>
XMPPath is a Class that provides an easy iterative description of a specific path into the XMP tree.
Each XMPPathSegment represents one segment of the path into the XMP tree.| Modifier and Type | Class and Description |
|---|---|
static class |
XMPPath.Compare |
| Constructor and Description |
|---|
XMPPath()
Creates an empty
XMPPath object |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
XMPPathSegment element) |
boolean |
add(XMPPathSegment e) |
boolean |
addAll(Collection<? extends XMPPathSegment> c) |
boolean |
addAll(int index,
Collection<? extends XMPPathSegment> c) |
void |
clear() |
XMPPath.Compare |
compare(XMPPath path)
Compares the provided path with this path.
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object obj) |
XMPPathSegment |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<XMPPathSegment> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<XMPPathSegment> |
listIterator() |
ListIterator<XMPPathSegment> |
listIterator(int index) |
static XMPPath |
parse(String path,
Map<String,String> prefixContract)
Creates an
XMPPath object by parsing an XMP path String and creates one path segment
for each detected segment in the path. |
XMPPathSegment |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
String |
serialize()
Serializes the
XMPPath object to a String representation. |
String |
serialize(Map<String,String> prefixContract)
Serializes the
XMPPath object to a String representation. |
XMPPathSegment |
set(int index,
XMPPathSegment element) |
int |
size() |
List<XMPPathSegment> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
getClass, notify, notifyAll, toString, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streampublic static XMPPath parse(String path, Map<String,String> prefixContract) throws XMPPathParserException
XMPPath object by parsing an XMP path String and creates one path segment
for each detected segment in the path.path - Path string to parseprefixContract - A Map that contains the mapping between Namespaces and their prefixes.
This must be provided to interpret the path correctly. The key must be the prefix and the value the namespace!XMPPathParserException - If the path has an invalid format or a prefix is found that is not defined in the prefixContractpublic String serialize()
XMPPath object to a String representation.
This will produce a long form of the path using the full namespace strings.XMPPathpublic String serialize(Map<String,String> prefixContract)
XMPPath object to a String representation.
This produces a short form of the path using the prefixes provided by the contract.prefixContract - A Map that contains the mapping between Namespaces and their prefixes.
The key must be the prefix and the value the namespace!XMPPathpublic int size()
size in interface Collection<XMPPathSegment>size in interface List<XMPPathSegment>public boolean isEmpty()
isEmpty in interface Collection<XMPPathSegment>isEmpty in interface List<XMPPathSegment>public boolean contains(Object o)
contains in interface Collection<XMPPathSegment>contains in interface List<XMPPathSegment>public Iterator<XMPPathSegment> iterator()
iterator in interface Iterable<XMPPathSegment>iterator in interface Collection<XMPPathSegment>iterator in interface List<XMPPathSegment>public Object[] toArray()
toArray in interface Collection<XMPPathSegment>toArray in interface List<XMPPathSegment>public <T> T[] toArray(T[] a)
toArray in interface Collection<XMPPathSegment>toArray in interface List<XMPPathSegment>public boolean add(XMPPathSegment e)
add in interface Collection<XMPPathSegment>add in interface List<XMPPathSegment>public boolean remove(Object o)
remove in interface Collection<XMPPathSegment>remove in interface List<XMPPathSegment>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<XMPPathSegment>containsAll in interface List<XMPPathSegment>public boolean addAll(Collection<? extends XMPPathSegment> c)
addAll in interface Collection<XMPPathSegment>addAll in interface List<XMPPathSegment>public boolean addAll(int index,
Collection<? extends XMPPathSegment> c)
addAll in interface List<XMPPathSegment>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<XMPPathSegment>removeAll in interface List<XMPPathSegment>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<XMPPathSegment>retainAll in interface List<XMPPathSegment>public void clear()
clear in interface Collection<XMPPathSegment>clear in interface List<XMPPathSegment>public XMPPathSegment get(int index)
get in interface List<XMPPathSegment>public XMPPathSegment set(int index, XMPPathSegment element)
set in interface List<XMPPathSegment>public void add(int index,
XMPPathSegment element)
add in interface List<XMPPathSegment>public XMPPathSegment remove(int index)
remove in interface List<XMPPathSegment>public int indexOf(Object o)
indexOf in interface List<XMPPathSegment>public int lastIndexOf(Object o)
lastIndexOf in interface List<XMPPathSegment>public ListIterator<XMPPathSegment> listIterator()
listIterator in interface List<XMPPathSegment>public ListIterator<XMPPathSegment> listIterator(int index)
listIterator in interface List<XMPPathSegment>public List<XMPPathSegment> subList(int fromIndex, int toIndex)
subList in interface List<XMPPathSegment>public XMPPath.Compare compare(XMPPath path)
path - the path to compare withIllegalArgumentException - If path is nullpublic int hashCode()
hashCode in interface Collection<XMPPathSegment>hashCode in interface List<XMPPathSegment>hashCode in class Objectpublic boolean equals(Object obj)
equals in interface Collection<XMPPathSegment>equals in interface List<XMPPathSegment>equals in class ObjectCopyright © 2010 - 2020 Adobe. All Rights Reserved