org.eclipse.ocl.ecore.delegate
Class OCLQueryDelegateFactory

java.lang.Object
  extended by org.eclipse.ocl.ecore.delegate.AbstractOCLDelegateFactory
      extended by org.eclipse.ocl.ecore.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
 

Since:
3.1

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.ecore.delegate.AbstractOCLDelegateFactory
delegateDomain, delegateURI
 
Constructor Summary
OCLQueryDelegateFactory()
           
OCLQueryDelegateFactory(OCLDelegateDomain delegateDomain)
           
 
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.ecore.delegate.AbstractOCLDelegateFactory
getDelegateDomain, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OCLQueryDelegateFactory

public OCLQueryDelegateFactory()

OCLQueryDelegateFactory

public OCLQueryDelegateFactory(OCLDelegateDomain delegateDomain)
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