net.sf.saxon.event
public abstract class Builder extends Object implements Receiver
Field Summary | |
---|---|
protected String | baseURI |
protected Configuration | config |
protected NodeInfo | currentRoot |
protected boolean | lineNumbering |
static int | LINKED_TREE
Constant denoting the "linked tree" in which each node is represented as an object |
protected NamePool | namePool |
protected PipelineConfiguration | pipe |
protected boolean | started |
protected String | systemId |
static int | STANDARD_TREE
Alternative constant denoting the "linked tree" in which each node is represented as an object
Retained for backwards compatibility |
protected boolean | timing |
static int | TINY_TREE
Constant denoting the "tiny tree" in which the tree is represented internally using arrays of integers |
static int | TINY_TREE_CONDENSED
Constant denoting the "tiny tree condensed", a variant of the tiny tree in which text and attribute nodes
sharing the same string value use shared storage for the value. |
static int | UNSPECIFIED_TREE_MODEL
Constant denoting a request for the default tree model |
Constructor Summary | |
---|---|
Builder()
Create a Builder and initialise variables |
Method Summary | |
---|---|
static NodeInfo | build(Source source, Stripper stripper, Configuration config)
Static method to build a document from any kind of Source object. |
static NodeInfo | build(Source source, Stripper stripper, PipelineConfiguration pipe)
Static method to build a document from any kind of Source object. |
void | close() |
String | getBaseURI()
Get the base URI of the document node of the tree being constructed by this builder |
Configuration | getConfiguration()
Get the Configuration |
NodeInfo | getCurrentRoot()
Get the current root node. |
PipelineConfiguration | getPipelineConfiguration() |
String | getSystemId()
The SystemId is equivalent to the document-uri property defined in the XDM data model.
|
boolean | isTiming()
Get timing option |
void | open() |
void | reset()
Reset the builder to its initial state. |
void | setBaseURI(String baseURI)
Set the base URI of the document node of the tree being constructed by this builder |
void | setLineNumbering(boolean lineNumbering)
Set line numbering on or off |
void | setPipelineConfiguration(PipelineConfiguration pipe) |
void | setSystemId(String systemId)
The SystemId is equivalent to the document-uri property defined in the XDM data model.
|
void | setTiming(boolean on)
Set timing option on or off |
boolean | usesTypeAnnotations()
Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations
supplied on element and attribute events |
Deprecated: since Saxon 9.2: use Configuration. The method was also changed in 9.2 to ignore the stripper parameter.
Static method to build a document from any kind of Source object. If the source is already in the form of a tree, it is wrapped as required.The preferred way to construct a document tree from a Source object is to use the method Configuration.
Parameters: source Any javax.xml.transform.Source object stripper A stripper object, if whitespace text nodes are to be stripped; otherwise null. Ignored since Saxon 9.2 config The Configuration object
Returns: the NodeInfo of the start node in the resulting document object.
Deprecated: since Saxon 9.2: use Configuration. The method was also changed in 9.2 to ignore the stripper parameter.
Static method to build a document from any kind of Source object. If the source is already in the form of a tree, it is wrapped as required.The preferred way to construct a document tree from a Source object is to use the method Configuration.
Parameters: source Any javax.xml.transform.Source object stripper A stripper object, if whitespace text nodes are to be stripped; otherwise null. Ignored since Saxon 9.2 pipe The PipelineConfiguration object
Returns: the NodeInfo of the start node in the resulting document object.
Returns: the base URI
Returns: the Saxon configuration
Returns: the root of the tree that is currently being built, or that has been most recently built using this builder
Returns: the SystemId, that is, the document-uri.
Returns: true if timing information has been requested
Parameters: baseURI the base URI
Parameters: lineNumbering set to true if line numbers are to be maintained for nodes in the tree being constructed.
Parameters: systemId the SystemId, that is, the document-uri.
Parameters: on set to true to turn timing on. This causes the builder to display statistical information about the tree that is constructed. It corresponds to the command line -t option
Returns: true if the Receiver makes any use of this information. If false, the caller may supply untyped nodes instead of supplying the type annotation