public interface NamedElement extends Element
The following features are supported:
Aadl2Package.getNamedElement()
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()
The query allNamespaces() gives the sequence of namespaces in which the
NamedElement is nested, working outwards.
|
void |
checkPropertyAssociation(Property pd,
java.util.Collection<? extends PropertyExpression> vals)
Check that the proposed association is legal for this property holder.
|
PropertyAssociation |
createOwnedPropertyAssociation()
Creates a new
PropertyAssociation and appends it to the 'Owned Property Association' containment reference list. |
java.lang.String |
getName()
Returns the value of the 'Name' attribute.
|
Namespace |
getNamespace() |
PropertyExpression |
getNonModalPropertyValue(Property pd) |
org.eclipse.emf.common.util.EList<PropertyAssociation> |
getOwnedPropertyAssociations()
Returns the value of the 'Owned Property Association' containment reference list.
|
PropertyAcc |
getPropertyValue(Property property)
Get the property value for a particular model element and property.
|
void |
getPropertyValueInternal(Property property,
PropertyAcc pas,
boolean fromInstanceSlaveCall)
Helper routine for computing the value of the property.
|
java.util.List<? extends PropertyExpression> |
getPropertyValueList(Property property) |
org.eclipse.emf.common.util.EList<PropertyExpression> |
getPropertyValues(java.lang.String propertySetName,
java.lang.String propertyName)
DB: Added for OCL.
|
java.lang.String |
getQualifiedName()
Returns the value of the 'Qualified Name' attribute.
|
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)
If
there is no name, or one of the containing namespaces has no name, there
is no qualified name.
|
boolean |
has_qualified_name(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
When there is a name, and all of the containing namespaces have a name,
the qualified name is constructed from the names of the containing
namespaces.
|
boolean |
hasName()
Returns
true if this NamedElement has a name. |
boolean |
isDistinguishableFrom(NamedElement n,
Namespace ns)
The query isDistinguishableFrom() determines whether two NamedElements
may logically co-exist within a Namespace.
|
java.lang.String |
qualifiedName()
When there is a name, and all of the containing namespaces have a name,
the qualified name is constructed from the names of the containing
namespaces.
|
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()
The query separator() gives the string that is used to separate names
when constructing a qualified name.
|
void |
setName(java.lang.String value)
Sets the value of the '
Name ' attribute. |
PropertyAssociation |
setPropertyValue(Property pd,
java.util.List<? extends PropertyExpression> pvl)
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) |
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
java.lang.String getName()
setName(String)
,
Aadl2Package.getNamedElement_Name()
void setName(java.lang.String value)
Name
' attribute.
value
- the new value of the 'Name' attribute.getName()
java.lang.String getQualifiedName()
Aadl2Package.getNamedElement_QualifiedName()
org.eclipse.emf.common.util.EList<PropertyAssociation> getOwnedPropertyAssociations()
PropertyAssociation
.
If the meaning of the 'Owned Property Association' containment reference list isn't clear, there really should be more of a description here...
Aadl2Package.getNamedElement_OwnedPropertyAssociation()
PropertyAssociation createOwnedPropertyAssociation()
PropertyAssociation
and appends it to the 'Owned Property Association' containment reference list.
PropertyAssociation
.getOwnedPropertyAssociations()
boolean has_no_qualified_name(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
diagnostics
- The chain of diagnostics to which problems are to be
appended.context
- The cache of context-specific information. boolean has_qualified_name(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
diagnostics
- The chain of diagnostics to which problems are to be
appended.context
- The cache of context-specific information. Namespace getNamespace()
org.eclipse.emf.common.util.EList<Namespace> allNamespaces()
boolean isDistinguishableFrom(NamedElement n, Namespace ns)
java.lang.String separator()
java.lang.String qualifiedName()
boolean hasName()
true
if this NamedElement
has a name. This method
will check for null
and the empty string.true
if object has a name; false
otherwise.PropertyExpression getSimplePropertyValue(Property property) throws InvalidModelException, PropertyNotPresentException, PropertyIsModalException, java.lang.IllegalStateException, java.lang.IllegalArgumentException, PropertyDoesNotApplyToHolderException, PropertyIsListException
property
- PropertyInvalidModelException
- Thrown if the property value cannot be
retrieved because the model is incomplete or otherwise
invalid.PropertyNotPresentException
- Thrown if the property is undefined
for this NamedElement.PropertyIsModalException
- Thrown if this NamedElement is modal and
declarative.java.lang.IllegalStateException
- Thrown if the lookup encounters a cycle of
property reference dependencies.java.lang.IllegalArgumentException
- Thrown if property is null.PropertyDoesNotApplyToHolderException
- Thrown if the Property
property does not apply to this NamedElement.PropertyIsListException
- Thrown if the property is not scalar.SystemInstance.setCurrentSystemOperationMode(org.osate.aadl2.instance.SystemOperationMode)
PropertyAcc getPropertyValue(Property property) throws java.lang.IllegalStateException, InvalidModelException, PropertyDoesNotApplyToHolderException, java.lang.IllegalArgumentException
property
- The property whose value is to be retieved.null
.java.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.,
acceptsProperty(Property)
returns false
.java.lang.IllegalArgumentException
- Thrown if property is null
.boolean acceptsProperty(Property property)
property
- The property definition to test.true
if the given property applies to this element.void getPropertyValueInternal(Property property, PropertyAcc pas, boolean fromInstanceSlaveCall) throws InvalidModelException
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.
property
- The property whose value is to be retrieved. It must be
the case that this property is accepted by the property
holder, i.e., acceptsProperty(Property)
must return
true
.paa
- The working property value accumulator to add results to.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.PropertyAssociation setPropertyValue(Property pd, java.util.List<? extends PropertyExpression> pvl)
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.
pd
- property definition objectpvl
- List of property value objects.java.lang.IllegalArgumentException
- Thrown if the property value cannot
be set. This could be because the given property doesn't
apply to this property holder, the property value isn't
list-valued and the given list does not have exactly 1
element, or because of type mismatch issues.void checkPropertyAssociation(Property pd, java.util.Collection<? extends PropertyExpression> vals)
IllegalArgumentException
describing the problem.java.lang.IllegalArgumentException
- (see description)void removePropertyAssociations(Property pd)
pd
- The property definitionvoid removePropertyAssociations(Property pd, java.util.List<? extends Mode> modes)
pd
- The property definitionmodes
- list of modesPropertyAssociation setPropertyValue(Property pd, java.util.List<? extends PropertyExpression> pvl, java.util.List<? extends Mode> modes)
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 setPropertyValue(Property, List)
, this method is not
affected by the current system operation mode.
pd
- property definition objectpvl
- List of property value objectsmodes
- list of modes.java.lang.IllegalArgumentException
- Thrown if the property value cannot
be set. This could be because the given property doesn't
apply to this property holder, the property value isn't
list-valued and the given list does not have exactly 1
element, or because of type mismatch issues.java.util.List<? extends PropertyExpression> getPropertyValueList(Property property)
PropertyAssociation setPropertyValue(Property pd, PropertyValue pv)
org.eclipse.emf.common.util.EList<PropertyExpression> getPropertyValues(java.lang.String propertySetName, java.lang.String propertyName) throws InvalidModelException, java.lang.IllegalArgumentException, PropertyIsModalException, java.lang.IllegalStateException, PropertyDoesNotApplyToHolderException
property
- mode
- InvalidModelException
java.lang.IllegalArgumentException
PropertyIsModalException
java.lang.IllegalStateException
PropertyDoesNotApplyToHolderException
PropertyExpression getNonModalPropertyValue(Property pd)