public abstract class Builder extends java.lang.Object implements Receiver
?????? | ????? |
---|---|
protected java.lang.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 |
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 |
started |
protected java.lang.String |
systemId |
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 |
UNSPECIFIED_TREE_MODEL
Constant denoting a request for the default tree model
|
?????? |
---|
Builder()
create a Builder and initialise variables
|
?????? | ????? |
---|---|
static NodeInfo |
build(javax.xml.transform.Source source,
Stripper stripper,
Configuration config)
Static method to build a document from any kind of Source object.
|
static NodeInfo |
build(javax.xml.transform.Source source,
Stripper stripper,
PipelineConfiguration pipe)
Static method to build a document from any kind of Source object.
|
void |
close()
Notify the end of the event stream
|
void |
endDocument()
Notify the end of a document node
|
java.lang.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()
Get the pipeline configuration
|
java.lang.String |
getSystemId()
The SystemId is equivalent to the document-uri property defined in the XDM data model.
|
boolean |
isTiming()
Get timing option
|
void |
open()
Notify the start of the event stream
|
void |
reset()
Reset the builder to its initial state.
|
void |
setBaseURI(java.lang.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)
Set the pipeline configuration
|
void |
setSystemId(java.lang.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
|
void |
startDocument(int properties)
Start of a document node.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
attribute, characters, comment, endElement, namespace, processingInstruction, setUnparsedEntity, startContent, startElement
public static final int UNSPECIFIED_TREE_MODEL
public static final int LINKED_TREE
public static final int STANDARD_TREE
public static final int TINY_TREE
protected PipelineConfiguration pipe
protected Configuration config
protected NamePool namePool
protected java.lang.String systemId
protected java.lang.String baseURI
protected NodeInfo currentRoot
protected boolean lineNumbering
protected boolean started
protected boolean timing
public void setPipelineConfiguration(PipelineConfiguration pipe)
Receiver
setPipelineConfiguration
???? Receiver
pipe
- the pipeline configurationpublic PipelineConfiguration getPipelineConfiguration()
Receiver
getPipelineConfiguration
???? Receiver
public Configuration getConfiguration()
public void setSystemId(java.lang.String systemId)
setSystemId
???? javax.xml.transform.Result
setSystemId
???? Receiver
systemId
- the SystemId, that is, the document-uri.public java.lang.String getSystemId()
getSystemId
???? javax.xml.transform.Result
public void setBaseURI(java.lang.String baseURI)
baseURI
- the base URIpublic java.lang.String getBaseURI()
public void setLineNumbering(boolean lineNumbering)
lineNumbering
- set to true if line numbers are to be maintained for nodes in the tree being
constructed.public void setTiming(boolean on)
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 optionpublic boolean isTiming()
public void open() throws XPathException
Receiver
open
???? Receiver
XPathException
public void close() throws XPathException
Receiver
close
???? Receiver
XPathException
public void startDocument(int properties) throws XPathException
startDocument
???? Receiver
properties
- bit-significant integer indicating properties of the document node.
The definitions of the bits are in class ReceiverOptions
XPathException
public void endDocument() throws XPathException
endDocument
???? Receiver
XPathException
public NodeInfo getCurrentRoot()
public void reset()
public static NodeInfo build(javax.xml.transform.Source source, Stripper stripper, Configuration config) throws XPathException
The preferred way to construct a document tree from a Source object is to
use the method Configuration.buildDocument(javax.xml.transform.Source)
.
source
- Any javax.xml.transform.Source objectstripper
- A stripper object, if whitespace text nodes are to be stripped;
otherwise null.config
- The Configuration objectXPathException
public static NodeInfo build(javax.xml.transform.Source source, Stripper stripper, PipelineConfiguration pipe) throws XPathException
The preferred way to construct a document tree from a Source object is to
use the method Configuration.buildDocument(javax.xml.transform.Source)
.
source
- Any javax.xml.transform.Source objectstripper
- A stripper object, if whitespace text nodes are to be stripped;
otherwise null.pipe
- The PipelineConfiguration objectXPathException