Package com.sodius.mdw.metamodel.uml21
Interface NamedElement
-
- All Superinterfaces:
Comparable<Object>
,Element
,org.eclipse.emf.ecore.EModelElement
,org.eclipse.emf.ecore.EObject
,MDWEObject
,MDWObject
,org.eclipse.emf.common.notify.Notifier
- All Known Subinterfaces:
Abstraction
,AcceptCallAction
,AcceptEventAction
,Action
,ActionExecutionSpecification
,ActionInputPin
,Activity
,ActivityEdge
,ActivityFinalNode
,ActivityNode
,ActivityParameterNode
,ActivityPartition
,Actor
,AddStructuralFeatureValueAction
,AddVariableValueAction
,AnyReceiveEvent
,Artifact
,Association
,AssociationClass
,Behavior
,BehavioralFeature
,BehavioredClassifier
,BehaviorExecutionSpecification
,BroadcastSignalAction
,CallAction
,CallBehaviorAction
,CallEvent
,CallOperationAction
,CentralBufferNode
,ChangeEvent
,Class
,Classifier
,ClearAssociationAction
,ClearStructuralFeatureAction
,ClearVariableAction
,Collaboration
,CollaborationUse
,CombinedFragment
,CommunicationPath
,Component
,ComponentRealization
,ConditionalNode
,ConnectableElement
,ConnectionPointReference
,Connector
,ConsiderIgnoreFragment
,Constraint
,Continuation
,ControlFlow
,ControlNode
,CreateLinkAction
,CreateLinkObjectAction
,CreateObjectAction
,CreationEvent
,DataStoreNode
,DataType
,DecisionNode
,Dependency
,DeployedArtifact
,Deployment
,DeploymentSpecification
,DeploymentTarget
,DestroyLinkAction
,DestroyObjectAction
,DestructionEvent
,Device
,Duration
,DurationConstraint
,DurationInterval
,DurationObservation
,EncapsulatedClassifier
,Enumeration
,EnumerationLiteral
,Event
,ExecutableNode
,ExecutionEnvironment
,ExecutionEvent
,ExecutionOccurrenceSpecification
,ExecutionSpecification
,ExpansionNode
,ExpansionRegion
,Expression
,Extend
,Extension
,ExtensionEnd
,ExtensionPoint
,Feature
,FinalNode
,FinalState
,FlowFinalNode
,ForkNode
,FunctionBehavior
,Gate
,GeneralizationSet
,GeneralOrdering
,Include
,InformationFlow
,InformationItem
,InitialNode
,InputPin
,InstanceSpecification
,InstanceValue
,Interaction
,InteractionConstraint
,InteractionFragment
,InteractionOperand
,InteractionUse
,Interface
,InterfaceRealization
,Interval
,IntervalConstraint
,InvocationAction
,JoinNode
,Lifeline
,LinkAction
,LiteralBoolean
,LiteralInteger
,LiteralNull
,LiteralSpecification
,LiteralString
,LiteralUnlimitedNatural
,LoopNode
,Manifestation
,MergeNode
,Message
,MessageEnd
,MessageEvent
,MessageOccurrenceSpecification
,Model
,Namespace
,Node
,ObjectFlow
,ObjectNode
,Observation
,OccurrenceSpecification
,OpaqueAction
,OpaqueBehavior
,OpaqueExpression
,Operation
,OutputPin
,Package
,PackageableElement
,Parameter
,ParameterSet
,PartDecomposition
,Pin
,Port
,PrimitiveType
,Profile
,Property
,ProtocolStateMachine
,ProtocolTransition
,Pseudostate
,RaiseExceptionAction
,ReadExtentAction
,ReadIsClassifiedObjectAction
,ReadLinkAction
,ReadLinkObjectEndAction
,ReadLinkObjectEndQualifierAction
,ReadSelfAction
,ReadStructuralFeatureAction
,ReadVariableAction
,Realization
,ReceiveOperationEvent
,ReceiveSignalEvent
,Reception
,ReclassifyObjectAction
,RedefinableElement
,RedefinableTemplateSignature
,ReduceAction
,Region
,RemoveStructuralFeatureValueAction
,RemoveVariableValueAction
,ReplyAction
,SendObjectAction
,SendOperationEvent
,SendSignalAction
,SendSignalEvent
,SequenceNode
,Signal
,SignalEvent
,StartClassifierBehaviorAction
,State
,StateInvariant
,StateMachine
,Stereotype
,StringExpression
,StructuralFeature
,StructuralFeatureAction
,StructuredActivityNode
,StructuredClassifier
,Substitution
,TestIdentityAction
,TimeConstraint
,TimeEvent
,TimeExpression
,TimeInterval
,TimeObservation
,Transition
,Trigger
,Type
,TypedElement
,UnmarshallAction
,Usage
,UseCase
,ValuePin
,ValueSpecification
,ValueSpecificationAction
,Variable
,VariableAction
,Vertex
,WriteLinkAction
,WriteStructuralFeatureAction
,WriteVariableAction
public interface NamedElement extends Element
A representation of the model object 'Named Element'. A named element is an element in a model that may have a name. A named element supports using a string expression to specify its name. This allows names of model elements to involve template parameters. The actual name is evaluated from the string expression only when it is sensible to do so (e.g., when a template is bound).The following features are supported:
- See Also:
UMLPackage.getNamedElement()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MDWEList<Namespace>
allNamespaces()
The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards.MDWEList<Package>
allOwningPackages()
The query allOwningPackages() returns all the directly or indirectly owning packages.Dependency
createDependency(NamedElement supplier)
Creates a dependency between this named element and the specified supplier, owned by this named element's nearest package.StringExpression
createNameExpression(String name, Type type)
Creates a newStringExpression
,with the specified 'Name', and 'Type', and sets the 'Name Expression' containment reference.MDWEList<Dependency>
getClientDependencies()
Returns the value of the 'Client Dependency' reference list.Dependency
getClientDependency(String name)
Retrieves the firstDependency
with the specified 'Name' from the ' Client Dependency' reference list.Dependency
getClientDependency(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstDependency
with the specified 'Name' from the ' Client Dependency' reference list.String
getLabel()
Retrieves a localized label for this named element.String
getLabel(boolean localize)
Retrieves a label for this named element, localized if indicated.String
getName()
Returns the value of the 'Name' attribute.StringExpression
getNameExpression()
Returns the value of the 'Name Expression' containment reference.Namespace
getNamespace()
Returns the value of the 'Namespace' reference.String
getQualifiedName()
Returns the value of the 'Qualified Name' attribute.VisibilityKind
getVisibility()
Returns the value of the 'Visibility' attribute.boolean
isDistinguishableFrom(NamedElement n, Namespace ns)
The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace.boolean
isSetName()
Returns whether the value of the 'Name
' attribute is set.boolean
isSetVisibility()
Returns whether the value of the 'Visibility
' attribute is set.String
separator()
The query separator() gives the string that is used to separate names when constructing a qualified name.void
setName(String value)
Sets the value of the 'Name
' attribute.void
setNameExpression(StringExpression value)
Sets the value of the 'Name Expression
' containment reference.void
setVisibility(VisibilityKind value)
Sets the value of the 'Visibility
' attribute.void
unsetName()
Unsets the value of the 'Name
' attribute.void
unsetVisibility()
Unsets the value of the 'Visibility
' attribute.boolean
validateHasNoQualifiedName(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
If there is no name, or one of the containing namespaces has no name, there is no qualified name.boolean
validateHasQualifiedName(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces.boolean
validateVisibilityNeedsOwnership(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
If a NamedElement is not owned by a Namespace, it does not have a visibility.-
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
-
-
-
-
Field Detail
-
SEPARATOR
static final String SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Returns the value of the 'Name' attribute. The name of the NamedElement.- Returns:
- the value of the 'Name' attribute.
- See Also:
isSetName()
,unsetName()
,setName(String)
,UMLPackage.getNamedElement_Name()
-
setName
void setName(String value)
Sets the value of the 'Name
' attribute.- Parameters:
value
- the new value of the 'Name' attribute.- See Also:
isSetName()
,unsetName()
,getName()
-
unsetName
void unsetName()
Unsets the value of the 'Name
' attribute.- See Also:
isSetName()
,getName()
,setName(String)
-
isSetName
boolean isSetName()
Returns whether the value of the 'Name
' attribute is set.- Returns:
- whether the value of the 'Name' attribute is set.
- See Also:
unsetName()
,getName()
,setName(String)
-
getVisibility
VisibilityKind getVisibility()
Returns the value of the 'Visibility' attribute. The literals are from the enumerationVisibilityKind
. Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility.- Returns:
- the value of the 'Visibility' attribute.
- See Also:
VisibilityKind
,isSetVisibility()
,unsetVisibility()
,setVisibility(VisibilityKind)
,UMLPackage.getNamedElement_Visibility()
-
setVisibility
void setVisibility(VisibilityKind value)
Sets the value of the 'Visibility
' attribute.- Parameters:
value
- the new value of the 'Visibility' attribute.- See Also:
VisibilityKind
,isSetVisibility()
,unsetVisibility()
,getVisibility()
-
unsetVisibility
void unsetVisibility()
Unsets the value of the 'Visibility
' attribute.
-
isSetVisibility
boolean isSetVisibility()
Returns whether the value of the 'Visibility
' attribute is set.- Returns:
- whether the value of the 'Visibility' attribute is set.
- See Also:
unsetVisibility()
,getVisibility()
,setVisibility(VisibilityKind)
-
getQualifiedName
String getQualifiedName()
Returns the value of the 'Qualified Name' attribute. A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself.- Returns:
- the value of the 'Qualified Name' attribute.
- See Also:
UMLPackage.getNamedElement_QualifiedName()
-
getClientDependencies
MDWEList<Dependency> getClientDependencies()
Returns the value of the 'Client Dependency' reference list. The list contents are of typeDependency
. It is bidirectional and its opposite is 'Client
'. Indicates the dependencies that reference the client.- Returns:
- the value of the 'Client Dependency' reference list.
- See Also:
UMLPackage.getNamedElement_ClientDependency()
,Dependency.getClients()
-
getClientDependency
Dependency getClientDependency(String name)
Retrieves the firstDependency
with the specified 'Name' from the ' Client Dependency' reference list.- Parameters:
name
- The 'Name' of theDependency
to retrieve, ornull
.- Returns:
- The first
Dependency
with the specified 'Name', ornull
. - See Also:
getClientDependencies()
-
getClientDependency
Dependency getClientDependency(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstDependency
with the specified 'Name' from the ' Client Dependency' reference list.- Parameters:
name
- The 'Name' of theDependency
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.eClass
- The Ecore class of theDependency
to retrieve, ornull
.- Returns:
- The first
Dependency
with the specified 'Name', ornull
. - See Also:
getClientDependencies()
-
getNamespace
Namespace getNamespace()
Returns the value of the 'Namespace' reference. It is bidirectional and its opposite is 'Owned Member
'. Specifies the namespace that owns the NamedElement.- Returns:
- the value of the 'Namespace' reference.
- See Also:
UMLPackage.getNamedElement_Namespace()
,Namespace.getOwnedMembers()
-
getNameExpression
StringExpression getNameExpression()
Returns the value of the 'Name Expression' containment reference. The string expression used to define the name of this named element.- Returns:
- the value of the 'Name Expression' containment reference.
- See Also:
setNameExpression(StringExpression)
,UMLPackage.getNamedElement_NameExpression()
-
setNameExpression
void setNameExpression(StringExpression value)
Sets the value of the 'Name Expression
' containment reference.- Parameters:
value
- the new value of the 'Name Expression' containment reference.- See Also:
getNameExpression()
-
createNameExpression
StringExpression createNameExpression(String name, Type type)
Creates a newStringExpression
,with the specified 'Name', and 'Type', and sets the 'Name Expression' containment reference.- Parameters:
name
- The 'Name' for the newStringExpression
, ornull
.type
- The 'Type' for the newStringExpression
, ornull
.- Returns:
- The new
StringExpression
. - See Also:
getNameExpression()
-
validateHasNoQualifiedName
boolean validateHasNoQualifiedName(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
If there is no name, or one of the containing namespaces has no name, there is no qualified name. (self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty()) implies self.qualifiedName->isEmpty()
-
validateHasQualifiedName
boolean validateHasQualifiedName(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces. (self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()) implies self.qualifiedName = self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result))
-
validateVisibilityNeedsOwnership
boolean validateVisibilityNeedsOwnership(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
If a NamedElement is not owned by a Namespace, it does not have a visibility. namespace->isEmpty() implies visibility->isEmpty()
-
createDependency
Dependency createDependency(NamedElement supplier)
Creates a dependency between this named element and the specified supplier, owned by this named element's nearest package.
-
getLabel
String getLabel()
Retrieves a localized label for this named element.
-
getLabel
String getLabel(boolean localize)
Retrieves a label for this named element, localized if indicated.
-
allNamespaces
MDWEList<Namespace> allNamespaces()
The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards. result = if self.namespace->isEmpty() then Sequence{} else self.namespace.allNamespaces()->prepend(self.namespace) endif
-
isDistinguishableFrom
boolean isDistinguishableFrom(NamedElement n, Namespace ns)
The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names. result = if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType) then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->isEmpty() else true endif
-
separator
String separator()
The query separator() gives the string that is used to separate names when constructing a qualified name. result = '::'
-
-