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 the LuceneSail should handle the add of a new type statement in a connection if the LuceneSail.INDEXEDTYPES property is defined.

Backtrace example

For example if we have the predicate my:text indexed by Lucene and (my:oftype my:type1) as an LuceneSail.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 Details

    • 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 Details

    • DEFAULT_TYPE_BACKTRACE_MODE

      public static final TypeBacktraceMode DEFAULT_TYPE_BACKTRACE_MODE
      Default backtrace mode
  • Method Details

    • values

      public static TypeBacktraceMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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 name
      NullPointerException - 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