Enum TripleTableForm

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TripleTableForm>, java.util.function.Predicate<java.util.Set<TupleSlot>>, java.util.function.Supplier<TripleTable>

    public enum TripleTableForm
    extends java.lang.Enum<TripleTableForm>
    implements java.util.function.Supplier<TripleTable>, java.util.function.Predicate<java.util.Set<TupleSlot>>
    Forms for triple indexes.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      OSP
      Object-subject-predicate.
      POS
      Predicate-object-subject.
      SPO
      Subject-predicate-object.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.Set<TupleSlot> onePrefix
      Prefixes of the pattern for this table form.
      java.util.Set<TupleSlot> twoPrefix
      Prefixes of the pattern for this table form.
    • Field Detail

      • twoPrefix

        public final java.util.Set<TupleSlot> twoPrefix
        Prefixes of the pattern for this table form.
      • onePrefix

        public final java.util.Set<TupleSlot> onePrefix
        Prefixes of the pattern for this table form.
    • Method Detail

      • values

        public static TripleTableForm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TripleTableForm c : TripleTableForm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TripleTableForm valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • test

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

        public static TripleTableForm chooseFrom​(java.util.Set<TupleSlot> pattern)
        Parameters:
        pattern -
        Returns:
        the most appropriate choice of index form for that query
      • tableForms

        public static java.util.stream.Stream<TripleTableForm> tableForms()
        Returns:
        a stream of these table forms