|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A representation of the model object 'Named Element'. A named element represents elements that may have a name. The name is used for identification of the named element within the namespace in which it is defined. A named element also has a qualified name that allows it to be unambiguously identified within a hierarchy of nested namespaces. NamedElement is an abstract metaclass.
The following features are supported:
UML2Package.getNamedElement()
Field Summary | |
static String |
copyright
|
static String |
SEPARATOR
|
Method Summary | |
List |
allNamespaces()
A query based on the following OCL expression:
if self.namespace->isEmpty()
then Sequence{}
else self.namespace.allNamespaces()->prepend(self.namespace)
endif
|
StringExpression |
createNameExpression(EClass eClass)
Creates a StringExpression and sets the 'Name Expression' containment reference |
EList |
getClientDependencies()
Returns the value of the 'Client Dependency' reference list. |
Dependency |
getClientDependency(String unqualifiedName)
Retrieves the Dependency with the specified name from the 'Client Dependency' reference list |
String |
getName()
Returns the value of the 'Name' attribute. |
StringExpression |
getNameExpression()
Returns the value of the 'Name Expression' containment reference |
Namespace |
getNamespace()
|
EList |
getOwnedElements()
|
Element |
getOwner()
|
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)
A query based on the following OCL expression:
if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->isEmpty()
else true
endif
|
String |
qualifiedName()
A query based on the following OCL expression:
if self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()
then
self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result))
else
Set{}
endif
|
String |
separator()
A query based on the following OCL expression:
'::'
|
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 |
boolean |
validateNoName(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty()
implies self.qualifiedName->isEmpty()
|
boolean |
validateQualifiedName(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
(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))
|
boolean |
validateVisibilityNeedsOwnership(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
namespace->isEmpty() implies visibility->isEmpty()
|
Methods inherited from interface org.eclipse.uml2.TemplateableElement |
createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBindings, parameterableElements, setOwnedTemplateSignature |
Methods inherited from interface org.eclipse.uml2.Element |
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getValue, hasKeyword, isApplied, isRequired, mustBeOwned, removeKeyword, setValue, unapply, 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, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
Field Detail |
public static final String copyright
public static final String SEPARATOR
Method Detail |
public String getName()
""
.
If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here...
The name of the NamedElement.
setName(String)
,
UML2Package.getNamedElement_Name()
public void setName(String value)
Name
' attribute.
value
- the new value of the 'Name' attribute.getName()
public String getQualifiedName()
""
.
If the meaning of the 'Qualified Name' attribute isn't clear, there really should be more of a description here...
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. This is a derived attribute.
UML2Package.getNamedElement_QualifiedName()
public VisibilityKind getVisibility()
VisibilityKind
.
If the meaning of the 'Visibility' attribute isn't clear, there really should be more of a description here...
Determines the visibility of the NamedElement within different Namespaces within the overall model. Package Dependencies (�Dependencies� on page 94)
VisibilityKind
,
setVisibility(VisibilityKind)
,
UML2Package.getNamedElement_Visibility()
public void setVisibility(VisibilityKind value)
Visibility
' attribute.
value
- the new value of the 'Visibility' attribute.VisibilityKind
,
getVisibility()
public EList getClientDependencies()
Dependency
.
It is bidirectional and its opposite is 'Client
'.
If the meaning of the 'Client Dependency' reference list isn't clear, there really should be more of a description here...
UML2Package.getNamedElement_ClientDependency()
,
Dependency.getClients()
public Dependency getClientDependency(String unqualifiedName)
Dependency
with the specified name from the 'Client Dependency' reference list.
unqualifiedName
- The unqualified name of the Dependency
to retrieve.
Dependency
with the specified name, or null
.getClientDependencies()
public StringExpression getNameExpression()
If the meaning of the 'Name Expression' containment reference isn't clear, there really should be more of a description here...
The expression used to define the name of this named element.
setNameExpression(StringExpression)
,
UML2Package.getNamedElement_NameExpression()
public void setNameExpression(StringExpression value)
Name Expression
' containment reference.
value
- the new value of the 'Name Expression' containment reference.getNameExpression()
public StringExpression createNameExpression(EClass eClass)
StringExpression
and sets the 'Name Expression' containment reference.
eClass
- The Ecore class of the StringExpression
to create.
StringExpression
.getNameExpression()
public boolean validateNoName(DiagnosticChain diagnostics, Map context)
self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty()
implies self.qualifiedName->isEmpty()
public boolean validateQualifiedName(DiagnosticChain diagnostics, Map context)
(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))
public List allNamespaces()
if self.namespace->isEmpty()
then Sequence{}
else self.namespace.allNamespaces()->prepend(self.namespace)
endif
public boolean isDistinguishableFrom(NamedElement n, Namespace ns)
if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->isEmpty()
else true
endif
public String separator()
'::'
public String qualifiedName()
if self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()
then
self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result))
else
Set{}
endif
public boolean validateVisibilityNeedsOwnership(DiagnosticChain diagnostics, Map context)
namespace->isEmpty() implies visibility->isEmpty()
public Namespace getNamespace()
public Element getOwner()
getOwner
in interface Element
UML2Package.getElement_Owner()
,
Element.getOwnedElements()
public EList getOwnedElements()
getOwnedElements
in interface TemplateableElement
|
Copyright 2003, 2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |