org.eclipse.ocl.examples.pivot.delegate
Class OCLQueryDelegateFactory

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.delegate.AbstractOCLDelegateFactory
      extended by org.eclipse.ocl.examples.pivot.delegate.OCLQueryDelegateFactory
All Implemented Interfaces:
org.eclipse.emf.ecore.util.QueryDelegate.Factory
Direct Known Subclasses:
OCLQueryDelegateFactory.Global

public class OCLQueryDelegateFactory
extends AbstractOCLDelegateFactory
implements org.eclipse.emf.ecore.util.QueryDelegate.Factory

Factory for OCL query delegates.

The factory may be obtained by:

 QueryDelegate.Factory factory = QueryDelegate.Factory.Registry.INSTANCE
                .getFactory(OCLDelegateDomain.OCL_DELEGATE_URI);
 
from which a query delegate may be created by:
 QueryDelegate delegate = factory.createQueryDelegate(
                classifier,                 // the context type
                map-of-name-to-classifier,  // the external variable names and types
                string);                    // the OCL expression text
 
and (repeatedly) invoked by:
 Object result = delegate.execute(
                target,                     // the context instance
                map-of-name-to-object);     // the external variable bindings
 


Nested Class Summary
static class OCLQueryDelegateFactory.Global
          The Global variant of the Factory delegates to a local ResourceSet factory if one can be located at the QueryDelegate.Factory.Registry by the DelegateResourceSetAdapter.
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.util.QueryDelegate.Factory
org.eclipse.emf.ecore.util.QueryDelegate.Factory.Descriptor, org.eclipse.emf.ecore.util.QueryDelegate.Factory.Registry
 
Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.pivot.delegate.AbstractOCLDelegateFactory
delegateURI
 
Constructor Summary
OCLQueryDelegateFactory(java.lang.String delegateURI)
           
 
Method Summary
 org.eclipse.emf.ecore.util.QueryDelegate createQueryDelegate(org.eclipse.emf.ecore.EClassifier context, java.util.Map<java.lang.String,org.eclipse.emf.ecore.EClassifier> parameters, java.lang.String expression)
           
 
Methods inherited from class org.eclipse.ocl.examples.pivot.delegate.AbstractOCLDelegateFactory
getDelegateDomain, getURI, loadDelegateDomain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OCLQueryDelegateFactory

public OCLQueryDelegateFactory(@NonNull
                               java.lang.String delegateURI)
Method Detail

createQueryDelegate

public org.eclipse.emf.ecore.util.QueryDelegate createQueryDelegate(org.eclipse.emf.ecore.EClassifier context,
                                                                    java.util.Map<java.lang.String,org.eclipse.emf.ecore.EClassifier> parameters,
                                                                    java.lang.String expression)
Specified by:
createQueryDelegate in interface org.eclipse.emf.ecore.util.QueryDelegate.Factory