org.eclipse.emf.ecore.sdo.util
Class SDOUtil.Accessor

java.lang.Object
  extended by 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.


Nested Class Summary
protected static class SDOUtil.Accessor.Pool
          Only the get and recycle methods should be call; they are the only synchronized methods.
protected static class SDOUtil.Accessor.TokenList
           
 
Field Summary
protected  EObject eObject
           
protected  EStructuralFeature feature
           
protected  int index
           
protected static int NO_INDEX
           
 
Constructor Summary
protected SDOUtil.Accessor()
           
protected SDOUtil.Accessor(EObject eObject, java.lang.String path)
           
 
Method Summary
static SDOUtil.Accessor create(EObject eObject, java.lang.String path)
          Creates an accessor for the path of the object.
 java.lang.Object get()
           
 java.lang.Object getAndRecyle()
           
 EObject getEObject()
           
 EStructuralFeature getEStructuralFeature()
           
protected  int getIndex()
           
protected  void init(EObject eObject, java.lang.String path)
           
 boolean isSet()
           
 boolean isSetAndRecyle()
           
protected static int matchingIndex(java.util.List<?> eObjects, java.lang.String attributeName, java.lang.String attributeValue)
           
protected  void process(java.lang.String pathString)
           
 void recycle()
           
 void set(java.lang.Object newValue)
           
 void setAndRecyle(java.lang.Object newValue)
           
protected  void setEObject(EObject eObject)
           
protected  void setFeatureName(java.lang.String name)
           
protected  void setIndex(int index)
           
 java.lang.String toString()
           
 void unset()
           
 void unsetAndRecyle()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

SDOUtil.Accessor

protected SDOUtil.Accessor()

SDOUtil.Accessor

protected SDOUtil.Accessor(EObject eObject,
                           java.lang.String path)
Method Detail

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

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.