Class DynamicEMFQueryRuntimeContext
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.matchers.context.AbstractQueryRuntimeContext
-
- org.eclipse.viatra.query.runtime.emf.EMFQueryRuntimeContext
-
- org.eclipse.viatra.query.runtime.emf.DynamicEMFQueryRuntimeContext
-
- All Implemented Interfaces:
IQueryRuntimeContext
public class DynamicEMFQueryRuntimeContext extends EMFQueryRuntimeContext
In dynamic EMF mode, we need to make sure that EEnum literal constants and values returned by eval() expressions are canonicalized in the same way as enum literals from the EMF model.This canonicalization is a one-way mapping, so
EMFQueryRuntimeContext.unwrapElement(Object)
and#unwrapTuple(Object)
remain NOPs.
-
-
Field Summary
-
Fields inherited from class org.eclipse.viatra.query.runtime.emf.EMFQueryRuntimeContext
baseIndex, indexedClasses, indexedDataTypes, indexedFeatures, logger, metaContext
-
-
Constructor Summary
Constructors Constructor Description DynamicEMFQueryRuntimeContext(NavigationHelper baseIndex, org.apache.log4j.Logger logger, EMFScope emfScope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
wrapElement(java.lang.Object externalElement)
Wraps the external element into the internal representation that is to be used by the query backendTuple
wrapTuple(Tuple externalElements)
Unwraps the tuple of elements into the internal representation that is to be used by the query backend-
Methods inherited from class org.eclipse.viatra.query.runtime.emf.EMFQueryRuntimeContext
addUpdateListener, coalesceTraversals, containsTuple, countTuples, dispose, ensureEnumerableKey, ensureIndexed, ensureIndexed, ensureIndexed, ensureIndexed, ensureValidKey, ensureWildcardIndexing, enumerateTuples, enumerateValues, estimateAverageBucketSize, estimateCardinality, executeAfterTraversal, getCurrentIndexingServiceFor, getEmfScope, getMetaContext, illegalEnumerateValues, illegalInputKey, isCoalescing, isIndexed, removeUpdateListener, unwrapElement, unwrapTuple
-
-
-
-
Constructor Detail
-
DynamicEMFQueryRuntimeContext
public DynamicEMFQueryRuntimeContext(NavigationHelper baseIndex, org.apache.log4j.Logger logger, EMFScope emfScope)
-
-
Method Detail
-
wrapElement
public java.lang.Object wrapElement(java.lang.Object externalElement)
Description copied from interface:IQueryRuntimeContext
Wraps the external element into the internal representation that is to be used by the query backendmodel element -> internal object.
null must be mapped to null.
- Specified by:
wrapElement
in interfaceIQueryRuntimeContext
- Overrides:
wrapElement
in classEMFQueryRuntimeContext
-
wrapTuple
public Tuple wrapTuple(Tuple externalElements)
Description copied from interface:IQueryRuntimeContext
Unwraps the tuple of elements into the internal representation that is to be used by the query backendmodel elements -> internal objects
null must be mapped to null.
- Specified by:
wrapTuple
in interfaceIQueryRuntimeContext
- Overrides:
wrapTuple
in classEMFQueryRuntimeContext
-
-