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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe 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
featurestringThe 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
containerobjectThe 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
referencestringThe 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
elementIModelElementThe element that should be looked for
Returns
- string
A fragment of the relative URI
OnDefining_featureCalled(OperationCallEventArgs)
Raises the Defining_featureCalled event
protected virtual void OnDefining_featureCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnDefining_featureCalling(OperationCallEventArgs)
Raises the Defining_featureCalling event
protected virtual void OnDefining_featureCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSpecificationChanged(ValueChangedEventArgs)
Raises the SpecificationChanged event
protected virtual void OnSpecificationChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnSpecificationChanging(ValueChangedEventArgs)
Raises the SpecificationChanging event
protected virtual void OnSpecificationChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnStructural_featureCalled(OperationCallEventArgs)
Raises the Structural_featureCalled event
protected virtual void OnStructural_featureCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnStructural_featureCalling(OperationCallEventArgs)
Raises the Structural_featureCalling event
protected virtual void OnStructural_featureCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
Events
Defining_featureCalled
Gets fired after the operation defining_feature got called
public event EventHandler<OperationCallEventArgs> Defining_featureCalled
Event Type
Defining_featureCalling
Gets fired before the operation defining_feature gets called
public event EventHandler<OperationCallEventArgs> Defining_featureCalling
Event Type
SpecificationChanged
Gets fired when the Specification property changed its value
public event EventHandler<ValueChangedEventArgs> SpecificationChanged
Event Type
SpecificationChanging
Gets fired before the Specification property changes its value
public event EventHandler<ValueChangedEventArgs> SpecificationChanging
Event Type
Structural_featureCalled
Gets fired after the operation structural_feature got called
public event EventHandler<OperationCallEventArgs> Structural_featureCalled
Event Type
Structural_featureCalling
Gets fired before the operation structural_feature gets called
public event EventHandler<OperationCallEventArgs> Structural_featureCalling