public abstract class TreeModel
extends java.lang.Object
implements java.io.Serializable
This class serves two purposes: it acts as a factory for obtaining a Builder which can be used to build trees using this tree model; and it provides static constants that can be used to identify the built-in tree models.
Modifier and Type | Field and Description |
---|---|
static TreeModel |
LINKED_TREE
The LinkedTree.
|
static TreeModel |
TINY_TREE
The TinyTree implementation.
|
static TreeModel |
TINY_TREE_CONDENSED
The CondensedTinyTree implementation.
|
Constructor and Description |
---|
TreeModel() |
Modifier and Type | Method and Description |
---|---|
int |
getSymbolicValue()
Get the integer constant used to identify this tree model in some legacy interfaces
|
static TreeModel |
getTreeModel(int symbolicValue)
Get the tree model corresponding to a given integer constant
|
boolean |
isMutable()
Ask whether this tree model supports updating (that is, whether the nodes
in the constructed tree will implement
MutableNodeInfo , which is necessary
if they are to support XQuery Update. |
abstract Builder |
makeBuilder(PipelineConfiguration pipe)
Make a Builder to construct an instance of this tree model from a stream of events
|
public static final TreeModel TINY_TREE
public static final TreeModel TINY_TREE_CONDENSED
public static final TreeModel LINKED_TREE
public abstract Builder makeBuilder(PipelineConfiguration pipe)
public int getSymbolicValue()
Builder.TINY_TREE
public static TreeModel getTreeModel(int symbolicValue)
symbolicValue
- one of the constants Builder.TINY_TREE
,
Builder.TINY_TREE_CONDENSED
, or Builder.LINKED_TREE
public boolean isMutable()
MutableNodeInfo
, which is necessary
if they are to support XQuery Update. This method can be overridden in subclasses;
the default implementation returns false.