edu.cmu.sei.aadl.aadl2.operations
Class ClassifierOperations

java.lang.Object
  extended by edu.cmu.sei.aadl.aadl2.operations.ElementOperations
      extended by edu.cmu.sei.aadl.aadl2.operations.NamedElementOperations
          extended by edu.cmu.sei.aadl.aadl2.operations.NamespaceOperations
              extended by edu.cmu.sei.aadl.aadl2.operations.ClassifierOperations
Direct Known Subclasses:
BehavioredImplementationOperations

public class ClassifierOperations
extends NamespaceOperations

A static utility class that provides operations related to 'Classifier' model objects.

The following operations are supported:


Field Summary
protected static java.lang.String ALL_FEATURES__EOCL_EXP
          The cached OCL expression body for the 'All Features' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> ALL_FEATURES__EOCL_QRY
          The cached OCL query for the 'All Features' query operation
protected static java.lang.String ALL_PARENTS__EOCL_EXP
          The cached OCL expression body for the 'All Parents' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> ALL_PARENTS__EOCL_QRY
          The cached OCL query for the 'All Parents' query operation
protected static java.lang.String HAS_VISIBILITY_OF__NAMED_ELEMENT__EOCL_EXP
          The cached OCL expression body for the 'Has Visibility Of' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> HAS_VISIBILITY_OF__NAMED_ELEMENT__EOCL_QRY
          The cached OCL query for the 'Has Visibility Of' query operation
protected static java.lang.String INHERIT__ELIST__EOCL_EXP
          The cached OCL expression body for the 'Inherit' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> INHERIT__ELIST__EOCL_QRY
          The cached OCL query for the 'Inherit' query operation
protected static java.lang.String INHERITABLE_MEMBERS__CLASSIFIER__EOCL_EXP
          The cached OCL expression body for the 'Inheritable Members' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> INHERITABLE_MEMBERS__CLASSIFIER__EOCL_QRY
          The cached OCL query for the 'Inheritable Members' query operation
protected static java.lang.String INHERITED_MEMBER__EOCL_EXP
          The cached OCL expression body for the 'Inherited Member' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> INHERITED_MEMBER__EOCL_QRY
          The cached OCL query for the 'Inherited Member' query operation
protected static java.lang.String MAY_SPECIALIZE_TYPE__CLASSIFIER__EOCL_EXP
          The cached OCL expression body for the 'May Specialize Type' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> MAY_SPECIALIZE_TYPE__CLASSIFIER__EOCL_QRY
          The cached OCL query for the 'May Specialize Type' query operation
protected static java.lang.String NO_CYCLES_IN_GENERALIZATION__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP
          The cached OCL expression body for the 'No cycles in generalization' operation
protected static org.eclipse.ocl.ecore.Constraint NO_CYCLES_IN_GENERALIZATION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
          The cached OCL invariant for the 'No cycles in generalization' invariant operation
protected static java.lang.String PARENTS__EOCL_EXP
          The cached OCL expression body for the 'Parents' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> PARENTS__EOCL_QRY
          The cached OCL query for the 'Parents' query operation
protected static java.lang.String SPECIALIZE_TYPE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP
          The cached OCL expression body for the 'Specialize type' operation
protected static org.eclipse.ocl.ecore.Constraint SPECIALIZE_TYPE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
          The cached OCL invariant for the 'Specialize type' invariant operation
 
Fields inherited from class edu.cmu.sei.aadl.aadl2.operations.NamespaceOperations
GET_NAMES_OF_MEMBER__NAMED_ELEMENT__EOCL_EXP, GET_NAMES_OF_MEMBER__NAMED_ELEMENT__EOCL_QRY, MEMBERS_ARE_DISTINGUISHABLE__EOCL_EXP, MEMBERS_ARE_DISTINGUISHABLE__EOCL_QRY, MEMBERS_DISTINGUISHABLE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP, MEMBERS_DISTINGUISHABLE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
 
Fields inherited from class edu.cmu.sei.aadl.aadl2.operations.NamedElementOperations
ALL_NAMESPACES__EOCL_EXP, ALL_NAMESPACES__EOCL_QRY, HAS_NO_QUALIFIED_NAME__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP, HAS_NO_QUALIFIED_NAME__DIAGNOSTIC_CHAIN_MAP__EOCL_INV, HAS_QUALIFIED_NAME__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP, HAS_QUALIFIED_NAME__DIAGNOSTIC_CHAIN_MAP__EOCL_INV, IS_DISTINGUISHABLE_FROM__NAMED_ELEMENT_NAMESPACE__EOCL_EXP, IS_DISTINGUISHABLE_FROM__NAMED_ELEMENT_NAMESPACE__EOCL_QRY, QUALIFIED_NAME__EOCL_EXP, QUALIFIED_NAME__EOCL_QRY, SEPARATOR__EOCL_EXP, SEPARATOR__EOCL_QRY
 
Fields inherited from class edu.cmu.sei.aadl.aadl2.operations.ElementOperations
ALL_OWNED_ELEMENTS__EOCL_EXP, ALL_OWNED_ELEMENTS__EOCL_QRY, EOCL_ENV, HAS_OWNER__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP, HAS_OWNER__DIAGNOSTIC_CHAIN_MAP__EOCL_INV, MUST_BE_OWNED__EOCL_EXP, MUST_BE_OWNED__EOCL_QRY, NOT_OWN_SELF__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP, NOT_OWN_SELF__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
 
Constructor Summary
protected ClassifierOperations()
           
 
Method Summary
static org.eclipse.emf.common.util.EList<ClassifierFeature> allFeatures(Classifier classifier)
          The query allFeatures() gives all of the features in the namespace of the classifier.
static org.eclipse.emf.common.util.EList<Classifier> allParents(Classifier classifier)
          The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier.
static boolean hasVisibilityOf(Classifier classifier, NamedElement n)
          The query hasVisibilityOf() determines whether a named element is visible in the classifier.
static org.eclipse.emf.common.util.EList<NamedElement> inherit(Classifier classifier, org.eclipse.emf.common.util.EList<NamedElement> inhs)
          The query inherit() defines how to inherit a set of elements.
static org.eclipse.emf.common.util.EList<NamedElement> inheritableMembers(Classifier classifier, Classifier c)
          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.
static org.eclipse.emf.common.util.EList<NamedElement> inheritedMember(Classifier classifier)
          The inheritedMember association is derived by inheriting the inheritable members of the parents.
static boolean maySpecializeType(Classifier classifier, Classifier c)
          The query maySpecializeType() determines whether this classifier may have a generalization relationship to classifiers of the specified type.
static boolean no_cycles_in_generalization(Classifier classifier, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Generalization hierarchies must be directed and acyclical.
static org.eclipse.emf.common.util.EList<Classifier> parents(Classifier classifier)
          The query parents() gives all of the immediate ancestors of a generalized Classifier.
static boolean specialize_type(Classifier classifier, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          A classifier may only specialize classifiers of a valid type.
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.operations.NamespaceOperations
getNamesOfMember, members_distinguishable, membersAreDistinguishable
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.operations.NamedElementOperations
allNamespaces, has_no_qualified_name, has_qualified_name, isDistinguishableFrom, qualifiedName, separator
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.operations.ElementOperations
allOwnedElements, has_owner, mustBeOwned, not_own_self
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CYCLES_IN_GENERALIZATION__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

protected static final java.lang.String NO_CYCLES_IN_GENERALIZATION__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP
The cached OCL expression body for the 'No cycles in generalization' operation.

See Also:
no_cycles_in_generalization(Classifier, org.eclipse.emf.common.util.DiagnosticChain, java.util.Map), Constant Field Values

NO_CYCLES_IN_GENERALIZATION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV

protected static org.eclipse.ocl.ecore.Constraint NO_CYCLES_IN_GENERALIZATION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
The cached OCL invariant for the 'No cycles in generalization' invariant operation.

See Also:
no_cycles_in_generalization(Classifier, org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)

SPECIALIZE_TYPE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

protected static final java.lang.String SPECIALIZE_TYPE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP
The cached OCL expression body for the 'Specialize type' operation.

See Also:
specialize_type(Classifier, org.eclipse.emf.common.util.DiagnosticChain, java.util.Map), Constant Field Values

SPECIALIZE_TYPE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV

protected static org.eclipse.ocl.ecore.Constraint SPECIALIZE_TYPE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
The cached OCL invariant for the 'Specialize type' invariant operation.

See Also:
specialize_type(Classifier, org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)

ALL_FEATURES__EOCL_EXP

protected static final java.lang.String ALL_FEATURES__EOCL_EXP
The cached OCL expression body for the 'All Features' operation.

See Also:
allFeatures(Classifier), Constant Field Values

ALL_FEATURES__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> ALL_FEATURES__EOCL_QRY
The cached OCL query for the 'All Features' query operation.

See Also:
allFeatures(Classifier)

INHERITED_MEMBER__EOCL_EXP

protected static final java.lang.String INHERITED_MEMBER__EOCL_EXP
The cached OCL expression body for the 'Inherited Member' operation.

See Also:
inheritedMember(Classifier), Constant Field Values

INHERITED_MEMBER__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> INHERITED_MEMBER__EOCL_QRY
The cached OCL query for the 'Inherited Member' query operation.

See Also:
inheritedMember(Classifier)

PARENTS__EOCL_EXP

protected static final java.lang.String PARENTS__EOCL_EXP
The cached OCL expression body for the 'Parents' operation.

See Also:
parents(Classifier), Constant Field Values

PARENTS__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> PARENTS__EOCL_QRY
The cached OCL query for the 'Parents' query operation.

See Also:
parents(Classifier)

ALL_PARENTS__EOCL_EXP

protected static final java.lang.String ALL_PARENTS__EOCL_EXP
The cached OCL expression body for the 'All Parents' operation.

See Also:
allParents(Classifier), Constant Field Values

ALL_PARENTS__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> ALL_PARENTS__EOCL_QRY
The cached OCL query for the 'All Parents' query operation.

See Also:
allParents(Classifier)

INHERITABLE_MEMBERS__CLASSIFIER__EOCL_EXP

protected static final java.lang.String INHERITABLE_MEMBERS__CLASSIFIER__EOCL_EXP
The cached OCL expression body for the 'Inheritable Members' operation.

See Also:
inheritableMembers(Classifier, edu.cmu.sei.aadl.aadl2.Classifier), Constant Field Values

INHERITABLE_MEMBERS__CLASSIFIER__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> INHERITABLE_MEMBERS__CLASSIFIER__EOCL_QRY
The cached OCL query for the 'Inheritable Members' query operation.

See Also:
inheritableMembers(Classifier, edu.cmu.sei.aadl.aadl2.Classifier)

HAS_VISIBILITY_OF__NAMED_ELEMENT__EOCL_EXP

protected static final java.lang.String HAS_VISIBILITY_OF__NAMED_ELEMENT__EOCL_EXP
The cached OCL expression body for the 'Has Visibility Of' operation.

See Also:
hasVisibilityOf(Classifier, edu.cmu.sei.aadl.aadl2.NamedElement), Constant Field Values

HAS_VISIBILITY_OF__NAMED_ELEMENT__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> HAS_VISIBILITY_OF__NAMED_ELEMENT__EOCL_QRY
The cached OCL query for the 'Has Visibility Of' query operation.

See Also:
hasVisibilityOf(Classifier, edu.cmu.sei.aadl.aadl2.NamedElement)

INHERIT__ELIST__EOCL_EXP

protected static final java.lang.String INHERIT__ELIST__EOCL_EXP
The cached OCL expression body for the 'Inherit' operation.

See Also:
inherit(Classifier, org.eclipse.emf.common.util.EList), Constant Field Values

INHERIT__ELIST__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> INHERIT__ELIST__EOCL_QRY
The cached OCL query for the 'Inherit' query operation.

See Also:
inherit(Classifier, org.eclipse.emf.common.util.EList)

MAY_SPECIALIZE_TYPE__CLASSIFIER__EOCL_EXP

protected static final java.lang.String MAY_SPECIALIZE_TYPE__CLASSIFIER__EOCL_EXP
The cached OCL expression body for the 'May Specialize Type' operation.

See Also:
maySpecializeType(Classifier, edu.cmu.sei.aadl.aadl2.Classifier), Constant Field Values

MAY_SPECIALIZE_TYPE__CLASSIFIER__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> MAY_SPECIALIZE_TYPE__CLASSIFIER__EOCL_QRY
The cached OCL query for the 'May Specialize Type' query operation.

See Also:
maySpecializeType(Classifier, edu.cmu.sei.aadl.aadl2.Classifier)
Constructor Detail

ClassifierOperations

protected ClassifierOperations()

Method Detail

no_cycles_in_generalization

public static boolean no_cycles_in_generalization(Classifier classifier,
                                                  org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                  java.util.Map<java.lang.Object,java.lang.Object> context)
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)

Parameters:
classifier - The receiving 'Classifier' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

specialize_type

public static boolean specialize_type(Classifier classifier,
                                      org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                      java.util.Map<java.lang.Object,java.lang.Object> context)
A classifier may only specialize classifiers of a valid type. self.parents()->forAll(c | self.maySpecializeType(c))

Parameters:
classifier - The receiving 'Classifier' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

allFeatures

public static org.eclipse.emf.common.util.EList<ClassifierFeature> allFeatures(Classifier classifier)
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))

