Class InstanceSpecification
An instance specification is a model element that represents an instance in a modeled system.
[XmlNamespace("http://www.omg.org/spec/MOF/20131001/cmof.xmi")]
[XmlNamespacePrefix("cmof")]
[ModelRepresentationClass("http://www.omg.org/spec/MOF/20131001/cmof.xmi#//InstanceSpecification")]
public class InstanceSpecification : PackageableElement, IInstanceSpecification, IPackageableElement, INamedElement, IElement, IObject, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
InstanceSpecification
- Implements
- Derived
- Inherited Members
Constructors
InstanceSpecification()
Creates a new instance
public InstanceSpecification()
Properties
Children
Gets the child model elements of this model element
public override IEnumerableExpression<IModelElement> Children { get; }
Property Value
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
Classifier
The classifier or classifiers of the represented instance. If multiple classifiers are specified, the instance is classified by all of them.
[XmlElementName("classifier")]
[XmlAttribute(true)]
public ISetExpression<IClassifier> Classifier { get; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Slot
A slot giving the value or values of a structural feature of the instance. An instance specification can have one slot per structural feature of its classifiers, including inherited features. It is not necessary to model a slot for each structural feature, in which case the instance specification is a partial description.
[Browsable(false)]
[XmlElementName("slot")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("owningInstance")]
public IOrderedSetExpression<ISlot> Slot { get; }
Property Value
Specification
A specification of how to compute, derive, or construct the instance.
[Browsable(false)]
[XmlElementName("specification")]
[XmlAttribute(false)]
[Containment]
public IValueSpecification Specification { get; set; }
Property Value
Methods
Defining_feature(object, object)
The defining feature of each slot is a structural feature (directly or inherited) of a classifier of the instance specification. slot->forAll(s | classifier->exists (c | c.allFeatures()->includes (s.definingFeature)))
public bool Defining_feature(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
GetClass()
Gets the Class for this model element
public override IClass GetClass()
Returns
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
feature
stringThe requested feature
Returns
- IList
A non-generic list of elements
GetCompositionName(object)
Gets the property name for the given container
protected override string GetCompositionName(object container)
Parameters
container
objectThe container object
Returns
- string
The name of the respective container reference
GetExpressionForReference(string)
Gets the property expression for the given reference
protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)
Parameters
reference
stringThe requested reference in upper case
Returns
- INotifyExpression<IModelElement>
An incremental property expression
GetModelElementForReference(string, int)
Resolves the given URI to a child model element
protected override IModelElement GetModelElementForReference(string reference, int index)
Parameters
Returns
- IModelElement
The model element or null if it could not be found
GetRelativePathForNonIdentifiedChild(IModelElement)
Gets the relative URI fragment for the given child model element
protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)
Parameters
element
IModelElementThe element that should be looked for
Returns
- string
A fragment of the relative URI
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)
Parameters
Structural_feature(object, object)
One structural feature (including the same feature inherited from multiple classifiers) is the defining feature of at most one slot in an instance specification. classifier->forAll(c | (c.allFeatures()->forAll(f | slot->select(s | s.definingFeature = f)->size() <= 1)))
public bool Structural_feature(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.