Namespace is a Flyweight Namespace that can be shared amongst
nodes.
| Modifier and Type | Field and Description |
|---|---|
| protected static final NamespaceCache | CACHE
Cache of Namespace instances |
| private int | hashCode
A cached version of the hashcode for efficiency |
| public static final Namespace | NO_NAMESPACE
No Namespace present |
| private String | prefix
The prefix mapped to this namespace |
| private String | uri
The URI for this namespace |
| public static final Namespace | XML_NAMESPACE
XML Namespace |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Visitor
is the visitor in the Visitor Pattern visitor)Implements org.
|
| public String | |
| protected int | Returns: DOCUMENT ME!Factory method to create the hashcode allowing derived classes to change the behaviour |
| protected Node | |
| public boolean | Returns: DOCUMENT ME!DOCUMENT ME! object)Overrides java. |
| public static Namespace | |
| public static Namespace | |
| public short | getNodeType()
Overrides org. Implements org. |
| public String | getPath(Element
is the parent context from which the relative path should
start. If the context is null or the context is not an
ancestor of this node then the path will be absolute and start
from the document and so begin with the '/' character. context)Implements org. |
| public String | |
| public String | getStringValue()
Overrides org. Implements org. |
| public String | getText()
Overrides org. Implements org. Returns the text of this node. |
| public String | getUniquePath(Element
is the parent context from which the path should start. If the
context is null or the context is not an ancestor of this node
then the path will start from the document and so begin with
the '/' character. context)Implements org. Returns the relative unique XPath expression from the given context which will return a nodeset of one node which is the current node. |
| public String | |
| public String | |
| public int | Returns: the hash code based on the qualified name and the URI of the namespace.Overrides java. |
| public String |
| CACHE | back to summary |
|---|---|
| protected static final NamespaceCache CACHE Cache of Namespace instances | |
| hashCode | back to summary |
|---|---|
| private int hashCode A cached version of the hashcode for efficiency | |
| NO_NAMESPACE | back to summary |
|---|---|
| public static final Namespace NO_NAMESPACE No Namespace present | |
| prefix | back to summary |
|---|---|
| private String prefix The prefix mapped to this namespace | |
| uri | back to summary |
|---|---|
| private String uri The URI for this namespace | |
| XML_NAMESPACE | back to summary |
|---|---|
| public static final Namespace XML_NAMESPACE XML Namespace | |
| Namespace | back to summary |
|---|---|
| public Namespace(String prefix, String uri) DOCUMENT ME! | |
| accept | back to summary |
|---|---|
| public void accept(Visitor visitor) Implements org. Doc from org.
| |
| asXML | back to summary |
|---|---|
| public String asXML() Implements org. Doc from org.
| |
| createHashCode | back to summary |
|---|---|
| protected int createHashCode() Factory method to create the hashcode allowing derived classes to change the behaviour
| |
| createXPathResult | back to summary |
|---|---|
| protected Node createXPathResult(Element parent) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Checks whether this Namespace equals the given Namespace. Two Namespaces are equals if their URI and prefix are equal.
| |
| get | back to summary |
|---|---|
| public static Namespace get(String prefix, String uri) A helper method to return the Namespace instance for the given prefix and URI | |
| get | back to summary |
|---|---|
| public static Namespace get(String uri) A helper method to return the Namespace instance for no prefix and the URI | |
| getNodeType | back to summary |
|---|---|
| public short getNodeType() Overrides org. Implements org. Doc from org. Returns the code according to the type of node. This makes processing nodes polymorphically much easier as the switch statement can be used instead of multiple if (instanceof) statements.
| |
| getPath | back to summary |
|---|---|
| public String getPath(Element context) Implements org. Doc from org. Returns the relative XPath expression which will return a node set containing the given node such as a/b/@c. No indexing will be used to restrict the path if multiple elements with the same name occur on the path.
| |
| getPrefix | back to summary |
|---|---|
| public String getPrefix() DOCUMENT ME!
| |
| getStringValue | back to summary |
|---|---|
| public String getStringValue() Overrides org. Implements org. Doc from org. Returns the XPath string-value of this node. The behaviour of this method is defined in the XPath specification .
| |
| getText | back to summary |
|---|---|
| public String getText() Overrides org. Implements org. Doc from org. Returns the text of this node.
| |
| getUniquePath | back to summary |
|---|---|
| public String getUniquePath(Element context) Implements org. Doc from org. Returns the relative unique XPath expression from the given context which will return a nodeset of one node which is the current node. This method will use the XPath index operator to restrict the path if multiple elements with the same name occur on the path.
| |
| getURI | back to summary |
|---|---|
| public String getURI() DOCUMENT ME!
| |
| getXPathNameStep | back to summary |
|---|---|
| public String getXPathNameStep() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. DOCUMENT ME!
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |