Class EcoreIndexHost
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.tabular.TabularIndexHost
-
- org.eclipse.viatra.query.runtime.tabular.EcoreIndexHost
-
public class EcoreIndexHost extends TabularIndexHost
Simple EMF-specific demo tabular index host.Usage:
- First, instantiate index host with given Ecore metamodel packages
- To emulate an EMF instance model, write arbitrary content into the tables using
getTableDirectInstances(EClassifier)
andgetTableFeatureSlots(EStructuralFeature)
. - Initialize and evaluate regular EMF-based Viatra queries on the scope provided by
TabularIndexHost.getScope()
, as you would on anEMFScope
.EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same.
- Since:
- 2.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.viatra.query.runtime.tabular.TabularIndexHost
TabularIndexHost.TabularIndexScope
-
-
Field Summary
-
Fields inherited from class org.eclipse.viatra.query.runtime.tabular.TabularIndexHost
runtimeContext, scope
-
-
Constructor Summary
Constructors Constructor Description EcoreIndexHost(IStorageBackend storage, org.eclipse.emf.ecore.EPackage... packages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.util.Map.Entry<org.eclipse.emf.ecore.EClassifier,ITableWriterUnary.Table<java.lang.Object>>>
getAllCurrentTablesDirectInstances()
java.util.Set<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>>
getAllCurrentTablesFeatures()
ITableWriterUnary.Table<java.lang.Object>
getTableDirectInstances(org.eclipse.emf.ecore.EClassifier classifier)
ITableWriterBinary.Table<java.lang.Object,java.lang.Object>
getTableFeatureSlots(org.eclipse.emf.ecore.EStructuralFeature feature)
protected boolean
isQueryScopeEmulated(java.lang.Class<? extends QueryScope> queryScopeClass)
-
Methods inherited from class org.eclipse.viatra.query.runtime.tabular.TabularIndexHost
finishUpdateTransaction, getRuntimeContext, getScope, newBinaryInputTable, newUnaryInputTable, registerNewTable, startUpdateTransaction
-
-
-
-
Constructor Detail
-
EcoreIndexHost
public EcoreIndexHost(IStorageBackend storage, org.eclipse.emf.ecore.EPackage... packages)
-
-
Method Detail
-
isQueryScopeEmulated
protected boolean isQueryScopeEmulated(java.lang.Class<? extends QueryScope> queryScopeClass)
- Specified by:
isQueryScopeEmulated
in classTabularIndexHost
- Returns:
- true if this index host aims to serve queries that have a scope of the given type
-
getTableDirectInstances
public ITableWriterUnary.Table<java.lang.Object> getTableDirectInstances(org.eclipse.emf.ecore.EClassifier classifier)
-
getTableFeatureSlots
public ITableWriterBinary.Table<java.lang.Object,java.lang.Object> getTableFeatureSlots(org.eclipse.emf.ecore.EStructuralFeature feature)
-
getAllCurrentTablesDirectInstances
public java.util.Set<java.util.Map.Entry<org.eclipse.emf.ecore.EClassifier,ITableWriterUnary.Table<java.lang.Object>>> getAllCurrentTablesDirectInstances()
-
getAllCurrentTablesFeatures
public java.util.Set<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>> getAllCurrentTablesFeatures()
-
-