|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.om.AbstractNode
net.sf.saxon.tinytree.TinyNodeImpl
net.sf.saxon.tinytree.TinyParentNodeImpl
net.sf.saxon.tinytree.TinyDocumentImpl
public final class TinyDocumentImpl
A node in the XML parse tree representing the Document itself (or equivalently, the root node of the Document).
Field Summary | |
---|---|
protected int[] |
alpha
|
protected int[] |
attCode
|
protected int[] |
attParent
|
protected CharSequence[] |
attValue
|
protected int[] |
beta
|
protected char[] |
charBuffer
|
protected int |
charBufferLength
|
protected StringBuffer |
commentBuffer
|
protected short[] |
depth
|
protected int[] |
nameCode
|
protected int[] |
namespaceCode
|
protected int[] |
namespaceParent
|
protected int[] |
next
|
protected byte[] |
nodeKind
|
protected int |
numberOfAttributes
|
protected int |
numberOfNamespaces
|
protected int |
numberOfNodes
|
protected int[] |
prior
|
protected int |
rootNode
|
Fields inherited from class net.sf.saxon.tinytree.TinyNodeImpl |
---|
document, nodeNr, parent |
Fields inherited from class net.sf.saxon.om.AbstractNode |
---|
NODE_LETTER |
Fields inherited from interface net.sf.saxon.om.NodeInfo |
---|
ALL_NAMESPACES, LOCAL_NAMESPACES, NO_NAMESPACES |
Constructor Summary | |
---|---|
TinyDocumentImpl()
|
|
TinyDocumentImpl(int nodes,
int attributes,
int namespaces,
int characters)
|
Method Summary | |
---|---|
protected void |
addAttribute(int parent0,
int code0,
int type0,
CharSequence value0)
|
protected void |
addNamespace(int parent,
int nscode)
|
protected int |
addNode(short kind,
int depth0,
int alpha0,
int beta0,
int nameCode0)
Add a node to the document |
protected void |
appendChars(CharSequence chars)
|
void |
condense()
Condense the tree: release unused memory. |
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations)
Copy this node to a given outputter |
void |
diagnosticDump()
Produce diagnostic print of main tree arrays |
protected void |
ensureAttributeCapacity()
|
protected void |
ensureNamespaceCapacity()
|
protected void |
ensureNodeCapacity()
|
protected void |
ensurePriorIndex()
On demand, make an index for quick access to preceding-sibling nodes |
String |
generateId()
Get a character string that uniquely identifies this node |
protected AxisIterator |
getAllElements(int fingerprint)
Get a list of all elements with a given name. |
protected int |
getAttributeAnnotation(int nr)
Get the type annotation of an attribute node. |
protected TinyAttributeImpl |
getAttributeNode(int nr)
Make a (transient) attribute node from the array of attributes |
String |
getBaseURI()
Get the base URI of this root node. |
int |
getDocumentNumber()
Get the unique document number |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
protected int |
getElementAnnotation(int nodeNr)
Get the type annotation of an element node. |
int |
getLineNumber()
Get the line number of this root node. |
protected int |
getLineNumber(int sequence)
Get the line number for an element. |
NamePool |
getNamePool()
Get the name pool used for the names in this document |
protected TinyNamespaceImpl |
getNamespaceNode(int nr)
Make a (transient) namespace node from the array of namespace declarations |
TinyNodeImpl |
getNode(int nr)
|
int |
getNodeKind()
Return the type of node. |
NodeInfo |
getParent()
Find the parent node of this node. |
NodeInfo |
getRoot()
Get the root node |
long |
getSequenceNumber()
Get the node sequence number (in document order). |
String |
getSystemId()
Get the system id of this root node |
protected String |
getSystemId(int seq)
Get the system id of an element in the document |
String[] |
getUnparsedEntity(String name)
Get the unparsed entity with a given nameID if there is one, or null if not. |
protected UntypedAtomicValue |
getUntypedAtomicValue(int nodeNr)
Get the typed value of a node. |
protected boolean |
isUsingNamespaces()
determine whether this document uses namespaces |
NodeInfo |
selectID(String id)
Get the element with a given ID. |
protected void |
setElementAnnotation(int nodeNr,
int typeCode)
Set the type annotation of an element node |
protected void |
setLineNumber(int sequence,
int line)
Set the line number for an element. |
void |
setLineNumbering()
Set line numbering on |
void |
setNamePool(NamePool pool)
Set the name pool used for all names in this document |
void |
setRootNode(NodeInfo root)
Set the root node. |
protected void |
setSystemId(int seq,
String uri)
Set the system id of an element in the document |
void |
setSystemId(String uri)
Set the system id of this node |
protected void |
setUnparsedEntity(String name,
String uri,
String publicId)
Set an unparsed entity URI associated with this document. |
void |
showSize()
|
Methods inherited from class net.sf.saxon.tinytree.TinyParentNodeImpl |
---|
getStringValue, hasChildNodes |
Methods inherited from class net.sf.saxon.tinytree.TinyNodeImpl |
---|
compareOrder, getAttributeValue, getDisplayName, getFingerprint, getLocalPart, getNameCode, getOriginatingNode, getPrefix, getURI, hasAttributes, isSameNode, iterateAxis, iterateAxis, outputNamespaceNodes, setParentNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.saxon.om.NodeInfo |
---|
compareOrder, getAttributeValue, getDisplayName, getFingerprint, getLocalPart, getNameCode, getStringValue, getTypeAnnotation, getURI, hasChildNodes, isSameNode, iterateAxis, iterateAxis, outputNamespaceNodes |
Methods inherited from interface net.sf.saxon.om.Item |
---|
getTypedValue |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Field Detail |
---|
protected int rootNode
protected char[] charBuffer
protected int charBufferLength
protected StringBuffer commentBuffer
protected int numberOfNodes
protected byte[] nodeKind
protected short[] depth
protected int[] next
protected int[] alpha
protected int[] beta
protected int[] nameCode
protected int[] prior
protected int numberOfAttributes
protected int[] attParent
protected int[] attCode
protected CharSequence[] attValue
protected int numberOfNamespaces
protected int[] namespaceParent
protected int[] namespaceCode
Constructor Detail |
---|
public TinyDocumentImpl()
public TinyDocumentImpl(int nodes, int attributes, int namespaces, int characters)
Method Detail |
---|
public void setNamePool(NamePool pool)
setNamePool
in interface DocumentInfo
pool
- The name pool to be usedpublic NamePool getNamePool()
getNamePool
in interface DocumentInfo
getNamePool
in interface NodeInfo
getNamePool
in class TinyNodeImpl
public int getDocumentNumber()
getDocumentNumber
in interface DocumentInfo
getDocumentNumber
in interface NodeInfo
getDocumentNumber
in class TinyNodeImpl
protected void ensureNodeCapacity()
protected void ensureAttributeCapacity()
protected void ensureNamespaceCapacity()
public void setRootNode(NodeInfo root)
protected int addNode(short kind, int depth0, int alpha0, int beta0, int nameCode0)
kind
- The kind of the nodedepth0
- The depth in the treealpha0
- Pointer to attributes or textbeta0
- Pointer to namespaces or textnameCode0
- The name of the node
protected void appendChars(CharSequence chars)
public void condense()
protected void setElementAnnotation(int nodeNr, int typeCode)
protected int getElementAnnotation(int nodeNr)
protected void ensurePriorIndex()
protected void addAttribute(int parent0, int code0, int type0, CharSequence value0)
protected void addNamespace(int parent, int nscode)
public TinyNodeImpl getNode(int nr)
protected UntypedAtomicValue getUntypedAtomicValue(int nodeNr)
public long getSequenceNumber()
getSequenceNumber
in class TinyNodeImpl
protected TinyAttributeImpl getAttributeNode(int nr)
protected int getAttributeAnnotation(int nr)
protected boolean isUsingNamespaces()
protected TinyNamespaceImpl getNamespaceNode(int nr)
public void setSystemId(String uri)
setSystemId
in interface Source
setSystemId
in class TinyNodeImpl
public String getSystemId()
getSystemId
in interface Source
getSystemId
in interface SourceLocator
getSystemId
in interface NodeInfo
getSystemId
in class TinyNodeImpl
public String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in interface Node
getBaseURI
in class TinyNodeImpl
protected void setSystemId(int seq, String uri)
protected String getSystemId(int seq)
public void setLineNumbering()
protected void setLineNumber(int sequence, int line)
protected int getLineNumber(int sequence)
public int getLineNumber()
getLineNumber
in interface SourceLocator
getLineNumber
in interface NodeInfo
getLineNumber
in class TinyNodeImpl
public final int getNodeKind()
getNodeKind
in interface NodeInfo
Type
public NodeInfo getParent()
getParent
in interface NodeInfo
getParent
in class TinyNodeImpl
public NodeInfo getRoot()
getRoot
in interface NodeInfo
getRoot
in class TinyNodeImpl
public DocumentInfo getDocumentRoot()
getDocumentRoot
in interface NodeInfo
getDocumentRoot
in class TinyNodeImpl
public String generateId()
generateId
in interface NodeInfo
generateId
in class TinyNodeImpl
protected AxisIterator getAllElements(int fingerprint)
public NodeInfo selectID(String id)
selectID
in interface DocumentInfo
id
- The unique ID of the required element, previously registered using registerID()
protected void setUnparsedEntity(String name, String uri, String publicId)
public String[] getUnparsedEntity(String name)
getUnparsedEntity
in interface DocumentInfo
name
- the name of the entity
public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations) throws TransformerException
copy
in interface NodeInfo
out
- the Receiver to which the node should be copiedwhichNamespaces
- in the case of an element, controls
which namespace nodes should be copied. Values are NO_NAMESPACES,
LOCAL_NAMESPACES, ALL_NAMESPACEScopyAnnotations
- indicates whether the type annotations
of element and attribute nodes should be copied
TransformerException
public void diagnosticDump()
public void showSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |