public abstract class NamedElementImpl extends ElementImpl implements NamedElement
The following features are implemented:
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
copyright
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsProperty(Property property)
Query whether this object accepts values for the given property.
|
org.eclipse.emf.common.util.EList<Namespace> |
allNamespaces() |
void |
checkPropertyAssociation(Property pd,
java.util.Collection<? extends PropertyExpression> vals)
Check that the proposed association is legal.
|
PropertyAssociation |
createOwnedPropertyAssociation() |
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) |
void |
eUnset(int featureID) |
java.lang.String |
getName() |
Namespace |
getNamespace() |
PropertyExpression |
getNonModalPropertyValue(Property property)
Retrieves the property value (single or list) of a non-modal property.
|
org.eclipse.emf.common.util.EList<PropertyAssociation> |
getOwnedPropertyAssociations() |
PropertyAcc |
getPropertyValue(Property property)
Returns the property value for the property specified by property
|
void |
getPropertyValueInternal(Property pn,
PropertyAcc pas,
boolean fromInstanceSlaveCall)
Helper routine for computing the value of the property.
|
java.util.List<PropertyExpression> |
getPropertyValueList(Property property)
Retrieves a non-modal property value as a list.
|
org.eclipse.emf.common.util.EList<PropertyExpression> |
getPropertyValues(java.lang.String p_propertySetName,
java.lang.String p_propertyName)
DB: Added for OCL.
|
java.lang.String |
getQualifiedName() |
PropertyExpression |
getSimplePropertyValue(Property property)
Retrieves the property value of a non-modal, single-valued property.
|
boolean |
has_no_qualified_name(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context) |
boolean |
has_qualified_name(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context) |
boolean |
hasName()
Returns
true if this NamedElement has a name. |
boolean |
isDistinguishableFrom(NamedElement n,
Namespace ns) |
java.lang.String |
qualifiedName() |
void |
removePropertyAssociations(Property pd)
Remove all the local property associations for the given property
definition.
|
void |
removePropertyAssociations(Property pd,
java.util.List<? extends Mode> modes)
Modify the modal property associations so that there are no local
associations for the given property for the given modes.
|
java.lang.String |
separator() |
void |
setName(java.lang.String newName) |
PropertyAssociation |
setPropertyValue(Property pd,
java.util.List<? extends PropertyExpression> pes)
Set property association for given property definition with specified
value list.
|
PropertyAssociation |
setPropertyValue(Property pd,
java.util.List<? extends PropertyExpression> pvl,
java.util.List<? extends Mode> modes)
Set property association for given property definition to the specified
value list in the given modes.
|
PropertyAssociation |
setPropertyValue(Property pd,
PropertyValue pv) |
java.lang.String |
toString() |
allOwnedElements, createOwnedComment, getChildren, getContainingClassifier, getContainingComponentImpl, getElementRoot, getOwnedComments, getOwnedElements, getOwner, has_owner, isSetOwnedElements, mustBeOwned, not_own_self
getAdapter, getLocationReference, setLocationReference, setLocationReference
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset
eNotificationRequired, eNotify
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
allOwnedElements, createOwnedComment, getChildren, getContainingClassifier, getContainingComponentImpl, getElementRoot, getOwnedComments, getOwnedElements, getOwner, has_owner, mustBeOwned, not_own_self
getLocationReference, setLocationReference, setLocationReference
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
public java.lang.String getName()
getName
in interface NamedElement
NamedElement.setName(String)
,
Aadl2Package.getNamedElement_Name()
public void setName(java.lang.String newName)
setName
in interface NamedElement
newName
- the new value of the 'Name' attribute.NamedElement.getName()
public java.lang.String getQualifiedName()
getQualifiedName
in interface NamedElement
Aadl2Package.getNamedElement_QualifiedName()
public org.eclipse.emf.common.util.EList<PropertyAssociation> getOwnedPropertyAssociations()
getOwnedPropertyAssociations
in interface NamedElement
Aadl2Package.getNamedElement_OwnedPropertyAssociation()
public PropertyAssociation createOwnedPropertyAssociation()
createOwnedPropertyAssociation
in interface NamedElement
PropertyAssociation
.NamedElement.getOwnedPropertyAssociations()
public boolean has_no_qualified_name(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
has_no_qualified_name
in interface NamedElement
diagnostics
- The chain of diagnostics to which problems are to be
appended.context
- The cache of context-specific information. public boolean has_qualified_name(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
has_qualified_name
in interface NamedElement
diagnostics
- The chain of diagnostics to which problems are to be
appended.context
- The cache of context-specific information. public Namespace getNamespace()
getNamespace
in interface NamedElement
public org.eclipse.emf.common.util.EList<Namespace> allNamespaces()
allNamespaces
in interface NamedElement
public boolean isDistinguishableFrom(NamedElement n, Namespace ns)
isDistinguishableFrom
in interface NamedElement
public java.lang.String separator()
separator
in interface NamedElement
public java.lang.String qualifiedName()
qualifiedName
in interface NamedElement
public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
eInverseRemove
in class ElementImpl
public java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
eGet
in interface org.eclipse.emf.ecore.InternalEObject
eGet
in class ElementImpl
public void eSet(int featureID, java.lang.Object newValue)
eSet
in interface org.eclipse.emf.ecore.InternalEObject
eSet
in class ElementImpl
public void eUnset(int featureID)
eUnset
in interface org.eclipse.emf.ecore.InternalEObject
eUnset
in class ElementImpl
public boolean eIsSet(int featureID)
eIsSet
in interface org.eclipse.emf.ecore.InternalEObject
eIsSet
in class ElementImpl
public java.lang.String toString()
toString
in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public boolean hasName()
NamedElement
true
if this NamedElement
has a name. This method
will check for null
and the empty string.hasName
in interface NamedElement
true
if object has a name; false
otherwise.public PropertyExpression getSimplePropertyValue(Property property) throws InvalidModelException, PropertyNotPresentException, PropertyIsModalException, java.lang.IllegalStateException, java.lang.IllegalArgumentException, PropertyDoesNotApplyToHolderException, PropertyIsListException
getSimplePropertyValue
in interface NamedElement
property
- PropertyInvalidModelException
- Thrown if the property value cannot
be retrieved because the model is incomplete or otherwise invalid.PropertyNotPresentException
PropertyIsModalException
java.lang.IllegalStateException
java.lang.IllegalArgumentException
PropertyDoesNotApplyToHolderException
PropertyIsListException
SystemInstance.setCurrentSystemOperationMode(org.osate.aadl2.instance.SystemOperationMode)
public PropertyExpression getNonModalPropertyValue(Property property) throws InvalidModelException, PropertyNotPresentException, PropertyIsModalException, java.lang.IllegalStateException, java.lang.IllegalArgumentException, PropertyDoesNotApplyToHolderException
getNonModalPropertyValue
in interface NamedElement
property
- PropertyInvalidModelException
PropertyNotPresentException
PropertyIsModalException
java.lang.IllegalStateException
java.lang.IllegalArgumentException
PropertyDoesNotApplyToHolderException
public PropertyAcc getPropertyValue(Property property) throws java.lang.IllegalStateException, InvalidModelException, PropertyDoesNotApplyToHolderException, java.lang.IllegalArgumentException
getPropertyValue
in interface NamedElement
property
- The property to lookupjava.lang.IllegalStateException
- Thrown if the lookup encounters a cycle of property
reference dependencies.InvalidModelException
- Thrown if the property value cannot be
retrieved because the model is incomplete or otherwise
invalid.PropertyDoesNotApplyToHolderException
- Thrown if the given
property does not apply to the property holder, i.e.,
NamedElement.acceptsProperty(Property)
returns false
.java.lang.IllegalArgumentException
- Thrown if property is null
.public boolean acceptsProperty(Property property)
NamedElement
acceptsProperty
in interface NamedElement
property
- The property definition to test.true
if the given property applies to this element.public void getPropertyValueInternal(Property pn, PropertyAcc pas, boolean fromInstanceSlaveCall) throws InvalidModelException
NamedElement
NamedElementImpl
, but because of the way that
EMF deals with multiple inheritance, not all implementations of
NamedElement actually extend from NamedElementImpl.
In particular, this method does not create a new property value accumulator—it uses the one provided—and it does not look up the default value of the property.
getPropertyValueInternal
in interface NamedElement
pn
- The property whose value is to be retrieved. It must be
the case that this property is accepted by the property
holder, i.e., NamedElement.acceptsProperty(Property)
must return
true
.fromInstanceSlaveCall
- true
if the call is performing
a lookup on the declarative model on behalf of an instance
model object. When true
the lookup algorithm
ignores the "inherits" attribute on property definitions when
it would mean that the lookup should defer to the containing
component implementation. Also disables the interpretation of
contained property associations in the declarative model
because they have already been applied to the instance model
at this point. The expectation is that the instance model
lookup itself is not ignoring the inherits attribute, and thus
any inherited property values will still be found correctly.
Interpreting the inherits attribute during the declarative
model search is redundant and causes problems later on. This
flag does not affect lookup for feature declarations because
in that case the inherit flag defers to the component type or
feature group type.InvalidModelException
- Thrown if the property value cannot be
retrieved because the model is incomplete or otherwise
invalid.public final PropertyAssociation setPropertyValue(Property pd, java.util.List<? extends PropertyExpression> pes)
NamedElement
PropertyAssociation#isDerived()
status of
the association is set to false
.
When the property is not list-valued, i.e., pd.isList()
is
false
, the provided list of values must be of length 1,
i.e., pvl.size() == 1
.
When invoked on an instance model object (i.e., a subtype of
InstanceObject
), the property association is made to apply only
to current system operation mode as determined from the containing system
instance's SystemInstance.getCurrentSystemOperationMode()
method.
setPropertyValue
in interface NamedElement
pd
- property definition objectpes
- List of property value objects.public void checkPropertyAssociation(Property pd, java.util.Collection<? extends PropertyExpression> vals)
checkPropertyAssociation
in interface NamedElement
public final void removePropertyAssociations(Property pd)
NamedElement
removePropertyAssociations
in interface NamedElement
pd
- The property definitionpublic final void removePropertyAssociations(Property pd, java.util.List<? extends Mode> modes)
NamedElement
removePropertyAssociations
in interface NamedElement
pd
- The property definitionmodes
- list of modespublic final PropertyAssociation setPropertyValue(Property pd, java.util.List<? extends PropertyExpression> pvl, java.util.List<? extends Mode> modes)
NamedElement
PropertyAssociation#isDerived()
status of
the association is set to false
.
When the property is not list-valued, i.e., pd.isList()
is
false
, the provided list of values must be of length 1,
i.e., pvl.size() == 1
.
Unlike NamedElement.setPropertyValue(Property, List)
, this method is not
affected by the current system operation mode.
setPropertyValue
in interface NamedElement
pd
- property definition objectpvl
- List of property value objectsmodes
- list of modes.public final java.util.List<PropertyExpression> getPropertyValueList(Property property) throws InvalidModelException, java.lang.IllegalArgumentException, PropertyNotPresentException, PropertyIsModalException, java.lang.IllegalStateException, PropertyDoesNotApplyToHolderException
getPropertyValueList
in interface NamedElement
property
- PropertyDefinitionInvalidModelException
java.lang.IllegalArgumentException
PropertyNotPresentException
PropertyIsModalException
java.lang.IllegalStateException
PropertyDoesNotApplyToHolderException
public final PropertyAssociation setPropertyValue(Property pd, PropertyValue pv)
setPropertyValue
in interface NamedElement
public org.eclipse.emf.common.util.EList<PropertyExpression> getPropertyValues(java.lang.String p_propertySetName, java.lang.String p_propertyName) throws InvalidModelException, java.lang.IllegalArgumentException, PropertyIsModalException, java.lang.IllegalStateException, PropertyDoesNotApplyToHolderException
NamedElement
getPropertyValues
in interface NamedElement
InvalidModelException
java.lang.IllegalArgumentException
PropertyIsModalException
java.lang.IllegalStateException
PropertyDoesNotApplyToHolderException