public class ElementPointerPart extends Object implements PointerPart
Constructor and Description |
---|
ElementPointerPart(List childSequence)
Constructs an ElementPointerPart with only a childSequence.
|
ElementPointerPart(NCName elementID)
Constructs an ElementPointerPart with only an elementID NCName.
|
ElementPointerPart(NCName elementID,
List childSequence)
Constructs an ElementPointerPart with both an NCName and a childSequence.
|
Modifier and Type | Method and Description |
---|---|
Integer[] |
getChildSequence()
Returns the child sequence of this Element PointerPart.
|
NCName |
getNCName()
Returns the NCName for this Element PointerPart.
|
boolean |
hasChildSequence()
Checks if this Element PointerPart has a childSequence or not.
|
boolean |
hasNCName()
Checks if this Element PointerPart has a NCName or not.
|
static ElementPointerPart |
parseFromString(String schemeData)
Deserialises the schemaData for an ElementPointerPart and constructs a new ElementPointerPart from it.
|
String |
toString()
Returns a String serialisation of this xpointer PointerPart.
|
public ElementPointerPart(NCName elementID)
elementID
- an NCName of the elementID to reference.NullPointerException
- is a null elementID is given.public ElementPointerPart(List childSequence)
childSequence
- a List of Integers representing the child sequence.NullPointerException
- if childSequence is null.IllegalArgumentException
- if childSequence is empty or contains elements other than Integers.public ElementPointerPart(NCName elementID, List childSequence)
elementID
- an NCName of the elementID to reference.childSequence
- a List of Integers representing the child sequence.NullPointerException
- if elementID or childSequence are null.IllegalArgumentException
- if childSequence is empty or contains elements other than Integers.public NCName getNCName()
public Integer[] getChildSequence()
public boolean hasNCName()
public boolean hasChildSequence()
public String toString()
PointerPart
toString
in interface PointerPart
toString
in class Object
public static ElementPointerPart parseFromString(String schemeData) throws InvalidXPointerException
schemeData
- a String of the schemeaData parsed from the string XPointer.IllegalArgumentException
- if the schemeData has invalid scheme syntax.InvalidXPointerException
Copyright © 2005-2013 Apache Software Foundation. All Rights Reserved.