Table of Contents

Interface IClassifier

Namespace
NMF.Interop.Cmof
Assembly
NMF.UMLInterop.dll

The public interface for Classifier

[DefaultImplementationType(typeof(Classifier))]
[XmlDefaultImplementationType(typeof(Classifier))]
[ModelRepresentationClass("http://www.omg.org/spec/MOF/20131001/cmof.xmi#//Classifier")]
public interface IClassifier : IType, IPackageableElement, IRedefinableElement, INamespace, INamedElement, IElement, IObject, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inherited Members

Properties

Generalization

Specifies the Generalization relationships for this Classifier. These Generalizations navigaten to more general classifiers in the generalization hierarchy.

[Browsable(false)]
[XmlElementName("generalization")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("specific")]
IOrderedSetExpression<IGeneralization> Generalization { get; }

Property Value

IOrderedSetExpression<IGeneralization>

IsAbstract

If true, the Classifier does not provide a complete declaration and can typically not be instantiated. An abstract classifier is intended to be used by other classifiers e.g. as the target of general metarelationships or generalization relationships.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isAbstract")]
[XmlAttribute(true)]
bool IsAbstract { get; set; }

Property Value

bool

IsFinalSpecialization

If true, the Classifier cannot be specialized by generalization. Note that this property is preserved through package merge operations; that is, the capability to specialize a Classifier (i.e., isFinalSpecialization =false) must be preserved in the resulting Classifier of a package merge operation where a Classifier with isFinalSpecialization =false is merged with a matching Classifier with isFinalSpecialization =true: the resulting Classifier will have isFinalSpecialization =false.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isFinalSpecialization")]
[XmlAttribute(true)]
bool IsFinalSpecialization { get; set; }

Property Value

bool

RedefinedClassifier

References the Classifiers that are redefined by this Classifier.

[XmlElementName("redefinedClassifier")]
[XmlAttribute(true)]
ISetExpression<IClassifier> RedefinedClassifier { get; }

Property Value

ISetExpression<IClassifier>

Methods

AllFeatures()

The query allFeatures() gives all of the features in the namespace of the classifier. In general, through mechanisms such as inheritance, this will be a larger set than feature. result = member->select(oclIsKindOf(Feature))

ISetExpression<IFeature> AllFeatures()

Returns

ISetExpression<IFeature>

AllParents()

The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier. result = self.parents()->union(self.parents()->collect(p | p.allParents())

ISetExpression<IClassifier> AllParents()

Returns

ISetExpression<IClassifier>

HasVisibilityOf(INamedElement)

The query hasVisibilityOf() determines whether a named element is visible in the classifier. By default all are visible. It is only called when the argument is something owned by a parent. result = (n.visibility <> VisibilityKind::private) self.allParents()->including(self)->collect(c | c.member)->includes(n)

bool HasVisibilityOf(INamedElement n)

Parameters

n INamedElement

Returns

bool

Inherit(IEnumerable<INamedElement>)

The inherit operation is overridden to exclude redefined properties. The query inherit() defines how to inherit a set of elements. Here the operation is defined to inherit them all. It is intended to be redefined in circumstances where inheritance is affected by redefinition. result = inhs

ISetExpression<INamedElement> Inherit(IEnumerable<INamedElement> inhs)

Parameters

inhs IEnumerable<INamedElement>

Returns

ISetExpression<INamedElement>

InheritableMembers(IClassifier)

The query inheritableMembers() gives all of the members of a classifier that may be inherited in one of its descendants, subject to whatever visibility restrictions apply. c.allParents()->includes(self) result = member->select(m | c.hasVisibilityOf(m))

ISetExpression<INamedElement> InheritableMembers(IClassifier c)

Parameters

c IClassifier

Returns

ISetExpression<INamedElement>

MaySpecializeType(IClassifier)

The query maySpecializeType() determines whether this classifier may have a generalization relationship to classifiers of the specified type. By default a classifier may specialize classifiers of the same or a more general type. It is intended to be redefined by classifiers that have different specialization constraints. result = self.oclIsKindOf(c.oclType)

bool MaySpecializeType(IClassifier c)

Parameters

c IClassifier

Returns

bool

No_cycles_in_generalization(object, object)

Generalization hierarchies must be directed and acyclical. A classifier can not be both a transitively general and transitively specific classifier of the same classifier. not self.allParents()->includes(self)

bool No_cycles_in_generalization(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Non_final_parents(object, object)

The parents of a classifier must be non-final. self.parents()->forAll(not isFinalSpecialization)

bool Non_final_parents(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Parents()

The query parents() gives all of the immediate ancestors of a generalized Classifier. result = generalization.general

ISetExpression<IClassifier> Parents()

Returns

ISetExpression<IClassifier>

Specialize_type(object, object)

A classifier may only specialize classifiers of a valid type. self.parents()->forAll(c | self.maySpecializeType(c))

bool Specialize_type(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool