Table of Contents

Interface IClassifier

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

The public interface for Classifier

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

Properties

General

References the general classifier in the Generalization relationship. Subsets DirectedRelationship::target.

[XmlElementName("general")]
[XmlAttribute(true)]
ISetExpression<IClassifier> General { 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>

GetGenerals()

The general classifiers are the classifiers referenced by the generalization relationships. result = self.parents()

ISetExpression<IClassifier> GetGenerals()

Returns

ISetExpression<IClassifier>

GetInheritedMembers()

The inheritedMember association is derived by inheriting the inheritable members of the parents. result = self.inherit(self.parents()->collect(p | p.inheritableMembers(self))

ISetExpression<INamedElement> GetInheritedMembers()

Returns

ISetExpression<INamedElement>

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. self.allParents()->collect(c | c.member)->includes(n) result = if (self.inheritedMember->includes(n)) then (n.visibility <> #private) else true

bool HasVisibilityOf(INamedElement n)

Parameters

n INamedElement

Returns

bool

Inherit(IEnumerable<INamedElement>)

The inherit operation is overridden to exclude redefined properties. 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
context object

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
context object

Returns

bool