org.eclipse.incquery.runtime.base.core

## Class NavigationHelperImpl

- java.lang.Object
- - org.eclipse.incquery.runtime.base.core.NavigationHelperImpl

- All Implemented Interfaces:
    NavigationHelper

      public class NavigationHelperImpl
      extends java.lang.Object
      implements NavigationHelper

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NavigationHelperImpl(org.eclipse.emf.common.notify.Notifier emfRoot, BaseIndexOptions options, org.apache.log4j.Logger logger)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBaseIndexChangeListener(EMFBaseIndexChangeListener listener)` Adds a coarse-grained listener that will be invoked after the NavigationHelper index or the underlying model is changed.
    `void` | `addDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types, DataTypeListener listener)` The given `listener` will be notified from now on whenever instances the given `EDataType`s are added to or removed from the model.
    `void` | `addFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features, FeatureListener listener)` The given `listener` will be notified from now on whenever instances the given `EStructuralFeature`s are added to or removed from the model.
    `boolean` | `addIndexingErrorListener(IEMFIndexingErrorListener listener)` Adds a listener for internal errors in the index.
    `void` | `addInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes, InstanceListener listener)` The given `listener` will be notified from now on whenever instances the given `EClass`es (and any of their subtypes) are added to or removed from the model.
    `boolean` | `addLightweightEObjectObserver(LightweightEObjectObserver observer, org.eclipse.emf.ecore.EObject observedObject)` Register a lightweight observer that is notified if the value of any feature of the given EObject changes.
    `void` | `addRoot(org.eclipse.emf.common.notify.Notifier emfRoot)` Adds an additional EMF model root.
    `void` | `cheapMoveTo(org.eclipse.emf.ecore.EObject element, org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference containmentFeature)` Moves an EObject (along with its entire containment subtree) within the containment hierarchy of the EMF model.
    `<T extends org.eclipse.emf.ecore.EObject> void` | `cheapMoveTo(T element, org.eclipse.emf.common.util.EList<T> targetContainmentReferenceList)` Moves an EObject (along with its entire containment subtree) within the containment hierarchy of the EMF model.
    `<V> V` | `coalesceTraversals(java.util.concurrent.Callable<V> callable)` The given callback will be executed, and all model traversals and index registrations will be delayed until the execution is done.
    `void` | `dispose()` Call this method to dispose the NavigationHelper.
    `java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting>` | `findByAttributeValue(java.lang.Object value_)` For a given attribute value `value`, find each `EAttribute` and host `EObject` such that this attribute of the the host object takes the given value.
    `java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting>` | `findByAttributeValue(java.lang.Object value_, java.util.Collection<org.eclipse.emf.ecore.EAttribute> attributes)` For given `attributes` and an attribute value `value`, find each host `EObject` such that any of these attributes of the the host object takes the given value.
    `java.util.Set<org.eclipse.emf.ecore.EObject>` | `findByAttributeValue(java.lang.Object value_, org.eclipse.emf.ecore.EAttribute attribute)` Find all `EObject`s for which the given `attribute` takes the given `value`.
    `java.util.Set<org.eclipse.emf.ecore.EObject>` | `findByFeatureValue(java.lang.Object value_, org.eclipse.emf.ecore.EStructuralFeature _feature)` Find all source `EObject`s for which the given `feature` points to / takes the given `value`.
    `java.util.Set<org.eclipse.emf.ecore.EClass>` | `getAllCurrentClasses()` Returns all EClasses that currently have direct instances cached by the index.
    `java.util.Set<org.eclipse.emf.ecore.EObject>` | `getAllInstances(org.eclipse.emf.ecore.EClass type)` Get the all `EObject` instances of the given `EClass`.
    `java.util.Set<java.lang.Object>` | `getAllObservedClassesInternal()` not just the directly observed classes, but also their known subtypes
    `BaseIndexOptions` | `getBaseIndexOptions()`
    `EMFModelComprehension` | `getComprehension()`
    `NavigationHelperContentAdapter` | `getContentAdapter()`
    `java.util.Set<java.lang.Object>` | `getDataTypeInstances(org.eclipse.emf.ecore.EDataType type)` Returns the set of instances for the given `EDataType` that can be found in the model.
    `java.util.Set<org.eclipse.emf.ecore.EObject>` | `getDirectInstances(org.eclipse.emf.ecore.EClass type)` Get the direct `EObject` instances of the given `EClass`.
    `java.util.Set<java.lang.Object>` | `getDirectlyObservedClassesInternal()`
    `java.util.Map<org.eclipse.emf.ecore.EObject,java.util.Set<java.lang.Object>>` | `getFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature _feature)` Find all value assignment instances of the given `EStructuralFeature` in the form of a host `EObject` -> value(s) multimap.
    `java.util.Set<java.lang.Object>` | `getFeatureTargets(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature _feature)` Find all `Object`s that are the target of the EStructuralFeature `feature` from the given `source` `EObject`.
    `java.util.Set<org.eclipse.emf.ecore.EObject>` | `getHoldersOfFeature(org.eclipse.emf.ecore.EStructuralFeature _feature)` Returns those host `EObject`s that have a non-null value for the given feature (at least one, in case of multi-valued references).
    `java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting>` | `getInverseReferences(org.eclipse.emf.ecore.EObject target)` For a given `EObject` `target`, find each `EReference` and source `EObject` such that this reference (list) of the the host object points to the given target object.
    `java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting>` | `getInverseReferences(org.eclipse.emf.ecore.EObject target, java.util.Collection<org.eclipse.emf.ecore.EReference> references)` For given `references` and an `EObject` `target`, find each source `EObject` such that any of these references of the the source object points to the given target object.
    `java.util.Set<org.eclipse.emf.ecore.EObject>` | `getInverseReferences(org.eclipse.emf.ecore.EObject target, org.eclipse.emf.ecore.EReference reference)` Find all source `EObject`s for which the given `reference` points to the given `target` object.
    `java.util.Map<LightweightEObjectObserver,java.util.Collection<org.eclipse.emf.ecore.EObject>>` | `getLightweightObservers()`
    `java.util.Set<java.lang.Object>` | `getObservedDataTypesInternal()`
    `java.util.Set<java.lang.Object>` | `getObservedFeaturesInternal()`
    `java.util.Set<org.eclipse.emf.ecore.EObject>` | `getReferenceValues(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EReference reference)` Find all `EObject`s that are the target of the EReference `reference` from the given `source` `EObject`.
    `boolean` | `isCoalescing()` Examines whether execution is currently in the callable block of an invocation of {#link `NavigationHelper.coalesceTraversals(Callable)`}.
    `boolean` | `isExpansionAllowed()`
    `boolean` | `isFeatureResolveIgnored(org.eclipse.emf.ecore.EStructuralFeature feature)`
    `boolean` | `isInDynamicEMFMode()` Indicates whether indexing is performed in dynamic EMF mode, i.e.
    `boolean` | `isInWildcardMode()` Indicates whether indexing is performed in wildcard mode, where every aspect of the EMF model is automatically indexed.
    `void` | `notifyErrorListener(java.lang.String message, java.lang.Throwable t)`
    `void` | `notifyFatalListener(java.lang.String message, java.lang.Throwable t)`
    `void` | `processAllFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature feature, IEStructuralFeatureProcessor processor)` Traverses all instances of a selected feature stored in the base index, and allows executing a custom function on it.
    `void` | `processAllInstances(org.eclipse.emf.ecore.EClass type, IEClassifierProcessor.IEClassProcessor processor)` Traverses all direct instances of a selected class stored in the base index, and allows executing a custom function on it.
    `void` | `processDataTypeInstances(org.eclipse.emf.ecore.EDataType type, IEClassifierProcessor.IEDataTypeProcessor processor)` Traverses all instances of a selected data type stored in the base index, and allows executing a custom function on it.
    `void` | `processDirectInstances(org.eclipse.emf.ecore.EClass type, IEClassifierProcessor.IEClassProcessor processor)` Traverses all direct instances of a selected class stored in the base index, and allows executing a custom function on it.
    `void` | `registerEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)` Manually turns on indexing for the given classes (indexing of other classes are unaffected).
    `void` | `registerEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)` Manually turns on indexing for the given data types (indexing of other features are unaffected).
    `void` | `registerEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)` Manually turns on indexing for the given features (indexing of other features are unaffected).
    `void` | `registerObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes, java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes, java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)` Manually turns on indexing for the given types (indexing of others are unaffected).
    `void` | `removeBaseIndexChangeListener(EMFBaseIndexChangeListener listener)` Removes a registered listener.
    `void` | `removeDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types, DataTypeListener listener)` Unregisters a data type listener for the given types.
    `void` | `removeFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features, FeatureListener listener)` Unregisters a feature listener for the given features.
    `boolean` | `removeIndexingErrorListener(IEMFIndexingErrorListener listener)` Removes a listener for internal errors in the index
    `void` | `removeInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes, InstanceListener listener)` Unregisters an instance listener for the given classes.
    `boolean` | `removeLightweightEObjectObserver(LightweightEObjectObserver observer, org.eclipse.emf.ecore.EObject observedObject)` Unregisters a lightweight observer for the given EObject.
    `void` | `resampleDerivedFeatures()` Resamples the values of not well-behaving derived features if those features are also indexed.
    `java.lang.Object` | `toCanonicalValueRepresentation(java.lang.Object value)` Returns the internal, canonicalized implementation of an attribute value.
    `void` | `unregisterEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)` Manually turns off indexing for the given classes (indexing of other classes are unaffected).
    `void` | `unregisterEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)` Manually turns off indexing for the given data types (indexing of other data types are unaffected).
    `void` | `unregisterEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)` Manually turns off indexing for the given features (indexing of other features are unaffected).
    `void` | `unregisterObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes, java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes, java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)` Manually turns off indexing for the given types (indexing of others are unaffected).

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NavigationHelperImpl

          public NavigationHelperImpl(org.eclipse.emf.common.notify.Notifier emfRoot,
                                      BaseIndexOptions options,
                                      org.apache.log4j.Logger logger)
                               throws IncQueryBaseException

      Throws:
        `IncQueryBaseException`

  - ### Method Detail

    - #### isInWildcardMode

          public boolean isInWildcardMode()

      Description copied from interface: `NavigationHelper`
      Indicates whether indexing is performed in wildcard mode, where every aspect of the EMF model is automatically indexed.
      Specified by:
        `isInWildcardMode` in interface `NavigationHelper`
      Returns:
        true if everything is indexed, false if manual registration of interesting EClassifiers and EStructuralFeatures is required.

    - #### isInDynamicEMFMode

          public boolean isInDynamicEMFMode()

      Description copied from interface: `NavigationHelper`
      Indicates whether indexing is performed in dynamic EMF mode, i.e. EPackage nsURI collisions are tolerated and EPackages with the same URI are automatically considered as equal.
      Specified by:
        `isInDynamicEMFMode` in interface `NavigationHelper`
      Returns:
        true if multiple EPackages with the same nsURI are treated as the same, false if an error is logged instead in this case.

    - #### getBaseIndexOptions

          public BaseIndexOptions getBaseIndexOptions()

      Returns:
        the baseIndexOptions

    - #### getComprehension

          public EMFModelComprehension getComprehension()

      Returns:
        the comprehension

    - #### getContentAdapter

          public NavigationHelperContentAdapter getContentAdapter()

    - #### getObservedFeaturesInternal

          public java.util.Set<java.lang.Object> getObservedFeaturesInternal()

    - #### isFeatureResolveIgnored

          public boolean isFeatureResolveIgnored(org.eclipse.emf.ecore.EStructuralFeature feature)

    - #### dispose

          public void dispose()

      Description copied from interface: `NavigationHelper`
      Call this method to dispose the NavigationHelper.

      After its disposal, the NavigationHelper will no longer listen to EMF change notifications, and it will be possible to GC it even if the model is retained in memory.

      Precondition:
        no listeners can be registered at all.
      Specified by:
        `dispose` in interface `NavigationHelper`

    - #### getDataTypeInstances

          public java.util.Set<java.lang.Object> getDataTypeInstances(org.eclipse.emf.ecore.EDataType type)

      Description copied from interface: `NavigationHelper`
      Returns the set of instances for the given `EDataType` that can be found in the model.

      Precondition: Results will be returned only if either (a) the EDataType has already been registered using `NavigationHelper.registerEDataTypes(Set)`, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getDataTypeInstances` in interface `NavigationHelper`
      Parameters:
        `type` - the data type
      Returns:
        the set of all attribute values found in the model that are of the given data type

    - #### findByAttributeValue

          public java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> findByAttributeValue(java.lang.Object value_)

      Description copied from interface: `NavigationHelper`
      For a given attribute value `value`, find each `EAttribute` and host `EObject` such that this attribute of the the host object takes the given value. The method will return a set of `EStructuralFeature.Setting`s, one for each such host object - EAttribute - value triplet.

      Precondition: Unset / null attribute values are not indexed, so `value!=null`

      Precondition: Will only find those EAttributes that have already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, unless running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `findByAttributeValue` in interface `NavigationHelper`
      Parameters:
        `value_` - the value of the attribute
      Returns:
        a set of `EStructuralFeature.Setting`s, one for each EObject and EAttribute that have the given value
      See Also:
        `NavigationHelper.findByAttributeValue(Object)`

    - #### findByAttributeValue

          public java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> findByAttributeValue(java.lang.Object value_,
                                                                                                      java.util.Collection<org.eclipse.emf.ecore.EAttribute> attributes)

      Description copied from interface: `NavigationHelper`
      For given `attributes` and an attribute value `value`, find each host `EObject` such that any of these attributes of the the host object takes the given value. The method will return a set of `EStructuralFeature.Setting`s, one for each such host object - EAttribute - value triplet.

      Precondition: Unset / null attribute values are not indexed, so `value!=null`

      Precondition: Will only find those EAttributes that have already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, unless running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `findByAttributeValue` in interface `NavigationHelper`
      Parameters:
        `value_` - the value of the attribute
        `attributes` - the collection of attributes that should take the given value
      Returns:
        a set of `EStructuralFeature.Setting`s, one for each EObject and attribute that have the given value

    - #### findByAttributeValue

          public java.util.Set<org.eclipse.emf.ecore.EObject> findByAttributeValue(java.lang.Object value_,
                                                                                   org.eclipse.emf.ecore.EAttribute attribute)

      Description copied from interface: `NavigationHelper`
      Find all `EObject`s for which the given `attribute` takes the given `value`.

      Precondition: Unset / null attribute values are not indexed, so `value!=null`

      Precondition: Results will be returned only if either (a) the EAttribute has already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `findByAttributeValue` in interface `NavigationHelper`
      Parameters:
        `value_` - the value of the attribute
        `attribute` - the EAttribute that should take the given value
      Returns:
        the set of `EObject`s for which the given attribute has the given value

    - #### processAllFeatureInstances

          public void processAllFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature feature,
                                                 IEStructuralFeatureProcessor processor)

      Description copied from interface: `NavigationHelper`
      Traverses all instances of a selected feature stored in the base index, and allows executing a custom function on it. There is no guaranteed order in which the processor will be called with the selected features.

      Precondition: Will only find those EAttributes that have already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, unless running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `processAllFeatureInstances` in interface `NavigationHelper`

    - #### processDirectInstances

          public void processDirectInstances(org.eclipse.emf.ecore.EClass type,
                                             IEClassifierProcessor.IEClassProcessor processor)

      Description copied from interface: `NavigationHelper`
      Traverses all direct instances of a selected class stored in the base index, and allows executing a custom function on it. There is no guaranteed order in which the processor will be called with the selected features.
      Specified by:
        `processDirectInstances` in interface `NavigationHelper`

    - #### processAllInstances

          public void processAllInstances(org.eclipse.emf.ecore.EClass type,
                                          IEClassifierProcessor.IEClassProcessor processor)

      Description copied from interface: `NavigationHelper`
      Traverses all direct instances of a selected class stored in the base index, and allows executing a custom function on it. There is no guaranteed order in which the processor will be called with the selected features.
      Specified by:
        `processAllInstances` in interface `NavigationHelper`

    - #### processDataTypeInstances

          public void processDataTypeInstances(org.eclipse.emf.ecore.EDataType type,
                                               IEClassifierProcessor.IEDataTypeProcessor processor)

      Description copied from interface: `NavigationHelper`
      Traverses all instances of a selected data type stored in the base index, and allows executing a custom function on it. There is no guaranteed order in which the processor will be called with the selected features.
      Specified by:
        `processDataTypeInstances` in interface `NavigationHelper`

    - #### getInverseReferences

          public java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> getInverseReferences(org.eclipse.emf.ecore.EObject target)

      Description copied from interface: `NavigationHelper`
      For a given `EObject` `target`, find each `EReference` and source `EObject` such that this reference (list) of the the host object points to the given target object. The method will return a set of `EStructuralFeature.Setting`s, one for each such source object - EReference - target triplet.

      Precondition: Unset / null reference values are not indexed, so `target!=null`

      Precondition: Results will be returned only for those references that have already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, or all references if running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getInverseReferences` in interface `NavigationHelper`
      Parameters:
        `target` - the EObject pointed to by the references
      Returns:
        a set of `EStructuralFeature.Setting`s, one for each source EObject and reference that point to the given target

    - #### getInverseReferences

          public java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> getInverseReferences(org.eclipse.emf.ecore.EObject target,
                                                                                                      java.util.Collection<org.eclipse.emf.ecore.EReference> references)

      Description copied from interface: `NavigationHelper`
      For given `references` and an `EObject` `target`, find each source `EObject` such that any of these references of the the source object points to the given target object. The method will return a set of `EStructuralFeature.Setting`s, one for each such source object - EReference - target triplet.

      Precondition: Unset / null reference values are not indexed, so `target!=null`

      Precondition: Will only find those EReferences that have already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, unless running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getInverseReferences` in interface `NavigationHelper`
      Parameters:
        `target` - the EObject pointed to by the references
        `references` - a set of EReferences pointing to the target
      Returns:
        a set of `EStructuralFeature.Setting`s, one for each source EObject and reference that point to the given target

    - #### getInverseReferences

          public java.util.Set<org.eclipse.emf.ecore.EObject> getInverseReferences(org.eclipse.emf.ecore.EObject target,
                                                                                   org.eclipse.emf.ecore.EReference reference)

      Description copied from interface: `NavigationHelper`
      Find all source `EObject`s for which the given `reference` points to the given `target` object.

      Precondition: Unset / null reference values are not indexed, so `target!=null`

      Precondition: Results will be returned only if either (a) the reference has already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getInverseReferences` in interface `NavigationHelper`
      Parameters:
        `target` - the EObject pointed to by the references
        `reference` - an EReference pointing to the target
      Returns:
        the collection of `EObject`s for which the given reference points to the given target object

    - #### getReferenceValues

          public java.util.Set<org.eclipse.emf.ecore.EObject> getReferenceValues(org.eclipse.emf.ecore.EObject source,
                                                                                 org.eclipse.emf.ecore.EReference reference)

      Description copied from interface: `NavigationHelper`
      Find all `EObject`s that are the target of the EReference `reference` from the given `source` `EObject`.

      Unset / null-valued references are not indexed, and will not be included in the results.

      Precondition: Results will be returned only if either (a) the reference has already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getReferenceValues` in interface `NavigationHelper`
      Parameters:
        `source` - the host object
        `reference` - an EReference of the host object
      Returns:
        the set of `EObject`s that the given reference points to, from the given source object

    - #### getFeatureTargets

          public java.util.Set<java.lang.Object> getFeatureTargets(org.eclipse.emf.ecore.EObject source,
                                                                   org.eclipse.emf.ecore.EStructuralFeature _feature)

      Description copied from interface: `NavigationHelper`
      Find all `Object`s that are the target of the EStructuralFeature `feature` from the given `source` `EObject`.

      Unset / null-valued features are not indexed, and will not be included in the results.

      Precondition: Results will be returned only if either (a) the feature has already been registered, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getFeatureTargets` in interface `NavigationHelper`
      Parameters:
        `source` - the host object
        `_feature` - an EStructuralFeature of the host object
      Returns:
        the set of values that the given feature takes at the given source object
      See Also:
        `NavigationHelper.getReferenceValues(EObject, EReference)`

    - #### getFeatureInstances

          public java.util.Map<org.eclipse.emf.ecore.EObject,java.util.Set<java.lang.Object>> getFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature _feature)

      Description copied from interface: `NavigationHelper`
      Find all value assignment instances of the given `EStructuralFeature` in the form of a host `EObject` -> value(s) multimap.

      Unset / null-valued features are not indexed, and will not be included in the results.

      Precondition: Results will be returned only if either (a) the feature has already been registered, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getFeatureInstances` in interface `NavigationHelper`
      Parameters:
        `_feature` - the EStructuralFeature
      Returns:
        the map from source `EObject`s to the value(s) of the given feature

    - #### getDirectInstances

          public java.util.Set<org.eclipse.emf.ecore.EObject> getDirectInstances(org.eclipse.emf.ecore.EClass type)

      Description copied from interface: `NavigationHelper`
      Get the direct `EObject` instances of the given `EClass`. Instances of subclasses will be excluded.

      Precondition: Results will be returned only if either (a) the EClass (or any superclass) has already been registered using `NavigationHelper.registerEClasses(Set)`, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getDirectInstances` in interface `NavigationHelper`
      Parameters:
        `type` - an EClass
      Returns:
        the collection of `EObject` direct instances of the given EClass (not of subclasses)
      See Also:
        `NavigationHelper.getAllInstances(EClass)`

    - #### toCanonicalValueRepresentation

          public java.lang.Object toCanonicalValueRepresentation(java.lang.Object value)

      Description copied from interface: `NavigationHelper`
      Returns the internal, canonicalized implementation of an attribute value.

      Behaviour: when in dynamic EMF mode, substitutes enum literals with a canonical version of the enum literal. Otherwise, returns the input.

      The canonical enum literal will be guaranteed to be a valid EMF enum literal (`Enumerator`), and the best effort is made to ensure that it will be the same for all versions of the `EEnum`, including `EEnumLiteral`s in different versions of ecore packages, as well as Java enums generated from them..

      Usage is not required when simply querying the indexed model through the `NavigationHelper` API, as both method inputs and the results returned are automatically canonicalized in dynamic EMF mode. Using this method is required only if the client wants to do querying/filtering on the results returned, and wants to know what to look for.

      Specified by:
        `toCanonicalValueRepresentation` in interface `NavigationHelper`

    - #### getAllInstances

          public java.util.Set<org.eclipse.emf.ecore.EObject> getAllInstances(org.eclipse.emf.ecore.EClass type)

      Description copied from interface: `NavigationHelper`
      Get the all `EObject` instances of the given `EClass`. This includes instances of subclasses.

      Precondition: Results will be returned only if either (a) the EClass (or any superclass) has already been registered using `NavigationHelper.registerEClasses(Set)`, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getAllInstances` in interface `NavigationHelper`
      Parameters:
        `type` - an EClass
      Returns:
        the collection of `EObject` instances of the given EClass and any of its subclasses
      See Also:
        `NavigationHelper.getDirectInstances(EClass)`

    - #### findByFeatureValue

          public java.util.Set<org.eclipse.emf.ecore.EObject> findByFeatureValue(java.lang.Object value_,
                                                                                 org.eclipse.emf.ecore.EStructuralFeature _feature)

      Description copied from interface: `NavigationHelper`
      Find all source `EObject`s for which the given `feature` points to / takes the given `value`.

      Precondition: Unset / null-valued features are not indexed, so `value!=null`

      Precondition: Results will be returned only if either (a) the feature has already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `findByFeatureValue` in interface `NavigationHelper`
      Parameters:
        `value_` - the value of the feature
        `_feature` - the feature instance
      Returns:
        the collection of `EObject` instances

    - #### getHoldersOfFeature

          public java.util.Set<org.eclipse.emf.ecore.EObject> getHoldersOfFeature(org.eclipse.emf.ecore.EStructuralFeature _feature)

      Description copied from interface: `NavigationHelper`
      Returns those host `EObject`s that have a non-null value for the given feature (at least one, in case of multi-valued references).

      Unset / null-valued features are not indexed, and will not be included in the results.

      Precondition: Results will be returned only if either (a) the feature has already been registered using `NavigationHelper.registerEStructuralFeatures(Set)`, or (b) running in wildcard mode (see `NavigationHelper.isInWildcardMode()`).

      Specified by:
        `getHoldersOfFeature` in interface `NavigationHelper`
      Parameters:
        `_feature` - a structural feature
      Returns:
        the collection of `EObject`s that have some value for the given structural feature

    - #### addInstanceListener

          public void addInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes,
                                          InstanceListener listener)

      Description copied from interface: `NavigationHelper`
      The given `listener` will be notified from now on whenever instances the given `EClass`es (and any of their subtypes) are added to or removed from the model.
      Specified by:
        `addInstanceListener` in interface `NavigationHelper`
      Parameters:
        `classes` - the collection of classes whose instances the listener should be notified of
        `listener` - the listener instance

    - #### removeInstanceListener

          public void removeInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes,
                                             InstanceListener listener)

      Description copied from interface: `NavigationHelper`
      Unregisters an instance listener for the given classes.
      Specified by:
        `removeInstanceListener` in interface `NavigationHelper`
      Parameters:
        `classes` - the collection of classes
        `listener` - the listener instance

    - #### addFeatureListener

          public void addFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features,
                                         FeatureListener listener)

      Description copied from interface: `NavigationHelper`
      The given `listener` will be notified from now on whenever instances the given `EStructuralFeature`s are added to or removed from the model.
      Specified by:
        `addFeatureListener` in interface `NavigationHelper`
      Parameters:
        `features` - the collection of features associated to the listener
        `listener` - the listener instance

    - #### removeFeatureListener

          public void removeFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features,
                                            FeatureListener listener)

      Description copied from interface: `NavigationHelper`
      Unregisters a feature listener for the given features.
      Specified by:
        `removeFeatureListener` in interface `NavigationHelper`
      Parameters:
        `features` - the collection of features
        `listener` - the listener instance

    - #### addDataTypeListener

          public void addDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types,
                                          DataTypeListener listener)

      Description copied from interface: `NavigationHelper`
      The given `listener` will be notified from now on whenever instances the given `EDataType`s are added to or removed from the model.
      Specified by:
        `addDataTypeListener` in interface `NavigationHelper`
      Parameters:
        `types` - the collection of types associated to the listener
        `listener` - the listener instance

    - #### removeDataTypeListener

          public void removeDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types,
                                             DataTypeListener listener)

      Description copied from interface: `NavigationHelper`
      Unregisters a data type listener for the given types.
      Specified by:
        `removeDataTypeListener` in interface `NavigationHelper`
      Parameters:
        `types` - the collection of data types
        `listener` - the listener instance

    - #### getObservedDataTypesInternal

          public java.util.Set<java.lang.Object> getObservedDataTypesInternal()

      Returns:
        the observedDataTypes

    - #### addLightweightEObjectObserver

          public boolean addLightweightEObjectObserver(LightweightEObjectObserver observer,
                                                       org.eclipse.emf.ecore.EObject observedObject)

      Description copied from interface: `NavigationHelper`
      Register a lightweight observer that is notified if the value of any feature of the given EObject changes.
      Specified by:
        `addLightweightEObjectObserver` in interface `NavigationHelper`
      Parameters:
        `observer` - the listener instance
        `observedObject` - the observed EObject
      Returns:
        false if the observer was already attached to the object (call has no effect), true otherwise

    - #### removeLightweightEObjectObserver

          public boolean removeLightweightEObjectObserver(LightweightEObjectObserver observer,
                                                          org.eclipse.emf.ecore.EObject observedObject)

      Description copied from interface: `NavigationHelper`
      Unregisters a lightweight observer for the given EObject.
      Specified by:
        `removeLightweightEObjectObserver` in interface `NavigationHelper`
      Parameters:
        `observer` - the listener instance
        `observedObject` - the observed EObject
      Returns:
        false if the observer has not been previously attached to the object (call has no effect), true otherwise

    - #### getLightweightObservers

          public java.util.Map<LightweightEObjectObserver,java.util.Collection<org.eclipse.emf.ecore.EObject>> getLightweightObservers()

      Returns:
        the lightweightObservers

    - #### addBaseIndexChangeListener

          public void addBaseIndexChangeListener(EMFBaseIndexChangeListener listener)

      Description copied from interface: `NavigationHelper`
      Adds a coarse-grained listener that will be invoked after the NavigationHelper index or the underlying model is changed. Can be used e.g. to check model contents. Not intended for general use.

      See `NavigationHelper.removeBaseIndexChangeListener(EMFBaseIndexChangeListener)`
      Specified by:
        `addBaseIndexChangeListener` in interface `NavigationHelper`

    - #### removeBaseIndexChangeListener

          public void removeBaseIndexChangeListener(EMFBaseIndexChangeListener listener)

      Description copied from interface: `NavigationHelper`
      Removes a registered listener.

      See `NavigationHelper.addBaseIndexChangeListener(EMFBaseIndexChangeListener)`
      Specified by:
        `removeBaseIndexChangeListener` in interface `NavigationHelper`

    - #### addIndexingErrorListener

          public boolean addIndexingErrorListener(IEMFIndexingErrorListener listener)

      Description copied from interface: `NavigationHelper`
      Adds a listener for internal errors in the index. A listener can only be added once.
      Specified by:
        `addIndexingErrorListener` in interface `NavigationHelper`

    - #### removeIndexingErrorListener

          public boolean removeIndexingErrorListener(IEMFIndexingErrorListener listener)

      Description copied from interface: `NavigationHelper`
      Removes a listener for internal errors in the index
      Specified by:
        `removeIndexingErrorListener` in interface `NavigationHelper`

    - #### notifyErrorListener

          public void notifyErrorListener(java.lang.String message,
                                          java.lang.Throwable t)

    - #### notifyFatalListener

          public void notifyFatalListener(java.lang.String message,
                                          java.lang.Throwable t)

    - #### isExpansionAllowed

          public boolean isExpansionAllowed()

      Returns:
        the expansionAllowed

    - #### getDirectlyObservedClassesInternal

          public java.util.Set<java.lang.Object> getDirectlyObservedClassesInternal()

      Returns:
        the directlyObservedClasses

    - #### getAllObservedClassesInternal

          public java.util.Set<java.lang.Object> getAllObservedClassesInternal()

      not just the directly observed classes, but also their known subtypes

    - #### registerObservedTypes

          public void registerObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes,
                                            java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes,
                                            java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)

      Description copied from interface: `NavigationHelper`
      Manually turns on indexing for the given types (indexing of others are unaffected). Note that registering new types will result in a single iteration through the whole attached model. Not usable in wildcard mode.
      Specified by:
        `registerObservedTypes` in interface `NavigationHelper`
      Parameters:
        `classes` - the set of classes to observe (null okay)
        `dataTypes` - the set of data types to observe (null okay)
        `features` - the set of features to observe (null okay)

    - #### unregisterObservedTypes

          public void unregisterObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes,
                                              java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes,
                                              java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)

      Description copied from interface: `NavigationHelper`
      Manually turns off indexing for the given types (indexing of others are unaffected). Note that if the unregistered types are re-registered later, the whole attached model needs to be visited again. Not usable in wildcard mode.
      Precondition:
        no listeners can be registered for the given types.
      Specified by:
        `unregisterObservedTypes` in interface `NavigationHelper`
      Parameters:
        `classes` - the set of classes that will be ignored again from now on (null okay)
        `dataTypes` - the set of data types that will be ignored again from now on (null okay)
        `features` - the set of features that will be ignored again from now on (null okay)

    - #### registerEStructuralFeatures

          public void registerEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)

      Description copied from interface: `NavigationHelper`
      Manually turns on indexing for the given features (indexing of other features are unaffected). Note that registering new features will result in a single iteration through the whole attached model. Not usable in wildcard mode.
      Specified by:
        `registerEStructuralFeatures` in interface `NavigationHelper`
      Parameters:
        `features` - the set of features to observe

    - #### unregisterEStructuralFeatures

          public void unregisterEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)

      Description copied from interface: `NavigationHelper`
      Manually turns off indexing for the given features (indexing of other features are unaffected). Note that if the unregistered features are re-registered later, the whole attached model needs to be visited again. Not usable in wildcard mode.
      Precondition:
        no listeners can be registered for the given features.
      Specified by:
        `unregisterEStructuralFeatures` in interface `NavigationHelper`
      Parameters:
        `features` - the set of features that will be ignored again from now on

    - #### registerEClasses

          public void registerEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)

      Description copied from interface: `NavigationHelper`
      Manually turns on indexing for the given classes (indexing of other classes are unaffected). Instances of subclasses will also be indexed. Note that registering new classes will result in a single iteration through the whole attached model. Not usable in wildcard mode.
      Specified by:
        `registerEClasses` in interface `NavigationHelper`
      Parameters:
        `classes` - the set of classes to observe

    - #### unregisterEClasses

          public void unregisterEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)

      Description copied from interface: `NavigationHelper`
      Manually turns off indexing for the given classes (indexing of other classes are unaffected). Note that if the unregistered classes are re-registered later, the whole attached model needs to be visited again. Not usable in wildcard mode.
      Precondition:
        no listeners can be registered for the given classes.
      Specified by:
        `unregisterEClasses` in interface `NavigationHelper`
      Parameters:
        `classes` - the set of classes that will be ignored again from now on

    - #### registerEDataTypes

          public void registerEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)

      Description copied from interface: `NavigationHelper`
      Manually turns on indexing for the given data types (indexing of other features are unaffected). Note that registering new data types will result in a single iteration through the whole attached model. Not usable in wildcard mode.
      Specified by:
        `registerEDataTypes` in interface `NavigationHelper`
      Parameters:
        `dataTypes` - the set of data types to observe

    - #### unregisterEDataTypes

          public void unregisterEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)

      Description copied from interface: `NavigationHelper`
      Manually turns off indexing for the given data types (indexing of other data types are unaffected). Note that if the unregistered data types are re-registered later, the whole attached model needs to be visited again. Not usable in wildcard mode.
      Precondition:
        no listeners can be registered for the given datatypes.
      Specified by:
        `unregisterEDataTypes` in interface `NavigationHelper`
      Parameters:
        `dataTypes` - the set of data types that will be ignored again from now on

    - #### isCoalescing

          public boolean isCoalescing()

      Description copied from interface: `NavigationHelper`
      Examines whether execution is currently in the callable block of an invocation of {#link `NavigationHelper.coalesceTraversals(Callable)`}.
      Specified by:
        `isCoalescing` in interface `NavigationHelper`

    - #### coalesceTraversals

          public <V> V coalesceTraversals(java.util.concurrent.Callable<V> callable)
                                   throws java.lang.reflect.InvocationTargetException

      Description copied from interface: `NavigationHelper`
      The given callback will be executed, and all model traversals and index registrations will be delayed until the execution is done. If there are any outstanding feature, class or datatype registrations, a single coalesced model traversal will initialize the caches and deliver the notifications.
      Specified by:
        `coalesceTraversals` in interface `NavigationHelper`
      Throws:
        `java.lang.reflect.InvocationTargetException`

    - #### addRoot

          public void addRoot(org.eclipse.emf.common.notify.Notifier emfRoot)
                       throws IncQueryBaseException

      Description copied from interface: `NavigationHelper`
      Adds an additional EMF model root.
      Specified by:
        `addRoot` in interface `NavigationHelper`
      Throws:
        `IncQueryBaseException`

    - #### cheapMoveTo

          public <T extends org.eclipse.emf.ecore.EObject> void cheapMoveTo(T element,
                                                                            org.eclipse.emf.common.util.EList<T> targetContainmentReferenceList)

      Description copied from interface: `NavigationHelper`
      Moves an EObject (along with its entire containment subtree) within the containment hierarchy of the EMF model. The object will be relocated from the original parent object to a different parent, or a different containment list of the same parent.

      When indexing is enabled, such a relocation is costly if performed through normal getters/setters, as the index for the entire subtree is pruned at the old location and reconstructed at the new one. This method provides a workaround to keep the operation cheap.

      This method is experimental. Re-entrancy not supported.

      Specified by:
        `cheapMoveTo` in interface `NavigationHelper`
      Parameters:
        `element` - the eObject to be moved
        `targetContainmentReferenceList` - containment list of the new parent object into which the element has to be moved

    - #### cheapMoveTo

          public void cheapMoveTo(org.eclipse.emf.ecore.EObject element,
                                  org.eclipse.emf.ecore.EObject parent,
                                  org.eclipse.emf.ecore.EReference containmentFeature)

      Description copied from interface: `NavigationHelper`
      Moves an EObject (along with its entire containment subtree) within the containment hierarchy of the EMF model. The object will be relocated from the original parent object to a different parent, or a different containment list of the same parent.

      When indexing is enabled, such a relocation is costly if performed through normal getters/setters, as the index for the entire subtree is pruned at the old location and reconstructed at the new one. This method provides a workaround to keep the operation cheap.

      This method is experimental. Re-entrancy not supported.

      Specified by:
        `cheapMoveTo` in interface `NavigationHelper`
      Parameters:
        `element` - the eObject to be moved
        `parent` - the new parent object under which the element has to be moved
        `containmentFeature` - the kind of containment reference that should be established between the new parent and the element

    - #### getAllCurrentClasses

          public java.util.Set<org.eclipse.emf.ecore.EClass> getAllCurrentClasses()

      Description copied from interface: `NavigationHelper`
      Returns all EClasses that currently have direct instances cached by the index.
      - Supertypes will not be returned, unless they have direct instances in the model as well.
      - If not in wildcard mode, only registered EClasses and their subtypes will be considered.
      - Note for advanced users: if a type is represented by multiple EClass objects, one of them is chosen as representative and returned.
      Specified by:
        `getAllCurrentClasses` in interface `NavigationHelper`

    - #### resampleDerivedFeatures

          public void resampleDerivedFeatures()

      Resamples the values of not well-behaving derived features if those features are also indexed.
      Specified by:
        `resampleDerivedFeatures` in interface `NavigationHelper`