|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.icl.saxon.jdom.NodeWrapper
A node in the XML parse tree representing an XML element, character content, or attribute.
This is the top class in the interface hierarchy for nodes; see NodeImpl for the implementation hierarchy.
Field Summary | |
protected DocumentWrapper |
docWrapper
|
protected int |
index
|
protected java.lang.Object |
node
|
protected short |
nodeType
|
protected NodeWrapper |
parent
|
Fields inherited from interface com.icl.saxon.om.NodeInfo |
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT |
Constructor Summary | |
NodeWrapper(java.lang.Object node,
NodeWrapper parent,
int index)
|
Method Summary | |
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
void |
copy(Outputter out)
Copy this node to a given outputter (deep copy) |
void |
copyStringValue(Outputter out)
Copy the string-value of this node to a given outputter |
java.lang.String |
generateId()
Get a character string that uniquely identifies this node. Note: a.isSameNode(b) if and only if generateId(a)==generateId(b) |
java.lang.String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
java.lang.String |
getAttributeValue(java.lang.String uri,
java.lang.String localName)
Find the value of a given attribute of this node. |
java.lang.String |
getBaseURI()
Get the Base URI for the node, that is, the URI used for resolving a relative URI contained in the node. |
java.lang.String |
getDisplayName()
Get the display name of this node. |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
AxisEnumeration |
getEnumeration(byte axisNumber,
NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node |
int |
getFingerprint()
Get fingerprint. |
int |
getLineNumber()
Get line number |
java.lang.String |
getLocalName()
Get the local part of the name of this node. |
int |
getNameCode()
Get name code. |
java.lang.Object |
getNode()
Get the underlying JDOM node |
short |
getNodeType()
Return the type of node. |
NodeInfo |
getParent()
Get the NodeInfo object representing the parent of this node |
java.lang.String |
getPrefix()
Get the prefix part of the name of this node. |
java.lang.String |
getStringValue()
Return the string value of the node. |
java.lang.String |
getSystemId()
Get the System ID for the node. |
java.lang.String |
getURI()
Get the URI part of the name of this node. |
boolean |
hasChildNodes()
Determine whether the node has any children. |
boolean |
isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another node. |
NodeWrapper |
makeWrapper(java.lang.Object node,
NodeWrapper parent,
int index)
|
void |
outputNamespaceNodes(Outputter out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
void |
setSystemId(java.lang.String uri)
Set the system identifier for this Source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object node
protected short nodeType
protected NodeWrapper parent
protected DocumentWrapper docWrapper
protected int index
Constructor Detail |
public NodeWrapper(java.lang.Object node, NodeWrapper parent, int index)
Method Detail |
public NodeWrapper makeWrapper(java.lang.Object node, NodeWrapper parent, int index)
public java.lang.Object getNode()
public short getNodeType()
getNodeType
in interface NodeInfo
public boolean isSameNodeInfo(NodeInfo other)
isSameNodeInfo
in interface NodeInfo
public java.lang.String getSystemId()
getSystemId
in interface NodeInfo
public void setSystemId(java.lang.String uri)
Source
The system identifier is optional if the source does not get its data from a URL, but it may still be useful to provide one. The application can use a system identifier, for example, to resolve relative URIs and to include in error messages and warnings.
setSystemId
in interface Source
uri
- The system identifier as a URL string.public java.lang.String getBaseURI()
getBaseURI
in interface NodeInfo
public int getLineNumber()
getLineNumber
in interface NodeInfo
public int compareOrder(NodeInfo other)
compareOrder
in interface NodeInfo
other
- The other node, whose position is to be compared with this node
public java.lang.String getStringValue()
getStringValue
in interface NodeInfo
public int getNameCode()
getNameCode
in interface NodeInfo
allocate
public int getFingerprint()
getFingerprint
in interface NodeInfo
public java.lang.String getLocalName()
getLocalName
in interface NodeInfo
public java.lang.String getPrefix()
getPrefix
in interface NodeInfo
public java.lang.String getURI()
getURI
in interface NodeInfo
public java.lang.String getDisplayName()
getDisplayName
in interface NodeInfo
public NodeInfo getParent()
getParent
in interface NodeInfo
public AxisEnumeration getEnumeration(byte axisNumber, NodeTest nodeTest)
getEnumeration
in interface NodeInfo
nodeTest
- the type(s) of node to be included, e.g. NodeInfo.ELEMENT, NodeInfo.TEXT.
The value NodeInfo.NODE means include any type of node.axisNumber
- the axis to be followed (a constant in class Axis
)
public java.lang.String getAttributeValue(java.lang.String uri, java.lang.String localName)
getAttributeValue
in interface NodeInfo
uri
- the namespace uri of an attribute ("" if no namespace)localName
- the local name of the attribute
public java.lang.String getAttributeValue(int fingerprint)
getAttributeValue
in interface NodeInfo
fingerprint
- The fingerprint of the attribute name
public DocumentInfo getDocumentRoot()
getDocumentRoot
in interface NodeInfo
public boolean hasChildNodes()
hasChildNodes
in interface NodeInfo
public java.lang.String generateId()
generateId
in interface NodeInfo
public void copy(Outputter out) throws TransformerException
copy
in interface NodeInfo
TransformerException
public void copyStringValue(Outputter out) throws TransformerException
copyStringValue
in interface NodeInfo
TransformerException
public void outputNamespaceNodes(Outputter out, boolean includeAncestors) throws TransformerException
outputNamespaceNodes
in interface NodeInfo
out
- The relevant outputterincludeAncestors
- True if namespaces declared on ancestor elements must
be output; false if it is known that these are already on the result tree
TransformerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |