Class QueryRewriteIndex

java.lang.Object
org.apache.jena.geosparql.implementation.index.QueryRewriteIndex

public class QueryRewriteIndex extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Symbol
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    QueryRewriteIndex(String queryRewriteLabel, int maxSize, long expiryInterval)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Empty the index.
    static final QueryRewriteIndex
    Create QueryRewriteIndex using the default global settings.
    final long
     
    boolean
     
    static final void
    prepare(Dataset dataset)
    Prepare a Dataset with the default QueryRewriteIndex settings.
    static final void
    prepare(Dataset dataset, String queryRewriteLabel, int maxSize, long expiryInterval)
    Prepare a Dataset with the provided QueryRewriteIndex settings.
    void
    reset(int maxSize, long expiryInterval)
    Reset the index to the provided max size and expiry interval.
    All contents will be lost.
    static final QueryRewriteIndex
    retrieve(Dataset dataset)
    Retrieve the QueryRewriteIndex from the Dataset Context.
    If no index has been setup then QueryRewriteIndex is created.
    static final QueryRewriteIndex
    Retrieve the QueryRewriteIndex from the Context.
    If no index has been setup then QueryRewriteIndex is created.
    static final QueryRewriteIndex
    retrieve(Context context)
    Retrieve the QueryRewriteIndex from the Dataset Context.
    If no index has been setup then QueryRewriteIndex is created.
    final void
    setActive(boolean indexActive)
    Sets whether the index is active.
    static final void
    setExpiry(long mapExpiryIntervalDefault)
    Set the maximum default expiry interval in millisecond of QueryRewriteIndexes.
    static final void
    setMaxSize(int mapSizeDefault)
    Set the maximum default size of QueryRewriteIndexes.
    final Boolean
    test(Node subjectGeometryLiteral, Node predicate, Node objectGeometryLiteral, GenericPropertyFunction propertyFunction)
     
    Converts the index to a model of asserted spatial relation statements.
    static final Dataset
    Wrap Model in a Dataset and include QueryRewriteIndex.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • QUERY_REWRITE_INDEX_SYMBOL

      public static final Symbol QUERY_REWRITE_INDEX_SYMBOL
  • Constructor Details

    • QueryRewriteIndex

      public QueryRewriteIndex()
    • QueryRewriteIndex

      public QueryRewriteIndex(String queryRewriteLabel, int maxSize, long expiryInterval)
  • Method Details

    • test

      public final Boolean test(Node subjectGeometryLiteral, Node predicate, Node objectGeometryLiteral, GenericPropertyFunction propertyFunction)
      Parameters:
      subjectGeometryLiteral -
      predicate -
      objectGeometryLiteral -
      propertyFunction -
      Returns:
      Result of relation between subject and object.
    • clear

      public final void clear()
      Empty the index.
    • isIndexActive

      public boolean isIndexActive()
      Returns:
      True if index is active.
    • toModel

      public Model toModel()
      Converts the index to a model of asserted spatial relation statements.
      Returns:
      Model containing all true assertions.
    • setActive

      public final void setActive(boolean indexActive)
      Sets whether the index is active.
      Parameters:
      indexActive -
    • getIndexSize

      public final long getIndexSize()
      Returns:
      Number of items in the index.
    • reset

      public void reset(int maxSize, long expiryInterval)
      Reset the index to the provided max size and expiry interval.
      All contents will be lost.
      Parameters:
      maxSize - Maximum size
      expiryInterval - Expiry interval
    • setMaxSize

      public static final void setMaxSize(int mapSizeDefault)
      Set the maximum default size of QueryRewriteIndexes. -1 for no limit, 0 for no storage.
      Parameters:
      mapSizeDefault -
    • setExpiry

      public static final void setExpiry(long mapExpiryIntervalDefault)
      Set the maximum default expiry interval in millisecond of QueryRewriteIndexes. 0 for no expiry.
      Parameters:
      mapExpiryIntervalDefault -
    • createDefault

      public static final QueryRewriteIndex createDefault()
      Create QueryRewriteIndex using the default global settings.
      Returns:
      Query Rewrite Index using default global settings.
    • prepare

      public static final void prepare(Dataset dataset)
      Prepare a Dataset with the default QueryRewriteIndex settings.
      Parameters:
      dataset -
    • prepare

      public static final void prepare(Dataset dataset, String queryRewriteLabel, int maxSize, long expiryInterval)
      Prepare a Dataset with the provided QueryRewriteIndex settings.
      Parameters:
      dataset -
      queryRewriteLabel -
      maxSize -
      expiryInterval -
    • retrieve

      public static final QueryRewriteIndex retrieve(ExecutionContext execCxt)
      Retrieve the QueryRewriteIndex from the Context.
      If no index has been setup then QueryRewriteIndex is created.
      Parameters:
      execCxt -
      Returns:
      QueryRewriteIndex contained in the Context.
    • retrieve

      public static final QueryRewriteIndex retrieve(Dataset dataset)
      Retrieve the QueryRewriteIndex from the Dataset Context.
      If no index has been setup then QueryRewriteIndex is created.
      Parameters:
      dataset -
      Returns:
      QueryRewriteIndex contained in the Context.
    • retrieve

      public static final QueryRewriteIndex retrieve(Context context)
      Retrieve the QueryRewriteIndex from the Dataset Context.
      If no index has been setup then QueryRewriteIndex is created.
      Parameters:
      context -
      Returns:
      QueryRewriteIndex contained in the Context.
    • wrapModel

      public static final Dataset wrapModel(Model model)
      Wrap Model in a Dataset and include QueryRewriteIndex.
      Parameters:
      model -
      Returns:
      Dataset with default Model and QueryRewriteIndex in Context.