org.eclipse.uml2.uml
Interface InstanceSpecification

All Superinterfaces:
DeployedArtifact, DeploymentTarget, Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, NamedElement, org.eclipse.emf.common.notify.Notifier, PackageableElement, ParameterableElement
All Known Subinterfaces:
EnumerationLiteral

public interface InstanceSpecification
extends DeploymentTarget, PackageableElement, DeployedArtifact

A representation of the model object 'Instance Specification'. An InstanceSpecification is a model element that represents an instance in a modeled system. An InstanceSpecification can act as a DeploymentTarget in a Deployment relationship, in the case that it represents an instance of a Node. It can also act as a DeployedArtifact, if it represents an instance of an Artifact.

From package UML::Classification.

The following features are supported:

See Also:
UMLPackage.getInstanceSpecification()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 Slot createSlot()
          Creates a new Slot and appends it to the 'Slot' containment reference list
 ValueSpecification createSpecification(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Specification' containment reference
 Classifier getClassifier(java.lang.String name)
          Retrieves the first Classifier with the specified 'Name' from the 'Classifier' reference list
 Classifier getClassifier(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first Classifier with the specified 'Name' from the 'Classifier' reference list
 org.eclipse.emf.common.util.EList<Classifier> getClassifiers()
          Returns the value of the 'Classifier' reference list.
 org.eclipse.emf.common.util.EList<Slot> 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 validateDefiningFeature(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The definingFeature of each slot is a StructuralFeature related to a classifier of the InstanceSpecification, including direct attributes, inherited attributes, private attributes in generalizations, and memberEnds of Associations, but excluding redefined StructuralFeatures.
 boolean validateDeploymentArtifact(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          An InstanceSpecification can act as a DeployedArtifact if it represents an instance of an Artifact.
 boolean validateDeploymentTarget(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          An InstanceSpecification can act as a DeploymentTarget if it represents an instance of a Node and functions as a part in the internal structure of an encompassing Node.
 boolean validateStructuralFeature(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          No more than one slot in an InstanceSpecification may have the same definingFeature.
 
Methods inherited from interface org.eclipse.uml2.uml.DeploymentTarget
createDeployment, getDeployedElement, getDeployedElement, getDeployedElements, getDeployment, getDeployment, getDeployments
 
Methods inherited from interface org.eclipse.uml2.uml.PackageableElement
validateNamespaceNeedsVisibility
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.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 org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getClassifiers

org.eclipse.emf.common.util.EList<Classifier> getClassifiers()
Returns the value of the 'Classifier' reference list. The list contents are of type Classifier. The Classifier or Classifiers of the represented instance. If multiple Classifiers are specified, the instance is classified by all of them.

From package UML::Classification.

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

getClassifier

Classifier getClassifier(java.lang.String name)
Retrieves the first Classifier with the specified 'Name' from the 'Classifier' reference list.

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

getClassifier

Classifier getClassifier(java.lang.String name,
                         boolean ignoreCase,
                         org.eclipse.emf.ecore.EClass eClass)
Retrieves the first Classifier with the specified 'Name' from the 'Classifier' reference list.

Parameters:
name - The 'Name' of the Classifier to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Classifier to retrieve, or null.
Returns:
The first Classifier with the specified 'Name', or null.
See Also:
getClassifiers()

getSpecification

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

This feature subsets the following features:

A specification of how to compute, derive, or construct the instance.

From package UML::Classification.

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

setSpecification

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

ValueSpecification createSpecification(java.lang.String name,
                                       Type type,
                                       org.eclipse.emf.ecore.EClass eClass)
Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Specification' containment reference.

Parameters:
name - The 'Name' for the new ValueSpecification, or null.
type - The 'Type' for the new ValueSpecification, or null.
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
getSpecification()

getSlots

org.eclipse.emf.common.util.EList<Slot> 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'.

This feature subsets the following features:

A Slot giving the value or values of a StructuralFeature of the instance. An InstanceSpecification can have one Slot per StructuralFeature of its Classifiers, including inherited features. It is not necessary to model a Slot for every StructuralFeature, in which case the InstanceSpecification is a partial description.

From package UML::Classification.

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

createSlot

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

Returns:
The new Slot.
See Also:
getSlots()

validateDefiningFeature

boolean validateDefiningFeature(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)
The definingFeature of each slot is a StructuralFeature related to a classifier of the InstanceSpecification, including direct attributes, inherited attributes, private attributes in generalizations, and memberEnds of Associations, but excluding redefined StructuralFeatures. slot->forAll(s | classifier->exists (c | c.allSlottableFeatures()->includes (s.definingFeature)))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateStructuralFeature

boolean validateStructuralFeature(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)
No more than one slot in an InstanceSpecification may have the same definingFeature. classifier->forAll(c | (c.allSlottableFeatures()->forAll(f | slot->select(s | s.definingFeature = f)->size() <= 1)))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateDeploymentTarget

boolean validateDeploymentTarget(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)
An InstanceSpecification can act as a DeploymentTarget if it represents an instance of a Node and functions as a part in the internal structure of an encompassing Node. deployment->notEmpty() implies classifier->exists(node | node.oclIsKindOf(Node) and Node.allInstances()->exists(n | n.part->exists(p | p.type = node)))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateDeploymentArtifact

boolean validateDeploymentArtifact(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)
An InstanceSpecification can act as a DeployedArtifact if it represents an instance of an Artifact. deploymentForArtifact->notEmpty() implies classifier->exists(oclIsKindOf(Artifact))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.