|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.accessor.reference.ChildReference
public abstract class ChildReference
Path is a single or multi-level reference to a child node in the tree representation of data value.
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 | |
---|---|
ChildReference |
childReference
|
static java.util.regex.Pattern |
INDEX_PATTERN
|
static java.util.regex.Pattern |
MAP_PATTERN
|
static java.util.regex.Pattern |
NAME_PATTERN
|
Method Summary | |
---|---|
abstract ChildReference |
clone()
|
static ChildReference |
compile(ChildReference... refs)
Creates a compilation of individual a references into a one refence. |
static ChildReference |
compile(java.util.Collection<ChildReference> refs)
Creates a compilation of individual a references into a one refence. |
static ChildReference |
concatenate(ChildReference pathToBeCloned,
ChildReference ref)
Create a concatenation of two references. |
ChildReference |
getChildReference()
|
boolean |
hasChildReference()
|
static ChildReference |
parseBinary(byte[] binaryRef)
|
static ChildReference |
parsePath(java.lang.String path)
Get reference path from AccessorReference path. |
void |
setChildReference(ChildReference childReference)
|
ChildReference |
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. |
static ChildReference |
toTypeReference(ChildReference vref,
Datatype type)
Attempt to convert value reference to type reference. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern INDEX_PATTERN
public static final java.util.regex.Pattern MAP_PATTERN
public static final java.util.regex.Pattern NAME_PATTERN
public ChildReference childReference
Method Detail |
---|
public static ChildReference concatenate(ChildReference pathToBeCloned, ChildReference ref)
pathToBeCloned
- prefix path, or nullref
- suffix path, or null
public static ChildReference compile(ChildReference... refs)
refs
-
null
if there are no elementspublic static ChildReference compile(java.util.Collection<ChildReference> refs)
refs
-
null
if there are no elementspublic static ChildReference parsePath(java.lang.String path)
path
-
null
if there is no pathpublic static ChildReference toTypeReference(ChildReference vref, Datatype type) throws java.lang.IllegalArgumentException
vref
- type
-
java.lang.IllegalArgumentException
- if conversion fails.public static ChildReference parseBinary(byte[] binaryRef) throws java.io.IOException
java.io.IOException
public ChildReference getChildReference()
public boolean hasChildReference()
public void setChildReference(ChildReference 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 ChildReference clone()
clone
in class java.lang.Object
public ChildReference tail()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |