| /* |
| * Copyright (c) 2005, 2016 IBM Corporation, CEA, and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM - initial API and implementation |
| * Kenn Hussey (CEA) - 351774, 418466, 451350, 485756 |
| * Christian W. Damus (CEA) - 251963 |
| * |
| */ |
| package org.eclipse.uml2.uml; |
| |
| import java.util.Map; |
| |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| |
| import org.eclipse.emf.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the model object '<em><b>Instance Specification</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * <!-- begin-model-doc --> |
| * 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. |
| * <p>From package UML::Classification.</p> |
| * <!-- end-model-doc --> |
| * |
| * <p> |
| * The following features are supported: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.uml2.uml.InstanceSpecification#getClassifiers <em>Classifier</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.InstanceSpecification#getSlots <em>Slot</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.InstanceSpecification#getSpecification <em>Specification</em>}</li> |
| * </ul> |
| * |
| * @see org.eclipse.uml2.uml.UMLPackage#getInstanceSpecification() |
| * @model |
| * @generated |
| */ |
| public interface InstanceSpecification |
| extends DeploymentTarget, PackageableElement, DeployedArtifact { |
| |
| /** |
| * Returns the value of the '<em><b>Classifier</b></em>' reference list. |
| * The list contents are of type {@link org.eclipse.uml2.uml.Classifier}. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The Classifier or Classifiers of the represented instance. If multiple Classifiers are specified, the instance is classified by all of them. |
| * <p>From package UML::Classification.</p> |
| * <!-- end-model-doc --> |
| * @return the value of the '<em>Classifier</em>' reference list. |
| * @see org.eclipse.uml2.uml.UMLPackage#getInstanceSpecification_Classifier() |
| * @model ordered="false" |
| * @generated |
| */ |
| EList<Classifier> getClassifiers(); |
| |
| /** |
| * Retrieves the first {@link org.eclipse.uml2.uml.Classifier} with the specified '<em><b>Name</b></em>' from the '<em><b>Classifier</b></em>' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Classifier} to retrieve, or <code>null</code>. |
| * @return The first {@link org.eclipse.uml2.uml.Classifier} with the specified '<em><b>Name</b></em>', or <code>null</code>. |
| * @see #getClassifiers() |
| * @generated |
| */ |
| Classifier getClassifier(String name); |
| |
| /** |
| * Retrieves the first {@link org.eclipse.uml2.uml.Classifier} with the specified '<em><b>Name</b></em>' from the '<em><b>Classifier</b></em>' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Classifier} to retrieve, or <code>null</code>. |
| * @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons. |
| * @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.Classifier} to retrieve, or <code>null</code>. |
| * @return The first {@link org.eclipse.uml2.uml.Classifier} with the specified '<em><b>Name</b></em>', or <code>null</code>. |
| * @see #getClassifiers() |
| * @generated |
| */ |
| Classifier getClassifier(String name, boolean ignoreCase, EClass eClass); |
| |
| /** |
| * Returns the value of the '<em><b>Specification</b></em>' containment reference. |
| * <p> |
| * This feature subsets the following features: |
| * </p> |
| * <ul> |
| * <li>'{@link org.eclipse.uml2.uml.Element#getOwnedElements() <em>Owned Element</em>}'</li> |
| * </ul> |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * A specification of how to compute, derive, or construct the instance. |
| * <p>From package UML::Classification.</p> |
| * <!-- end-model-doc --> |
| * @return the value of the '<em>Specification</em>' containment reference. |
| * @see #setSpecification(ValueSpecification) |
| * @see org.eclipse.uml2.uml.UMLPackage#getInstanceSpecification_Specification() |
| * @model containment="true" resolveProxies="true" ordered="false" |
| * @generated |
| */ |
| ValueSpecification getSpecification(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.uml2.uml.InstanceSpecification#getSpecification <em>Specification</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Specification</em>' containment reference. |
| * @see #getSpecification() |
| * @generated |
| */ |
| void setSpecification(ValueSpecification value); |
| |
| /** |
| * Creates a new {@link org.eclipse.uml2.uml.ValueSpecification}, with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', and sets the '<em><b>Specification</b></em>' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.ValueSpecification}, or <code>null</code>. |
| * @param type The '<em><b>Type</b></em>' for the new {@link org.eclipse.uml2.uml.ValueSpecification}, or <code>null</code>. |
| * @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.ValueSpecification} to create. |
| * @return The new {@link org.eclipse.uml2.uml.ValueSpecification}. |
| * @see #getSpecification() |
| * @generated |
| */ |
| ValueSpecification createSpecification(String name, Type type, |
| EClass eClass); |
| |
| /** |
| * Returns the value of the '<em><b>Slot</b></em>' containment reference list. |
| * The list contents are of type {@link org.eclipse.uml2.uml.Slot}. |
| * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.Slot#getOwningInstance <em>Owning Instance</em>}'. |
| * <p> |
| * This feature subsets the following features: |
| * </p> |
| * <ul> |
| * <li>'{@link org.eclipse.uml2.uml.Element#getOwnedElements() <em>Owned Element</em>}'</li> |
| * </ul> |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * 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. |
| * <p>From package UML::Classification.</p> |
| * <!-- end-model-doc --> |
| * @return the value of the '<em>Slot</em>' containment reference list. |
| * @see org.eclipse.uml2.uml.UMLPackage#getInstanceSpecification_Slot() |
| * @see org.eclipse.uml2.uml.Slot#getOwningInstance |
| * @model opposite="owningInstance" containment="true" resolveProxies="true" ordered="false" |
| * @generated |
| */ |
| EList<Slot> getSlots(); |
| |
| /** |
| * Creates a new {@link org.eclipse.uml2.uml.Slot} and appends it to the '<em><b>Slot</b></em>' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @return The new {@link org.eclipse.uml2.uml.Slot}. |
| * @see #getSlots() |
| * @generated |
| */ |
| Slot createSlot(); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * 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))) |
| * @param diagnostics The chain of diagnostics to which problems are to be appended. |
| * @param context The cache of context-specific information. |
| * <!-- end-model-doc --> |
| * @model |
| * @generated |
| */ |
| boolean validateDefiningFeature(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * 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))) |
| * @param diagnostics The chain of diagnostics to which problems are to be appended. |
| * @param context The cache of context-specific information. |
| * <!-- end-model-doc --> |
| * @model |
| * @generated |
| */ |
| boolean validateStructuralFeature(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * 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))) |
| * @param diagnostics The chain of diagnostics to which problems are to be appended. |
| * @param context The cache of context-specific information. |
| * <!-- end-model-doc --> |
| * @model |
| * @generated |
| */ |
| boolean validateDeploymentTarget(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * An InstanceSpecification can act as a DeployedArtifact if it represents an instance of an Artifact. |
| * deploymentForArtifact->notEmpty() implies classifier->exists(oclIsKindOf(Artifact)) |
| * @param diagnostics The chain of diagnostics to which problems are to be appended. |
| * @param context The cache of context-specific information. |
| * <!-- end-model-doc --> |
| * @model |
| * @generated |
| */ |
| boolean validateDeploymentArtifact(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| } // InstanceSpecification |