|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xalan.xsltc.dom.DOMImpl
Constructor Summary | |
DOMImpl()
Constructor - defaults to 32K nodes |
|
DOMImpl(int size)
Constructor - defines initial size |
Method Summary | |
void |
characters(int textNode,
TransletOutputHandler handler)
Copy the contents of a text-node to an output handler |
void |
copy(int node,
TransletOutputHandler handler)
Performs a deep copy (ref. |
void |
copy(NodeIterator nodes,
TransletOutputHandler handler)
Copy a node-set to an output handler |
void |
copy(TransletOutputHandler handler)
Copy the whole tree to an output handler |
int |
getAttributeNode(int type,
int element)
Returns the attribute node of a given type (if any) for an element |
int |
getAttributePosition(int attr)
|
java.lang.String |
getAttributeValue(int type,
int element)
Returns the value of a given attribute type of a given element |
java.lang.String |
getAttributeValue(java.lang.String name,
int element)
This method is for testing/debugging only |
NodeIterator |
getAxisIterator(int axis)
This is a shortcut to the iterators that implement the supported XPath axes (only namespace::) is not supported. |
DOMBuilder |
getBuilder()
Returns an instance of the DOMBuilder inner class This class will consume the input document through a SAX2 interface and populate the tree. |
NodeIterator |
getChildren(int node)
Returns an iterator with all the children of a given node |
java.lang.String |
getDocumentURI()
Returns the origin of the document from which the tree was built |
java.lang.String |
getDocumentURI(int node)
|
int |
getElementPosition(int node)
|
java.lang.String |
getElementValue(int element)
Returns the string value of any element |
int |
getGeneralizedType(java.lang.String name)
Returns the internal type associated with an expaneded QName |
NodeIterator |
getIterator()
Returns singleton iterator containg the document root Works for them main document (mark == 0) |
java.lang.String |
getLanguage(int node)
Returns a node' defined language for a node (if any) |
short[] |
getMapping(java.lang.String[] names)
Get mapping from DOM element/attribute types to external types |
NodeIterator |
getNamespaceAxisIterator(int axis,
int ns)
Do not thing that this returns an iterator for the namespace axis. |
short[] |
getNamespaceMapping(java.lang.String[] namespaces)
Get mapping from DOM namespace types to external namespace types |
java.lang.String |
getNamespaceName(int node)
Returns the namespace URI to which a node belongs |
int |
getNamespaceType(int node)
Returns the namespace type of a specific node |
java.lang.String |
getNodeName(int node)
Returns the name of a node (attribute or element). |
java.lang.String |
getNodeValue(int node)
Returns the (String) value of any node in the tree |
NodeIterator |
getNodeValueIterator(NodeIterator iterator,
int type,
java.lang.String value,
boolean op)
|
NodeIterator |
getNthDescendant(int type,
int n,
boolean includeself)
Returns the nth descendant of a node |
TransletOutputHandler |
getOutputDomBuilder()
Returns a DOMBuilder class wrapped in a SAX adapter. |
int |
getParent(int node)
Returns the parent of a node |
short[] |
getReverseMapping(java.lang.String[] names)
Get mapping from external element/attribute types to DOM types |
short[] |
getReverseNamespaceMapping(java.lang.String[] namespaces)
Get mapping from external namespace types to DOM namespace types |
int |
getSize()
Returns the number of nodes in the tree (used for indexing) |
java.lang.String |
getStringValue()
Returns the string value of the entire tree |
java.lang.String |
getTreeString()
|
int |
getType(int node)
Returns the type of a specific node |
short[] |
getTypeArray()
Returns the node-to-type mapping array |
NodeIterator |
getTypedAxisIterator(int axis,
int type)
Similar to getAxisIterator, but this one returns an iterator containing nodes of a typed axis (ex.: child::foo) |
NodeIterator |
getTypedChildren(int type)
Returns an iterator with all children of a specific type for a given node (element) |
NodeIterator |
getTypedDescendantIterator(int type)
Returns an iterator with all descendants of a node that are of a given type. |
int |
getTypedLast(int type,
int node)
Returns an iterator's last node of a given type |
int |
getTypedPosition(int type,
int node)
Returns a node's position amongst other nodes of the same type |
Filter |
getTypeFilter(int type)
Returns a node type filter (implementation of Filter) |
boolean |
hasAttribute(int type,
int node)
Returns true if a given element has an attribute of a given type |
boolean |
isAttribute(int node)
Returns 'true' if a specific node is an element (of any type) |
boolean |
isElement(int node)
Returns 'true' if a specific node is an element (of any type) |
boolean |
lessThan(int node1,
int node2)
Returns true if node1 comes before node2 in document order |
Node |
makeNode(int index)
Create an org.w3c.dom.Node from a node in the tree |
Node |
makeNode(NodeIterator iter)
Create an org.w3c.dom.Node from a node in an iterator The iterator most be started before this method is called |
NodeList |
makeNodeList(int index)
Create an org.w3c.dom.NodeList from a node in the tree |
NodeList |
makeNodeList(NodeIterator iter)
Create an org.w3c.dom.NodeList from a node iterator The iterator most be started before this method is called |
NodeIterator |
orderNodes(NodeIterator source,
int node)
Encapsulates an iterator in an OrderedIterator to ensure node order |
void |
print(int node,
int level)
Prints the whole tree to standard output |
void |
readExternal(java.io.ObjectInput in)
Read the whole tree from a file (serialized) |
void |
setDocumentURI(java.lang.String uri)
Define the origin of the document from which the tree was built |
void |
setFilter(StripFilter filter)
Part of the DOM interface - no function here. |
void |
setupMapping(java.lang.String[] names,
java.lang.String[] namespaces)
|
java.lang.String |
shallowCopy(int node,
TransletOutputHandler handler)
Performs a shallow copy (ref. |
NodeIterator |
strippingIterator(NodeIterator iterator,
short[] mapping,
StripFilter filter)
|
void |
writeExternal(java.io.ObjectOutput out)
Dump the whole tree to a file (serialized) |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DOMImpl()
public DOMImpl(int size)
Method Detail |
public void setDocumentURI(java.lang.String uri)
public java.lang.String getDocumentURI()
public java.lang.String getDocumentURI(int node)
public void setupMapping(java.lang.String[] names, java.lang.String[] namespaces)
public boolean isElement(int node)
public boolean isAttribute(int node)
public int getSize()
public void setFilter(StripFilter filter)
public boolean lessThan(int node1, int node2)
public Node makeNode(int index)
public Node makeNode(NodeIterator iter)
public NodeList makeNodeList(int index)
public NodeList makeNodeList(NodeIterator iter)
public Filter getTypeFilter(int type)
public NodeIterator strippingIterator(NodeIterator iterator, short[] mapping, StripFilter filter)
public NodeIterator getNodeValueIterator(NodeIterator iterator, int type, java.lang.String value, boolean op)
public NodeIterator orderNodes(NodeIterator source, int node)
public int getParent(int node)
public int getElementPosition(int node)
public int getAttributePosition(int attr)
public int getTypedPosition(int type, int node)
public int getTypedLast(int type, int node)
public NodeIterator getIterator()
public int getType(int node)
public int getNamespaceType(int node)
public short[] getTypeArray()
public java.lang.String getNodeValue(int node)
public int getGeneralizedType(java.lang.String name)
public short[] getMapping(java.lang.String[] names)
public short[] getReverseMapping(java.lang.String[] names)
public short[] getNamespaceMapping(java.lang.String[] namespaces)
public short[] getReverseNamespaceMapping(java.lang.String[] namespaces)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
public void print(int node, int level)
public java.lang.String getNodeName(int node)
public java.lang.String getNamespaceName(int node)
public int getAttributeNode(int type, int element)
public java.lang.String getAttributeValue(int type, int element)
public boolean hasAttribute(int type, int node)
public java.lang.String getAttributeValue(java.lang.String name, int element)
public NodeIterator getChildren(int node)
public NodeIterator getTypedChildren(int type)
public NodeIterator getAxisIterator(int axis)
public NodeIterator getTypedAxisIterator(int axis, int type)
public NodeIterator getNamespaceAxisIterator(int axis, int ns)
public NodeIterator getTypedDescendantIterator(int type)
public NodeIterator getNthDescendant(int type, int n, boolean includeself)
public void characters(int textNode, TransletOutputHandler handler) throws TransletException
public void copy(NodeIterator nodes, TransletOutputHandler handler) throws TransletException
public void copy(TransletOutputHandler handler) throws TransletException
public void copy(int node, TransletOutputHandler handler) throws TransletException
public java.lang.String shallowCopy(int node, TransletOutputHandler handler) throws TransletException
public java.lang.String getStringValue()
public java.lang.String getElementValue(int element)
public java.lang.String getTreeString()
public java.lang.String getLanguage(int node)
public DOMBuilder getBuilder()
public TransletOutputHandler getOutputDomBuilder()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |