Interface AtomicPattern

All Known Subinterfaces:
View<NativeQueryType>
All Known Implementing Classes:
AbstractAtomicPattern, ViewImpl

public interface AtomicPattern
Represents a basic pattern for querying predicates with specific constraints on term positions. This pattern defines which positions must be specified (Mandatory), which can be indexed (Indexable), and what types of terms are allowed in each position.
  • Method Details

    • getPredicate

      Predicate getPredicate()
      Returns the predicate described by this pattern.
      Returns:
      The predicate associated with this pattern.
    • getTermConstraint

      Class<? extends Term> getTermConstraint(int position)
      Retrieves the allowed term type for a specific position.
      Parameters:
      position - The position to check (0-based index).
      Returns:
      The class type of the allowed term, or null if no constraint.
    • getMandatoryPositions

      Set<Integer> getMandatoryPositions()
      Returns the positions that must be assigned before evaluation.
      Returns:
      An unmodifiable list of positions that are mandatory.
    • getIndexablePatterns

      Set<Set<Integer>> getIndexablePatterns()
      Returns the sets of positions that can be indexed together.
      Returns:
      An unmodifiable set of indexable position patterns.
    • createQueries

      Stream<BasicQuery> createQueries(Map<Integer,Term> positionsAssignation)
      Creates basic queries compatible with this atom.

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

      Parameters:
      positionsAssignation - the assignation of the positions
      Returns:
      A stream containing the BasicQueries compatible with this termSequence.
    • hasAssignedMandatoryParameters

      boolean hasAssignedMandatoryParameters(Map<Integer,Term> positionsAssignation)
      Checks whether all mandatory parameters are assigned.
      Parameters:
      positionsAssignation - the assignation of the positions
      Returns:
      true iff the mandatory parameters are assigned