All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.uml2.uml.Constraint Maven / Gradle / Ivy

There is a newer version: 5.0.0-v20140602-0749
Show newest version
/*
 * Copyright (c) 2005, 2011 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
 *
 * $Id: Constraint.java,v 1.15 2007/10/23 15:54:22 jbruck Exp $
 */
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 'Constraint'.
 * 
 *
 * 
 * A constraint is a condition or restriction expressed in natural language text or in a machine readable language for the purpose of declaring some of the semantics of an element.
 * 
 *
 * 

* The following features are supported: *

    *
  • {@link org.eclipse.uml2.uml.Constraint#getConstrainedElements Constrained Element}
  • *
  • {@link org.eclipse.uml2.uml.Constraint#getContext Context}
  • *
  • {@link org.eclipse.uml2.uml.Constraint#getSpecification Specification}
  • *
*

* * @see org.eclipse.uml2.uml.UMLPackage#getConstraint() * @model * @generated */ public interface Constraint extends PackageableElement { /** * Returns the value of the 'Constrained Element' reference list. * The list contents are of type {@link org.eclipse.uml2.uml.Element}. * * * * The ordered set of Elements referenced by this Constraint. * * @return the value of the 'Constrained Element' reference list. * @see org.eclipse.uml2.uml.UMLPackage#getConstraint_ConstrainedElement() * @model * @generated */ EList getConstrainedElements(); /** * Returns the value of the 'Specification' containment reference. *

* This feature subsets the following features: *

    *
  • '{@link org.eclipse.uml2.uml.Element#getOwnedElements() Owned Element}'
  • *
*

* * * * A condition that must be true when evaluated in order for the constraint to be satisfied. * * @return the value of the 'Specification' containment reference. * @see #setSpecification(ValueSpecification) * @see org.eclipse.uml2.uml.UMLPackage#getConstraint_Specification() * @model containment="true" resolveProxies="true" required="true" ordered="false" * @generated */ ValueSpecification getSpecification(); /** * Sets the value of the '{@link org.eclipse.uml2.uml.Constraint#getSpecification Specification}' containment reference. * * * @param value the new value of the 'Specification' containment reference. * @see #getSpecification() * @generated */ void setSpecification(ValueSpecification value); /** * Creates a new {@link org.eclipse.uml2.uml.ValueSpecification}, with the specified 'Name', and 'Type', and sets the 'Specification' 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 #getSpecification() * @generated */ ValueSpecification createSpecification(String name, Type type, EClass eClass); /** * Returns the value of the 'Context' container reference. * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.Namespace#getOwnedRules Owned Rule}'. *

* This feature subsets the following features: *

    *
  • '{@link org.eclipse.uml2.uml.NamedElement#getNamespace() Namespace}'
  • *
*

* * * * Specifies the namespace that owns the NamedElement. * * @return the value of the 'Context' container reference. * @see #setContext(Namespace) * @see org.eclipse.uml2.uml.UMLPackage#getConstraint_Context() * @see org.eclipse.uml2.uml.Namespace#getOwnedRules * @model opposite="ownedRule" transient="false" ordered="false" * @generated */ Namespace getContext(); /** * Sets the value of the '{@link org.eclipse.uml2.uml.Constraint#getContext Context}' container reference. * * * @param value the new value of the 'Context' container reference. * @see #getContext() * @generated */ void setContext(Namespace value); /** * * * * A constraint cannot be applied to itself. * not constrainedElement->includes(self) * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateNotApplyToSelf(DiagnosticChain diagnostics, Map context); /** * * * * The value specification for a constraint must evaluate to a Boolean value. * self.specification().booleanValue().isOclKindOf(Boolean) * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateValueSpecificationBoolean(DiagnosticChain diagnostics, Map context); /** * * * * The value specification for a constraint must evaluate to a Boolean value. * true * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateBooleanValue(DiagnosticChain diagnostics, Map context); /** * * * * Evaluating the value specification for a constraint must not have side effects. * true * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateNoSideEffects(DiagnosticChain diagnostics, Map context); } // Constraint




© 2015 - 2025 Weber Informatics LLC | Privacy Policy