Class BasicQuery

java.lang.Object
fr.inria.rules.integraal.model.data.readable.query.BasicQuery

public class BasicQuery extends Object
Represents a query built from a AtomicPattern.
  • Constructor Details

    • BasicQuery

      public BasicQuery(AtomicPattern pattern, Map<Integer,Term> assignedTerms)
      Constructs a BasicQuery from a valid AtomicPattern.
      Parameters:
      pattern - The AtomicPattern that defines the query structure.
      assignedTerms - The terms assigned to specific positions.
  • Method Details

    • getPredicate

      public Predicate getPredicate()
      Returns the predicate associated with this query.
      Returns:
      The predicate associated with this query.
    • getTerm

      public Optional<Term> getTerm(int position)
      Retrieves the term assigned to a given position.
      Parameters:
      position - The position to check.
      Returns:
      An Optional containing the term if assigned, otherwise an empty Optional.
    • getAssignedTerms

      public Map<Integer,Term> getAssignedTerms()
      Returns the current assignment of terms by position.
      Returns:
      An unmodifiable map of assigned terms.