|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A representation of the model object 'Property'. Property represents a declared state of one or more instances in terms of a named relationship to a value or values. When a property is an attribute of a classifier, the value or values are related to the instance of the classifier by being held in slots of the instance. When a property is an association end, the value or values are related to the instance or instances at the other end(s) of the association (see semantics of Association). Property is indirectly a subclass of Constructs::TypedElement. The range of valid values represented by the property can be controlled by setting the property�s type. Package AssociationClasses (�AssociationClasses� on page 107) A property may have other properties (attributes) that serve as qualifiers.
The following features are supported:
Default
Is Composite
Is Derived
Class
Opposite
Is Derived Union
Owning Association
Redefined Property
Subsetted Property
Datatype
Association
Aggregation
Default Value
Qualifier
Association End
UML2Package.getProperty()
Field Summary | |
static String |
copyright
|
Fields inherited from interface org.eclipse.uml2.NamedElement |
SEPARATOR |
Fields inherited from interface org.eclipse.uml2.MultiplicityElement |
UNLIMITED_UPPER_BOUND |
Method Summary | |
ValueSpecification |
createDefaultValue(EClass eClass)
Creates a ValueSpecification and sets the 'Default Value' containment reference |
Property |
createQualifier(EClass eClass)
Creates a Property and appends it to the 'Qualifier' containment reference list |
AggregationKind |
getAggregation()
Returns the value of the 'Aggregation' attribute. |
Association |
getAssociation()
Returns the value of the 'Association' reference. |
Property |
getAssociationEnd()
Returns the value of the 'Association End' container reference. |
Class |
getClass_()
Returns the value of the 'Class ' reference |
DataType |
getDatatype()
Returns the value of the 'Datatype' container reference. |
String |
getDefault()
Returns the value of the 'Default' attribute. |
ValueSpecification |
getDefaultValue()
Returns the value of the 'Default Value' containment reference |
EList |
getFeaturingClassifiers()
|
Namespace |
getNamespace()
|
Property |
getOpposite()
Returns the value of the 'Opposite' reference |
EList |
getOwnedElements()
|
Element |
getOwner()
|
Association |
getOwningAssociation()
Returns the value of the 'Owning Association' container reference. |
Property |
getQualifier(String unqualifiedName)
Retrieves the Property with the specified name from the 'Qualifier' containment reference list |
EList |
getQualifiers()
Returns the value of the 'Qualifier' containment reference list. |
EList |
getRedefinedElements()
|
EList |
getRedefinedProperties()
Returns the value of the 'Redefined Property' reference list. |
Property |
getRedefinedProperty(String unqualifiedName)
Retrieves the Property with the specified name from the 'Redefined Property' reference list |
EList |
getSubsettedProperties()
Returns the value of the 'Subsetted Property' reference list. |
Property |
getSubsettedProperty(String unqualifiedName)
Retrieves the Property with the specified name from the 'Subsetted Property' reference list |
boolean |
isComposite()
Returns the value of the 'Is Composite' attribute. |
boolean |
isConsistentWith(RedefinableElement redefinee)
A query based on the following OCL expression:
(redefinee.oclIsKindOf(Property) and
let prop: Property = redefinee.oclAsType(Property) in
type.conformsTo(prop.type) and
(lowerBound()->notEmpty and prop.lowerBound()->notEmpty() implies lowerBound() >= prop.lowerBound())
and
(upperBound()->notEmpty and prop.upperBound()->notEmpty() implies upperBound() <= prop.upperBound())
and
(prop.isDerived implies isDerived))
|
boolean |
isDerived()
Returns the value of the 'Is Derived' attribute. |
boolean |
isDerivedUnion()
Returns the value of the 'Is Derived Union' attribute. |
boolean |
isNavigable()
Determines whether this property is navigable, i.e. it is part of an assocation and owned by one of its end types. |
boolean |
isReadOnly()
|
Property |
opposite()
A query based on the following OCL expression:
if owningAssociation->notEmpty() and association.memberEnd->size() = 2 then
let otherEnd = (association.memberEnd - self)->any() in
if otherEnd.owningAssociation->notEmpty then otherEnd else Set{} endif
else Set {}
endif
|
void |
setAggregation(AggregationKind value)
Sets the value of the ' Aggregation ' attribute |
void |
setAssociation(Association value)
Sets the value of the ' Association ' reference |
void |
setAssociationEnd(Property value)
Sets the value of the ' Association End ' container reference |
void |
setBooleanDefault(boolean value)
Sets the default to the specified boolean value. |
void |
setDatatype(DataType value)
Sets the value of the ' Datatype ' container reference |
void |
setDefaultValue(ValueSpecification value)
Sets the value of the ' Default Value ' containment reference |
void |
setIntegerDefault(int value)
Sets the default to the specified integer value. |
void |
setIsDerived(boolean value)
Sets the value of the ' Is Derived ' attribute |
void |
setIsDerivedUnion(boolean value)
Sets the value of the ' Is Derived Union ' attribute |
void |
setIsReadOnly(boolean value)
|
void |
setNavigable(boolean navigable)
Sets the navigability of this property as specified. |
void |
setOwningAssociation(Association value)
Sets the value of the ' Owning Association ' container reference |
void |
setStringDefault(String value)
Sets the default to the specified string value. |
void |
setUnlimitedNaturalDefault(int value)
Sets the default to the specified unlimited natural value. |
Set |
subsettingContext()
A query based on the following OCL expression:
if association->notEmpty()
then association.endType-type
else if classifier->notEmpty then Set{classifier} else Set{} endif
endif
|
boolean |
validateDerivedUnionIsDerived(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
isDerivedUnion implies isDerived
|
boolean |
validateMultiplicityOfComposite(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
isComposite implies (upperBound()->isEmpty() or upperBound() <= 1)
|
boolean |
validateNavigablePropertyRedefinition(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
(subsettedProperty->exists(sp | sp.class->notEmpty())
implies class->notEmpty())
and
(redefinedProperty->exists(rp | rp.class->notEmpty())
implies class->notEmpty())
|
boolean |
validateNavigableReadonly(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
isReadOnly implies class->notEmpty()
|
boolean |
validateOppositeIsOtherEnd(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
opposite =
if owningAssociation->notEmpty() and association.memberEnd->size() = 2 then
let otherEnd = (association.memberEnd - self)->any() in
if otherEnd.owningAssociation->notEmpty then otherEnd else Set{} endif
else Set {}
endif
|
boolean |
validateSubsettingContext(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
subsettedProperty->notEmpty() implies
(subsettingContext()->notEmpty() and subsettingContext()->forAll (sc |
subsettedProperty->forAll(sp |
sp.subsettingContext()->exists(c | sc.conformsTo(c)))))
|
boolean |
validateSubsettingRules(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
subsettedProperty->forAll(sp |
type.conformsTo(sp.type) and
((upperBound()->notEmpty() and sp.upperBound()->notEmpty()) implies
upperBound()<=sp.upperBound() ))
|
Methods inherited from interface org.eclipse.uml2.Feature |
getFeaturingClassifier, isStatic, setIsStatic |
Methods inherited from interface org.eclipse.uml2.RedefinableElement |
getRedefinitionContext, getRedefinitionContexts, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid |
Methods inherited from interface org.eclipse.uml2.NamedElement |
allNamespaces, createNameExpression, getClientDependencies, getClientDependency, getName, getNameExpression, getQualifiedName, getVisibility, isDistinguishableFrom, qualifiedName, separator, setName, setNameExpression, setVisibility, validateNoName, validateQualifiedName, validateVisibilityNeedsOwnership |
Methods inherited from interface org.eclipse.uml2.TemplateableElement |
createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBindings, parameterableElements, setOwnedTemplateSignature |
Methods inherited from interface org.eclipse.uml2.Element |
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getValue, hasKeyword, isApplied, isRequired, mustBeOwned, removeKeyword, setValue, unapply, validateHasOwner, validateNotOwnSelf |
Methods inherited from interface org.eclipse.emf.ecore.EModelElement |
getEAnnotation, getEAnnotations |
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.uml2.TypedElement |
getType, setType |
Methods inherited from interface org.eclipse.uml2.MultiplicityElement |
createLowerValue, createUpperValue, getLower, getLowerValue, getUpper, getUpperValue, includesCardinality, includesMultiplicity, isMultivalued, isOrdered, isUnique, lower, lowerBound, setIsOrdered, setIsUnique, setLowerBound, setLowerValue, setUpperBound, setUpperValue, upper, upperBound, validateLowerEqLowerbound, validateLowerGe0, validateUpperEqUpperbound, validateUpperGeLower, validateUpperGt0 |
Methods inherited from interface org.eclipse.uml2.ConnectableElement |
getEnds |
Methods inherited from interface org.eclipse.uml2.ParameterableElement |
getOwningParameter, getTemplateParameter, setOwningParameter, setTemplateParameter |
Methods inherited from interface org.eclipse.uml2.DeploymentTarget |
createDeployment, getClientDependencies, getDeployedElement, getDeployedElements, getDeployment, getDeployments |
Field Detail |
public static final String copyright
Method Detail |
public String getDefault()
""
.
If the meaning of the 'Default' attribute isn't clear, there really should be more of a description here...
UML2Package.getProperty_Default()
public boolean isComposite()
"false"
.
If the meaning of the 'Is Composite' attribute isn't clear, there really should be more of a description here...
UML2Package.getProperty_IsComposite()
public boolean isDerived()
"false"
.
If the meaning of the 'Is Derived' attribute isn't clear, there really should be more of a description here...
Specifies whether the Property is derived, i.e., whether its value or values can be computed from other information. The default value is false.
setIsDerived(boolean)
,
UML2Package.getProperty_IsDerived()
public void setIsDerived(boolean value)
Is Derived
' attribute.
value
- the new value of the 'Is Derived' attribute.isDerived()
public boolean isDerivedUnion()
"false"
.
If the meaning of the 'Is Derived Union' attribute isn't clear, there really should be more of a description here...
Specifies whether the property is derived as the union of all of the properties that are constrained to subset it. The default value is false.
setIsDerivedUnion(boolean)
,
UML2Package.getProperty_IsDerivedUnion()
public void setIsDerivedUnion(boolean value)
Is Derived Union
' attribute.
value
- the new value of the 'Is Derived Union' attribute.isDerivedUnion()
public AggregationKind getAggregation()
"none"
.
The literals are from the enumeration AggregationKind
.
If the meaning of the 'Aggregation' attribute isn't clear, there really should be more of a description here...
Specifies the kind of aggregation that applies to the Property. The default value is none.
AggregationKind
,
setAggregation(AggregationKind)
,
UML2Package.getProperty_Aggregation()
public void setAggregation(AggregationKind value)
Aggregation
' attribute.
value
- the new value of the 'Aggregation' attribute.AggregationKind
,
getAggregation()
public Class getClass_()
If the meaning of the 'Class ' reference isn't clear, there really should be more of a description here...
UML2Package.getProperty_Class_()
public Property getOpposite()
If the meaning of the 'Opposite' reference isn't clear, there really should be more of a description here...
UML2Package.getProperty_Opposite()
public Association getOwningAssociation()
Owned End
'.
If the meaning of the 'Owning Association' container reference isn't clear, there really should be more of a description here...
References the owning association of this property. Subsets Property::association, NamedElement::namespace, Feature::featuringClassifier, and RedefinableElement:: redefinitionContext.
setOwningAssociation(Association)
,
UML2Package.getProperty_OwningAssociation()
,
Association.getOwnedEnds()
public void setOwningAssociation(Association value)
Owning Association
' container reference.
value
- the new value of the 'Owning Association' container reference.getOwningAssociation()
public EList getRedefinedProperties()
Property
.
If the meaning of the 'Redefined Property' reference list isn't clear, there really should be more of a description here...
UML2Package.getProperty_RedefinedProperty()
public Property getRedefinedProperty(String unqualifiedName)
Property
with the specified name from the 'Redefined Property' reference list.
unqualifiedName
- The unqualified name of the Property
to retrieve.
Property
with the specified name, or null
.getRedefinedProperties()
public EList getSubsettedProperties()
Property
.
If the meaning of the 'Subsetted Property' reference list isn't clear, there really should be more of a description here...
UML2Package.getProperty_SubsettedProperty()
public Property getSubsettedProperty(String unqualifiedName)
Property
with the specified name from the 'Subsetted Property' reference list.
unqualifiedName
- The unqualified name of the Property
to retrieve.
Property
with the specified name, or null
.getSubsettedProperties()
public DataType getDatatype()
Owned Attribute
'.
If the meaning of the 'Datatype' container reference isn't clear, there really should be more of a description here...
The DataType that owns this Property. Subsets NamedElement::namespace, Feature::featuringClassifier, and Property::classifier.
setDatatype(DataType)
,
UML2Package.getProperty_Datatype()
,
DataType.getOwnedAttributes()
public void setDatatype(DataType value)
Datatype
' container reference.
value
- the new value of the 'Datatype' container reference.getDatatype()
public Association getAssociation()
Member End
'.
If the meaning of the 'Association' reference isn't clear, there really should be more of a description here...
References the association of which this property is a member, if any.
setAssociation(Association)
,
UML2Package.getProperty_Association()
,
Association.getMemberEnds()
public void setAssociation(Association value)
Association
' reference.
value
- the new value of the 'Association' reference.getAssociation()
public ValueSpecification getDefaultValue()
If the meaning of the 'Default Value' containment reference isn't clear, there really should be more of a description here...
A ValueSpecification that is evaluated to give a default value for the Property when an object of the owning Classifier is is instantiated. Subsets Element::ownedElement.
setDefaultValue(ValueSpecification)
,
UML2Package.getProperty_DefaultValue()
public void setDefaultValue(ValueSpecification value)
Default Value
' containment reference.
value
- the new value of the 'Default Value' containment reference.getDefaultValue()
public ValueSpecification createDefaultValue(EClass eClass)
ValueSpecification
and sets the 'Default Value' containment reference.
eClass
- The Ecore class of the ValueSpecification
to create.
ValueSpecification
.getDefaultValue()
public EList getQualifiers()
Property
.
It is bidirectional and its opposite is 'Association End
'.
If the meaning of the 'Qualifier' containment reference list isn't clear, there really should be more of a description here...
UML2Package.getProperty_Qualifier()
,
getAssociationEnd()
public Property getQualifier(String unqualifiedName)
Property
with the specified name from the 'Qualifier' containment reference list.
unqualifiedName
- The unqualified name of the Property
to retrieve.
Property
with the specified name, or null
.getQualifiers()
public Property createQualifier(EClass eClass)
Property
and appends it to the 'Qualifier' containment reference list.
eClass
- The Ecore class of the Property
to create.
Property
.getQualifiers()
public Property getAssociationEnd()
Qualifier
'.
If the meaning of the 'Association End' container reference isn't clear, there really should be more of a description here...
setAssociationEnd(Property)
,
UML2Package.getProperty_AssociationEnd()
,
getQualifiers()
public void setAssociationEnd(Property value)
Association End
' container reference.
value
- the new value of the 'Association End' container reference.getAssociationEnd()
public boolean validateOppositeIsOtherEnd(DiagnosticChain diagnostics, Map context)
opposite =
if owningAssociation->notEmpty() and association.memberEnd->size() = 2 then
let otherEnd = (association.memberEnd - self)->any() in
if otherEnd.owningAssociation->notEmpty then otherEnd else Set{} endif
else Set {}
endif
public Property opposite()
if owningAssociation->notEmpty() and association.memberEnd->size() = 2 then
let otherEnd = (association.memberEnd - self)->any() in
if otherEnd.owningAssociation->notEmpty then otherEnd else Set{} endif
else Set {}
endif
public boolean validateMultiplicityOfComposite(DiagnosticChain diagnostics, Map context)
isComposite implies (upperBound()->isEmpty() or upperBound() <= 1)
public boolean validateSubsettingContext(DiagnosticChain diagnostics, Map context)
subsettedProperty->notEmpty() implies
(subsettingContext()->notEmpty() and subsettingContext()->forAll (sc |
subsettedProperty->forAll(sp |
sp.subsettingContext()->exists(c | sc.conformsTo(c)))))
public boolean validateNavigablePropertyRedefinition(DiagnosticChain diagnostics, Map context)
(subsettedProperty->exists(sp | sp.class->notEmpty())
implies class->notEmpty())
and
(redefinedProperty->exists(rp | rp.class->notEmpty())
implies class->notEmpty())
public boolean validateSubsettingRules(DiagnosticChain diagnostics, Map context)
subsettedProperty->forAll(sp |
type.conformsTo(sp.type) and
((upperBound()->notEmpty() and sp.upperBound()->notEmpty()) implies
upperBound()<=sp.upperBound() ))
public boolean validateNavigableReadonly(DiagnosticChain diagnostics, Map context)
isReadOnly implies class->notEmpty()
public boolean validateDerivedUnionIsDerived(DiagnosticChain diagnostics, Map context)
isDerivedUnion implies isDerived
public boolean isConsistentWith(RedefinableElement redefinee)
(redefinee.oclIsKindOf(Property) and
let prop: Property = redefinee.oclAsType(Property) in
type.conformsTo(prop.type) and
(lowerBound()->notEmpty and prop.lowerBound()->notEmpty() implies lowerBound() >= prop.lowerBound())
and
(upperBound()->notEmpty and prop.upperBound()->notEmpty() implies upperBound() <= prop.upperBound())
and
(prop.isDerived implies isDerived))
isConsistentWith
in interface RedefinableElement
public Set subsettingContext()
if association->notEmpty()
then association.endType-type
else if classifier->notEmpty then Set{classifier} else Set{} endif
endif
public boolean isReadOnly()
isReadOnly
in interface StructuralFeature
StructuralFeature.setIsReadOnly(boolean)
,
UML2Package.getStructuralFeature_IsReadOnly()
public void setIsReadOnly(boolean value)
setIsReadOnly
in interface StructuralFeature
value
- the new value of the 'Is Read Only' attribute.StructuralFeature.isReadOnly()
public Namespace getNamespace()
getNamespace
in interface NamedElement
public EList getFeaturingClassifiers()
getFeaturingClassifiers
in interface Feature
UML2Package.getFeature_FeaturingClassifier()
,
Classifier.getFeatures()
public EList getRedefinedElements()
getRedefinedElements
in interface RedefinableElement
public EList getOwnedElements()
getOwnedElements
in interface NamedElement
public Element getOwner()
getOwner
in interface NamedElement
public boolean isNavigable()
true
if this property is navigable; false
otherwise.public void setNavigable(boolean navigable)
navigable
- Whether this property should be navigable.
IllegalArgumentException
- If is specified property is not an association end or if
the specified navigability does not apply.public void setBooleanDefault(boolean value)
value
- The new value of the default.getDefault()
public void setIntegerDefault(int value)
value
- The new value of the default.getDefault()
public void setStringDefault(String value)
value
- The new value of the default.getDefault()
public void setUnlimitedNaturalDefault(int value)
value
- The new value of the default.getDefault()
|
Copyright 2003, 2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |