blob: 7b61d703fe7abc42a5598f9545eafd4681a1eed9 [file] [log] [blame]
* Copyright (c) 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* Contributors:
* IBM Corporation - initial API and implementation
Implementation of an OCL binding for the <tt>Ecore</tt> metamodel.
<h2>Package Specification</h2>
This package defines an OCL {@linkplain org.eclipse.ocl.Environment environment}
implementation for the <tt>Ecore</tt> metamodel. Clients can use an
{@link org.eclipse.ocl.ecore.EcoreEnvironmentFactory} in conjunction with the
{@link org.eclipse.ocl.ecore.OCL} class to parse and evaluated OCL constraints
on Ecore models.
Clients may extend the environment implementation to support custom requirements,
such as overriding the
{@link org.eclipse.ocl.Environment#lookupOperation} and
{@link org.eclipse.ocl.EvaluationEnvironment#callOperation}
methods to inject custom operations into existing metaclasses (to provide
Java implementations, rather than defining additional operations using OCL).
This package also extends the types of the OCL {@link org.eclipse.ocl.types.TypesPackage Types}
package to define the generalization relationships to the Ecore metamodel's
counterparts to the UML Classifier ({@link org.eclipse.emf.ecore.EClassifier})
and DataType ({@link org.eclipse.emf.ecore.EDataType}) metaclasses. This
ensures a consistent type system in the OCL binding for Ecore, so that all
types are represented as <tt>EClassifier</tt>s.
Clients may assume that any types referenced by OCL constraints parsed against
an Ecore model are instances of the interfaces in this package.
@see org.eclipse.ocl.ecore.OCL
@see org.eclipse.ocl.ecore.EcoreEnvironmentFactory
@see org.eclipse.ocl.ecore.EcoreEnvironment
@see org.eclipse.ocl.ecore.EcoreEvaluationEnvironment
@see org.eclipse.ocl.types