org.eclipse.uml2
Interface Property

All Superinterfaces:
ConnectableElement, DeploymentTarget, Element, EModelElement, EObject, Feature, MultiplicityElement, NamedElement, Notifier, ParameterableElement, RedefinableElement, StructuralFeature, TemplateableElement, TypedElement
All Known Subinterfaces:
ExtensionEnd, Port

public interface Property
extends StructuralFeature, ConnectableElement, DeploymentTarget

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:

See Also:
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

copyright

public static final String copyright

See Also:
Constant Field Values
Method Detail

getDefault

public String getDefault()
Returns the value of the 'Default' attribute. The default value is "".

If the meaning of the 'Default' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Default' attribute.
See Also:
UML2Package.getProperty_Default()

isComposite

public boolean isComposite()
Returns the value of the 'Is Composite' attribute. The default value is "false".

If the meaning of the 'Is Composite' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Is Composite' attribute.
See Also:
UML2Package.getProperty_IsComposite()

isDerived

public boolean isDerived()
Returns the value of the 'Is Derived' attribute. The default value is "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.

Returns:
the value of the 'Is Derived' attribute.
See Also:
setIsDerived(boolean), UML2Package.getProperty_IsDerived()

setIsDerived

public void setIsDerived(boolean value)
Sets the value of the 'Is Derived' attribute.

Parameters:
value - the new value of the 'Is Derived' attribute.
See Also:
isDerived()

isDerivedUnion

public boolean isDerivedUnion()
Returns the value of the 'Is Derived Union' attribute. The default value is "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.

Returns:
the value of the 'Is Derived Union' attribute.
See Also:
setIsDerivedUnion(boolean), UML2Package.getProperty_IsDerivedUnion()

setIsDerivedUnion

public void setIsDerivedUnion(boolean value)
Sets the value of the 'Is Derived Union' attribute.

Parameters:
value - the new value of the 'Is Derived Union' attribute.
See Also:
isDerivedUnion()

getAggregation

public AggregationKind getAggregation()
Returns the value of the 'Aggregation' attribute. The default value is "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.

Returns:
the value of the 'Aggregation' attribute.
See Also:
AggregationKind, setAggregation(AggregationKind), UML2Package.getProperty_Aggregation()

setAggregation

public void setAggregation(AggregationKind value)
Sets the value of the 'Aggregation' attribute.

Parameters:
value - the new value of the 'Aggregation' attribute.
See Also:
AggregationKind, getAggregation()

getClass_

public Class getClass_()
Returns the value of the 'Class ' reference.

If the meaning of the 'Class ' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Class ' reference.
See Also:
UML2Package.getProperty_Class_()

getOpposite

public Property getOpposite()
Returns the value of the 'Opposite' reference.

If the meaning of the 'Opposite' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Opposite' reference.
See Also:
UML2Package.getProperty_Opposite()

getOwningAssociation

public Association getOwningAssociation()
Returns the value of the 'Owning Association' container reference. It is bidirectional and its opposite is '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.

Returns:
the value of the 'Owning Association' container reference.
See Also:
setOwningAssociation(Association), UML2Package.getProperty_OwningAssociation(), Association.getOwnedEnds()

setOwningAssociation

public void setOwningAssociation(Association value)
Sets the value of the 'Owning Association' container reference.

Parameters:
value - the new value of the 'Owning Association' container reference.
See Also:
getOwningAssociation()

getRedefinedProperties

public EList getRedefinedProperties()
Returns the value of the 'Redefined Property' reference list. The list contents are of type Property.

If the meaning of the 'Redefined Property' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Redefined Property' reference list.
See Also:
UML2Package.getProperty_RedefinedProperty()

getRedefinedProperty

public Property getRedefinedProperty(String unqualifiedName)
Retrieves the Property with the specified name from the 'Redefined Property' reference list.

Parameters:
unqualifiedName - The unqualified name of the Property to retrieve.
Returns:
The Property with the specified name, or null.
See Also:
getRedefinedProperties()

getSubsettedProperties

public EList getSubsettedProperties()
Returns the value of the 'Subsetted Property' reference list. The list contents are of type Property.

If the meaning of the 'Subsetted Property' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Subsetted Property' reference list.
See Also:
UML2Package.getProperty_SubsettedProperty()

getSubsettedProperty

public Property getSubsettedProperty(String unqualifiedName)
Retrieves the Property with the specified name from the 'Subsetted Property' reference list.

Parameters:
unqualifiedName - The unqualified name of the Property to retrieve.
Returns:
The Property with the specified name, or null.
See Also:
getSubsettedProperties()

getDatatype

public DataType getDatatype()
Returns the value of the 'Datatype' container reference. It is bidirectional and its opposite is '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.

Returns:
the value of the 'Datatype' container reference.
See Also:
setDatatype(DataType), UML2Package.getProperty_Datatype(), DataType.getOwnedAttributes()

setDatatype

public void setDatatype(DataType value)
Sets the value of the 'Datatype' container reference.

Parameters:
value - the new value of the 'Datatype' container reference.
See Also:
getDatatype()

getAssociation

public Association getAssociation()
Returns the value of the 'Association' reference. It is bidirectional and its opposite is '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.

Returns:
the value of the 'Association' reference.
See Also:
setAssociation(Association), UML2Package.getProperty_Association(), Association.getMemberEnds()

setAssociation

public void setAssociation(Association value)
Sets the value of the 'Association' reference.

Parameters:
value - the new value of the 'Association' reference.
See Also:
getAssociation()

getDefaultValue

public ValueSpecification getDefaultValue()
Returns the value of the 'Default Value' containment reference.

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.

Returns:
the value of the 'Default Value' containment reference.
See Also:
setDefaultValue(ValueSpecification), UML2Package.getProperty_DefaultValue()

setDefaultValue

public void setDefaultValue(ValueSpecification value)
Sets the value of the 'Default Value' containment reference.

Parameters:
value - the new value of the 'Default Value' containment reference.
See Also:
getDefaultValue()

createDefaultValue

public ValueSpecification createDefaultValue(EClass eClass)
Creates a ValueSpecification and sets the 'Default Value' containment reference.

Parameters:
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
getDefaultValue()

getQualifiers

public EList getQualifiers()
Returns the value of the 'Qualifier' containment reference list. The list contents are of type 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...

Returns:
the value of the 'Qualifier' containment reference list.
See Also:
UML2Package.getProperty_Qualifier(), getAssociationEnd()

getQualifier

public Property getQualifier(String unqualifiedName)
Retrieves the Property with the specified name from the 'Qualifier' containment reference list.

Parameters:
unqualifiedName - The unqualified name of the Property to retrieve.
Returns:
The Property with the specified name, or null.
See Also:
getQualifiers()

createQualifier

public Property createQualifier(EClass eClass)
Creates a Property and appends it to the 'Qualifier' containment reference list.

Parameters:
eClass - The Ecore class of the Property to create.
Returns:
The new Property.
See Also:
getQualifiers()

getAssociationEnd

public Property getAssociationEnd()
Returns the value of the 'Association End' container reference. It is bidirectional and its opposite is 'Qualifier'.

If the meaning of the 'Association End' container reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Association End' container reference.
See Also:
setAssociationEnd(Property), UML2Package.getProperty_AssociationEnd(), getQualifiers()

setAssociationEnd

public void setAssociationEnd(Property value)
Sets the value of the 'Association End' container reference.

Parameters:
value - the new value of the 'Association End' container reference.
See Also:
getAssociationEnd()

validateOppositeIsOtherEnd

public 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


opposite

public 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


validateMultiplicityOfComposite

public boolean validateMultiplicityOfComposite(DiagnosticChain diagnostics,
                                               Map context)
An invariant constraint based on the following OCL expression: isComposite implies (upperBound()->isEmpty() or upperBound() <= 1)


validateSubsettingContext

public 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)))))


validateNavigablePropertyRedefinition

public 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())


validateSubsettingRules

public 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() ))


validateNavigableReadonly

public boolean validateNavigableReadonly(DiagnosticChain diagnostics,
                                         Map context)
An invariant constraint based on the following OCL expression: isReadOnly implies class->notEmpty()


validateDerivedUnionIsDerived

public boolean validateDerivedUnionIsDerived(DiagnosticChain diagnostics,
                                             Map context)
An invariant constraint based on the following OCL expression: isDerivedUnion implies isDerived


isConsistentWith

public 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))

Specified by:
isConsistentWith in interface RedefinableElement

subsettingContext

public 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


isReadOnly

public boolean isReadOnly()

Specified by:
isReadOnly in interface StructuralFeature
Returns:
the value of the 'Is Read Only' attribute.
See Also:
StructuralFeature.setIsReadOnly(boolean), UML2Package.getStructuralFeature_IsReadOnly()

setIsReadOnly

public void setIsReadOnly(boolean value)

Specified by:
setIsReadOnly in interface StructuralFeature
Parameters:
value - the new value of the 'Is Read Only' attribute.
See Also:
StructuralFeature.isReadOnly()

getNamespace

public Namespace getNamespace()

Specified by:
getNamespace in interface NamedElement

getFeaturingClassifiers

public EList getFeaturingClassifiers()

Specified by:
getFeaturingClassifiers in interface Feature
Returns:
the value of the 'Featuring Classifier' reference list.
See Also:
UML2Package.getFeature_FeaturingClassifier(), Classifier.getFeatures()

getRedefinedElements

public EList getRedefinedElements()

Specified by:
getRedefinedElements in interface RedefinableElement

getOwnedElements

public EList getOwnedElements()

Specified by:
getOwnedElements in interface NamedElement

getOwner

public Element getOwner()

Specified by:
getOwner in interface NamedElement

isNavigable

public boolean isNavigable()
Determines whether this property is navigable, i.e. it is part of an assocation and owned by one of its end types.

Returns:
true if this property is navigable; false otherwise.

setNavigable

public void setNavigable(boolean navigable)
Sets the navigability of this property as specified.

Parameters:
navigable - Whether this property should be navigable.
Throws:
IllegalArgumentException - If is specified property is not an association end or if the specified navigability does not apply.

setBooleanDefault

public void setBooleanDefault(boolean value)
Sets the default to the specified boolean value.

Parameters:
value - The new value of the default.
See Also:
getDefault()

setIntegerDefault

public void setIntegerDefault(int value)
Sets the default to the specified integer value.

Parameters:
value - The new value of the default.
See Also:
getDefault()

setStringDefault

public void setStringDefault(String value)
Sets the default to the specified string value.

Parameters:
value - The new value of the default.
See Also:
getDefault()

setUnlimitedNaturalDefault

public void setUnlimitedNaturalDefault(int value)
Sets the default to the specified unlimited natural value.

Parameters:
value - The new value of the default.
See Also:
getDefault()

Copyright 2003, 2004 IBM Corporation and others.
All Rights Reserved.