org.eclipse.emf.henshin.model.impl
Class RuleImpl

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.EObjectImpl
              extended by org.eclipse.emf.henshin.model.impl.ModelElementImpl
                  extended by org.eclipse.emf.henshin.model.impl.NamedElementImpl
                      extended by org.eclipse.emf.henshin.model.impl.UnitImpl
                          extended by org.eclipse.emf.henshin.model.impl.RuleImpl
All Implemented Interfaces:
Notifier, EObject, InternalEObject, ModelElement, NamedElement, Rule, Unit

public class RuleImpl
extends UnitImpl
implements Rule

An implementation of the model object 'Rule'.

The following features are implemented:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
BasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
BasicNotifierImpl.EAdapterList<E extends Object & Adapter>, BasicNotifierImpl.EObservableAdapterList
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
InternalEObject.EStore
 
Field Summary
protected  EList<AttributeCondition> attributeConditions
          The cached value of the 'Attribute Conditions' containment reference list.
protected static boolean CHECK_DANGLING_EDEFAULT
          The default value of the 'Check Dangling' attribute.
protected  boolean checkDangling
          The cached value of the 'Check Dangling' attribute.
protected static boolean INJECTIVE_MATCHING_EDEFAULT
          The default value of the 'Injective Matching' attribute.
protected  boolean injectiveMatching
          The cached value of the 'Injective Matching' attribute.
protected  EList<String> javaImports
          The cached value of the 'Java Imports' attribute list.
protected  Graph lhs
          The cached value of the 'Lhs' containment reference.
protected  EList<Mapping> mappings
          The cached value of the 'Mappings' containment reference list.
protected  EList<Mapping> multiMappings
          The cached value of the 'Multi Mappings' containment reference list.
protected  EList<Rule> multiRules
          The cached value of the 'Multi Rules' containment reference list.
protected  Graph rhs
          The cached value of the 'Rhs' containment reference.
 
Fields inherited from class org.eclipse.emf.henshin.model.impl.UnitImpl
activated, ACTIVATED_EDEFAULT, parameterMappings, parameters
 
Fields inherited from class org.eclipse.emf.henshin.model.impl.NamedElementImpl
description, DESCRIPTION_EDEFAULT, name, NAME_EDEFAULT
 
Fields inherited from class org.eclipse.emf.henshin.model.impl.ModelElementImpl
annotations
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
 
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.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
RuleImpl()
           
RuleImpl(String name)
           
 
Method Summary
 NotificationChain basicSetLhs(Graph newLhs, NotificationChain msgs)
           
 NotificationChain basicSetRhs(Graph newRhs, NotificationChain msgs)
           
 boolean canCreateEdge(Node source, Node target, EReference type)
           
 Edge createEdge(Node source, Node target, EReference type)
           
 Node createNode(EClass type)
           
 Object eGet(int featureID, boolean resolve, boolean coreType)
           
 NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, Object newValue)
           
protected  EClass eStaticClass()
           
 void eUnset(int featureID)
           
 EList<Edge> getActionEdges(Action action)
           
 EList<Node> getActionNodes(Action action)
           
 MappingList getAllMappings()
           
 EList<Rule> getAllMultiRules()
           
 EList<AttributeCondition> getAttributeConditions()
           
 EList<String> getJavaImports()
           
 Rule getKernelRule()
           
 Graph getLhs()
           
 MappingList getMappings()
           
 MappingList getMultiMappings()
           
 Rule getMultiRule(String name)
           
 EList<Rule> getMultiRulePath(Rule multiRule)
           
 EList<Rule> getMultiRules()
           
 EList<Node> getParameterNodes()
           
 Graph getRhs()
           
 Rule getRootRule()
           
 EList<Unit> getSubUnits()
          Get the direct subUnits of this unit.
 boolean isCheckDangling()
           
 boolean isInjectiveMatching()
           
 boolean isMultiRule()
           
 boolean removeAttribute(Attribute attribute, boolean removeMapped)
           
 boolean removeEdge(Edge edge, boolean removeMapped)
           
 boolean removeNode(Node node, boolean removeMapped)
           
 void setCheckDangling(boolean newCheckDangling)
           
 void setInjectiveMatching(boolean newInjectiveMatching)
           
 void setLhs(Graph newLhs)
           
 void setRhs(Graph newRhs)
           
 String toString()
           
 
Methods inherited from class org.eclipse.emf.henshin.model.impl.UnitImpl
getModule, getParameter, getParameterByName, getParameterMappings, getParameters, getSubUnits, isActivated, setActivated
 
