|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.event.Builder
public abstract class Builder
The abstract Builder class is responsible for taking a stream of SAX events and constructing a Document tree. There is one concrete subclass for each tree implementation.
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
|
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 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 |
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 |
Fields inherited from interface javax.xml.transform.Result |
---|
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING |
Constructor Summary | |
---|---|
Builder()
Create a Builder and initialise variables |
Method Summary | |
---|---|
static NodeInfo |
build(Source source,
Stripper stripper,
Configuration config)
Deprecated. since Saxon 9.2: use Configuration.buildDocument(javax.xml.transform.Source) . The method
was also changed in 9.2 to ignore the stripper parameter. |
static NodeInfo |
build(Source source,
Stripper stripper,
PipelineConfiguration pipe)
Deprecated. since Saxon 9.2: use Configuration.buildDocument(javax.xml.transform.Source) . The method
was also changed in 9.2 to ignore the stripper parameter. |
void |
close()
Notify the end of the event stream |
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 |
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(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(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 |
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.event.Receiver |
---|
attribute, characters, comment, endDocument, endElement, namespace, processingInstruction, setUnparsedEntity, startContent, startDocument, startElement |
Field Detail |
---|
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
public static final int TINY_TREE_CONDENSED
protected PipelineConfiguration pipe
protected Configuration config
protected NamePool namePool
protected String systemId
protected String baseURI
protected NodeInfo currentRoot
protected boolean lineNumbering
protected boolean started
protected boolean timing
Constructor Detail |
---|
public Builder()
Method Detail |
---|
public void setPipelineConfiguration(PipelineConfiguration pipe)
Receiver
setPipelineConfiguration
in interface Receiver
pipe
- the pipeline configurationpublic PipelineConfiguration getPipelineConfiguration()
Receiver
getPipelineConfiguration
in interface Receiver
public Configuration getConfiguration()
public void setSystemId(String systemId)
setSystemId
in interface Result
setSystemId
in interface Receiver
systemId
- the SystemId, that is, the document-uri.public String getSystemId()
getSystemId
in interface Result
public void setBaseURI(String baseURI)
baseURI
- the base URIpublic 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
in interface Receiver
XPathException
public void close() throws XPathException
Receiver
close
in interface Receiver
XPathException
public boolean usesTypeAnnotations()
usesTypeAnnotations
in interface Receiver
public NodeInfo getCurrentRoot()
public void reset()
public static NodeInfo build(Source source, Stripper stripper, Configuration config) throws XPathException
Configuration.buildDocument(javax.xml.transform.Source)
. The method
was also changed in 9.2 to ignore the stripper parameter.
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. Ignored since Saxon 9.2config
- The Configuration object
XPathException
public static NodeInfo build(Source source, Stripper stripper, PipelineConfiguration pipe) throws XPathException
Configuration.buildDocument(javax.xml.transform.Source)
. The method
was also changed in 9.2 to ignore the stripper parameter.
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. Ignored since Saxon 9.2pipe
- The PipelineConfiguration object
XPathException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |