Package com.sodius.mdw.metamodel.uml21
Interface Namespace
-
- All Superinterfaces:
Comparable<Object>
,Element
,org.eclipse.emf.ecore.EModelElement
,org.eclipse.emf.ecore.EObject
,MDWEObject
,MDWObject
,NamedElement
,org.eclipse.emf.common.notify.Notifier
- All Known Subinterfaces:
Activity
,Actor
,Artifact
,Association
,AssociationClass
,Behavior
,BehavioralFeature
,BehavioredClassifier
,Class
,Classifier
,Collaboration
,CommunicationPath
,Component
,ConditionalNode
,DataType
,DeploymentSpecification
,Device
,EncapsulatedClassifier
,Enumeration
,ExecutionEnvironment
,ExpansionRegion
,Extension
,FinalState
,FunctionBehavior
,InformationItem
,Interaction
,InteractionOperand
,Interface
,LoopNode
,Model
,Node
,OpaqueBehavior
,Operation
,Package
,PrimitiveType
,Profile
,ProtocolStateMachine
,ProtocolTransition
,Reception
,Region
,SequenceNode
,Signal
,State
,StateMachine
,Stereotype
,StructuredActivityNode
,StructuredClassifier
,Transition
,UseCase
public interface Namespace extends NamedElement
A representation of the model object 'Namespace'. A namespace is an element in a model that contains a set of named elements that can be identified by name.The following features are supported:
- See Also:
UMLPackage.getNamespace()
-
-
Field Summary
-
Fields inherited from interface com.sodius.mdw.metamodel.uml21.NamedElement
SEPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ElementImport
createElementImport(PackageableElement importedElement)
Creates a newElementImport
, with the specified 'Imported Element', and appends it to the 'Element Import' containment reference list.ElementImport
createElementImport(PackageableElement element, VisibilityKind visibility)
Creates an import of the specified element into this namespace with the specified visibility.Diagram
createOwnedDiagram(String name, String typeInfo)
Constraint
createOwnedRule(String name)
Creates a newConstraint
, with the specified 'Name', and appends it to the ' Owned Rule' containment reference list.Constraint
createOwnedRule(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newConstraint
, with the specified 'Name', and appends it to the ' Owned Rule' containment reference list.PackageImport
createPackageImport(Package importedPackage)
Creates a newPackageImport
, with the specified 'Imported Package', and appends it to the 'Package Import' containment reference list.PackageImport
createPackageImport(Package package_, VisibilityKind visibility)
Creates an import of the specified package into this namespace with the specified visibility.MDWEList<PackageableElement>
excludeCollisions(MDWEList<PackageableElement> imps)
The query excludeCollisions() excludes from a set of PackageableElements any that would not be distinguishable from each other in this namespace.ElementImport
getElementImport(PackageableElement importedElement)
Retrieves the firstElementImport
with the specified 'Imported Element' from the ' Element Import' containment reference list.ElementImport
getElementImport(PackageableElement importedElement, boolean createOnDemand)
Retrieves the firstElementImport
with the specified 'Imported Element' from the ' Element Import' containment reference list.MDWEList<ElementImport>
getElementImports()
Returns the value of the 'Element Import' containment reference list.MDWEList<PackageableElement>
getImportedElements()
Retrieves the elements imported by this namespace.PackageableElement
getImportedMember(String name)
Retrieves the firstPackageableElement
with the specified 'Name' from the ' Imported Member' reference list.PackageableElement
getImportedMember(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstPackageableElement
with the specified 'Name' from the ' Imported Member' reference list.MDWEList<PackageableElement>
getImportedMembers()
Returns the value of the 'Imported Member' reference list.MDWEList<Package>
getImportedPackages()
Retrieves the packages imported by this namespace.NamedElement
getMember(String name)
Retrieves the firstNamedElement
with the specified 'Name' from the ' Member' reference list.NamedElement
getMember(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstNamedElement
with the specified 'Name' from the ' Member' reference list.MDWEList<NamedElement>
getMembers()
Returns the value of the 'Member' reference list.MDWEList<String>
getNamesOfMember(NamedElement element)
The query getNamesOfMember() takes importing into account.MDWList<Diagram>
getOwnedDiagrams()
MDWList<Diagram>
getOwnedDiagrams(String typeInfo)
NamedElement
getOwnedMember(String name)
Retrieves the firstNamedElement
with the specified 'Name' from the ' Owned Member' reference list.NamedElement
getOwnedMember(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstNamedElement
with the specified 'Name' from the ' Owned Member' reference list.MDWEList<NamedElement>
getOwnedMembers()
Returns the value of the 'Owned Member' reference list.Constraint
getOwnedRule(String name)
Retrieves the firstConstraint
with the specified 'Name' from the ' Owned Rule' containment reference list.Constraint
getOwnedRule(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
Retrieves the firstConstraint
with the specified 'Name' from the ' Owned Rule' containment reference list.MDWEList<Constraint>
getOwnedRules()
Returns the value of the 'Owned Rule' containment reference list.PackageImport
getPackageImport(Package importedPackage)
Retrieves the firstPackageImport
with the specified 'Imported Package' from the ' Package Import' containment reference list.PackageImport
getPackageImport(Package importedPackage, boolean createOnDemand)
Retrieves the firstPackageImport
with the specified 'Imported Package' from the ' Package Import' containment reference list.MDWEList<PackageImport>
getPackageImports()
Returns the value of the 'Package Import' containment reference list.MDWEList<PackageableElement>
importMembers(MDWEList<PackageableElement> imps)
The query importMembers() defines which of a set of PackageableElements are actually imported into the namespace.boolean
membersAreDistinguishable()
The Boolean query membersAreDistinguishable() determines whether all of the namespace's members are distinguishable within it.boolean
validateMembersDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
All the members of a Namespace are distinguishable within it.-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
-
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
-
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
-
Methods inherited from interface com.sodius.mdw.core.model.MDWObject
compareTo, eExtendedClass, eIsInstanceOf, eIsInstanceOf, eIsProfiled, eIsRemoved, eMetamodel, eMetaTypeName, eModel, eRemove, eSetUniqueID, eUniqueID, superScript, superScript, toBoolean, toBoolean, toByte, toByte, toChar, toChar, toDouble, toDouble, toFloat, toFloat, toInt, toInt, toList, toList, toList, toList, toList, toLong, toLong, toObject, toObject, toSet, toSet, toShort, toShort, toString, toString
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
-
-
-
-
Method Detail
-
getElementImports
MDWEList<ElementImport> getElementImports()
Returns the value of the 'Element Import' containment reference list. The list contents are of typeElementImport
. It is bidirectional and its opposite is 'Importing Namespace
'. References the ElementImports owned by the Namespace.- Returns:
- the value of the 'Element Import' containment reference list.
- See Also:
UMLPackage.getNamespace_ElementImport()
,ElementImport.getImportingNamespace()
-
createElementImport
ElementImport createElementImport(PackageableElement importedElement)
Creates a newElementImport
, with the specified 'Imported Element', and appends it to the 'Element Import' containment reference list.- Parameters:
importedElement
- The 'Imported Element' for the newElementImport
, ornull
.- Returns:
- The new
ElementImport
. - See Also:
getElementImports()
-
getElementImport
ElementImport getElementImport(PackageableElement importedElement)
Retrieves the firstElementImport
with the specified 'Imported Element' from the ' Element Import' containment reference list.- Parameters:
importedElement
- The 'Imported Element' of theElementImport
to retrieve, ornull
.- Returns:
- The first
ElementImport
with the specified 'Imported Element', ornull
. - See Also:
getElementImports()
-
getElementImport
ElementImport getElementImport(PackageableElement importedElement, boolean createOnDemand)
Retrieves the firstElementImport
with the specified 'Imported Element' from the ' Element Import' containment reference list.- Parameters:
importedElement
- The 'Imported Element' of theElementImport
to retrieve, ornull
.createOnDemand
- Whether to create aElementImport
on demand if not found.- Returns:
- The first
ElementImport
with the specified 'Imported Element', ornull
. - See Also:
getElementImports()
-
getPackageImports
MDWEList<PackageImport> getPackageImports()
Returns the value of the 'Package Import' containment reference list. The list contents are of typePackageImport
. It is bidirectional and its opposite is 'Importing Namespace
'. References the PackageImports owned by the Namespace.- Returns:
- the value of the 'Package Import' containment reference list.
- See Also:
UMLPackage.getNamespace_PackageImport()
,PackageImport.getImportingNamespace()
-
createPackageImport
PackageImport createPackageImport(Package importedPackage)
Creates a newPackageImport
, with the specified 'Imported Package', and appends it to the 'Package Import' containment reference list.- Parameters:
importedPackage
- The 'Imported Package' for the newPackageImport
, ornull
.- Returns:
- The new
PackageImport
. - See Also:
getPackageImports()
-
getPackageImport
PackageImport getPackageImport(Package importedPackage)
Retrieves the firstPackageImport
with the specified 'Imported Package' from the ' Package Import' containment reference list.- Parameters:
importedPackage
- The 'Imported Package' of thePackageImport
to retrieve, ornull
.- Returns:
- The first
PackageImport
with the specified 'Imported Package', ornull
. - See Also:
getPackageImports()
-
getPackageImport
PackageImport getPackageImport(Package importedPackage, boolean createOnDemand)
Retrieves the firstPackageImport
with the specified 'Imported Package' from the ' Package Import' containment reference list.- Parameters:
importedPackage
- The 'Imported Package' of thePackageImport
to retrieve, ornull
.createOnDemand
- Whether to create aPackageImport
on demand if not found.- Returns:
- The first
PackageImport
with the specified 'Imported Package', ornull
. - See Also:
getPackageImports()
-
getOwnedRules
MDWEList<Constraint> getOwnedRules()
Returns the value of the 'Owned Rule' containment reference list. The list contents are of typeConstraint
. It is bidirectional and its opposite is 'Context
'. Specifies a set of Constraints owned by this Namespace.- Returns:
- the value of the 'Owned Rule' containment reference list.
- See Also:
UMLPackage.getNamespace_OwnedRule()
,Constraint.getContext()
-
createOwnedRule
Constraint createOwnedRule(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newConstraint
, with the specified 'Name', and appends it to the ' Owned Rule' containment reference list.- Parameters:
name
- The 'Name' for the newConstraint
, ornull
.eClass
- The Ecore class of theConstraint
to create.- Returns:
- The new
Constraint
. - See Also:
getOwnedRules()
-
createOwnedRule
Constraint createOwnedRule(String name)
Creates a newConstraint
, with the specified 'Name', and appends it to the ' Owned Rule' containment reference list.- Parameters:
name
- The 'Name' for the newConstraint
, ornull
.- Returns:
- The new
Constraint
. - See Also:
getOwnedRules()
-
getOwnedRule
Constraint getOwnedRule(String name)
Retrieves the firstConstraint
with the specified 'Name' from the ' Owned Rule' containment reference list.- Parameters:
name
- The 'Name' of theConstraint
to retrieve, ornull
.- Returns:
- The first
Constraint
with the specified 'Name', ornull
. - See Also:
getOwnedRules()
-
getOwnedRule
Constraint getOwnedRule(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
Retrieves the firstConstraint
with the specified 'Name' from the ' Owned Rule' containment reference list.- Parameters:
name
- The 'Name' of theConstraint
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.eClass
- The Ecore class of theConstraint
to retrieve, ornull
.createOnDemand
- Whether to create aConstraint
on demand if not found.- Returns:
- The first
Constraint
with the specified 'Name', ornull
. - See Also:
getOwnedRules()
-
getMembers
MDWEList<NamedElement> getMembers()
Returns the value of the 'Member' reference list. The list contents are of typeNamedElement
. A collection of NamedElements identifiable within the Namespace, either by being owned or by being introduced by importing or inheritance.- Returns:
- the value of the 'Member' reference list.
- See Also:
UMLPackage.getNamespace_Member()
-
getMember
NamedElement getMember(String name)
Retrieves the firstNamedElement
with the specified 'Name' from the ' Member' reference list.- Parameters:
name
- The 'Name' of theNamedElement
to retrieve, ornull
.- Returns:
- The first
NamedElement
with the specified 'Name', ornull
. - See Also:
getMembers()
-
getMember
NamedElement getMember(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstNamedElement
with the specified 'Name' from the ' Member' reference list.- Parameters:
name
- The 'Name' of theNamedElement
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.eClass
- The Ecore class of theNamedElement
to retrieve, ornull
.- Returns:
- The first
NamedElement
with the specified 'Name', ornull
. - See Also:
getMembers()
-
getImportedMembers
MDWEList<PackageableElement> getImportedMembers()
Returns the value of the 'Imported Member' reference list. The list contents are of typePackageableElement
. References the PackageableElements that are members of this Namespace as a result of either PackageImports or ElementImports.- Returns:
- the value of the 'Imported Member' reference list.
- See Also:
UMLPackage.getNamespace_ImportedMember()
-
getImportedMember
PackageableElement getImportedMember(String name)
Retrieves the firstPackageableElement
with the specified 'Name' from the ' Imported Member' reference list.- Parameters:
name
- The 'Name' of thePackageableElement
to retrieve, ornull
.- Returns:
- The first
PackageableElement
with the specified 'Name', ornull
. - See Also:
getImportedMembers()
-
getImportedMember
PackageableElement getImportedMember(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstPackageableElement
with the specified 'Name' from the ' Imported Member' reference list.- Parameters:
name
- The 'Name' of thePackageableElement
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.eClass
- The Ecore class of thePackageableElement
to retrieve, ornull
.- Returns:
- The first
PackageableElement
with the specified 'Name', ornull
. - See Also:
getImportedMembers()
-
getOwnedMembers
MDWEList<NamedElement> getOwnedMembers()
Returns the value of the 'Owned Member' reference list. The list contents are of typeNamedElement
. It is bidirectional and its opposite is 'Namespace
'. A collection of NamedElements owned by the Namespace.- Returns:
- the value of the 'Owned Member' reference list.
- See Also:
UMLPackage.getNamespace_OwnedMember()
,NamedElement.getNamespace()
-
getOwnedMember
NamedElement getOwnedMember(String name)
Retrieves the firstNamedElement
with the specified 'Name' from the ' Owned Member' reference list.- Parameters:
name
- The 'Name' of theNamedElement
to retrieve, ornull
.- Returns:
- The first
NamedElement
with the specified 'Name', ornull
. - See Also:
getOwnedMembers()
-
getOwnedMember
NamedElement getOwnedMember(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstNamedElement
with the specified 'Name' from the ' Owned Member' reference list.- Parameters:
name
- The 'Name' of theNamedElement
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.eClass
- The Ecore class of theNamedElement
to retrieve, ornull
.- Returns:
- The first
NamedElement
with the specified 'Name', ornull
. - See Also:
getOwnedMembers()
-
validateMembersDistinguishable
boolean validateMembersDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
All the members of a Namespace are distinguishable within it. membersAreDistinguishable()
-
createElementImport
ElementImport createElementImport(PackageableElement element, VisibilityKind visibility)
Creates an import of the specified element into this namespace with the specified visibility.
-
createPackageImport
PackageImport createPackageImport(Package package_, VisibilityKind visibility)
Creates an import of the specified package into this namespace with the specified visibility.
-
getImportedElements
MDWEList<PackageableElement> getImportedElements()
Retrieves the elements imported by this namespace.
-
getImportedPackages
MDWEList<Package> getImportedPackages()
Retrieves the packages imported by this namespace.
-
getNamesOfMember
MDWEList<String> getNamesOfMember(NamedElement element)
The query getNamesOfMember() takes importing into account. It gives back the set of names that an element would have in an importing namespace, either because it is owned, or if not owned then imported individually, or if not individually then from a package. 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. The query takes account of importing. It gives back the set of names that an element would have in an importing namespace, either because it is owned, or if not owned then imported individually, or if not individually then from a package. result = if self.ownedMember ->includes(element) then Set{}->include(element.name) else let elementImports: ElementImport = self.elementImport->select(ei | ei.importedElement = element) in if elementImports->notEmpty() then elementImports->collect(el | el.getName()) else self.packageImport->select(pi | pi.importedPackage.visibleMembers()->includes(element))-> collect(pi | pi.importedPackage.getNamesOfMember(element)) endif endif
-
membersAreDistinguishable
boolean membersAreDistinguishable()
The Boolean query membersAreDistinguishable() determines whether all of the namespace's members are distinguishable within it. result = self.member->forAll( memb | self.member->excluding(memb)->forAll(other | memb.isDistinguishableFrom(other, self)))
-
importMembers
MDWEList<PackageableElement> importMembers(MDWEList<PackageableElement> imps)
The query importMembers() defines which of a set of PackageableElements are actually imported into the namespace. This excludes hidden ones, i.e., those which have names that conflict with names of owned members, and also excludes elements which would have the same name when imported. result = self.excludeCollisions(imps)->select(imp | self.ownedMember->forAll(mem | mem.imp.isDistinguishableFrom(mem, self)))
-
excludeCollisions
MDWEList<PackageableElement> excludeCollisions(MDWEList<PackageableElement> imps)
The query excludeCollisions() excludes from a set of PackageableElements any that would not be distinguishable from each other in this namespace. result = imps->reject(imp1 | imps.exists(imp2 | not imp1.isDistinguishableFrom(imp2, self)))
-
getOwnedDiagrams
MDWList<Diagram> getOwnedDiagrams()
- Returns:
- list of Diagrams
- Since:
- 3.5.0
- See Also:
Diagram.getOwnerElement()
-
getOwnedDiagrams
MDWList<Diagram> getOwnedDiagrams(String typeInfo)
Returns the list ofDiagrams
owned by the currentNamespace
. TheDiagrams
listed have thetype info
attribute set to the 'typeInfo' value.- Parameters:
typeInfo
- the typeInfo value- Returns:
- list of Diagrams
- Since:
- 3.5.0
- See Also:
Diagram.getOwnerElement()
,SimpleSemanticModelElement.getTypeInfo()
-
createOwnedDiagram
Diagram createOwnedDiagram(String name, String typeInfo)
Creates aDiagram
called 'name' owned by the currentNamespace
. TheDiagram
created have aSimple Semantic Model Element
with thetype info
attribute set to the 'typeInfo' value.- Parameters:
name
- the name of the Diagram createdtypeInfo
- the typeInfo of the SimpleSemanticModelElement linked to the Diagram- Returns:
- list of Diagrams
- Since:
- 3.5.0
- See Also:
Diagram.getOwnerElement()
,SimpleSemanticModelElement.getTypeInfo()
-
-