org.eclipse.uml2.uml
Interface Element

All Superinterfaces:
EModelElement, EObject, Notifier
All Known Subinterfaces:
Abstraction, AcceptCallAction, AcceptEventAction, Action, ActionExecutionSpecification, ActionInputPin, Activity, ActivityEdge, ActivityFinalNode, ActivityGroup, ActivityNode, ActivityParameterNode, ActivityPartition, Actor, AddStructuralFeatureValueAction, AddVariableValueAction, AnyReceiveEvent, Artifact, Association, AssociationClass, Behavior, BehavioralFeature, BehavioredClassifier, BehaviorExecutionSpecification, BroadcastSignalAction, CallAction, CallBehaviorAction, CallEvent, CallOperationAction, CentralBufferNode, ChangeEvent, Class, Classifier, ClassifierTemplateParameter, Clause, ClearAssociationAction, ClearStructuralFeatureAction, ClearVariableAction, Collaboration, CollaborationUse, CombinedFragment, Comment, CommunicationPath, Component, ComponentRealization, ConditionalNode, ConnectableElement, ConnectableElementTemplateParameter, ConnectionPointReference, Connector, ConnectorEnd, ConsiderIgnoreFragment, Constraint, Continuation, ControlFlow, ControlNode, CreateLinkAction, CreateLinkObjectAction, CreateObjectAction, CreationEvent, DataStoreNode, DataType, DecisionNode, Dependency, DeployedArtifact, Deployment, DeploymentSpecification, DeploymentTarget, DestroyLinkAction, DestroyObjectAction, DestructionEvent, Device, DirectedRelationship, Duration, DurationConstraint, DurationInterval, DurationObservation, ElementImport, EncapsulatedClassifier, Enumeration, EnumerationLiteral, Event, ExceptionHandler, ExecutableNode, ExecutionEnvironment, ExecutionEvent, ExecutionOccurrenceSpecification, ExecutionSpecification, ExpansionNode, ExpansionRegion, Expression, Extend, Extension, ExtensionEnd, ExtensionPoint, Feature, FinalNode, FinalState, FlowFinalNode, ForkNode, FunctionBehavior, Gate, Generalization, GeneralizationSet, GeneralOrdering, Image, Include, InformationFlow, InformationItem, InitialNode, InputPin, InstanceSpecification, InstanceValue, Interaction, InteractionConstraint, InteractionFragment, InteractionOperand, InteractionUse, Interface, InterfaceRealization, InterruptibleActivityRegion, Interval, IntervalConstraint, InvocationAction, JoinNode, Lifeline, LinkAction, LinkEndCreationData, LinkEndData, LinkEndDestructionData, LiteralBoolean, LiteralInteger, LiteralNull, LiteralSpecification, LiteralString, LiteralUnlimitedNatural, LoopNode, Manifestation, MergeNode, Message, MessageEnd, MessageEvent, MessageOccurrenceSpecification, Model, MultiplicityElement, NamedElement, Namespace, Node, ObjectFlow, ObjectNode, Observation, OccurrenceSpecification, OpaqueAction, OpaqueBehavior, OpaqueExpression, Operation, OperationTemplateParameter, OutputPin, Package, PackageableElement, PackageImport, PackageMerge, Parameter, ParameterableElement, ParameterSet, PartDecomposition, Pin, Port, PrimitiveType, Profile, ProfileApplication, Property, ProtocolConformance, ProtocolStateMachine, ProtocolTransition, Pseudostate, QualifierValue, RaiseExceptionAction, ReadExtentAction, ReadIsClassifiedObjectAction, ReadLinkAction, ReadLinkObjectEndAction, ReadLinkObjectEndQualifierAction, ReadSelfAction, ReadStructuralFeatureAction, ReadVariableAction, Realization, ReceiveOperationEvent, ReceiveSignalEvent, Reception, ReclassifyObjectAction, RedefinableElement, RedefinableTemplateSignature, ReduceAction, Region, Relationship, RemoveStructuralFeatureValueAction, RemoveVariableValueAction, ReplyAction, SendObjectAction, SendOperationEvent, SendSignalAction, SendSignalEvent, SequenceNode, Signal, SignalEvent, Slot, StartClassifierBehaviorAction, State, StateInvariant, StateMachine, Stereotype, StringExpression, StructuralFeature, StructuralFeatureAction, StructuredActivityNode, StructuredClassifier, Substitution, TemplateableElement, TemplateBinding, TemplateParameter, TemplateParameterSubstitution, TemplateSignature, TestIdentityAction, TimeConstraint, TimeEvent, TimeExpression, TimeInterval, TimeObservation, Transition, Trigger, Type, TypedElement, UnmarshallAction, Usage, UseCase, ValuePin, ValueSpecification, ValueSpecificationAction, Variable, VariableAction, Vertex, WriteLinkAction, WriteStructuralFeatureAction, WriteVariableAction

