Enum Class IndexingStrategy

java.lang.Object
java.lang.Enum<IndexingStrategy>
org.apache.jena.mem.IndexingStrategy
All Implemented Interfaces:
Serializable, Comparable<IndexingStrategy>, Constable

public enum IndexingStrategy extends Enum<IndexingStrategy>
An enumeration that represents different indexing strategies for a graph. The indexing strategy determines how triples are indexed to support pattern matching. It is assumed that the graph contains a set of triples, and all operations that do not involve pattern matching are performed directly on this set, not on the indices.
Pattern matching refers to operations like Graph.find(org.apache.jena.graph.Triple), Graph.remove(org.apache.jena.graph.Node, org.apache.jena.graph.Node, org.apache.jena.graph.Node) or Graph.contains(org.apache.jena.graph.Node, org.apache.jena.graph.Node, org.apache.jena.graph.Node) that may take a triple pattern as argument, such as "S__", "SP_", "S_O", "_P_", "_PO", or "__O", instead of a concrete triple "SPO". In the case of a concrete triple these operations should be performed directly on the set of triples and not rely on the indices.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Starts with an index as any other in-memory graph.
    Starts with no index and builds it on demand when pattern matches are requested.
    Starts with no index and builds it on demand when pattern matches are requested.
    Starts with no index and throws an exception if a pattern match is requested, but the index has not been initialized manually yet.
    Starts with no index and uses filtering on the triple set, as long as the index has not been initialized.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • EAGER

      public static final IndexingStrategy EAGER
      Starts with an index as any other in-memory graph. Graph.add(org.apache.jena.graph.Triple), Graph.delete(org.apache.jena.graph.Triple) and Graph.clear() update the index immediately. Clearing the index just rebuilds it from the set of triples.
    • LAZY

      public static final IndexingStrategy LAZY
      Starts with no index and builds it on demand when pattern matches are requested. After initialization, the index behaves like EAGER. Index may be cleared manually, then it is rebuilt on demand.
    • LAZY_PARALLEL

      public static final IndexingStrategy LAZY_PARALLEL
      Starts with no index and builds it on demand when pattern matches are requested. After initialization, the index behaves like EAGER. Index may be cleared manually, then it is rebuilt on demand. This strategy uses parallel processing to build the index.
    • MANUAL

      public static final IndexingStrategy MANUAL
      Starts with no index and throws an exception if a pattern match is requested, but the index has not been initialized manually yet. After initialization, the index behaves like EAGER. Index may be cleared manually, then it has to be initialized again manually.
    • MINIMAL

      public static final IndexingStrategy MINIMAL
      Starts with no index and uses filtering on the triple set, as long as the index has not been initialized. After initialization, the index behaves like EAGER. Index may be cleared manually, then filtering is used again until the index is initialized again.
  • Method Details

    • values

      public static IndexingStrategy[] 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 IndexingStrategy 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