Package org.apache.jena.sparql.core.mem
Enum QuadTableForm
- java.lang.Object
-
- java.lang.Enum<QuadTableForm>
-
- org.apache.jena.sparql.core.mem.QuadTableForm
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<QuadTableForm>
,java.util.function.Predicate<java.util.Set<TupleSlot>>
,java.util.function.Supplier<QuadTable>
public enum QuadTableForm extends java.lang.Enum<QuadTableForm> implements java.util.function.Supplier<QuadTable>, java.util.function.Predicate<java.util.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 thisenum
are what implement the various interfaces named in the signature of this type. In particular, any value from thisenum
is a complete implementation ofQuadTable
.HexTable
binds up all these six forms into a single implementation ofQuadTable
that selects the most useful table form(s) for any given operation.- See Also:
HexTable
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<TupleSlot>
fullpattern
The full pattern of this table form.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static QuadTableForm
chooseFrom(java.util.Set<TupleSlot> pattern)
PMapQuadTable
get()
static java.util.stream.Stream<QuadTableForm>
tableForms()
boolean
test(java.util.Set<TupleSlot> pattern)
static QuadTableForm
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static QuadTableForm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
fullpattern
public final java.util.List<TupleSlot> fullpattern
The full pattern of this table form.
-
-
Method Detail
-
values
public static QuadTableForm[] 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 (QuadTableForm c : QuadTableForm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static QuadTableForm 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 namejava.lang.NullPointerException
- if the argument is null
-
get
public PMapQuadTable get()
- Specified by:
get
in interfacejava.util.function.Supplier<QuadTable>
-
test
public boolean test(java.util.Set<TupleSlot> pattern)
- Specified by:
test
in interfacejava.util.function.Predicate<java.util.Set<TupleSlot>>
- Parameters:
pattern
-- Returns:
- whether this table form avoids traversal for a query of this pattern
-
chooseFrom
public static QuadTableForm chooseFrom(java.util.Set<TupleSlot> pattern)
- Parameters:
pattern
-- Returns:
- the most appropriate choice of table form for that query
-
tableForms
public static java.util.stream.Stream<QuadTableForm> tableForms()
- Returns:
- a stream of these table forms
-
-