Class ViewImpl<NativeQueryType>

java.lang.Object
fr.inria.rules.integraal.model.data.readable.query.AbstractAtomicPattern
fr.inria.rules.integraal.views.view.ViewImpl<NativeQueryType>
Type Parameters:
NativeQueryType - the native query representation used by the view
All Implemented Interfaces:
AtomicPattern, View<NativeQueryType>

public class ViewImpl<NativeQueryType> extends AbstractAtomicPattern implements View<NativeQueryType>
Default implementation of a view-backed atomic pattern.
  • Constructor Details

    • ViewImpl

      public ViewImpl(Predicate predicate, Map<Integer, Class<? extends Term>> termConstraints, ViewParameters<NativeQueryType> viewParameters)
      Constructs an AtomicPattern with specific constraints.
      Parameters:
      predicate - The predicate associated with this pattern.
      termConstraints - A map associating positions (0-based index) with allowed term types.
      viewParameters - the native-query parameters associated with the view
  • Method Details

    • getIndexablePatterns

      public Set<Set<Integer>> getIndexablePatterns()
      Description copied from interface: AtomicPattern
      Returns the sets of positions that can be indexed together.
      Specified by:
      getIndexablePatterns in interface AtomicPattern
      Returns:
      An unmodifiable set of indexable position patterns.
    • createQueries

      public Stream<BasicQuery> createQueries(Map<Integer,Term> positionsAssignation)
      Description copied from interface: AtomicPattern
      Creates basic queries compatible with this atom.

      The result can be empty if it is not possible to build a Basic Query

      Specified by:
      createQueries in interface AtomicPattern
      Parameters:
      positionsAssignation - the assignation of the positions
      Returns:
      A stream containing the BasicQueries compatible with this termSequence.
    • getViewParameters

      public ViewParameters<NativeQueryType> getViewParameters()
      Description copied from interface: View
      Returns the parameters used to query the underlying native view.
      Specified by:
      getViewParameters in interface View<NativeQueryType>
      Returns:
      the view parameters