public abstract class TreeModel extends Object
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 |
---|---|
String |
getName()
Get a name that identifies the tree model
|
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. |
boolean |
isSchemaAware()
Ask whether this tree model supports the use of type annotations on element and attribute
nodes.
|
abstract Builder |
makeBuilder(PipelineConfiguration pipe)
Make a Builder, which can then be used 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)
pipe
- A PipelineConfiguration, which can be constructed using the method
Configuration.makePipelineConfiguration()
.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.public boolean isSchemaAware()
public String getName()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.