org.eclipse.ocl.examples.interpreter.console
Interface IOCLFactory<C>


public interface IOCLFactory<C>

Interface for a provider of an OCL facade for some target metamodel.

Author:
Christian W. Damus (cdamus)

Method Summary
<PK,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
OCL<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
createOCL(ModelingLevel level)
          Creates a new OCL instance for my target metamodel.
<PK,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
OCL<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
createOCL(ModelingLevel level, org.eclipse.emf.ecore.resource.Resource res)
          Creates a new OCL instance for my target metamodel, persisted in the specified resource.
 C getContextClassifier(org.eclipse.emf.ecore.EObject object)
          Obtains the metamodel-specific representation of the context classifier of the specified model element.
 java.lang.String getName(java.lang.Object modelElement)
          Obtains the name of an element of my metamodel (an instance of a metaclass).
 TargetMetamodel getTargetMetamodel()
          Queries the metamodel that I target.
 

Method Detail

getTargetMetamodel

TargetMetamodel getTargetMetamodel()
Queries the metamodel that I target.

Returns:
my target metamodel

createOCL

<PK,O,P,EL,PM,S,COA,SSA,CT,CLS,E> OCL<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createOCL(ModelingLevel level)
Creates a new OCL instance for my target metamodel.

Parameters:
modeling - level the active modeling level
Returns:
an OCL facade

createOCL

<PK,O,P,EL,PM,S,COA,SSA,CT,CLS,E> OCL<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createOCL(ModelingLevel level,
                                                                                   org.eclipse.emf.ecore.resource.Resource res)
Creates a new OCL instance for my target metamodel, persisted in the specified resource.

Parameters:
modeling - level the active modeling level
res - a resource in which to persist the OCL environment
Returns:
an OCL facade

getContextClassifier

C getContextClassifier(org.eclipse.emf.ecore.EObject object)
Obtains the metamodel-specific representation of the context classifier of the specified model element.

Parameters:
object - an element in the model
Returns:
its classifier, in the metamodel that I target

getName

java.lang.String getName(java.lang.Object modelElement)
Obtains the name of an element of my metamodel (an instance of a metaclass).

Parameters:
modelElement - a named model element
Returns:
the model element's name