org.eclipse.incquery.viewers.runtime.model

## Class IncQueryViewerDataModel

- java.lang.Object
- - org.eclipse.incquery.viewers.runtime.model.ViewerDataModel
  - - org.eclipse.incquery.viewers.runtime.model.IncQueryViewerDataModel

-     public class IncQueryViewerDataModel
      extends ViewerDataModel

  A `ViewerDataModel` implementation for IncQuery/EVM model sources. If you instantiate this class yourself, then be sure to dispose() of it once it is not needed anymore.
  Author:
    Zoltan Ujhelyi, Istvan Rath, Csaba Debreceni

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IncQueryViewerDataModel(java.util.Collection<IQuerySpecification<?>> patterns, IncQueryEngine engine)` Initializes a Viewer Data model using a set of patterns and a selected engine.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dispose()` Deprecated. Due to independence from databinding Dispose of this `IncQueryViewerDataModel` instance.
    `IncQueryEngine` | `getEngine()`
    `org.apache.log4j.Logger` | `getLogger()`
    `java.util.Collection<IQuerySpecification<?>>` | `getPatterns()`
    `java.util.Collection<IQuerySpecification<?>>` | `getPatterns(java.lang.String annotation)`
    `static ViewerState` | `newViewerState(IncQueryEngine engine, java.util.Collection<IQuerySpecification<?>> patterns, ViewerDataFilter filter, java.util.Collection<ViewerState.ViewerStateFeature> features)` Instantiate a `ViewerState` and its corresponding `ViewerDataModel` instance, for IncQuery-based model sources.
    `static ViewerState` | `newViewerState(IncQueryViewerDataModel model, ViewerDataFilter filter, java.util.Collection<ViewerState.ViewerStateFeature> features)` Instantiate a new `ViewerState`, for an already existing `IncQueryViewerDataModel` instance.

    - ### Methods inherited from class org.eclipse.incquery.viewers.runtime.model.ViewerDataModel

      `getNotationModel`

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

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

- - ### Constructor Detail

    - #### IncQueryViewerDataModel

          public IncQueryViewerDataModel(java.util.Collection<IQuerySpecification<?>> patterns,
                                         IncQueryEngine engine)
                                  throws IncQueryException,
                                         IncQueryBaseException

      Initializes a Viewer Data model using a set of patterns and a selected engine.
      Parameters:
        `patterns` -
        `engine` -
      Throws:
        `IncQueryException`
        `IncQueryBaseException`

  - ### Method Detail

    - #### getEngine

          public IncQueryEngine getEngine()

      Overrides:
        `getEngine` in class `ViewerDataModel`

    - #### getPatterns

          public java.util.Collection<IQuerySpecification<?>> getPatterns(java.lang.String annotation)

    - #### getLogger

          public org.apache.log4j.Logger getLogger()

    - #### dispose

          @Deprecated
          public void dispose()

      Deprecated. Due to independence from databinding Dispose of this `IncQueryViewerDataModel` instance.
      Overrides:
        `dispose` in class `ViewerDataModel`

    - #### newViewerState

          public static ViewerState newViewerState(IncQueryEngine engine,
                                                   java.util.Collection<IQuerySpecification<?>> patterns,
                                                   ViewerDataFilter filter,
                                                   java.util.Collection<ViewerState.ViewerStateFeature> features)

      Instantiate a `ViewerState` and its corresponding `ViewerDataModel` instance, for IncQuery-based model sources. When the state is disposed, the model will be disposed too.
      Parameters:
        `set` -
        `engine` -
        `patterns` -
        `filter` -
        `features` -
      Returns:

    - #### newViewerState

          public static ViewerState newViewerState(IncQueryViewerDataModel model,
                                                   ViewerDataFilter filter,
                                                   java.util.Collection<ViewerState.ViewerStateFeature> features)

      Instantiate a new `ViewerState`, for an already existing `IncQueryViewerDataModel` instance. This `ViewerDataModel` will not be disposed when the state is disposed.
      Parameters:
        `model` -
        `filter` -
        `features` -
      Returns:

    - #### getPatterns

          public java.util.Collection<IQuerySpecification<?>> getPatterns()

      Specified by:
        `getPatterns` in class `ViewerDataModel`