Enum Class QuadTableForm

java.lang.Object
java.lang.Enum<QuadTableForm>
org.apache.jena.sparql.core.mem.QuadTableForm
All Implemented Interfaces:
Serializable, Comparable<QuadTableForm>, Constable, Predicate<Set<TupleSlot>>, Supplier<QuadTable>

public enum QuadTableForm extends Enum<QuadTableForm> implements Supplier<QuadTable>, Predicate<Set<TupleSlot>>
Six covering table forms and machinery to determine which of them is best suited to answer a given query. Please notice that the individual values of this enum are what implement the various interfaces named in the signature of this type. In particular, any value from this enum is a complete implementation of QuadTable. HexTable binds up all these six forms into a single implementation of QuadTable that selects the most useful table form(s) for any given operation.
See Also:
  • Enum Constant Details

    • GSPO

      public static final QuadTableForm GSPO
      Graph-subject-predicate-object.
    • GOPS

      public static final QuadTableForm GOPS
      Graph-object-predicate-subject.
    • SPOG

      public static final QuadTableForm SPOG
      Subject-predicate-object-graph.
    • OSGP

      public static final QuadTableForm OSGP
      Object-subject-graph-predicate.
    • PGSO

      public static final QuadTableForm PGSO
      Predicate-graph-subject-object.
    • OPSG

      public static final QuadTableForm OPSG
      Object-predicate-subject-graph.
  • Field Details

    • fullpattern

      public final List<TupleSlot> fullpattern
      The full pattern of this table form.
  • Method Details

    • values

      public static QuadTableForm[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static QuadTableForm valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public PMapQuadTable get()
      Specified by:
      get in interface Supplier<QuadTable>
    • test

      public boolean test(Set<TupleSlot> pattern)
      Specified by:
      test in interface Predicate<Set<TupleSlot>>
      Parameters:
      pattern -
      Returns:
      whether this table form avoids traversal for a query of this pattern
    • chooseFrom

      public static QuadTableForm chooseFrom(Set<TupleSlot> pattern)
      Parameters:
      pattern -
      Returns:
      the most appropriate choice of table form for that query
    • tableForms

      public static Stream<QuadTableForm> tableForms()
      Returns:
      a stream of these table forms