Package org.eclipse.rdf4j.sail.lucene
Enum TypeBacktraceMode
- java.lang.Object
-
- java.lang.Enum<TypeBacktraceMode>
-
- org.eclipse.rdf4j.sail.lucene.TypeBacktraceMode
-
- All Implemented Interfaces:
Serializable
,Comparable<TypeBacktraceMode>
public enum TypeBacktraceMode extends Enum<TypeBacktraceMode>
Option to describe how theLuceneSail
should handle the add of a new type statement in a connection if theLuceneSail.INDEXEDTYPES
property is defined.Backtrace example
For example if we have the predicate my:text indexed by Lucene and (my:oftype my:type1) as anLuceneSail.INDEXEDTYPES
, the previous store state is# Store triples: my:subj1 my:text "demo 1" . my:subj2 my:oftype my:type1 . my:subj2 my:text "demo 2" . # Lucene Indexed literals: my:subj2 "demo 2"
The option will define how the Sail will handle the update:
INSERT my:subj1 my:oftype my:type1 . DELETE my:subj2 my:oftype my:type1 .
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPLETE
The sail will get all previous triples of the subject and add them (if required) in the Lucene index, this mode is enabled by default.PARTIAL
The sail won't get any previous triples of the subject in the Lucene index, this mode is useful if you won't change the type and values of your subjects in multiple queries.
-
Field Summary
Fields Modifier and Type Field Description static TypeBacktraceMode
DEFAULT_TYPE_BACKTRACE_MODE
Default backtrace mode
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shouldBackTraceDelete()
boolean
shouldBackTraceInsert()
static TypeBacktraceMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static TypeBacktraceMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COMPLETE
public static final TypeBacktraceMode COMPLETE
The sail will get all previous triples of the subject and add them (if required) in the Lucene index, this mode is enabled by default.the future state of the Lucene index in the above example would be:
my:subj1 "demo 1"
-
PARTIAL
public static final TypeBacktraceMode PARTIAL
The sail won't get any previous triples of the subject in the Lucene index, this mode is useful if you won't change the type and values of your subjects in multiple queries.the future state of the Lucene index in the above example would be:
my:subj2 "demo 2"
-
-
Field Detail
-
DEFAULT_TYPE_BACKTRACE_MODE
public static final TypeBacktraceMode DEFAULT_TYPE_BACKTRACE_MODE
Default backtrace mode
-
-
Method Detail
-
values
public static TypeBacktraceMode[] 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 (TypeBacktraceMode c : TypeBacktraceMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeBacktraceMode valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
shouldBackTraceInsert
public boolean shouldBackTraceInsert()
- Returns:
- if the index should backtrace over the old properties on an add
-
shouldBackTraceDelete
public boolean shouldBackTraceDelete()
- Returns:
- if the index should backtrace over the old properties on a delete
-
-