public class TreeReference extends java.lang.Object implements Externalizable
Modifier and Type | Field and Description |
---|---|
static int |
CONTEXT_ABSOLUTE |
static int |
CONTEXT_INHERITED |
static int |
CONTEXT_INSTANCE |
static int |
CONTEXT_ORIGINAL |
private int |
contextType |
private java.util.List<TreeReferenceLevel> |
data |
static int |
DEFAULT_MUTLIPLICITY |
static int |
INDEX_ATTRIBUTE |
static int |
INDEX_REPEAT_JUNCTURE |
static int |
INDEX_TEMPLATE |
static int |
INDEX_UNBOUND |
private java.lang.String |
instanceName |
static java.lang.String |
NAME_WILDCARD |
static int |
REF_ABSOLUTE |
private int |
refLevel |
Constructor and Description |
---|
TreeReference() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name,
int mult) |
private void |
add(TreeReferenceLevel level) |
void |
addPredicate(int key,
java.util.List<XPathExpression> xpe) |
TreeReference |
anchor(TreeReference contextRef) |
TreeReference |
clone() |
TreeReference |
contextualize(TreeReference contextRef) |
boolean |
equals(java.lang.Object o) |
TreeReference |
extendRef(java.lang.String name,
int mult)
clone and extend a reference by one level
|
TreeReference |
genericize() |
int |
getContext() |
java.lang.String |
getInstanceName() |
int |
getMultiplicity(int index) |
int |
getMultLast() |
java.lang.String |
getName(int index) |
java.lang.String |
getNameLast() |
TreeReference |
getParentRef() |
java.util.List<XPathExpression> |
getPredicate(int key) |
int |
getRefLevel() |
TreeReference |
getSubReference(int level)
Returns the subreference of this reference up to the level specified.
|
int |
hashCode() |
boolean |
hasPredicates() |
void |
incrementRefLevel() |
TreeReference |
intersect(TreeReference b)
Intersect this tree reference with another, returning a new tree reference
which contains all of the common elements, starting with the root element.
|
boolean |
isAbsolute() |
boolean |
isAmbiguous() |
boolean |
isParentOf(TreeReference child,
boolean properParent) |
TreeReference |
parent(TreeReference parentRef) |
void |
readExternal(java.io.DataInputStream in,
PrototypeFactory pf) |
TreeReference |
relativize(TreeReference parent) |
boolean |
removeLastLevel() |
TreeReference |
removePredicates() |
static TreeReference |
rootRef() |
static TreeReference |
selfRef() |
void |
setContext(int context) |
void |
setInstanceName(java.lang.String instanceName) |
void |
setMultiplicity(int i,
int mult) |
void |
setRefLevel(int refLevel) |
int |
size() |
java.lang.String |
toShortString() |
java.lang.String |
toString() |
java.lang.String |
toString(boolean includePredicates) |
void |
writeExternal(java.io.DataOutputStream out) |
public static final int DEFAULT_MUTLIPLICITY
public static final int INDEX_UNBOUND
public static final int INDEX_TEMPLATE
public static final int INDEX_ATTRIBUTE
public static final int INDEX_REPEAT_JUNCTURE
public static final int CONTEXT_ABSOLUTE
public static final int CONTEXT_INHERITED
public static final int CONTEXT_ORIGINAL
public static final int CONTEXT_INSTANCE
public static final int REF_ABSOLUTE
public static final java.lang.String NAME_WILDCARD
private int refLevel
private int contextType
private java.lang.String instanceName
private java.util.List<TreeReferenceLevel> data
public static TreeReference rootRef()
public static TreeReference selfRef()
public java.lang.String getInstanceName()
public void setInstanceName(java.lang.String instanceName)
public int getMultiplicity(int index)
public java.lang.String getName(int index)
public int getMultLast()
public java.lang.String getNameLast()
public void setMultiplicity(int i, int mult)
public int size()
private void add(TreeReferenceLevel level)
public void add(java.lang.String name, int mult)
public void addPredicate(int key, java.util.List<XPathExpression> xpe)
public java.util.List<XPathExpression> getPredicate(int key)
public int getRefLevel()
public void setRefLevel(int refLevel)
public void incrementRefLevel()
public boolean isAbsolute()
public boolean isAmbiguous()
public TreeReference clone()
clone
in class java.lang.Object
public boolean removeLastLevel()
public TreeReference getParentRef()
public TreeReference parent(TreeReference parentRef)
public TreeReference anchor(TreeReference contextRef) throws XPathException
XPathException
public TreeReference contextualize(TreeReference contextRef)
public TreeReference relativize(TreeReference parent)
public TreeReference genericize()
public boolean isParentOf(TreeReference child, boolean properParent)
public TreeReference extendRef(java.lang.String name, int mult)
name
- mult
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean includePredicates)
public java.lang.String toShortString()
public void readExternal(java.io.DataInputStream in, PrototypeFactory pf) throws java.io.IOException, DeserializationException
readExternal
in interface Externalizable
java.io.IOException
DeserializationException
public void writeExternal(java.io.DataOutputStream out) throws java.io.IOException
writeExternal
in interface Externalizable
java.io.IOException
public TreeReference intersect(TreeReference b)
b
- The tree reference to intersectpublic void setContext(int context)
public int getContext()
public TreeReference getSubReference(int level)
level
- public boolean hasPredicates()
public TreeReference removePredicates()