|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.accessor.reference.AccessorReference
public abstract class AccessorReference
AccessorRef is a reference to a child node in the tree representation of a container.
ComponentReference[] is a path from a node to a child or decendent node in the tree representation of the container.
Reference has three serializable formats: Binary, URL compatible Path.
Field Summary | |
---|---|
static java.util.regex.Pattern |
ARRAY_ELEMENT_PATTERN
|
AccessorReference |
childReference
|
static java.util.regex.Pattern |
FIELD_INDEX_PATTERN
|
static java.util.regex.Pattern |
FIELD_NAME_PATTERN
|
static java.util.regex.Pattern |
MAP_PATTERN
|
static java.util.regex.Pattern |
UNION_INDEX_PATTERN
|
static java.util.regex.Pattern |
UNION_NAME_PATTERN
|
Method Summary | |
---|---|
abstract AccessorReference |
clone()
|
static AccessorReference |
compile(AccessorReference... refs)
Creates a compilation of individual a references into a one refence. |
static AccessorReference |
concatenate(AccessorReference pathToBeCloned,
AccessorReference ref)
Create a concatenation of two references. |
AccessorReference |
getChildReference()
|
boolean |
hasChildReference()
|
static AccessorReference |
parseBinary(byte[] binaryRef)
|
static AccessorReference |
parseString(java.lang.String path)
Get reference path from AccessorReference path. |
void |
setChildReference(AccessorReference childReference)
|
AccessorReference |
tail()
|
java.lang.String |
toPath()
|
java.lang.String |
toPath(boolean labelReference)
Converts the reference path into string representation. |
java.lang.String |
toString()
Convert the reference into its string representation |
abstract java.lang.String |
toString(boolean labelReference)
Convert the reference into string representation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern ARRAY_ELEMENT_PATTERN
public static final java.util.regex.Pattern MAP_PATTERN
public static final java.util.regex.Pattern FIELD_INDEX_PATTERN
public static final java.util.regex.Pattern FIELD_NAME_PATTERN
public static final java.util.regex.Pattern UNION_INDEX_PATTERN
public static final java.util.regex.Pattern UNION_NAME_PATTERN
public AccessorReference childReference
Method Detail |
---|
public static AccessorReference parseString(java.lang.String path)
path
-
null
if there is no pathpublic static AccessorReference parseBinary(byte[] binaryRef) throws SerializationException
SerializationException
public AccessorReference getChildReference()
public boolean hasChildReference()
public void setChildReference(AccessorReference childReference)
public java.lang.String toPath()
public java.lang.String toPath(boolean labelReference)
labelReference
- if true return label references.
public java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String toString(boolean labelReference)
If labelReference
is true, the string representation is
more user readable but has weaker typing. It serializes into
instances of LabelReference.
For instance Record Field Reference is "n-Children", but label reference "Children".
Some references cannot be converted into LabelReference.
E.g. string representation of FieldNameReference("i-5") is ambiguous with ArrayIndexReference(5).
labelReference
- if true returns
public abstract AccessorReference clone()
clone
in class java.lang.Object
public AccessorReference tail()
public static AccessorReference concatenate(AccessorReference pathToBeCloned, AccessorReference ref)
pathToBeCloned
- prefix path, or nullref
- suffix path, or null
public static AccessorReference compile(AccessorReference... refs)
refs
-
null
if there are no elements
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |