org.fcrepo.server.resourceIndex
Interface ResourceIndex

All Superinterfaces:
org.trippi.TriplestoreReader, org.trippi.TriplestoreWriter
All Known Implementing Classes:
ResourceIndexImpl, ResourceIndexModule

public interface ResourceIndex
extends org.trippi.TriplestoreWriter

The main interface to the Fedora Resource Index. The Resource Index (RI) provides read/write access to an RDF representation of all objects in the Fedora repository. The information stored in the RI is derived solely from information stored within the digital objects.

Author:
Edwin Shin, Chris Wilper

Field Summary
static int INDEX_LEVEL_OFF
          At this level, the ResourceIndex will not index anything.
static int INDEX_LEVEL_ON
          At this level the ResourceIndex will index: object properties datastreams intra-object dependencies
 
Method Summary
 void addObject(DOReader reader)
          Adds the appripriate triples implied by the given object to the ResourceIndex.
 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.
 int getIndexLevel()
          Gets the index level of the ResourceIndex.
 void modifyObject(DOReader oldReader, DOReader newReader)
          Updates any appropriate triples implied a modified object.
 
Methods inherited from interface org.trippi.TriplestoreWriter
add, add, add, delete, delete, delete, findBufferedUpdates, flushBuffer, getBufferSize, setFlushErrorHandler
 
Methods inherited from interface org.trippi.TriplestoreReader
close, countTriples, countTriples, countTriples, countTuples, findTriples, findTriples, findTriples, findTuples, getAliasMap, listTripleLanguages, listTupleLanguages, setAliasMap
 

Field Detail

INDEX_LEVEL_OFF

static final int INDEX_LEVEL_OFF
At this level, the ResourceIndex will not index anything.

See Also:
Constant Field Values

INDEX_LEVEL_ON

static final int INDEX_LEVEL_ON
At this level the ResourceIndex will index: object properties datastreams intra-object dependencies

See Also:
Constant Field Values
Method Detail

getIndexLevel

int getIndexLevel()
Gets the index level of the ResourceIndex.

Returns:
the current index level of the RI, which is either INDEX_LEVEL_OFF or INDEX_LEVEL_ON.

addObject

void addObject(DOReader reader)
               throws ResourceIndexException
Adds the appripriate triples implied by the given object to the ResourceIndex.

Parameters:
reader - The given object to index.
Throws:
ResourceIndexException - If the triples can't be added for any reason.

modifyObject

void modifyObject(DOReader oldReader,
                  DOReader newReader)
                  throws ResourceIndexException
Updates any appropriate triples implied a modified object.

Parameters:
oldReader - Pre-modification version of the oject.
newReader - Post-modification version of the object.
Throws:
ResourceIndexException - If the triples can't be updated for any reason.

deleteObject

void deleteObject(DOReader oldReader)
                  throws ResourceIndexException
Removes the triples implied by a given object from the ResourceIndex.

Parameters:
oldReader - Object whose triples shall be removed from the index.
Throws:
ResourceIndexException - If the triples can't be removed for any reason.

export

void export(OutputStream out,
            org.trippi.RDFFormat format)
            throws ResourceIndexException
Exports all triples in the RI.

Parameters:
out - 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).
Throws:
ResourceIndexException - if triples in the RI cannot be serialized for any reason.


Copyright © 2011 DuraSpace. All Rights Reserved.