org.eclipse.emf.ecore.sdo.util
Class SDOUtil.Accessor
java.lang.Object
org.eclipse.emf.ecore.sdo.util.SDOUtil.Accessor
- Enclosing class:
- SDOUtil
protected static final class SDOUtil.Accessor
- extends java.lang.Object
Process the default EMF path and minimal XPath syntax.
This design is still under review and construction.
Syntax:
path = /? (step '/')* step
step = feature
| feature '.' index_from_0
| feature '[' index_from_1 ']'
| reference '[' attribute '=' value ']'
| ..
| '@' step
feature = the name of an attribute or reference
attribute = the name of an attribute
reference = the name of a reference
index = positive integer
value = the string value of an attribute
leading / begins at the root
.. is containing object
features must be multi-valued to use '.' and '[' operations.
Only the last step may have an attribute as the feature.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NO_INDEX
protected static final int NO_INDEX
- See Also:
- Constant Field Values
eObject
protected EObject eObject
feature
protected EStructuralFeature feature
index
protected int index
SDOUtil.Accessor
protected SDOUtil.Accessor()
SDOUtil.Accessor
protected SDOUtil.Accessor(EObject eObject,
java.lang.String path)
create
public static SDOUtil.Accessor create(EObject eObject,
java.lang.String path)
- Creates an accessor for the path of the object.
init
protected void init(EObject eObject,
java.lang.String path)
get
public java.lang.Object get()
getAndRecyle
public java.lang.Object getAndRecyle()
set
public void set(java.lang.Object newValue)
setAndRecyle
public void setAndRecyle(java.lang.Object newValue)
isSet
public boolean isSet()
isSetAndRecyle
public boolean isSetAndRecyle()
unset
public void unset()
unsetAndRecyle
public void unsetAndRecyle()
recycle
public void recycle()
getEObject
public EObject getEObject()
setEObject
protected void setEObject(EObject eObject)
getEStructuralFeature
public EStructuralFeature getEStructuralFeature()
setFeatureName
protected void setFeatureName(java.lang.String name)
getIndex
protected int getIndex()
setIndex
protected void setIndex(int index)
process
protected void process(java.lang.String pathString)
matchingIndex
protected static int matchingIndex(java.util.List<?> eObjects,
java.lang.String attributeName,
java.lang.String attributeValue)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object