org.eclipse.ocl.examples.emf.validation.validity.impl
Class AbstractNodeImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.MinimalEObjectImpl
              extended by org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
                  extended by org.eclipse.ocl.examples.emf.validation.validity.impl.AbstractNodeImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder, org.eclipse.emf.ecore.InternalEObject, AbstractNode
Direct Known Subclasses:
ConstrainingNodeImpl, ValidatableNodeImpl

public abstract class AbstractNodeImpl
extends org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
implements AbstractNode

An implementation of the model object 'AbstractNode'.

The following features are implemented:

Generated

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container.Dynamic
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl
org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
protected  boolean enabled
          The cached value of the 'Enabled' attribute.
protected static boolean ENABLED_EDEFAULT
          The default value of the 'Enabled' attribute.
protected  boolean grayed
          The cached value of the 'Grayed' attribute.
protected static boolean GRAYED_EDEFAULT
          The default value of the 'Grayed' attribute.
protected  java.lang.String label
          The cached value of the 'Label' attribute.
protected static java.lang.String LABEL_EDEFAULT
          The default value of the 'Label' attribute.
static AbstractNode[] NO_CHILDREN
           
protected  boolean visible
          The cached value of the 'Visible' attribute.
protected static boolean VISIBLE_EDEFAULT
          The default value of the 'Visible' attribute.
protected  Result worstResult
          The cached value of the 'Worst Result' reference.
 
Fields inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
eContainer
 
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
 
Fields inherited from interface org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder
NIL
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected AbstractNodeImpl()
           
 
Method Summary
 int countVisibleChildren()
          Return the number of visible children in this node and its descendants.
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 java.lang.Object eInvoke(int operationID, org.eclipse.emf.common.util.EList<?> arguments)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, java.lang.Object newValue)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 void eUnset(int featureID)
           
abstract  org.eclipse.emf.common.util.EList<? extends AbstractNode> getChildren()
           
 void getGrayedElements(java.util.List<AbstractNode> grayedNodes)
          Fill grayedNodes with all grayed nodes in this node and its descendants.
 java.lang.String getLabel()
           
abstract  AbstractNode getParent()
           
 AbstractNode[] getVisibleChildren()
          Return the fraction of getChildren() that are visible in an array to suit access by a ContentProvider.
 Result getWorstResult()
           
 boolean isEnabled()
           
 boolean isGrayed()
           
 boolean isVisible()
           
 int refreshGrayed()
          Update the grayed status of this node and all its descendants, returning >0 if this node and its children are consistently enabled, <0 is consistently disbaled and 0 otherwise.
 boolean refreshVisibleChildren(java.lang.Iterable<IVisibilityFilter> visibilityFilters)
          Update the visible status of this node and all its descendants by comuting the AND of the visibilityFilters at each node.
 void setEnabled(boolean newEnabled)
           
 void setLabel(java.lang.String newLabel)
           
 void setWorstResult(Result newWorstResult)
          Sets the value of the 'Worst Result' reference.
 void setWorstResultGen(Result newWorstResult)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
eBasicSetContainer, eInternalContainer
 
Methods inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl
dynamicGet, dynamicSet, dynamicUnset, eAdapters, eBasicAdapterArray, eBasicAdapterListeners, eBasicAdapters, eBasicHasAdapters, eBasicProperties, eBasicSetAdapterArray, eBasicSetAdapterListeners, eBasicSetContainer, eBasicSetContainerFeatureID, eBasicSetSettings, eBasicSettings, eClass, eContainerFeatureID, eContents, eCrossReferences, eDeliver, eDirectResource, eDynamicClass, eHasSettings, eIsProxy, eProperties, eProxyURI, eSetClass, eSetDeliver, eSetDirectResource, eSetProxyURI, eSettings
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDynamicBasicRemoveFromContainer, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eSettingDelegate, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

ENABLED_EDEFAULT

protected static final boolean ENABLED_EDEFAULT
The default value of the 'Enabled' attribute.

See Also:
isEnabled(), Constant Field Values
Generated
Ordered

enabled

protected boolean enabled
The cached value of the 'Enabled' attribute.

See Also:
isEnabled()
Generated
Ordered

GRAYED_EDEFAULT

protected static final boolean GRAYED_EDEFAULT
The default value of the 'Grayed' attribute.

See Also:
isGrayed(), Constant Field Values
Generated
Ordered

grayed

protected boolean grayed
The cached value of the 'Grayed' attribute.

See Also:
isGrayed()
Generated
Ordered

VISIBLE_EDEFAULT

protected static final boolean VISIBLE_EDEFAULT
The default value of the 'Visible' attribute.

See Also:
isVisible(), Constant Field Values
Generated
Ordered

visible

protected boolean visible
The cached value of the 'Visible' attribute.

See Also:
isVisible()
Generated
Ordered

LABEL_EDEFAULT

protected static final java.lang.String LABEL_EDEFAULT
The default value of the 'Label' attribute.

