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

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
Direct Known Subclasses:
ClassifierOperations

public class NamespaceOperations
extends NamedElementOperations

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

The following operations are supported:


Field Summary
protected static java.lang.String GET_NAMES_OF_MEMBER__NAMED_ELEMENT__EOCL_EXP
          The cached OCL expression body for the 'Get Names Of Member' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> GET_NAMES_OF_MEMBER__NAMED_ELEMENT__EOCL_QRY
          The cached OCL query for the 'Get Names Of Member' query operation
protected static java.lang.String MEMBERS_ARE_DISTINGUISHABLE__EOCL_EXP
          The cached OCL expression body for the 'Members Are Distinguishable' operation
protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> MEMBERS_ARE_DISTINGUISHABLE__EOCL_QRY
          The cached OCL query for the 'Members Are Distinguishable' query operation
protected static java.lang.String MEMBERS_DISTINGUISHABLE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP
          The cached OCL expression body for the 'Members distinguishable' operation
protected static org.eclipse.ocl.ecore.Constraint MEMBERS_DISTINGUISHABLE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
          The cached OCL invariant for the 'Members distinguishable' invariant operation
 
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 NamespaceOperations()
           
 
Method Summary
static org.eclipse.emf.common.util.EList<java.lang.String> getNamesOfMember(Namespace namespace, NamedElement element)
          The query getNamesOfMember() gives a set of all of the names that a member would have in a Namespace.
static boolean members_distinguishable(Namespace namespace, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          All the members of a Namespace are distinguishable within it.
static boolean membersAreDistinguishable(Namespace namespace)
          The Boolean query membersAreDistinguishable() determines whether all of the namespaces members are distinguishable within it.
 
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

MEMBERS_DISTINGUISHABLE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

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

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

MEMBERS_DISTINGUISHABLE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV

protected static org.eclipse.ocl.ecore.Constraint MEMBERS_DISTINGUISHABLE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV
The cached OCL invariant for the 'Members distinguishable' invariant operation.

See Also:
members_distinguishable(Namespace, org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)

GET_NAMES_OF_MEMBER__NAMED_ELEMENT__EOCL_EXP

protected static final java.lang.String GET_NAMES_OF_MEMBER__NAMED_ELEMENT__EOCL_EXP
The cached OCL expression body for the 'Get Names Of Member' operation.

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

GET_NAMES_OF_MEMBER__NAMED_ELEMENT__EOCL_QRY

protected static org.eclipse.ocl.expressions.OCLExpression<org.eclipse.emf.ecore.EClassifier> GET_NAMES_OF_MEMBER__NAMED_ELEMENT__EOCL_QRY
The cached OCL query for the 'Get Names Of Member' query operation.

See Also:
getNamesOfMember(Namespace, edu.cmu.sei.aadl.aadl2.NamedElement)

MEMBERS_ARE_DISTINGUISHABLE__EOCL_EXP

protected static final java.lang.String MEMBERS_ARE_DISTINGUISHABLE__EOCL_EXP
The cached OCL expression body for the 'Members Are Distinguishable' operation.

See Also:
membersAreDistinguishable(Namespace), Constant Field Values

MEMBERS_ARE_DISTINGUISHABLE__EOCL_QRY

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

See Also:
membersAreDistinguishable(Namespace)
Constructor Detail

NamespaceOperations

protected NamespaceOperations()

Method Detail

members_distinguishable

public static boolean members_distinguishable(Namespace namespace,
                                              org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                              java.util.Map<java.lang.Object,java.lang.Object> context)
All the members of a Namespace are distinguishable within it. membersAreDistinguishable()

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

getNamesOfMember

public static org.eclipse.emf.common.util.EList<java.lang.String> getNamesOfMember(Namespace namespace,
                                                                                   NamedElement element)
The query getNamesOfMember() gives a set of all of the names that a member would have in a Namespace. In general a member can have multiple names in a Namespace if it is imported more than once with different aliases. Those semantics are specified by overriding the getNamesOfMember operation. The specification here simply returns a set containing a single name, or the empty set if no name. if member->includes(element) then Set{}->including(element.name) else Set{} endif

Parameters:
namespace - The receiving 'Namespace' model object.

membersAreDistinguishable

public static boolean membersAreDistinguishable(Namespace namespace)
The Boolean query membersAreDistinguishable() determines whether all of the namespaces members are distinguishable within it. self.member->forAll( memb | self.member->excluding(memb)->forAll(other | memb.isDistinguishableFrom(other, self)))

Parameters:
namespace - The receiving 'Namespace' model object.