org.eclipse.uml2
Interface NamedElement

All Superinterfaces:
Element, EModelElement, EObject, Notifier, TemplateableElement
All Known Subinterfaces:
Abstraction, AcceptCallAction, AcceptEventAction, Action, Activity, ActivityEdge, ActivityFinalNode, ActivityNode, ActivityParameterNode, ActivityPartition, Actor, AddStructuralFeatureValueAction, AddVariableValueAction, AnyTrigger, ApplyFunctionAction, Artifact, Association, AssociationClass, Behavior, BehavioralFeature, BehavioredClassifier, BroadcastSignalAction, CallAction, CallBehaviorAction, CallOperationAction, CallTrigger, CentralBufferNode, ChangeTrigger, Class, Classifier, ClearAssociationAction, ClearStructuralFeatureAction, ClearVariableAction, Collaboration, CollaborationOccurrence, CombinedFragment, CommunicationPath, Component, ConditionalNode, ConnectableElement, ConnectionPointReference, Connector, Constraint, Continuation, ControlFlow, ControlNode, CreateLinkAction, CreateLinkObjectAction, CreateObjectAction, DataStoreNode, DataType, DecisionNode, Dependency, DeployedArtifact, Deployment, DeploymentSpecification, DeploymentTarget, DestroyLinkAction, DestroyObjectAction, Device, Duration, DurationConstraint, DurationInterval, DurationObservationAction, EncapsulatedClassifier, Enumeration, EnumerationLiteral, EventOccurrence, ExecutableNode, ExecutionEnvironment, ExecutionOccurrence, ExpansionNode, ExpansionRegion, Expression, Extend, Extension, ExtensionEnd, ExtensionPoint, Feature, FinalNode, FinalState, FlowFinalNode, ForkNode, Gate, GeneralizationSet, GeneralOrdering, Implementation, Include, InformationFlow, InformationItem, InitialNode, InputPin, InstanceSpecification, InstanceValue, Interaction, InteractionConstraint, InteractionFragment, InteractionOccurrence, InteractionOperand, Interface, Interval, IntervalConstraint, InvocationAction, JoinNode, Lifeline, LinkAction, LiteralBoolean, LiteralInteger, LiteralNull, LiteralSpecification, LiteralString, LiteralUnlimitedNatural, LoopNode, Manifestation, MergeNode, Message, MessageEnd, MessageTrigger, Model, Namespace, Node, ObjectFlow, ObjectNode, OpaqueExpression, Operation, OutputPin, Package, PackageableElement, Parameter, ParameterableClassifier, ParameterSet, PartDecomposition, Permission, Pin, Port, PrimitiveFunction, PrimitiveType, Profile, Property, ProtocolStateMachine, ProtocolTransition, Pseudostate, RaiseExceptionAction, ReadExtentAction, ReadIsClassifiedObjectAction, ReadLinkAction, ReadLinkObjectEndAction, ReadLinkObjectEndQualifierAction, ReadSelfAction, ReadStructuralFeatureAction, ReadVariableAction, Realization, Reception, ReclassifyObjectAction, RedefinableElement, RedefinableTemplateSignature, Region, RemoveStructuralFeatureValueAction, RemoveVariableValueAction, ReplyAction, SendObjectAction, SendSignalAction, Signal, SignalTrigger, StartOwnedBehaviorAction, State, StateInvariant, StateMachine, Stereotype, Stop, StructuralFeature, StructuralFeatureAction, StructuredActivityNode, StructuredClassifier, Substitution, TemplateableClassifier, TestIdentityAction, TimeConstraint, TimeExpression, TimeInterval, TimeObservationAction, TimeTrigger, Transition, Trigger, Type, TypedElement, Usage, UseCase, ValuePin, ValueSpecification, Variable, VariableAction, Vertex, WriteLinkAction, WriteStructuralFeatureAction, WriteVariableAction

public interface NamedElement
extends TemplateableElement

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:

See Also:
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

copyright

public static final String copyright

See Also:
Constant Field Values

SEPARATOR

public static final String SEPARATOR
See Also:
Constant Field Values
Method Detail

getName

public String getName()
Returns the value of the 'Name' attribute. The default value is "".

If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here...

The name of the NamedElement.

Returns:
the value of the 'Name' attribute.
See Also:
setName(String), UML2Package.getNamedElement_Name()

setName

public void setName(String value)
Sets the value of the 'Name' attribute.

Parameters:
value - the new value of the 'Name' attribute.
See Also:
getName()

getQualifiedName

public String getQualifiedName()
Returns the value of the 'Qualified Name' attribute. The default value is "".

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.

Returns:
the value of the 'Qualified Name' attribute.
See Also:
UML2Package.getNamedElement_QualifiedName()

getVisibility

public VisibilityKind getVisibility()
Returns the value of the 'Visibility' attribute. The literals are from the enumeration 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)

Returns:
the value of the 'Visibility' attribute.
See Also:
VisibilityKind, setVisibility(VisibilityKind), UML2Package.getNamedElement_Visibility()

setVisibility

public void setVisibility(VisibilityKind value)
Sets the value of the 'Visibility' attribute.

Parameters:
value - the new value of the 'Visibility' attribute.
See Also:
VisibilityKind, getVisibility()

getClientDependencies

public EList getClientDependencies()
Returns the value of the 'Client Dependency' reference list. The list contents are of type 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...

Returns:
the value of the 'Client Dependency' reference list.
See Also:
UML2Package.getNamedElement_ClientDependency(), Dependency.getClients()

getClientDependency

public Dependency getClientDependency(String unqualifiedName)
Retrieves the Dependency with the specified name from the 'Client Dependency' reference list.

Parameters:
unqualifiedName - The unqualified name of the Dependency to retrieve.
Returns:
The Dependency with the specified name, or null.
See Also:
getClientDependencies()

getNameExpression

public StringExpression getNameExpression()
Returns the value of the 'Name Expression' containment reference.

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.

Returns:
the value of the 'Name Expression' containment reference.
See Also:
setNameExpression(StringExpression), UML2Package.getNamedElement_NameExpression()

setNameExpression

public 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

public StringExpression createNameExpression(EClass eClass)
Creates a StringExpression and sets the 'Name Expression' containment reference.

Parameters:
eClass - The Ecore class of the StringExpression to create.
Returns:
The new StringExpression.
See Also:
getNameExpression()

validateNoName

public 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()


validateQualifiedName

public 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))


allNamespaces

public List allNamespaces()
A query based on the following OCL expression: if self.namespace->isEmpty() then Sequence{} else self.namespace.allNamespaces()->prepend(self.namespace) endif


isDistinguishableFrom

public 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


separator

public String separator()
A query based on the following OCL expression: '::'


qualifiedName

public 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


validateVisibilityNeedsOwnership

public boolean validateVisibilityNeedsOwnership(DiagnosticChain diagnostics,
                                                Map context)
An invariant constraint based on the following OCL expression: namespace->isEmpty() implies visibility->isEmpty()


getNamespace

public Namespace getNamespace()


getOwner

public Element getOwner()

Specified by:
getOwner in interface Element
Returns:
the value of the 'Owner' reference.
See Also:
UML2Package.getElement_Owner(), Element.getOwnedElements()

getOwnedElements

public EList getOwnedElements()

Specified by:
getOwnedElements in interface TemplateableElement

Copyright 2003, 2004 IBM Corporation and others.
All Rights Reserved.