AXIOM_TREE, baseURI, config, currentRoot, DOMINO_TREE, JDOM_TREE, JDOM2_TREE, lineNumbering, LINKED_TREE, MUTABLE_LINKED_TREE, namePool, open, pipe, started, systemId, timing, TINY_TREE, TINY_TREE_CONDENSED, uniformBaseURI, UNSPECIFIED_TREE_MODEL, useEventLocation| Constructor and Description |
|---|
LinkedTreeBuilder(PipelineConfiguration pipe)
Create a Builder and initialise variables
|
LinkedTreeBuilder(PipelineConfiguration pipe,
boolean mutable)
Create a Builder and initialise variables
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(java.lang.CharSequence chars,
Location locationId,
int properties)
Notify a text node.
|
void |
close()
Close the stream of Receiver events
|
void |
comment(java.lang.CharSequence chars,
Location locationId,
int properties)
Notify a comment
|
void |
endDocument()
Notify the end of the document
|
void |
endElement()
Notify the end of an element
|
BuilderMonitor |
getBuilderMonitor()
Get a builder monitor for this builder.
|
NodeImpl |
getCurrentLeafNode()
Get the current text, comment, or processing instruction node
|
ParentNodeImpl |
getCurrentParentNode()
Get the current document or element node
|
NodeInfo |
getCurrentRoot()
Get the current root node.
|
void |
graftElement(ElementImpl element)
graftElement() allows an element node to be transferred from one tree to another.
|
void |
open()
Open the stream of Receiver events
|
void |
processingInstruction(java.lang.String name,
java.lang.CharSequence remainder,
Location locationId,
int properties)
Notify a processing instruction
|
void |
reset()
Reset the builder to its initial state.
|
void |
setAllocateSequenceNumbers(boolean allocate)
Set whether the builder should allocate sequence numbers to elements as they are added to the
tree.
|
void |
setNodeFactory(NodeFactory factory)
Set the Node Factory to use.
|
void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
Set an unparsed entity URI for the document
|
void |
startDocument(int properties)
Start of a document node.
|
void |
startElement(NodeName elemName,
SchemaType type,
AttributeMap suppliedAttributes,
NamespaceMap namespaces,
Location location,
int properties)
Notify the start of an element
|
getBaseURI, getConfiguration, getPipelineConfiguration, getSystemId, isTiming, isUseEventLocation, setBaseURI, setLineNumbering, setPipelineConfiguration, setSystemId, setTiming, setUseEventLocation, usesTypeAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappend, append, handlesAppendpublic LinkedTreeBuilder(PipelineConfiguration pipe)
pipe - the pipeline configurationpublic LinkedTreeBuilder(PipelineConfiguration pipe, boolean mutable)
pipe - the pipeline configurationmutable - set to true if the tree is to be mutablepublic NodeInfo getCurrentRoot()
getCurrentRoot in class Builderpublic void reset()
Builderpublic void setAllocateSequenceNumbers(boolean allocate)
allocate - true if sequence numbers are to be allocatedpublic void setNodeFactory(NodeFactory factory)
factory - the node factory to be used. This allows custom objects to be used to represent
the elements in the tree.public void open()
public void startDocument(int properties)
throws XPathException
properties - properties of the document nodeXPathException - if an error occurspublic void endDocument()
throws XPathException
XPathException - if an error occurspublic void close()
throws XPathException
close in interface Receiverclose in class BuilderXPathException - if an error occurspublic void startElement(NodeName elemName, SchemaType type, AttributeMap suppliedAttributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
elemName - the name of the element.type - the type annotation of the element.suppliedAttributes - the attributes of this elementnamespaces - the in-scope namespaces of this element: generally this is all the in-scope
namespaces, without relying on inheriting namespaces from parent elementslocation - an object providing information about the module, line, and column where the node originatedproperties - bit-significant properties of the element node. If there are no relevant
properties, zero is supplied. The definitions of the bits are in class ReceiverOptionXPathException - if an error occurspublic void endElement()
throws XPathException
XPathException - if an error occurspublic void characters(java.lang.CharSequence chars,
Location locationId,
int properties)
throws XPathException
chars - The characterslocationId - provides information such as line number and system ID.properties - Bit significant value. The following bits are defined:
XPathException - if an error occurspublic void processingInstruction(java.lang.String name,
java.lang.CharSequence remainder,
Location locationId,
int properties)
name - The PI name. This must be a legal name (it will not be checked).remainder - The data portion of the processing instructionlocationId - provides information such as line number and system ID.properties - Additional information about the PI.public void comment(java.lang.CharSequence chars,
Location locationId,
int properties)
throws XPathException
chars - The content of the commentlocationId - provides information such as line number and system ID.properties - Additional information about the comment.XPathException - if an error occurspublic ParentNodeImpl getCurrentParentNode()
public NodeImpl getCurrentLeafNode()
public void graftElement(ElementImpl element)
element - the element to be grafted in as a new child.public void setUnparsedEntity(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
name - The name of the unparsed entityuri - The system identifier of the unparsed entitypublicId - The identifier of the unparsed entitypublic BuilderMonitor getBuilderMonitor()
getBuilderMonitor in class BuilderCopyright (c) 2004-2021 Saxonica Limited. All rights reserved.