See Also:
getLabel(), Constant Field Values
Generated
Ordered

label

protected java.lang.String label
The cached value of the 'Label' attribute.

See Also:
getLabel()
Generated
Ordered

worstResult

protected Result worstResult
The cached value of the 'Worst Result' reference.

See Also:
getWorstResult()
Generated
Ordered

NO_CHILDREN

@NonNull
public static final AbstractNode[] NO_CHILDREN
Constructor Detail

AbstractNodeImpl

protected AbstractNodeImpl()

Generated
Method Detail

eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
eStaticClass in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
Generated

isEnabled

public boolean isEnabled()

Specified by:
isEnabled in interface AbstractNode
Returns:
the value of the 'Enabled' attribute.
See Also:
AbstractNode.setEnabled(boolean), ValidityPackage.getAbstractNode_Enabled()
Generated

setEnabled

public void setEnabled(boolean newEnabled)

Specified by:
setEnabled in interface AbstractNode
Parameters:
newEnabled - the new value of the 'Enabled' attribute.
See Also:
AbstractNode.isEnabled()
Generated

isGrayed

public boolean isGrayed()

Specified by:
isGrayed in interface AbstractNode
Returns:
the value of the 'Grayed' attribute.
See Also:
ValidityPackage.getAbstractNode_Grayed()
Generated

isVisible

public boolean isVisible()

Specified by:
isVisible in interface AbstractNode
Returns:
the value of the 'Visible' attribute.
See Also:
ValidityPackage.getAbstractNode_Visible()
Generated

getLabel

public java.lang.String getLabel()

Specified by:
getLabel in interface AbstractNode
Returns:
the value of the 'Label' attribute.
See Also:
AbstractNode.setLabel(String), ValidityPackage.getAbstractNode_Label()
Generated

setLabel

public void setLabel(java.lang.String newLabel)

Specified by:
setLabel in interface AbstractNode
Parameters:
newLabel - the new value of the 'Label' attribute.
See Also:
AbstractNode.getLabel()
Generated

getWorstResult

public Result getWorstResult()

Specified by:
getWorstResult in interface AbstractNode
Returns:
the value of the 'Worst Result' reference.
See Also:
AbstractNode.setWorstResult(Result), ValidityPackage.getAbstractNode_WorstResult()
Generated

setWorstResultGen

public void setWorstResultGen(Result newWorstResult)

Generated

setWorstResult

public void setWorstResult(Result newWorstResult)
Description copied from interface: AbstractNode
Sets the value of the 'Worst Result' reference.

Specified by:
setWorstResult in interface AbstractNode
Parameters:
newWorstResult - the new value of the 'Worst Result' reference.
See Also:
AbstractNode.getWorstResult()

getParent

public abstract AbstractNode getParent()

Specified by:
getParent in interface AbstractNode
Generated
NOT

getChildren

@NonNull
public abstract org.eclipse.emf.common.util.EList<? extends AbstractNode> getChildren()

Specified by:
getChildren in interface AbstractNode
Generated
NOT

eGet

public java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
Generated

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
Generated

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
Generated

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
Generated

eInvoke

public java.lang.Object eInvoke(int operationID,
                                org.eclipse.emf.common.util.EList<?> arguments)
                         throws java.lang.reflect.InvocationTargetException

Specified by:
eInvoke in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eInvoke in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
Throws:
java.lang.reflect.InvocationTargetException
Generated

toString

public java.lang.String toString()

Overrides:
toString in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
Generated
NOT

countVisibleChildren

public int countVisibleChildren()
Description copied from interface: AbstractNode
Return the number of visible children in this node and its descendants.

Specified by:
countVisibleChildren in interface AbstractNode

getGrayedElements

public void getGrayedElements(@NonNull
                              java.util.List<AbstractNode> grayedNodes)
Description copied from interface: AbstractNode
Fill grayedNodes with all grayed nodes in this node and its descendants.

Specified by:
getGrayedElements in interface AbstractNode

getVisibleChildren

@NonNull
public AbstractNode[] getVisibleChildren()
Description copied from interface: AbstractNode
Return the fraction of getChildren() that are visible in an array to suit access by a ContentProvider.

Specified by:
getVisibleChildren in interface AbstractNode

refreshGrayed

public int refreshGrayed()
Description copied from interface: AbstractNode
Update the grayed status of this node and all its descendants, returning >0 if this node and its children are consistently enabled, <0 is consistently disbaled and 0 otherwise.

Specified by:
refreshGrayed in interface AbstractNode

refreshVisibleChildren

public boolean refreshVisibleChildren(@NonNull
                                      java.lang.Iterable<IVisibilityFilter> visibilityFilters)
Description copied from interface: AbstractNode
Update the visible status of this node and all its descendants by comuting the AND of the visibilityFilters at each node. Return strue if this node visible.

Specified by:
refreshVisibleChildren in interface AbstractNode