|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ocl.examples.pivot.OCLBase org.eclipse.ocl.examples.pivot.OCL
public class OCL
Convenient subclass of the OCL
façade that binds the
Ecore metamodel to the superclass's generic type parameters. This frees
client code from the long list of parameter substitutions. This subclass
also provides a shortcut to creating an OCL
on the shared
EcoreEnvironmentFactory
instance.
EcoreEnvironmentFactory
Nested Class Summary | |
---|---|
static interface |
OCL.Query
Convenient interface aliasing the type parameter substitutions for the UML environment, for ease of typing. |
Constructor Summary | |
---|---|
protected |
OCL(Environment env)
Initializes me with an initial environment for the Ecore metamodel. |
protected |
OCL(EnvironmentFactory envFactory)
Initializes me with an environment factory for the Ecore metamodel. |
protected |
OCL(EnvironmentFactory envFactory,
org.eclipse.emf.ecore.resource.Resource resource)
Initializes me with an environment factory for the Ecore metamodel and a resource from which to load my root environment. |
Method Summary | |
---|---|
OCLHelper |
createOCLHelper()
|
OCL.Query |
createQuery(Constraint constraint)
Creates a new QueryBase encapsulating a constraint with the current
environment and extent map. |
OCL.Query |
createQuery(ExpressionInOcl specification)
Creates a new QueryBase encapsulating a query expression with the
current environment and extent map. |
static java.lang.String |
initialize(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Initialize registries to support OCL and Ecore usage. |
static OCL |
newInstance()
Creates a new OCL using the shared Ecore environment
factory instance. |
static OCL |
newInstance(Environment env)
Creates a new OCL using the specified initial Ecore
environment. |
static OCL |
newInstance(EnvironmentFactory envFactory)
Creates a new OCL using the specified Ecore environment
factory. |
static OCL |
newInstance(EnvironmentFactory envFactory,
org.eclipse.emf.ecore.resource.Resource resource)
Creates a new OCL using the specified Ecore environment
factory and a resource from which to load the initial environment. |
Methods inherited from class org.eclipse.ocl.examples.pivot.OCLBase |
---|
check, check, dispose, evaluate, getConstraints, getEnvironment, getEnvironmentFactory, getEvaluationEnvironment, getEvaluationProblems, getModelManager, getParserRepairCount, getProblems, getTypeManager, getValueFactory, isEvaluationTracingEnabled, isParseTracingEnabled, setEvaluationTracingEnabled, setModelManager, setParserRepairCount, setParseTracingEnabled, validate, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected OCL(EnvironmentFactory envFactory)
envFactory
- my environment factoryprotected OCL(Environment env)
env
- my root environmentprotected OCL(EnvironmentFactory envFactory, org.eclipse.emf.ecore.resource.Resource resource)
envFactory
- my environment factoryresource
- my persisted root environmentMethod Detail |
---|
public static java.lang.String initialize(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
A null resourceSet may be provided to initialize the global package registry and global URI mapping registry.
A non-null resourceSet may be provided to identify a specific package registry.
This method is used to configure the ResourceSet used to load the OCL Standard Library.
resourceSet
- to be initialized or null for global initialization
public static OCL newInstance()
OCL
using the shared Ecore environment
factory instance.
OCL
public static OCL newInstance(EnvironmentFactory envFactory)
OCL
using the specified Ecore environment
factory.
envFactory
- an environment factory for Ecore
OCL
public static OCL newInstance(Environment env)
OCL
using the specified initial Ecore
environment.
env
- an environment for Ecore
OCL
public static OCL newInstance(EnvironmentFactory envFactory, org.eclipse.emf.ecore.resource.Resource resource)
OCL
using the specified Ecore environment
factory and a resource from which to load the initial environment.
envFactory
- an environment factory for Ecoreresource
- the resource containing a persistent environment
(which may be empty for an initially empty environment)
OCL
public OCLHelper createOCLHelper()
public OCL.Query createQuery(Constraint constraint)
QueryBase
encapsulating a constraint with the current
environment and extent map. This is convenient for repeated evaluation of
constraints and for filtering objects using the constraint expression.
Every query maintains its own evaluation environment, which enables concurrent evaluation (where this may be safe in an EMF-based model) and different bindings for client-supplied "global" variables.
The return type is narrowed to the Ecore binding for the generic Query<C,CLS,E> type.
createQuery
in class OCLBase
constraint
- the OCL constraint
#createQuery(OCLExpression)
public OCL.Query createQuery(ExpressionInOcl specification)
QueryBase
encapsulating a query expression with the
current environment and extent map. This is convenient for repeated
evaluation of expressions and for filtering/transforming objects using a
query or constraint expression.
Every query maintains its own evaluation environment, which enables concurrent evaluation (where this may be safe in an EMF-based model) and different bindings for client-supplied "global" variables.
The return type is narrowed to the Ecore binding for the generic Query<C,CLS,E> type.
createQuery
in class OCLBase
#createQuery(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |