public class ResourceIndexImpl extends Object implements ResourceIndex
ResourceIndex.INDEX_LEVEL_OFF, INDEX_LEVEL_ON| Constructor and Description |
|---|
ResourceIndexImpl(org.trippi.TriplestoreConnector connector,
TripleGenerator generator,
int indexLevel,
boolean syncUpdates) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(List<org.jrdf.graph.Triple> triples,
boolean flush) |
void |
add(org.jrdf.graph.Triple triple,
boolean flush) |
void |
add(org.trippi.TripleIterator triples,
boolean flush) |
void |
addObject(DOReader reader)
Adds the appripriate triples implied by the given object to the
ResourceIndex.
|
void |
close() |
int |
countTriples(String queryLang,
String tripleQuery,
int limit,
boolean distinct) |
int |
countTriples(String queryLang,
String tupleQuery,
String tripleTemplate,
int limit,
boolean distinct) |
int |
countTriples(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object,
int limit) |
int |
countTuples(String queryLang,
String tupleQuery,
int limit,
boolean distinct) |
void |
delete(List<org.jrdf.graph.Triple> triples,
boolean flush) |
void |
delete(org.jrdf.graph.Triple triple,
boolean flush) |
void |
delete(org.trippi.TripleIterator triples,
boolean flush) |
void |
deleteObject(DOReader oldReader)
Removes the triples implied by a given object from the ResourceIndex.
|
void |
export(OutputStream out,
org.trippi.RDFFormat format)
Exports all triples in the RI.
|
List<org.trippi.TripleUpdate> |
findBufferedUpdates(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object,
int updateType) |
org.trippi.TripleIterator |
findTriples(String queryLang,
String tripleQuery,
int limit,
boolean distinct) |
org.trippi.TripleIterator |
findTriples(String queryLang,
String tupleQuery,
String tripleTemplate,
int limit,
boolean distinct) |
org.trippi.TripleIterator |
findTriples(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object,
int limit) |
org.trippi.TupleIterator |
findTuples(String queryLang,
String tupleQuery,
int limit,
boolean distinct) |
void |
flushBuffer() |
Map<String,String> |
getAliasMap() |
int |
getBufferSize() |
int |
getIndexLevel()
Gets the index level of the ResourceIndex.
|
String[] |
listTripleLanguages() |
String[] |
listTupleLanguages() |
void |
modifyObject(DOReader oldReader,
DOReader newReader)
Updates any appropriate triples implied a modified object.
|
void |
setAliasMap(Map<String,String> aliasToPrefix) |
void |
setFlushErrorHandler(org.trippi.FlushErrorHandler h) |
public ResourceIndexImpl(org.trippi.TriplestoreConnector connector,
TripleGenerator generator,
int indexLevel,
boolean syncUpdates)
public int getIndexLevel()
getIndexLevel in interface ResourceIndexpublic void addObject(DOReader reader) throws ResourceIndexException
addObject in interface ResourceIndexreader - The given object to index.ResourceIndexException - If the triples can't be added for any reason.public void modifyObject(DOReader oldReader, DOReader newReader) throws ResourceIndexException
modifyObject in interface ResourceIndexoldReader - Pre-modification version of the oject.newReader - Post-modification version of the object.ResourceIndexException - If the triples can't be updated for any reason.public void deleteObject(DOReader oldReader) throws ResourceIndexException
deleteObject in interface ResourceIndexoldReader - Object whose triples shall be removed from the index.ResourceIndexException - If the triples can't be removed for any reason.public void export(OutputStream out, org.trippi.RDFFormat format) throws ResourceIndexException
export in interface ResourceIndexout - the output stream to which the RDF should be written. The caller
is responsible for eventually closing this stream.format - the output format (RDF_XML, TURTLE, N_TRIPLESs, etc).ResourceIndexException - if triples in the RI cannot be serialized for any reason.public void setAliasMap(Map<String,String> aliasToPrefix) throws org.trippi.TrippiException
setAliasMap in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic Map<String,String> getAliasMap() throws org.trippi.TrippiException
getAliasMap in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic org.trippi.TupleIterator findTuples(String queryLang, String tupleQuery, int limit, boolean distinct) throws org.trippi.TrippiException
findTuples in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic int countTuples(String queryLang, String tupleQuery, int limit, boolean distinct) throws org.trippi.TrippiException
countTuples in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic org.trippi.TripleIterator findTriples(String queryLang, String tripleQuery, int limit, boolean distinct) throws org.trippi.TrippiException
findTriples in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic int countTriples(String queryLang, String tripleQuery, int limit, boolean distinct) throws org.trippi.TrippiException
countTriples in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic org.trippi.TripleIterator findTriples(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object,
int limit)
throws org.trippi.TrippiException
findTriples in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic int countTriples(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object,
int limit)
throws org.trippi.TrippiException
countTriples in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic org.trippi.TripleIterator findTriples(String queryLang, String tupleQuery, String tripleTemplate, int limit, boolean distinct) throws org.trippi.TrippiException
findTriples in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic int countTriples(String queryLang, String tupleQuery, String tripleTemplate, int limit, boolean distinct) throws org.trippi.TrippiException
countTriples in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic String[] listTupleLanguages()
listTupleLanguages in interface org.trippi.TriplestoreReaderpublic String[] listTripleLanguages()
listTripleLanguages in interface org.trippi.TriplestoreReaderpublic void close()
throws org.trippi.TrippiException
close in interface org.trippi.TriplestoreReaderorg.trippi.TrippiExceptionpublic void add(List<org.jrdf.graph.Triple> triples, boolean flush) throws IOException, org.trippi.TrippiException
add in interface org.trippi.TriplestoreWriterIOExceptionorg.trippi.TrippiExceptionpublic void add(org.trippi.TripleIterator triples,
boolean flush)
throws IOException,
org.trippi.TrippiException
add in interface org.trippi.TriplestoreWriterIOExceptionorg.trippi.TrippiExceptionpublic void add(org.jrdf.graph.Triple triple,
boolean flush)
throws IOException,
org.trippi.TrippiException
add in interface org.trippi.TriplestoreWriterIOExceptionorg.trippi.TrippiExceptionpublic void delete(List<org.jrdf.graph.Triple> triples, boolean flush) throws IOException, org.trippi.TrippiException
delete in interface org.trippi.TriplestoreWriterIOExceptionorg.trippi.TrippiExceptionpublic void delete(org.trippi.TripleIterator triples,
boolean flush)
throws IOException,
org.trippi.TrippiException
delete in interface org.trippi.TriplestoreWriterIOExceptionorg.trippi.TrippiExceptionpublic void delete(org.jrdf.graph.Triple triple,
boolean flush)
throws IOException,
org.trippi.TrippiException
delete in interface org.trippi.TriplestoreWriterIOExceptionorg.trippi.TrippiExceptionpublic void flushBuffer()
throws IOException,
org.trippi.TrippiException
flushBuffer in interface org.trippi.TriplestoreWriterIOExceptionorg.trippi.TrippiExceptionpublic void setFlushErrorHandler(org.trippi.FlushErrorHandler h)
setFlushErrorHandler in interface org.trippi.TriplestoreWriterpublic int getBufferSize()
getBufferSize in interface org.trippi.TriplestoreWriterpublic List<org.trippi.TripleUpdate> findBufferedUpdates(org.jrdf.graph.SubjectNode subject, org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object, int updateType)
findBufferedUpdates in interface org.trippi.TriplestoreWriterCopyright © 2013 DuraSpace. All Rights Reserved.