edu.cmu.sei.aadl.model.property.impl
Class PropertyDefinitionImpl

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 edu.cmu.sei.aadl.model.core.impl.AObjectImpl
                  extended by edu.cmu.sei.aadl.model.core.impl.NamedElementImpl
                      extended by edu.cmu.sei.aadl.model.property.impl.PropertyDefinitionImpl
All Implemented Interfaces:
AObject, NamedElement, PropertyDefinition, PropertyValueHolder, ReferencedProperty, org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject

public class PropertyDefinitionImpl
extends NamedElementImpl
implements PropertyDefinition

An implementation of the model object 'Definition'.

The following features are implemented:


Nested Class Summary
 
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>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
protected  boolean access
          The cached value of the 'Access' attribute
protected static boolean ACCESS_EDEFAULT
          The default value of the 'Access' attribute
protected  org.eclipse.emf.common.util.EList appliesto
          The cached value of the 'Appliesto' attribute list
protected  org.eclipse.emf.common.util.EList appliesToClassifier
          The cached value of the 'Applies To Classifier' containment reference list
static java.lang.String copyright
           
protected  org.eclipse.emf.common.util.EList defaultpropertyValue
          The cached value of the 'Defaultproperty Value' containment reference list
protected static boolean HAS_EMPTY_LIST_EDEFAULT
          The default value of the 'Has Empty List' attribute
protected  boolean hasEmptyList
          The cached value of the 'Has Empty List' attribute
protected  boolean inherit
          The cached value of the 'Inherit' attribute
protected static boolean INHERIT_EDEFAULT
          The default value of the 'Inherit' attribute
protected  boolean list
          The cached value of the 'List' attribute
protected static boolean LIST_EDEFAULT
          The default value of the 'List' attribute
protected  ParsedPropertyReference parsedPropertyReference
          the parsed proeprty reference names
protected  PropertyType propertyType
          The cached value of the 'Property Type' containment reference
protected  PropertyType propertyTypeReference
          The cached value of the 'Property Type Reference' reference
 
Fields inherited from class edu.cmu.sei.aadl.model.core.impl.NamedElementImpl
name, NAME_EDEFAULT
 
Fields inherited from class edu.cmu.sei.aadl.model.core.impl.AObjectImpl
comment, locationReference
 
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
protected PropertyDefinitionImpl()
           
 
Method Summary
 void addAppliesto(PropertyOwnerCategory newAppliesto)
          phf: add element to multiplicity EList
 void addAppliesToClassifier(ClassifierValue newAppliesToClassifier)
          phf: add element to multiplicity EList
 void addDefaultpropertyValue(PropertyValue newDefaultpropertyValue)
          phf: add element to multiplicity EList
 boolean appliesTo(PropertyHolder element)
          Does this property apply to the given element?
 PropertyType basicGetPropertyTypeReference()
           
 org.eclipse.emf.common.notify.NotificationChain basicSetPropertyType(PropertyType newPropertyType, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, java.lang.Object newValue)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 void eUnset(int featureID)
           
 AadlPropertyValue evaluate(java.lang.String sign, java.util.Map modes, PropertyHolder context)
          Evaluate a referenced property.
 org.eclipse.emf.common.util.EList getAppliesto()
           
 org.eclipse.emf.common.util.EList getAppliesToClassifier()
           
 org.eclipse.emf.common.util.EList getDefaultpropertyValue()
           
 AadlPropertyValue getDefaultValue()
          Get the default value of the property.
 ParsedPropertyReference getParsedPropertyReference()
          returns parsed property reference object
 PropertySet getPropertySet()
          gets the containing property set for a named property definition
 PropertyType getPropertyType()
           
 PropertyType getPropertyTypeReference()
           
 java.lang.String getQualifiedName()
          get the qualified property name
 PropertyType getThePropertyType()
          returns the property type of a property definition.
 boolean isAccess()
           
 boolean isHasEmptyList()
           
 boolean isInherit()
           
 boolean isList()
           
 void preEvaluate(PropertyHolder context, java.util.Set reqModeContexts)
          Pre-evaluate a property value to determine which ComponentImpls have modes that can affect the property value.
 void setAccess(boolean newAccess)
          phf: we want an add version for EList
 void setHasEmptyList(boolean newHasEmptyList)
           
 void setInherit(boolean newInherit)
          phf: we want an add version for EList
 void setList(boolean newList)
          phf: we want an add version for EList
 void setParsedPropertyReference(ParsedPropertyReference pr)
          sets parsed names for property reference
 void setPropertyType(PropertyType newPropertyType)
          phf: we want an add version for EList
 void setPropertyTypeReference(PropertyType newPropertyTypeReference)
          phf: we want an add version for EList
 java.lang.String toString()
           
 
Methods inherited from class edu.cmu.sei.aadl.model.core.impl.NamedElementImpl
checkName, getName, setName
 
Methods inherited from class edu.cmu.sei.aadl.model.core.impl.AObjectImpl
addComment, eObjectForURIFragmentSegment, eURIFragmentSegment, getAadlSpec, getAdapter, getAObjectRoot, getChildren, getComment, getContainingClassifier, getContainingClassifierNameSpace, getContainingComponentImpl, getContainingComponentType, getContainingPropertyAssociationDefinitionConstant, getContainingSubcomponent, getLocationReference, getReferencedObject, getSecondReferencedObject, getSystemInstance, setLocationReference, setLocationReference
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eIsSet, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStore, eUnset, 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 edu.cmu.sei.aadl.model.core.NamedElement
getName, setName
 
Methods inherited from interface edu.cmu.sei.aadl.model.core.AObject
addComment, getAadlSpec, getAObjectRoot, getChildren, getComment, getContainingClassifier, getContainingClassifierNameSpace, getContainingComponentImpl, getContainingComponentType, getContainingPropertyAssociationDefinitionConstant, getContainingSubcomponent, getLocationReference, getReferencedObject, getSecondReferencedObject, getSystemInstance, setLocationReference, setLocationReference
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, 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.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values

propertyTypeReference

protected PropertyType propertyTypeReference
The cached value of the 'Property Type Reference' reference.

See Also:
getPropertyTypeReference()

parsedPropertyReference

protected ParsedPropertyReference parsedPropertyReference
the parsed proeprty reference names


propertyType

protected PropertyType propertyType
The cached value of the 'Property Type' containment reference.

See Also:
getPropertyType()

defaultpropertyValue

protected org.eclipse.emf.common.util.EList defaultpropertyValue
The cached value of the 'Defaultproperty Value' containment reference list.

See Also:
getDefaultpropertyValue()

appliesToClassifier

protected org.eclipse.emf.common.util.EList appliesToClassifier
The cached value of the 'Applies To Classifier' containment reference list.

See Also:
getAppliesToClassifier()

ACCESS_EDEFAULT

protected static final boolean ACCESS_EDEFAULT
The default value of the 'Access' attribute.

See Also:
isAccess(), Constant Field Values

access

protected boolean access
The cached value of the 'Access' attribute.

See Also:
isAccess()

INHERIT_EDEFAULT

protected static final boolean INHERIT_EDEFAULT
The default value of the 'Inherit' attribute.

See Also:
isInherit(), Constant Field Values

inherit

protected boolean inherit
The cached value of the 'Inherit' attribute.

See Also:
isInherit()

LIST_EDEFAULT

protected static final boolean LIST_EDEFAULT
The default value of the 'List' attribute.

See Also:
isList(), Constant Field Values

list

protected boolean list
The cached value of the 'List' attribute.

See Also:
isList()

appliesto

protected org.eclipse.emf.common.util.EList appliesto
The cached value of the 'Appliesto' attribute list.

See Also:
getAppliesto()

HAS_EMPTY_LIST_EDEFAULT

protected static final boolean HAS_EMPTY_LIST_EDEFAULT
The default value of the 'Has Empty List' attribute.

See Also:
isHasEmptyList(), Constant Field Values

hasEmptyList

protected boolean hasEmptyList
The cached value of the 'Has Empty List' attribute.

See Also:
isHasEmptyList()
Constructor Detail

PropertyDefinitionImpl

protected PropertyDefinitionImpl()

Method Detail

eStaticClass

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

Overrides:
eStaticClass in class NamedElementImpl

getPropertyTypeReference

public PropertyType getPropertyTypeReference()

Specified by:
getPropertyTypeReference in interface PropertyDefinition
Returns:
the value of the 'Property Type Reference' reference.
See Also:
PropertyDefinition.setPropertyTypeReference(PropertyType), PropertyPackage.getPropertyDefinition_PropertyTypeReference()

basicGetPropertyTypeReference

