public class ResourceIndexModule extends Module implements ResourceIndex
ResourceIndex as a configurable module.Constants.FedoraHomeINDEX_LEVEL_OFF, INDEX_LEVEL_ONACCESS, ACTION, API, ATOM_APIM1_0, ATOM_ZIP1_1, ATOM1_1, AUDIT, AUDIT1_0, BATCH_MODIFY, BATCH_MODIFY1_1, BE_SECURITY, BE_SECURITY1_0, BINDING_SPEC, DATASTREAM, DC, DISSEMINATOR, DS_COMPOSITE_MODEL, DS_COMPOSITE_MODEL1_0, DS_INPUT_SPEC1_0, DS_INPUT_SPEC1_1, ENVIRONMENT, FCFG, FEDORA, FEDORA_APP_CONTEXT_NAME, FEDORA_DEFAULT_APP_CONTEXT, FEDORA_HOME, FEDORA_REPOSITORY_PID, FOXML, FOXML1_0, FOXML1_0_LEGACY, FOXML1_1, HTTP_REQUEST, MANAGEMENT, METHOD_MAP, METS, METS_EXT, METS_EXT1_0, METS_EXT1_0_LEGACY, METS_EXT1_1, MODEL, MULGARA, OAI_DC, OAI_DC2_0, OAI_FRIENDS, OAI_FRIENDS2_0, OAI_IDENTIFIER, OAI_IDENTIFIER2_0, OAI_PMH, OAI_PMH2_0, OAI_PROV, OAI_PROV2_0, OBJ_DATASTREAMS1_0, OBJ_HISTORY1_0, OBJ_ITEMS1_0, OBJ_METHODS1_0, OBJ_PROFILE1_0, OBJ_VALIDATION1_0, OBJECT, OLD_XLINK, PID_LIST1_0, RDF, RDF_XSD, RECOVERY, RELS_EXT, RELS_EXT1_0, RELS_INT1_0, REPO_DESC1_0, RESOURCE, SDEF, SDEF_METHOD_MAP1_0, SDEP, SDEP_METHOD_MAP1_0, SDEP_METHOD_MAP1_1, SERVICE_PROFILE, SOAP, SOAP_ENC, SUBJECT, TYPES, VIEW, WSDL, WSDL_HTTP, WSDL_MIME, XACML_POLICY, XACML_POLICY1_0, XACML1, XACML1_ACTION, XACML1_POLICY, XACML1_RESOURCE, XACML1_SUBJECT, XACML2_POLICY_SCHEMA, XLINK, XML_XSD, XMLNS, XSI| Constructor and Description |
|---|
ResourceIndexModule(Map<String,String> parameters,
Server server,
String role)
Instantiate the module.
|
| 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.
|
void |
initModule()
Perform post-initialization of this module.
|
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) |
void |
shutdownModule()
Shutdown the RI module by closing the wrapped ResourceIndex.
|
getRole, getServer, postInitModulegetHelp, getOptionalParameters, getParameterHelp, getRequiredModuleRoles, getRequiredParametersgetParameter, getParameter, getParameter, getParameterList, getParameters, getParameters, parameterNames, setParameter, setParameters, setParameterspublic ResourceIndexModule(Map<String,String> parameters, Server server, String role) throws ModuleInitializationException
ModuleInitializationExceptionpublic void initModule()
throws ModuleInitializationException
INDEX_LEVEL_OFF, and INDEX_LEVEL_ON.
initModule in class ModuleModuleInitializationException - If initialization values are invalid or initialization fails for
some other reason.public void shutdownModule()
throws ModuleShutdownException
shutdownModule in class ModuleModuleShutdownException - if any error occurs while closing.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.