org.aksw.commons.graph
Interface ITripleCacheIndex

All Known Implementing Classes:
TripleCacheIndexImpl

public interface ITripleCacheIndex


Method Summary
 void addSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
          Addes triples to the cache.
 void clear()
           
 IndexCompatibilityLevel getCompatibilityLevel(int[] columnIds)
           
 IndexCompatibilityLevel getCompatibilityLevel(com.hp.hpl.jena.graph.Triple pattern)
          Deprecated. 
 IGraph getGraph()
           
 int[] getKeyColumns()
          Returns the "columns" that are indexed - columns correspond to 0 = subject, 1 = predicate, 2 = object
 CacheState getState()
           
 int[] getValueColumns()
          Returns the "columns" for which values are provided by this index
 void index(Collection<com.hp.hpl.jena.graph.Triple> triples)
          Indexes the triples.
 Collection<com.hp.hpl.jena.graph.Triple> lookup(List<Object> key)
          Retrieves and caches data for the given triple patterns.
 void registerMisses(Set<List<Object>> keys)
           
 void removeSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
          Methods which are used to notify the index about new triples
 

Method Detail

getGraph

IGraph getGraph()

index

void index(Collection<com.hp.hpl.jena.graph.Triple> triples)
Indexes the triples. Completeness of the partitions is assumed.

Parameters:
triples -

registerMisses

void registerMisses(Set<List<Object>> keys)

addSeen

void addSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
Addes triples to the cache. The level indicates whether new index partitions created from these triples are incomplete (so there might be more triples in the underlying graph, which have not been touched so far), or complete.

Parameters:
triples -
level -

removeSeen

void removeSeen(Collection<com.hp.hpl.jena.graph.Triple> triples)
Methods which are used to notify the index about new triples

Parameters:
triples -

getCompatibilityLevel

@Deprecated
IndexCompatibilityLevel getCompatibilityLevel(com.hp.hpl.jena.graph.Triple pattern)
Deprecated. 

Returns the compatibility level for a given pattern

Parameters:
triple -
Returns:

getCompatibilityLevel

IndexCompatibilityLevel getCompatibilityLevel(int[] columnIds)

getKeyColumns

int[] getKeyColumns()
Returns the "columns" that are indexed - columns correspond to 0 = subject, 1 = predicate, 2 = object

Returns:

getValueColumns

int[] getValueColumns()
Returns the "columns" for which values are provided by this index

Returns:

lookup

Collection<com.hp.hpl.jena.graph.Triple> lookup(List<Object> key)
Retrieves and caches data for the given triple patterns. All triple patterns must be compatible with the index.

Parameters:
triple -
Returns:

clear

void clear()

getState

CacheState getState()


Copyright © 2012. All Rights Reserved.