public class TinyBuilder extends Builder
AXIOM_TREE, baseURI, config, currentRoot, DOMINO_TREE, JDOM_TREE, JDOM2_TREE, lineNumbering, LINKED_TREE, MUTABLE_LINKED_TREE, namePool, opened, pipe, started, systemId, timing, TINY_TREE, TINY_TREE_CONDENSED, uniformBaseURI, UNSPECIFIED_TREE_MODEL, useEventLocation
Constructor and Description |
---|
TinyBuilder(PipelineConfiguration pipe)
Create a TinyTree builder
|
Modifier and Type | Method and Description |
---|---|
void |
characters(UnicodeString chars,
Location locationId,
int properties)
Notify a text node
|
void |
close()
Notify the end of the event stream
|
void |
comment(UnicodeString chars,
Location locationId,
int properties)
Callback interface for SAX: not for application use
|
void |
endDocument()
Callback interface for SAX: not for application use
|
void |
endElement()
Notify the end of an element node
|
protected java.lang.String |
getAttValue(AttributeInfo att) |
BuilderMonitor |
getBuilderMonitor()
Get a builder monitor for this builder.
|
int |
getCurrentDepth()
Get the current depth in the tree
|
TinyNodeImpl |
getLastCompletedElement()
Get the last completed element node.
|
TinyTree |
getTree()
Get the tree being built by this builder
|
protected int |
makeTextNode(UnicodeString chars)
Create a text node.
|
void |
open()
Open the event stream
|
void |
processingInstruction(java.lang.String piname,
UnicodeString remainder,
Location locationId,
int properties)
Callback interface for SAX: not for application use
|
void |
reset()
Reset the builder to its initial state.
|
void |
setStatistics(Statistics stats)
Set the size parameters for the tree
|
void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
Set an unparsed entity in the document
|
void |
startDocument(int properties)
Write a document node to the tree
|
void |
startElement(NodeName elemName,
SchemaType type,
AttributeMap attributes,
NamespaceMap namespaces,
Location location,
int properties)
Notify the start of an element
|
getBaseURI, getConfiguration, getCurrentRoot, getPipelineConfiguration, getSystemId, isTiming, isUseEventLocation, setBaseURI, setLineNumbering, setPipelineConfiguration, setSystemId, setTiming, setUseEventLocation, usesTypeAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, append, handlesAppend
public TinyBuilder(PipelineConfiguration pipe)
pipe
- information about the pipeline leading up to this Builderpublic void setStatistics(Statistics stats)
stats
- an object holding the expected number of non-attribute nodes, the expected
number of attributes, the expected number of namespace declarations, and the expected total length of
character datapublic TinyTree getTree()
public int getCurrentDepth()
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 reset()
Builder
public void close() throws XPathException
Receiver
close
in interface Receiver
close
in class Builder
XPathException
- if an error occurspublic void startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
elemName
- the name of the element.type
- the type annotation of the element.attributes
- 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 ReceiverOption
XPathException
- if an error occursprotected java.lang.String getAttValue(AttributeInfo att)
public void endElement() throws XPathException
XPathException
- if an error occurspublic TinyNodeImpl getLastCompletedElement()
public void characters(UnicodeString 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 occursprotected int makeTextNode(UnicodeString chars)
chars
- the contents of the text nodepublic void processingInstruction(java.lang.String piname, UnicodeString remainder, Location locationId, int properties) throws XPathException
piname
- 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.XPathException
- if an error occurspublic void comment(UnicodeString 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 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()
Builder
getBuilderMonitor
in class Builder
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.