public PropertyType basicGetPropertyTypeReference()


setPropertyTypeReference

public void setPropertyTypeReference(PropertyType newPropertyTypeReference)
phf: we want an add version for EList

Specified by:
setPropertyTypeReference in interface PropertyDefinition
Parameters:
newPropertyTypeReference - the new value of the 'Property Type Reference' reference.
See Also:
PropertyDefinition.getPropertyTypeReference()

getPropertyType

public PropertyType getPropertyType()

Specified by:
getPropertyType in interface PropertyDefinition
Returns:
the value of the 'Property Type' containment reference.
See Also:
PropertyDefinition.setPropertyType(PropertyType), PropertyPackage.getPropertyDefinition_PropertyType()

basicSetPropertyType

public org.eclipse.emf.common.notify.NotificationChain basicSetPropertyType(PropertyType newPropertyType,
                                                                            org.eclipse.emf.common.notify.NotificationChain msgs)


setPropertyType

public void setPropertyType(PropertyType newPropertyType)
phf: we want an add version for EList

Specified by:
setPropertyType in interface PropertyDefinition
Parameters:
newPropertyType - the new value of the 'Property Type' containment reference.
See Also:
PropertyDefinition.getPropertyType()

getDefaultpropertyValue

public org.eclipse.emf.common.util.EList getDefaultpropertyValue()

Specified by:
getDefaultpropertyValue in interface PropertyDefinition
Returns:
the value of the 'Defaultproperty Value' containment reference list.
See Also:
PropertyPackage.getPropertyDefinition_DefaultpropertyValue()

addDefaultpropertyValue

public void addDefaultpropertyValue(PropertyValue newDefaultpropertyValue)
phf: add element to multiplicity EList

Specified by:
addDefaultpropertyValue in interface PropertyDefinition
Parameters:
newDefaultpropertyValue - the value to add to 'Defaultproperty Value' containment reference list.

getAppliesToClassifier

public org.eclipse.emf.common.util.EList getAppliesToClassifier()

Specified by:
getAppliesToClassifier in interface PropertyDefinition
Returns:
the value of the 'Applies To Classifier' containment reference list.
See Also:
PropertyPackage.getPropertyDefinition_AppliesToClassifier()

addAppliesToClassifier

public void addAppliesToClassifier(ClassifierValue newAppliesToClassifier)
phf: add element to multiplicity EList

Specified by:
addAppliesToClassifier in interface PropertyDefinition
Parameters:
newAppliesToClassifier - the value to add to 'Applies To Classifier' containment reference list.

isAccess

public boolean isAccess()

Specified by:
isAccess in interface PropertyDefinition
Returns:
the value of the 'Access' attribute.
See Also:
PropertyDefinition.setAccess(boolean), PropertyPackage.getPropertyDefinition_Access()

setAccess

public void setAccess(boolean newAccess)
phf: we want an add version for EList

Specified by:
setAccess in interface PropertyDefinition
Parameters:
newAccess - the new value of the 'Access' attribute.
See Also:
PropertyDefinition.isAccess()

isInherit

public boolean isInherit()

Specified by:
isInherit in interface PropertyDefinition
Returns:
the value of the 'Inherit' attribute.
See Also:
PropertyDefinition.setInherit(boolean), PropertyPackage.getPropertyDefinition_Inherit()

setInherit

public void setInherit(boolean newInherit)
phf: we want an add version for EList

Specified by:
setInherit in interface PropertyDefinition
Parameters:
newInherit - the new value of the 'Inherit' attribute.
See Also:
PropertyDefinition.isInherit()

isList

public boolean isList()

Specified by:
isList in interface PropertyDefinition
Specified by:
isList in interface ReferencedProperty
Returns:
the value of the 'List' attribute.
See Also:
PropertyDefinition.setList(boolean), PropertyPackage.getPropertyDefinition_List()

setList

public void setList(boolean newList)
phf: we want an add version for EList

Specified by:
setList in interface PropertyDefinition
Parameters:
newList - the new value of the 'List' attribute.
See Also:
PropertyDefinition.isList()

getAppliesto

public org.eclipse.emf.common.util.EList getAppliesto()

Specified by:
getAppliesto in interface PropertyDefinition
Returns:
the value of the 'Appliesto' attribute list.
See Also:
PropertyOwnerCategory, PropertyPackage.getPropertyDefinition_Appliesto()

