org.eclipse.viatra.query.runtime.matchers.context

## Class AbstractQueryMetaContext

- java.lang.Object
- - org.eclipse.viatra.query.runtime.matchers.context.AbstractQueryMetaContext

- All Implemented Interfaces:
    IQueryMetaContext
  Direct Known Subclasses:
    EMFQueryMetaContext

      public abstract class AbstractQueryMetaContext
      extends java.lang.Object
      implements IQueryMetaContext

  Common abstract class for implementers of `IQueryMetaContext`
  Since:
    1.3

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractQueryMetaContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canLeadOutOfScope(IInputKey key)` Tells whether the given `IInputKey` is an edge and may lead out of scope.
    `java.util.Map<InputKeyImplication,java.util.Set<InputKeyImplication>>` | `getConditionalImplications(IInputKey implyingKey)` Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys).
    `IPosetComparator` | `getPosetComparator(java.lang.Iterable<IInputKey> key)` Returns an `IPosetComparator` for the given set of `IInputKey`s.
    `java.util.Comparator<IInputKey>` | `getSuggestedEliminationOrdering()` For query normalizing, this is the order suggested for trying to eliminate input keys.
    `java.util.Collection<InputKeyImplication>` | `getWeakenedAlternatives(IInputKey implyingKey)` Returns a set of implications (weakened alternatives), with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.
    `boolean` | `isPosetKey(IInputKey key)` Returns true if the given `IInputKey` represents a poset type.

    - ### 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.runtime.matchers.context.IQueryMetaContext

      `getFunctionalDependencies, getImplications, isEnumerable, isStateless`

- - ### Constructor Detail

    - #### AbstractQueryMetaContext

          public AbstractQueryMetaContext()

  - ### Method Detail

    - #### getConditionalImplications

          public java.util.Map<InputKeyImplication,java.util.Set<InputKeyImplication>> getConditionalImplications(IInputKey implyingKey)

      Description copied from interface: `IQueryMetaContext`
      Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys). For example, a "type x, unscoped" input key may imply the "type x, in scope" input key under the condition of the input key "x is in scope"

      Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys (either as the implying key or as the additional condition).

      Note that symmetry is not required, i.e. the additional conditions do not have to list the same conditional implication.

      Specified by:
        `getConditionalImplications` in interface `IQueryMetaContext`
      Returns:
        multi-map, where the keys are additional conditions and the values are input key implications jointly implied by the condition and the given implying key.
      Since:
        2.0

    - #### canLeadOutOfScope

          public boolean canLeadOutOfScope(IInputKey key)

      Description copied from interface: `IQueryMetaContext`
      Tells whether the given `IInputKey` is an edge and may lead out of scope.
      Specified by:
        `canLeadOutOfScope` in interface `IQueryMetaContext`
      Since:
        1.6

    - #### getSuggestedEliminationOrdering

          public java.util.Comparator<IInputKey> getSuggestedEliminationOrdering()

      Description copied from interface: `IQueryMetaContext`
      For query normalizing, this is the order suggested for trying to eliminate input keys.
      Specified by:
        `getSuggestedEliminationOrdering` in interface `IQueryMetaContext`
      Since:
        1.6

    - #### getWeakenedAlternatives

          public java.util.Collection<InputKeyImplication> getWeakenedAlternatives(IInputKey implyingKey)

      Description copied from interface: `IQueryMetaContext`
      Returns a set of implications (weakened alternatives), with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.

      Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.

      Must follow directly or transitively from implications of `IQueryMetaContext.getImplications(IInputKey)`.

      Specified by:
        `getWeakenedAlternatives` in interface `IQueryMetaContext`
      Since:
        1.6

    - #### isPosetKey

          public boolean isPosetKey(IInputKey key)

      Description copied from interface: `IQueryMetaContext`
      Returns true if the given `IInputKey` represents a poset type.
      Specified by:
        `isPosetKey` in interface `IQueryMetaContext`

    - #### getPosetComparator

          public IPosetComparator getPosetComparator(java.lang.Iterable<IInputKey> key)

      Description copied from interface: `IQueryMetaContext`
      Returns an `IPosetComparator` for the given set of `IInputKey`s.
      Specified by:
        `getPosetComparator` in interface `IQueryMetaContext`
      Parameters:
        `key` - an iterable collection of input keys
      Returns:
        the poset comparator