org.eclipse.uml2.uml.Duration Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2005, 2014 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) - 327039, 418466
* 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;
/**
*
* A representation of the model object 'Duration'.
*
*
*
* A Duration is a ValueSpecification that specifies the temporal distance between two time instants.
* From package UML::Values.
*
*
*
* The following features are supported:
*
* - {@link org.eclipse.uml2.uml.Duration#getExpr Expr}
* - {@link org.eclipse.uml2.uml.Duration#getObservations Observation}
*
*
*
* @see org.eclipse.uml2.uml.UMLPackage#getDuration()
* @model
* @generated
*/
public interface Duration
extends ValueSpecification {
/**
* Returns the value of the 'Expr' containment reference.
*
* This feature subsets the following features:
*
* - '{@link org.eclipse.uml2.uml.Element#getOwnedElements() Owned Element}'
*
*
*
*
*
* A ValueSpecification that evaluates to the value of the Duration.
* From package UML::Values.
*
* @return the value of the 'Expr' containment reference.
* @see #setExpr(ValueSpecification)
* @see org.eclipse.uml2.uml.UMLPackage#getDuration_Expr()
* @model containment="true" resolveProxies="true" ordered="false"
* @generated
*/
ValueSpecification getExpr();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Duration#getExpr Expr}' containment reference.
*
*
* @param value the new value of the 'Expr' containment reference.
* @see #getExpr()
* @generated
*/
void setExpr(ValueSpecification value);
/**
* Creates a new {@link org.eclipse.uml2.uml.ValueSpecification}, with the specified 'Name', and 'Type', and sets the 'Expr' containment reference.
*
*
* @param name The 'Name' for the new {@link org.eclipse.uml2.uml.ValueSpecification}, or null
.
* @param type The 'Type' for the new {@link org.eclipse.uml2.uml.ValueSpecification}, or null
.
* @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 #getExpr()
* @generated
*/
ValueSpecification createExpr(String name, Type type, EClass eClass);
/**
* Returns the value of the 'Observation' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Observation}.
*
*
*
* Refers to the Observations that are involved in the computation of the Duration value
* From package UML::Values.
*
* @return the value of the 'Observation' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getDuration_Observation()
* @model ordered="false"
* @generated
*/
EList getObservations();
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Observation} with the specified 'Name' from the 'Observation' reference list.
*
*
* @param name The 'Name' of the {@link org.eclipse.uml2.uml.Observation} to retrieve, or null
.
* @return The first {@link org.eclipse.uml2.uml.Observation} with the specified 'Name', or null
.
* @see #getObservations()
* @generated
*/
Observation getObservation(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Observation} with the specified 'Name' from the 'Observation' reference list.
*
*
* @param name The 'Name' of the {@link org.eclipse.uml2.uml.Observation} to retrieve, or null
.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.Observation} to retrieve, or null
.
* @return The first {@link org.eclipse.uml2.uml.Observation} with the specified 'Name', or null
.
* @see #getObservations()
* @generated
*/
Observation getObservation(String name, boolean ignoreCase, EClass eClass);
/**
*
*
*
* If a Duration has no expr, then it must have a single observation that is a DurationObservation.
* expr = null implies (observation->size() = 1 and observation->forAll(oclIsKindOf(DurationObservation)))
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
*
* @model
* @generated
*/
boolean validateNoExprRequiresObservation(DiagnosticChain diagnostics,
Map