org.eclipse.uml2
Interface InstanceSpecification

All Superinterfaces:
DeployedArtifact, DeploymentTarget, Element, EModelElement, EObject, NamedElement, Notifier, PackageableElement, ParameterableElement, TemplateableElement
All Known Subinterfaces:
EnumerationLiteral

public interface InstanceSpecification
extends PackageableElement, DeploymentTarget, DeployedArtifact

A representation of the model object 'Instance Specification'. In the metamodel, InstanceSpecification is a specialization of DeploymentTarget and DeployedArtifact.

The following features are supported:

See Also:
UML2Package.getInstanceSpecification()

Field Summary
static String copyright
           
 
Fields inherited from interface org.eclipse.uml2.NamedElement
SEPARATOR
 
Method Summary
 Slot createSlot(EClass eClass)
          Creates a Slot and appends it to the 'Slot' containment reference list
 ValueSpecification createSpecification(EClass eClass)
          Creates a ValueSpecification and sets the 'Specification' containment reference
 Classifier getClassifier(String unqualifiedName)
          Retrieves the Classifier with the specified name from the 'Classifier' reference list
 EList getClassifiers()
          Returns the value of the 'Classifier' reference list.
 EList getOwnedElements()
           
 EList getSlots()
          Returns the value of the 'Slot' containment reference list.
 ValueSpecification getSpecification()
          Returns the value of the 'Specification' containment reference
 void setSpecification(ValueSpecification value)
          Sets the value of the 'Specification' containment reference
 boolean validateNoDuplicateSlots(DiagnosticChain diagnostics, Map context)
           An invariant constraint based on the following OCL expression: classifier->forAll(c | (c.allFeatures()->forAll(f | slot->select(s | s.definingFeature = f)->size() <= 1) )
 boolean validateSlotsAreDefined(DiagnosticChain diagnostics, Map context)
           An invariant constraint based on the following OCL expression: slot->forAll(s | classifier->exists(c | c.allFeatures()->includes(s.definingFeature))
 
Methods inherited from interface org.eclipse.uml2.PackageableElement
getPackageableElement_visibility, getVisibility, setPackageableElement_visibility, setVisibility
 
Methods inherited from interface org.eclipse.uml2.NamedElement
allNamespaces, createNameExpression, getClientDependencies, getClientDependency, getName, getNameExpression, getNamespace, getOwner, getQualifiedName, isDistinguishableFrom, qualifiedName, separator, setName, setNameExpression, validateNoName, validateQualifiedName, validateVisibilityNeedsOwnership
 
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
 
Methods inherited from interface org.eclipse.uml2.ParameterableElement
getOwner, getOwningParameter, getTemplateParameter, setOwningParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.DeploymentTarget
createDeployment, getClientDependencies, getDeployedElement, getDeployedElements, getDeployment, getDeployments
 

Field Detail

copyright

public static final String copyright

See Also:
Constant Field Values
Method Detail

getSlots

public EList getSlots()
Returns the value of the 'Slot' containment reference list. The list contents are of type Slot. It is bidirectional and its opposite is 'Owning Instance'.

If the meaning of the 'Slot' containment reference list isn't clear, there really should be more of a description here...

A slot giving the value or values of a structural feature of the instance. An instance specification can have one slot per structural feature of its classifiers, including inherited features. It is not necessary to model a slot for each structural feature, in which case the instance specification is a partial description. Subsets Element::ownedElement.

Returns:
the value of the 'Slot' containment reference list.
See Also:
UML2Package.getInstanceSpecification_Slot(), Slot.getOwningInstance()

createSlot

public Slot createSlot(EClass eClass)
Creates a Slot and appends it to the 'Slot' containment reference list.

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

getClassifiers

public EList getClassifiers()
Returns the value of the 'Classifier' reference list. The list contents are of type Classifier.

If the meaning of the 'Classifier' reference list isn't clear, there really should be more of a description here...

The classifier or classifiers of the represented instance. If multiple classifiers are specified, the instance is classified by all of them.

Returns:
the value of the 'Classifier' reference list.
See Also:
UML2Package.getInstanceSpecification_Classifier()

getClassifier

public Classifier getClassifier(String unqualifiedName)
Retrieves the Classifier with the specified name from the 'Classifier' reference list.

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

getSpecification

public ValueSpecification getSpecification()
Returns the value of the 'Specification' containment reference.

If the meaning of the 'Specification' containment reference isn't clear, there really should be more of a description here...

A specification of how to compute, derive, or construct the instance. Subsets Element:: ownedElement.

Returns:
the value of the 'Specification' containment reference.
See Also:
setSpecification(ValueSpecification), UML2Package.getInstanceSpecification_Specification()

setSpecification

public void setSpecification(ValueSpecification value)
Sets the value of the 'Specification' containment reference.

Parameters:
value - the new value of the 'Specification' containment reference.
See Also:
getSpecification()

createSpecification

public ValueSpecification createSpecification(EClass eClass)
Creates a ValueSpecification and sets the 'Specification' containment reference.

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

validateSlotsAreDefined

public boolean validateSlotsAreDefined(DiagnosticChain diagnostics,
                                       Map context)
An invariant constraint based on the following OCL expression: slot->forAll(s | classifier->exists(c | c.allFeatures()->includes(s.definingFeature))


validateNoDuplicateSlots

public boolean validateNoDuplicateSlots(DiagnosticChain diagnostics,
                                        Map context)
An invariant constraint based on the following OCL expression: classifier->forAll(c | (c.allFeatures()->forAll(f | slot->select(s | s.definingFeature = f)->size() <= 1) )


getOwnedElements

public EList getOwnedElements()

Specified by:
getOwnedElements in interface NamedElement

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