addAppliesto

public void addAppliesto(PropertyOwnerCategory newAppliesto)
phf: add element to multiplicity EList

Specified by:
addAppliesto in interface PropertyDefinition
Parameters:
newAppliesto - the value to add to 'Appliesto' attribute list.

isHasEmptyList

public boolean isHasEmptyList()

Specified by:
isHasEmptyList in interface PropertyDefinition
Returns:
the value of the 'Has Empty List' attribute.
See Also:
PropertyDefinition.setHasEmptyList(boolean), PropertyPackage.getPropertyDefinition_HasEmptyList()

setHasEmptyList

public void setHasEmptyList(boolean newHasEmptyList)

Specified by:
setHasEmptyList in interface PropertyDefinition
Parameters:
newHasEmptyList - the new value of the 'Has Empty List' attribute.
See Also:
PropertyDefinition.isHasEmptyList()

eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                      int featureID,
                                                                      org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseRemove in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

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 NamedElementImpl

eSet

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

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class NamedElementImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class NamedElementImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class NamedElementImpl

toString

public java.lang.String toString()

Overrides:
toString in class NamedElementImpl

getQualifiedName

public java.lang.String getQualifiedName()
get the qualified property name

Specified by:
getQualifiedName in interface PropertyDefinition
Returns:
String property name with the propertyset

setParsedPropertyReference

public void setParsedPropertyReference(ParsedPropertyReference pr)
sets parsed names for property reference

Specified by:
setParsedPropertyReference in interface PropertyDefinition
Parameters:
pr - parsed property reference object

getParsedPropertyReference

public ParsedPropertyReference getParsedPropertyReference()
returns parsed property reference object

Specified by:
getParsedPropertyReference in interface PropertyDefinition
Returns:
ParsedPropertyReference

evaluate

public final AadlPropertyValue evaluate(java.lang.String sign,
                                        java.util.Map modes,
                                        PropertyHolder context)
                                 throws InvalidModelException
Description copied from interface: ReferencedProperty
Evaluate a referenced property.

Specified by:
evaluate in interface ReferencedProperty
Parameters:
sign - the referenceSign value from the containing PropertyReference.
modes - The mode in which to look up the value; a mapping from component impls to modes
context - The context in which to look up any property value references.
Returns:
The evaluated property value: either null, a PropertyValue, or a list of PropertyValues. If the evaluation is trivial, then this will be the same as the receiver.
Throws:
InvalidModelException - Thrown if there is a problem with the model that prevents the prpoerty value from being evaluated.

preEvaluate

public final void preEvaluate(PropertyHolder context,
                              java.util.Set reqModeContexts)
                       throws InvalidModelException
Description copied from interface: ReferencedProperty
Pre-evaluate a property value to determine which ComponentImpls have modes that can affect the property value.

Specified by:
preEvaluate in interface ReferencedProperty
Parameters:
context - The context in which the property value is to be looked up.
reqModeContexts - The working set of component implementations whose modes affect the value of the property. This set is modified as a side-effect of this method.
Throws:
InvalidModelException - Thrown if there is a problem with the model that prevents the prpoerty value from being pre-evaluated.

appliesTo

public final boolean appliesTo(PropertyHolder element)
Description copied from interface: PropertyDefinition
Does this property apply to the given element?

Specified by:
appliesTo in interface PropertyDefinition
Parameters:
element - The element to test.
Returns:
Whether this property applies to the given element.

getDefaultValue

public final AadlPropertyValue getDefaultValue()
Description copied from interface: PropertyDefinition
Get the default value of the property. This differs from PropertyDefinition.getDefaultpropertyValue() in several ways:
  1. It returns an AadlPropertyValue object
  2. It incorporates the fact that a list-valued property has the empty list as it's default value if no other value is provided.

Specified by:
getDefaultValue in interface PropertyDefinition
Returns:
The default value of the property.

getPropertySet

public PropertySet getPropertySet()
gets the containing property set for a named property definition

Specified by:
getPropertySet in interface PropertyDefinition
Returns:
PropertySet

getThePropertyType

public PropertyType getThePropertyType()
returns the property type of a property definition. This will be either a named property type that is referenced or an unnamed property type that is contained

Specified by:
getThePropertyType in interface PropertyDefinition
Specified by:
getThePropertyType in interface ReferencedProperty
Returns:
PropertyType