Parameters:
classifier - The receiving 'Classifier' model object.

inheritedMember

public static org.eclipse.emf.common.util.EList<NamedElement> inheritedMember(Classifier classifier)
The inheritedMember association is derived by inheriting the inheritable members of the parents. result = self.inherit(self.parents()->collect(p | p.inheritableMembers(self))

Parameters:
classifier - The receiving 'Classifier' model object.

parents

public static org.eclipse.emf.common.util.EList<Classifier> parents(Classifier classifier)
The query parents() gives all of the immediate ancestors of a generalized Classifier. result = general

Parameters:
classifier - The receiving 'Classifier' model object.

allParents

public static org.eclipse.emf.common.util.EList<Classifier> allParents(Classifier classifier)
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())

Parameters:
classifier - The receiving 'Classifier' model object.

inheritableMembers

public static org.eclipse.emf.common.util.EList<NamedElement> inheritableMembers(Classifier classifier,
                                                                                 Classifier c)
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))

Parameters:
classifier - The receiving 'Classifier' model object.

hasVisibilityOf

public static boolean hasVisibilityOf(Classifier classifier,
                                      NamedElement n)
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

Parameters:
classifier - The receiving 'Classifier' model object.

inherit

public static org.eclipse.emf.common.util.EList<NamedElement> inherit(Classifier classifier,
                                                                      org.eclipse.emf.common.util.EList<NamedElement> inhs)
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

Parameters:
classifier - The receiving 'Classifier' model object.

maySpecializeType

public static boolean maySpecializeType(Classifier classifier,
                                        Classifier c)
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)

Parameters:
classifier - The receiving 'Classifier' model object.