Methods inherited from class org.eclipse.emf.henshin.model.impl.NamedElementImpl
getDescription, getName, setDescription, setName
 
Methods inherited from class org.eclipse.emf.henshin.model.impl.ModelElementImpl
getAnnotations
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, 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
eBasicAdapterArray, eBasicHasAdapters, 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.henshin.model.Unit
getModule, getParameter, getParameterMappings, getParameters, getSubUnits, isActivated, setActivated
 
Methods inherited from interface org.eclipse.emf.henshin.model.NamedElement
getDescription, getName, setDescription, setName
 
Methods inherited from interface org.eclipse.emf.henshin.model.ModelElement
getAnnotations
 
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

lhs

protected Graph lhs
The cached value of the 'Lhs' containment reference.

See Also:
getLhs()

rhs

protected Graph rhs
The cached value of the 'Rhs' containment reference.

See Also:
getRhs()

attributeConditions

protected EList<AttributeCondition> attributeConditions
The cached value of the 'Attribute Conditions' containment reference list.

See Also:
getAttributeConditions()

mappings

protected EList<Mapping> mappings
The cached value of the 'Mappings' containment reference list.

See Also:
getMappings()

CHECK_DANGLING_EDEFAULT

protected static final boolean CHECK_DANGLING_EDEFAULT
The default value of the 'Check Dangling' attribute.

See Also:
isCheckDangling(), Constant Field Values

checkDangling

protected boolean checkDangling
The cached value of the 'Check Dangling' attribute.

See Also:
isCheckDangling()

INJECTIVE_MATCHING_EDEFAULT

protected static final boolean INJECTIVE_MATCHING_EDEFAULT
The default value of the 'Injective Matching' attribute.

See Also:
isInjectiveMatching(), Constant Field Values

injectiveMatching

protected boolean injectiveMatching
The cached value of the 'Injective Matching' attribute.

See Also:
isInjectiveMatching()

multiRules

protected EList<Rule> multiRules
The cached value of the 'Multi Rules' containment reference list.

See Also:
getMultiRules()

multiMappings

protected EList<Mapping> multiMappings
The cached value of the 'Multi Mappings' containment reference list.

See Also:
getMultiMappings()

javaImports

protected EList<String> javaImports
The cached value of the 'Java Imports' attribute list.

See Also:
getJavaImports()
Constructor Detail

RuleImpl

public RuleImpl()


RuleImpl

public RuleImpl(String name)

Method Detail

eStaticClass

protected EClass eStaticClass()

Overrides:
eStaticClass in class UnitImpl

getLhs

public Graph getLhs()

Specified by:
getLhs in interface Rule
Returns:
the value of the 'Lhs' containment reference.
See Also:
Rule.setLhs(Graph), HenshinPackage.getRule_Lhs()

basicSetLhs

public NotificationChain basicSetLhs(Graph newLhs,
                                     NotificationChain msgs)


setLhs

public void setLhs(Graph newLhs)

Specified by:
setLhs in interface Rule
Parameters:
newLhs - the new value of the 'Lhs' containment reference.
See Also:
Rule.getLhs()

getRhs

public Graph getRhs()

Specified by:
getRhs in interface Rule
Returns:
the value of the 'Rhs' containment reference.
See Also:
Rule.setRhs(Graph), HenshinPackage.getRule_Rhs()

basicSetRhs

public NotificationChain basicSetRhs(Graph newRhs,
                                     NotificationChain msgs)


setRhs

public void setRhs(Graph newRhs)

Specified by:
setRhs in interface Rule
Parameters:
newRhs - the new value of the 'Rhs' containment reference.
See Also:
Rule.getRhs()

getAttributeConditions

public EList<AttributeCondition> getAttributeConditions()

Specified by:
getAttributeConditions in interface Rule
Returns:
the value of the 'Attribute Conditions' containment reference list.
See Also:
HenshinPackage.getRule_AttributeConditions(), AttributeCondition.getRule()

getMappings

public MappingList getMappings()

Specified by:
getMappings in interface Rule
Returns:
the value of the 'Mappings' containment reference list.
See Also:
HenshinPackage.getRule_Mappings()

getKernelRule

public Rule getKernelRule()

Specified by:
getKernelRule in interface Rule

getRootRule

public Rule getRootRule()

Specified by:
getRootRule in interface Rule

getMultiRule

public Rule getMultiRule(String name)

Specified by:
getMultiRule in interface Rule

getMultiRulePath

public EList<Rule> getMultiRulePath(Rule multiRule)

Specified by:
getMultiRulePath in interface Rule
Parameters:
multiRule - a direct or indirect multi-rule of this rule.
Returns:
The path to the argument multi-rule.

getAllMultiRules

public EList<Rule> getAllMultiRules()

Specified by:
getAllMultiRules in interface Rule

getAllMappings

public MappingList getAllMappings()

Specified by:
getAllMappings in interface Rule

getActionNodes

public EList<Node> getActionNodes(Action action)

Specified by:
getActionNodes in interface Rule

getActionEdges

public EList<Edge> getActionEdges(Action action)

Specified by:
getActionEdges in interface Rule

getParameterNodes

public EList<Node> getParameterNodes()

Specified by:
getParameterNodes in interface Rule

isMultiRule

public boolean isMultiRule()

Specified by:
isMultiRule in interface Rule

createNode

public Node createNode(EClass type)

Specified by:
createNode in interface Rule

removeNode

public boolean removeNode(Node node,
                          boolean removeMapped)

Specified by:
removeNode in interface Rule

createEdge

public Edge createEdge(Node source,
                       Node target,
                       EReference type)

Specified by:
createEdge in interface Rule

canCreateEdge

public boolean canCreateEdge(Node source,
                             Node target,
                             EReference type)

Specified by:
canCreateEdge in interface Rule

removeEdge

public boolean removeEdge(Edge edge,
                          boolean removeMapped)

Specified by:
removeEdge in interface Rule

removeAttribute

public boolean removeAttribute(Attribute attribute,
                               boolean removeMapped)

Specified by:
removeAttribute in interface Rule

isCheckDangling

public boolean isCheckDangling()

Specified by:
isCheckDangling in interface Rule
Returns:
the value of the 'Check Dangling' attribute.
See Also:
Rule.setCheckDangling(boolean), HenshinPackage.getRule_CheckDangling()

setCheckDangling

public void setCheckDangling(boolean newCheckDangling)

Specified by:
setCheckDangling in interface Rule
Parameters:
newCheckDangling - the new value of the 'Check Dangling' attribute.
See Also:
Rule.isCheckDangling()

isInjectiveMatching

public boolean isInjectiveMatching()

Specified by:
isInjectiveMatching in interface Rule
Returns:
the value of the 'Injective Matching' attribute.
See Also:
Rule.setInjectiveMatching(boolean), HenshinPackage.getRule_InjectiveMatching()

setInjectiveMatching

public void setInjectiveMatching(boolean newInjectiveMatching)

Specified by:
setInjectiveMatching in interface Rule
Parameters:
newInjectiveMatching - the new value of the 'Injective Matching' attribute.
See Also:
Rule.isInjectiveMatching()

getMultiRules

public EList<Rule> getMultiRules()

Specified by:
getMultiRules in interface Rule
Returns:
the value of the 'Multi Rules' containment reference list.
See Also:
HenshinPackage.getRule_MultiRules()

getMultiMappings

public MappingList getMultiMappings()

Specified by:
getMultiMappings in interface Rule
Returns:
the value of the 'Multi Mappings' containment reference list.
See Also:
HenshinPackage.getRule_MultiMappings()

getJavaImports

public EList<String> getJavaImports()

Specified by:
getJavaImports in interface Rule
Returns:
the value of the 'Java Imports' attribute list.
See Also:
HenshinPackage.getRule_JavaImports()

eInverseAdd

public NotificationChain eInverseAdd(InternalEObject otherEnd,
                                     int featureID,
                                     NotificationChain msgs)

Overrides:
eInverseAdd in class UnitImpl

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        NotificationChain msgs)

Overrides:
eInverseRemove in class UnitImpl

eGet

public Object eGet(int featureID,
                   boolean resolve,
                   boolean coreType)

Specified by:
eGet in interface InternalEObject
Overrides:
eGet in class UnitImpl

eSet

public void eSet(int featureID,
                 Object newValue)

Specified by:
eSet in interface InternalEObject
Overrides:
eSet in class UnitImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface InternalEObject
Overrides:
eUnset in class UnitImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface InternalEObject
Overrides:
eIsSet in class UnitImpl

toString

public String toString()

Overrides:
toString in class UnitImpl

getSubUnits

public EList<Unit> getSubUnits()
Description copied from class: UnitImpl
Get the direct subUnits of this unit. Subclasses must implement this method.

Specified by:
getSubUnits in class UnitImpl