public interface Element
extends EModelElement

A representation of the model object 'Element'. An element is a constituent of a model. As such, it has the capability of owning other elements.

The following features are supported:

See Also:
UMLPackage.getElement()

Method Summary
 boolean addKeyword(String keyword)
           Adds the specified keyword to this element
 EList allOwnedElements()
           The query allOwnedElements() gives all of the direct and indirect owned elements of an element.
 EObject applyStereotype(Stereotype stereotype)
           Applies the specified stereotype to this element
 EAnnotation createEAnnotation(String source)
           Creates an annotation with the specified source and this element as its model element
 Comment createOwnedComment()
          Creates a new Comment and appends it to the 'Owned Comment' containment reference list
 void destroy()
           Destroys this element by removing all cross references to/from it and removing it from its containing resource or object
 Stereotype getApplicableStereotype(String qualifiedName)
           Retrieves the stereotype with the specified qualified name that is applicable to this element, or null if no such stereotype is applicable
 EList getApplicableStereotypes()
           Retrieves the stereotypes that are applicable to this element, including those that are required and/or may already be applied
 Stereotype getAppliedStereotype(String qualifiedName)
           Retrieves the stereotype with the specified qualified name that is applied to this element, or null if no such stereotype is applied
 EList getAppliedStereotypes()
           Retrieves the stereotypes that are applied to this element
 Stereotype getAppliedSubstereotype(Stereotype stereotype, String qualifiedName)
           Retrieves the substereotype of the specified stereotype with the specified qualified name that is applied to this element, or null if no such stereotype is applied
 EList getAppliedSubstereotypes(Stereotype stereotype)
           Retrieves the substereotypes of the specified stereotype that are applied to this element
 EList getKeywords()
           Retrieves the keywords for this element
 Model getModel()
           Retrieves the model that owns (either directly or indirectly) this element
 Package getNearestPackage()
           Retrieves the nearest package that owns (either directly or indirectly) this element, or the element itself (if it is a package)
 EList getOwnedComments()
          Returns the value of the 'Owned Comment' containment reference list.
 EList getOwnedElements()
          Returns the value of the 'Owned Element' reference list.
 Element getOwner()
          Returns the value of the 'Owner' reference.
 EList getRelationships()
           Retrieves the relationships in which this element is involved
 EList getRelationships(EClass eClass)
           Retrieves the relationships of the specified type in which this element is involved
 Stereotype getRequiredStereotype(String qualifiedName)
           Retrieves the stereotype with the specified qualified name that is required for this element, or null if no such stereotype is required
 EList getRequiredStereotypes()
           Retrieves the stereotypes that are required for this element
 EList getSourceDirectedRelationships()
           Retrieves the directed relationships for which this element is a source
 EList getSourceDirectedRelationships(EClass eClass)
           Retrieves the directed relationships of the specified type for which this element is a source
 EObject getStereotypeApplication(Stereotype stereotype)
           Retrieves the application of the specified stereotype for this element, or null if no such stereotype application exists
 EList getStereotypeApplications()
           Retrieves the stereotype applications for this element
 EList getTargetDirectedRelationships()
           Retrieves the directed relationships for which this element is a target
 EList getTargetDirectedRelationships(EClass eClass)
           Retrieves the directed relationships of the specified type for which this element is a target
 Object getValue(Stereotype stereotype, String propertyName)
           Retrieves the value of the property with the specified name in the specified stereotype for this element
 boolean hasKeyword(String keyword)
           Determines whether this element has the specified keyword
 boolean hasValue(Stereotype stereotype, String propertyName)
           Determines whether this element has a (non-default) value for the property with the specified name in the specified stereotype
 boolean isStereotypeApplicable(Stereotype stereotype)
           Determines whether the specified stereotype is applicable to this element
 boolean isStereotypeApplied(Stereotype stereotype)
           Determines whether the specified stereotype is applied to this element
 boolean isStereotypeRequired(Stereotype stereotype)
           Determines whether the specified stereotype is required for this element
 boolean mustBeOwned()
           The query mustBeOwned() indicates whether elements of this type must have an owner.
 boolean removeKeyword(String keyword)
           Removes the specified keyword from this element
 void setValue(Stereotype stereotype, String propertyName, Object newValue)
           Sets the value of the property with the specified name in the specified stereotype for this element
 EObject unapplyStereotype(Stereotype stereotype)
           Unapplies the specified stereotype from this element
 boolean validateHasOwner(DiagnosticChain diagnostics, Map context)
           Elements that must be owned must have an owner.
 boolean validateNotOwnSelf(DiagnosticChain diagnostics, Map context)
           An element may not directly or indirectly own itself.
 
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
 

Method Detail

getOwnedElements

public EList getOwnedElements()
Returns the value of the 'Owned Element' reference list. The list contents are of type Element. It is bidirectional and its opposite is 'Owner'. The Elements owned by this element.

Returns:
the value of the 'Owned Element' reference list.
See Also:
UMLPackage.getElement_OwnedElement(), Element.getOwner()

getOwner

public Element getOwner()
Returns the value of the 'Owner' reference. It is bidirectional and its opposite is 'Owned Element'. The Element that owns this element.

Returns:
the value of the 'Owner' reference.
See Also:
UMLPackage.getElement_Owner(), Element.getOwnedElements()

getOwnedComments

public EList getOwnedComments()
Returns the value of the 'Owned Comment' containment reference list. The list contents are of type Comment. The Comments owned by this element.

Returns:
the value of the 'Owned Comment' containment reference list.
See Also:
UMLPackage.getElement_OwnedComment()

createOwnedComment

public Comment createOwnedComment()
Creates a new Comment and appends it to the 'Owned Comment' containment reference list.

Returns:
The new Comment.
See Also:
Element.getOwnedComments()

validateNotOwnSelf

public boolean validateNotOwnSelf(DiagnosticChain diagnostics,
                                  Map context)
An element may not directly or indirectly own itself. not self.allOwnedElements()->includes(self)


validateHasOwner

public boolean validateHasOwner(DiagnosticChain diagnostics,
                                Map context)
Elements that must be owned must have an owner. self.mustBeOwned() implies owner->notEmpty()


getStereotypeApplications

public EList getStereotypeApplications()
Retrieves the stereotype applications for this element.


getStereotypeApplication

public EObject getStereotypeApplication(Stereotype stereotype)
Retrieves the application of the specified stereotype for this element, or null if no such stereotype application exists.


getRequiredStereotypes

public EList getRequiredStereotypes()
Retrieves the stereotypes that are required for this element.


getRequiredStereotype

public Stereotype getRequiredStereotype(String qualifiedName)
Retrieves the stereotype with the specified qualified name that is required for this element, or null if no such stereotype is required.


getAppliedStereotypes

public EList getAppliedStereotypes()
Retrieves the stereotypes that are applied to this element.


getAppliedStereotype

public Stereotype getAppliedStereotype(String qualifiedName)
Retrieves the stereotype with the specified qualified name that is applied to this element, or null if no such stereotype is applied.


getAppliedSubstereotypes

public EList getAppliedSubstereotypes(Stereotype stereotype)
Retrieves the substereotypes of the specified stereotype that are applied to this element.


getAppliedSubstereotype

public Stereotype getAppliedSubstereotype(Stereotype stereotype,
                                          String qualifiedName)
Retrieves the substereotype of the specified stereotype with the specified qualified name that is applied to this element, or null if no such stereotype is applied.


hasValue

public boolean hasValue(Stereotype stereotype,
                        String propertyName)
Determines whether this element has a (non-default) value for the property with the specified name in the specified stereotype.


getValue

public Object getValue(Stereotype stereotype,
                       String propertyName)
Retrieves the value of the property with the specified name in the specified stereotype for this element.


setValue

public void setValue(Stereotype stereotype,
                     String propertyName,
                     Object newValue)
Sets the value of the property with the specified name in the specified stereotype for this element.


createEAnnotation

public EAnnotation createEAnnotation(String source)
Creates an annotation with the specified source and this element as its model element.


getRelationships

public EList getRelationships()
Retrieves the relationships in which this element is involved.


getRelationships

public EList getRelationships(EClass eClass)
Retrieves the relationships of the specified type in which this element is involved.


getSourceDirectedRelationships

public EList getSourceDirectedRelationships()
Retrieves the directed relationships for which this element is a source.


getSourceDirectedRelationships

public EList getSourceDirectedRelationships(EClass eClass)
Retrieves the directed relationships of the specified type for which this element is a source.


getTargetDirectedRelationships

public EList getTargetDirectedRelationships()
Retrieves the directed relationships for which this element is a target.


getTargetDirectedRelationships

public EList getTargetDirectedRelationships(EClass eClass)
Retrieves the directed relationships of the specified type for which this element is a target.


getKeywords

public EList getKeywords()
Retrieves the keywords for this element.


addKeyword

public boolean addKeyword(String keyword)
Adds the specified keyword to this element.


removeKeyword

public boolean removeKeyword(String keyword)
Removes the specified keyword from this element.


getNearestPackage

public Package getNearestPackage()
Retrieves the nearest package that owns (either directly or indirectly) this element, or the element itself (if it is a package).


getModel

public Model getModel()
Retrieves the model that owns (either directly or indirectly) this element.


isStereotypeApplicable

public boolean isStereotypeApplicable(Stereotype stereotype)
Determines whether the specified stereotype is applicable to this element.


isStereotypeRequired

public boolean isStereotypeRequired(Stereotype stereotype)
Determines whether the specified stereotype is required for this element.


isStereotypeApplied

public boolean isStereotypeApplied(Stereotype stereotype)
Determines whether the specified stereotype is applied to this element.


applyStereotype

public EObject applyStereotype(Stereotype stereotype)
Applies the specified stereotype to this element.


unapplyStereotype

public EObject unapplyStereotype(Stereotype stereotype)
Unapplies the specified stereotype from this element.


getApplicableStereotypes

public EList getApplicableStereotypes()
Retrieves the stereotypes that are applicable to this element, including those that are required and/or may already be applied.


getApplicableStereotype

public Stereotype getApplicableStereotype(String qualifiedName)
Retrieves the stereotype with the specified qualified name that is applicable to this element, or null if no such stereotype is applicable.


hasKeyword

public boolean hasKeyword(String keyword)
Determines whether this element has the specified keyword.


destroy

public void destroy()
Destroys this element by removing all cross references to/from it and removing it from its containing resource or object.


allOwnedElements

public EList allOwnedElements()
The query allOwnedElements() gives all of the direct and indirect owned elements of an element. result = ownedElement->union(ownedElement->collect(e | e.allOwnedElements()))


mustBeOwned

public boolean mustBeOwned()
The query mustBeOwned() indicates whether elements of this type must have an owner. Subclasses of Element that do not require an owner must override this operation. result = true


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