public class IncQueryBaseFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
NavigationHelper |
createNavigationHelper(org.eclipse.emf.common.notify.Notifier emfRoot,
BaseIndexOptions options,
org.apache.log4j.Logger logger)
The method creates a
NavigationHelper index for the given EMF model root. |
NavigationHelper |
createNavigationHelper(org.eclipse.emf.common.notify.Notifier emfRoot,
boolean wildcardMode,
boolean dynamicModel,
org.apache.log4j.Logger logger)
The method creates a
NavigationHelper index for the given EMF model root. |
NavigationHelper |
createNavigationHelper(org.eclipse.emf.common.notify.Notifier emfRoot,
boolean wildcardMode,
org.apache.log4j.Logger logger)
The method creates a
NavigationHelper index for the given EMF model root. |
TransitiveClosureHelper |
createTransitiveClosureHelper(NavigationHelper baseIndex,
java.util.Set<org.eclipse.emf.ecore.EReference> referencesToObserve)
The method creates a TransitiveClosureHelper instance built on an existing NavigationHelper.
|
TransitiveClosureHelper |
createTransitiveClosureHelper(org.eclipse.emf.common.notify.Notifier emfRoot,
java.util.Set<org.eclipse.emf.ecore.EReference> referencesToObserve)
The method creates a TransitiveClosureHelper instance for the given EMF model root.
|
static IncQueryBaseFactory |
getInstance()
Get the singleton instance of IncQueryBaseFactory.
|
public static IncQueryBaseFactory getInstance()
public NavigationHelper createNavigationHelper(org.eclipse.emf.common.notify.Notifier emfRoot, boolean wildcardMode, org.apache.log4j.Logger logger) throws IncQueryBaseException
NavigationHelper
index for the given EMF model root.
A new instance will be created on every call.
A NavigationHelper in wildcard mode will process and index all EStructuralFeatures, EClasses and EDatatypes. If wildcard mode is off, the client will have to manually register the interesting aspects of the model.
The NavigationHelper will be created without dynamic EMF support by default.
See createNavigationHelper(Notifier, boolean, boolean, Logger)
for more options.
emfRoot
- the root of the EMF tree to be indexed. Recommended: Resource or ResourceSet. Can be null - you can
add a root later using NavigationHelper.addRoot(Notifier)
wildcardMode
- true if all aspects of the EMF model should be indexed automatically, false if manual registration of
interesting aspects is desirablelogger
- the log output where errors will be logged if encountered during the operation of the
NavigationHelper; if null, the default logger for NavigationHelper
is used.IncQueryBaseException
NavigationHelper
public NavigationHelper createNavigationHelper(org.eclipse.emf.common.notify.Notifier emfRoot, boolean wildcardMode, boolean dynamicModel, org.apache.log4j.Logger logger) throws IncQueryBaseException
NavigationHelper
index for the given EMF model root.
A new instance will be created on every call.
A NavigationHelper in wildcard mode will process and index all EStructuralFeatures, EClasses and EDatatypes. If wildcard mode is off, the client will have to manually register the interesting aspects of the model.
If the dynamic model flag is set to true, the index will use String ids to distinguish between the various
EStructuralFeature
, EClass
and EDataType
instances. This way the index is able to
handle dynamic EMF instance models too.
emfRoot
- the root of the EMF tree to be indexed. Recommended: Resource or ResourceSet. Can be null - you can
add a root later using NavigationHelper.addRoot(Notifier)
wildcardMode
- true if all aspects of the EMF model should be indexed automatically, false if manual registration of
interesting aspects is desirabledynamicModel
- true if the index should use String ids (nsURIs) for the various EMF types and features, and treat
multiple EPackages sharing an nsURI as the same. false if dynamic model support is not requiredlogger
- the log output where errors will be logged if encountered during the operation of the
NavigationHelper; if null, the default logger for NavigationHelper
is used.IncQueryBaseException
NavigationHelper
public NavigationHelper createNavigationHelper(org.eclipse.emf.common.notify.Notifier emfRoot, BaseIndexOptions options, org.apache.log4j.Logger logger) throws IncQueryBaseException
NavigationHelper
index for the given EMF model root.
A new instance will be created on every call.
For details of base index options including wildcard and dynamic EMF mode, see BaseIndexOptions
.
emfRoot
- the root of the EMF tree to be indexed. Recommended: Resource or ResourceSet. Can be null - you can
add a root later using NavigationHelper.addRoot(Notifier)
options
- the options used by the indexlogger
- the log output where errors will be logged if encountered during the operation of the
NavigationHelper; if null, the default logger for NavigationHelper
is used.IncQueryBaseException
NavigationHelper
public TransitiveClosureHelper createTransitiveClosureHelper(org.eclipse.emf.common.notify.Notifier emfRoot, java.util.Set<org.eclipse.emf.ecore.EReference> referencesToObserve) throws IncQueryBaseException
One must specify the set of EReferences that will be considered as edges. The set can contain multiple elements; this way one can query forward and backward reachability information along heterogenous paths.
emfRoot
- the root of the EMF tree to be processed. Recommended: Resource or ResourceSet.referencesToObserve
- the set of references to observeIncQueryBaseException
- if the creation of the internal NavigationHelper failedpublic TransitiveClosureHelper createTransitiveClosureHelper(NavigationHelper baseIndex, java.util.Set<org.eclipse.emf.ecore.EReference> referencesToObserve)
One must specify the set of EReferences that will be considered as edges. The set can contain multiple elements; this way one can query forward and backward reachability information along heterogenous paths.
baseIndex
- the already existing NavigationHelper index on the modelreferencesToObserve
- the set of references to observe