org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher

## Class PatternMatcherContent

- java.lang.Object
- - org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.BaseContent<ParentType>
  - - org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.CompositeContent<PatternMatcherRootContent,PatternMatchContent>
    - - org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.PatternMatcherContent

- All Implemented Interfaces:
    IFilteredMatcherContent

      public class PatternMatcherContent
      extends CompositeContent<PatternMatcherRootContent,PatternMatchContent>
      implements IFilteredMatcherContent

  The middle level element in the tree viewer of the `QueryExplorer`. Instances of this class represent the various patterns (generated or runtime) that are loaded during runtime.

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.BaseContent

      `parent, text`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PatternMatcherContent(PatternMatcherRootContent parent, AdvancedViatraQueryEngine engine, RuleEngine ruleEngine, IQuerySpecification<?> specification, boolean generated, QueryEvaluationHint hint)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dispose()` Disposes of this content.
    `org.eclipse.core.databinding.observable.list.IObservableList` | `getChildren()` Returns the `IObservableList` of child elements.
    `java.util.Iterator<PatternMatchContent>` | `getChildrenIterator()` Returns an iterator on the child elements.
    `java.lang.Exception` | `getException()`
    `java.lang.Object[]` | `getFilter()` Returns the current filter used on the corresponding matcher.
    `IPatternMatch` | `getFilterMatch()`
    `ViatraQueryMatcher<IPatternMatch>` | `getMatcher()`
    `java.lang.String` | `getPatternName()`
    `IQuerySpecification<?>` | `getSpecification()`
    `boolean` | `isCreated()` Returns true if the RETE matcher was created for this observable matcher, false otherwise.
    `boolean` | `isGenerated()` Returns true if the matcher is generated, false if it is generic.
    `void` | `setFilter(java.lang.Object[] parameterFilter)`

    - ### Methods inherited from class org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.CompositeContent

      `updateHasChildren`

    - ### Methods inherited from class org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.BaseContent

      `getParent, getText, setText`

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

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

    - ### Methods inherited from interface org.eclipse.viatra.query.tooling.ui.util.IFilteredMatcherContent

      `getParent`

- - ### Constructor Detail

    - #### PatternMatcherContent

          public PatternMatcherContent(PatternMatcherRootContent parent,
                                       AdvancedViatraQueryEngine engine,
                                       RuleEngine ruleEngine,
                                       IQuerySpecification<?> specification,
                                       boolean generated,
                                       QueryEvaluationHint hint)

  - ### Method Detail

    - #### dispose

          public void dispose()

      Description copied from class: `BaseContent`
      Disposes of this content. It is the method's responsibility to call dispose on all child elements. Important: do NOT call dispose on the children observable collection as it will be invoked when the observable tree viewer processes the list diffs. This implementation should only release those resources (matchers / engines / etc) which are directly bound to this content.
      Overrides:
        `dispose` in class `CompositeContent<PatternMatcherRootContent,PatternMatchContent>`

    - #### getSpecification

          public IQuerySpecification<?> getSpecification()

    - #### getMatcher

          public ViatraQueryMatcher<IPatternMatch> getMatcher()

      Specified by:
        `getMatcher` in interface `IFilteredMatcherContent`

    - #### getPatternName

          public java.lang.String getPatternName()

    - #### setFilter

          public void setFilter(java.lang.Object[] parameterFilter)

    - #### getFilter

          public java.lang.Object[] getFilter()

      Returns the current filter used on the corresponding matcher.
      Returns:
        the filter as an array of objects

    - #### getFilterMatch

          public IPatternMatch getFilterMatch()

      Specified by:
        `getFilterMatch` in interface `IFilteredMatcherContent`
      Since:
        1.4

    - #### isGenerated

          public boolean isGenerated()

      Returns true if the matcher is generated, false if it is generic.
      Returns:
        true for generated, false for generic matcher

    - #### isCreated

          public boolean isCreated()

      Returns true if the RETE matcher was created for this observable matcher, false otherwise.
      Returns:
        true if matcher could be created

    - #### getChildren

          public org.eclipse.core.databinding.observable.list.IObservableList getChildren()

      Description copied from class: `CompositeContent`
      Returns the `IObservableList` of child elements.
      Specified by:
        `getChildren` in class `CompositeContent<PatternMatcherRootContent,PatternMatchContent>`
      Returns:
        the observable list of child elements

    - #### getException

          public java.lang.Exception getException()

    - #### getChildrenIterator

          public java.util.Iterator<PatternMatchContent> getChildrenIterator()

      Description copied from class: `CompositeContent`
      Returns an iterator on the child elements.
      Specified by:
        `getChildrenIterator` in class `CompositeContent<PatternMatcherRootContent,PatternMatchContent>`
      Returns:
        the iterator on the child elements