org.eclipse.incquery.runtime.base.api

## Class BaseIndexOptions

- java.lang.Object
- - org.eclipse.incquery.runtime.base.api.BaseIndexOptions

-     public class BaseIndexOptions
      extends java.lang.Object

  The base index options indicate how the indices are built.

  One of the options is to build indices in wildcard mode, meaning that all EClasses, EDataTypes, EReferences and EAttributes are indexed. This is convenient, but comes at a high memory cost. To save memory, one can disable wildcard mode and manually register those EClasses, EDataTypes, EReferences and EAttributes that should be indexed.

  Another choice is whether to build indices in dynamic EMF mode, meaning that types are identified by the String IDs that are ultimately derived from the nsURI of the EPackage. Multiple types with the same ID are treated as the same. This is useful if dynamic EMF is used, where there can be multiple copies (instantiations) of the same EPackage, representing essentially the same metamodel. If one disables dynamic EMF mode, an error is logged if duplicate EPackages with the same nsURI are encountered.

  Author:
    Abel Hegedus

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseIndexOptions()` Creates a base index options with the default values.
    `BaseIndexOptions(boolean dynamicEMFMode, boolean wildcardMode)` Creates a base index options using the provided values for dynamic EMF mode and wildcard mode.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `BaseIndexOptions` | `copy()` Creates an independent copy of itself.
    `boolean` | `equals(java.lang.Object obj)`
    `IBaseIndexObjectFilter` | `getObjectFilterConfiguration()`
    `IBaseIndexResourceFilter` | `getResourceFilterConfiguration()`
    `int` | `hashCode()`
    `boolean` | `isDynamicEMFMode()`
    `boolean` | `isTraverseOnlyWellBehavingDerivedFeatures()`
    `boolean` | `isWildcardMode()`
    `void` | `setDynamicEMFMode(boolean dynamicEMFMode)` Deprecated. Unsafe to use as setting it after the engine has been is undefined; use `withDynamicEMFMode(boolean)` instead
    `void` | `setObjectFilterConfiguration(IBaseIndexObjectFilter filter)` Deprecated. Unsafe to use as setting it after the engine has been is undefined; use `withResourceFilterConfiguration(IBaseIndexResourceFilter)` instead
    `void` | `setResourceFilter(IBaseIndexResourceFilter filter)` Deprecated. Unsafe to use as setting it after the engine has been is undefined; use `withResourceFilterConfiguration(IBaseIndexResourceFilter)` instead
    `void` | `setWildcardMode(boolean wildcardMode)` Deprecated. Unsafe to use as setting it after the engine has been is undefined; use `withWildcardMode(boolean)` instead
    `java.lang.String` | `toString()`
    `BaseIndexOptions` | `withDynamicEMFMode(boolean dynamicEMFMode)`
    `BaseIndexOptions` | `withObjectFilterConfiguration(IBaseIndexObjectFilter filter)` Adds an object-level filter to the indexer configuration.
    `BaseIndexOptions` | `withResourceFilterConfiguration(IBaseIndexResourceFilter filter)` Returns a copy of the configuration with a specified resource filter
    `BaseIndexOptions` | `withWildcardMode(boolean wildcardMode)`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### BaseIndexOptions

          public BaseIndexOptions()

      Creates a base index options with the default values.

    - #### BaseIndexOptions

          public BaseIndexOptions(boolean dynamicEMFMode,
                                  boolean wildcardMode)

      Creates a base index options using the provided values for dynamic EMF mode and wildcard mode.

  - ### Method Detail

    - #### setDynamicEMFMode

          public void setDynamicEMFMode(boolean dynamicEMFMode)

      Deprecated. Unsafe to use as setting it after the engine has been is undefined; use `withDynamicEMFMode(boolean)` instead

    - #### withDynamicEMFMode

          public BaseIndexOptions withDynamicEMFMode(boolean dynamicEMFMode)

      Parameters:
        `dynamicEMFMode` -
      Since:
        0.9

    - #### setObjectFilterConfiguration

          public void setObjectFilterConfiguration(IBaseIndexObjectFilter filter)

      Deprecated. Unsafe to use as setting it after the engine has been is undefined; use `withResourceFilterConfiguration(IBaseIndexResourceFilter)` instead
      Adds an object-level filter to the indexer. Warning - object-level indexing can increase indexing time noticeably. If possibly, use `withObjectFilterConfiguration(IBaseIndexObjectFilter)` instead.
      Parameters:
        `filter` -

    - #### withObjectFilterConfiguration

          public BaseIndexOptions withObjectFilterConfiguration(IBaseIndexObjectFilter filter)

      Adds an object-level filter to the indexer configuration. Warning - object-level indexing can increase indexing time noticeably. If possibly, use `withResourceFilterConfiguration(IBaseIndexResourceFilter)` instead.
      Parameters:
        `filter` -
      Since:
        0.9

    - #### getObjectFilterConfiguration

          public IBaseIndexObjectFilter getObjectFilterConfiguration()

      Returns:
        the selected object filter configuration, or null if not set

    - #### setResourceFilter

          public void setResourceFilter(IBaseIndexResourceFilter filter)

      Deprecated. Unsafe to use as setting it after the engine has been is undefined; use `withResourceFilterConfiguration(IBaseIndexResourceFilter)` instead
      Adds a resource filter to the current configuration
      Parameters:
        `filter` -

    - #### withResourceFilterConfiguration

          public BaseIndexOptions withResourceFilterConfiguration(IBaseIndexResourceFilter filter)

      Returns a copy of the configuration with a specified resource filter
      Parameters:
        `filter` -
      Since:
        0.9

    - #### getResourceFilterConfiguration

          public IBaseIndexResourceFilter getResourceFilterConfiguration()

      Returns:
        the selected resource filter, or null if not set

    - #### isDynamicEMFMode

          public boolean isDynamicEMFMode()

      Returns:
        whether the base index option has dynamic EMF mode set

    - #### isTraverseOnlyWellBehavingDerivedFeatures

          public boolean isTraverseOnlyWellBehavingDerivedFeatures()

      Returns:
        whether the base index option has traverse only well-behaving derived features set

    - #### setWildcardMode

          public void setWildcardMode(boolean wildcardMode)

      Deprecated. Unsafe to use as setting it after the engine has been is undefined; use `withWildcardMode(boolean)` instead
      Parameters:
        `wildcardMode` -

    - #### withWildcardMode

          public BaseIndexOptions withWildcardMode(boolean wildcardMode)

      Parameters:
        `wildcardMode` -
      Since:
        0.9

    - #### isWildcardMode

          public boolean isWildcardMode()

      Returns:
        whether the base index option has wildcard mode set

    - #### copy

          public BaseIndexOptions copy()

      Creates an independent copy of itself. The values of each option will be the same as this options. This method is used when a provided option must be copied to avoid external option changes afterward.
      Returns:
        the copy of this options

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`