|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.woden.xpointer.XPointer
public class XPointer
XPointer is a class which represents an XPointer defined in the XPointer Framework. This is specified at http://www.w3.org/TR/xptr-framework/
| Constructor Summary | |
|---|---|
XPointer()
Constructs a new XPointer. |
|
XPointer(java.lang.String xpointerString)
Constructs a new XPointer from the serialised string. |
|
| Method Summary | |
|---|---|
void |
addPointerPart(int index,
PointerPart pointerPart)
Inserts a pointer part at index of this XPointer. |
void |
addPointerPart(PointerPart pointerPart)
Appends a pointer part to the end of this XPointer. |
void |
addPrefixNamespaceBinding(NCName prefix,
java.lang.String namespace)
Adds a Prefix/Namespace binding to this XPointers contex. |
NCName |
getNamespaceBinding(java.lang.String namespace)
Gets Prefix the Namespace is bound to if the binding exists, otherwise it will return null. |
java.lang.Object[] |
getPointerParts()
Returns the pointer parts in this XPointer. |
java.lang.String |
getPrefixBinding(NCName prefix)
Gets the Namespace the Prefix is bound to if the binding exists, otherwise it will return null. |
NCName |
getShorthandPointer()
Returns the shorthandPointer in this XPointer. |
boolean |
hasNamespaceBinding(java.lang.String namespace)
Checks whether a namespace is bound or not. |
boolean |
hasPointerParts()
Tests whether this XPointer has scheme based pointers or not. |
boolean |
hasPrefixBinding(NCName prefix)
Checks whether a prefix is bound or not. |
boolean |
hasShorthandPointer()
Tests whether this XPointer has a shorthand pointer or not. |
void |
setShorthandPointer(NCName shorthandPointer)
Sets the Shorthand Pointer of this XPointer to the NCName given as an argument. |
java.lang.String |
toString()
Returns a String serialisation of this XPointer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XPointer()
public XPointer(java.lang.String xpointerString)
throws InvalidXPointerException
xpointerString - a String form of the XPointer to deserialise.
InvalidXPointerException| Method Detail |
|---|
public void addPointerPart(PointerPart pointerPart)
pointerPart - the Pointer Part to append.
UnsupportedOperationException() - if a Shorthand Pointer is already set.
public void addPointerPart(int index,
PointerPart pointerPart)
pointerPart - the Pointer Part to inserted.index - an integer specifying the point to insert the pointer part.
UnsupportedOperationException() - if a Shorthand Pointer is already set.public java.lang.Object[] getPointerParts()
java.lang.IllegalStateException - if this XPointer has a shorthand pointer.public void setShorthandPointer(NCName shorthandPointer)
shorthandPointer - an NCName of the Shorthand Pointer to set.
UnsupportedOperationException() - is a PointerPart Pointer is already set.public NCName getShorthandPointer()
java.lang.IllegalStateException - if this XPointer has a shorthand pointer.
public void addPrefixNamespaceBinding(NCName prefix,
java.lang.String namespace)
prefix - a NCName of the prefix too bind to the namespace.namespace - a String of the namespace to bind to the prefix.
java.lang.NullPointerException - if the prefix or namespace arguments are null.
java.lang.IllegalArgumentException - if the prefix or namespace are invalid as specified at http://www.w3.org/TR/xptr-framework/#nsContextpublic java.lang.String getPrefixBinding(NCName prefix)
prefix - a NCName of the prefix bound to the namespace.
public NCName getNamespaceBinding(java.lang.String namespace)
namespace - a String of the prefix bound to the prefix.
public boolean hasPrefixBinding(NCName prefix)
prefix - A NCName of the prefix to check.
public boolean hasNamespaceBinding(java.lang.String namespace)
namespace - A String of the namespace to check.
public boolean hasShorthandPointer()
public boolean hasPointerParts()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||