fedora.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, cwilper@cs.cornell.edu

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
static int INDEX_LEVEL_PERMUTATIONS
          Equivalent to INDEX_LEVEL_ON plus the indexing of the various permutations of a representation (i.e.
 
Method Summary
 void addBDefObject(BDefReader reader)
          Adds a behavior definition object.
 void addBMechObject(BMechReader reader)
          Adds a behavior mechanism object.
 void addDataObject(DOReader reader)
          Adds a data object.
 void deleteBDefObject(BDefReader oldReader)
          Deletes a behavior definition object.
 void deleteBMechObject(BMechReader oldReader)
          Deletes a behavior definition object.
 void deleteDataObject(DOReader oldReader)
          Deletes a behavior definition object.
 void export(java.io.OutputStream out, org.trippi.RDFFormat format)
          Exports all triples in the RI.
 int getIndexLevel()
          Gets the index level of the ResourceIndex.
 void modifyBDefObject(BDefReader oldReader, BDefReader newReader)
          Modifies a behavior definition object.
 void modifyBMechObject(BMechReader oldReader, BMechReader newReader)
          Modifies a behavior mechanism object.
 void modifyDataObject(DOReader oldReader, DOReader newReader)
          Modifies a data 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

INDEX_LEVEL_PERMUTATIONS

static final int INDEX_LEVEL_PERMUTATIONS
Equivalent to INDEX_LEVEL_ON plus the indexing of the various permutations of a representation (i.e. dissemination) given by a fixed parameter list. For example, consider the method, getImage, which requires two parameters, border and format. The range of border's values is on or off; and the range of format's values is jpg or png. There are four possible permutations: 1) getImage?border=on&format=jpg 2) getImage?border=on&format=png 3) getImage?border=off&format=jpg 4) getImage?border=off&format=png At INDEX_LEVEL_ON, only the method name, getImage, would be indexed, and none of the permutations.

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, INDEX_LEVEL_ON, or INDEX_LEVEL_PERMUTATIONS.

addBDefObject

void addBDefObject(BDefReader reader)
                   throws ResourceIndexException
Adds a behavior definition object.

Parameters:
reader - the behavior definition to add.
Throws:
ResourceIndexException - if the operation fails for any reason.

addBMechObject

void addBMechObject(BMechReader reader)
                    throws ResourceIndexException
Adds a behavior mechanism object.

Parameters:
reader - the behavior definition to add.
Throws:
ResourceIndexException - if the operation fails for any reason.

addDataObject

void addDataObject(DOReader reader)
                   throws ResourceIndexException
Adds a data object.

Parameters:
reader - the data object to add.
Throws:
ResourceIndexException - if the operation fails for any reason.

modifyBDefObject

void modifyBDefObject(BDefReader oldReader,
                      BDefReader newReader)
                      throws ResourceIndexException
Modifies a behavior definition object.

Parameters:
oldReader - the original behavior definition.
newReader - the modified behavior definition.
Throws:
ResourceIndexException - if the operation fails for any reason.

modifyBMechObject

void modifyBMechObject(BMechReader oldReader,
                       BMechReader newReader)
                       throws ResourceIndexException
Modifies a behavior mechanism object.

Parameters:
oldReader - the original behavior mechanism.
newReader - the modified behavior mechanism.
Throws:
ResourceIndexException - if the operation fails for any reason.

modifyDataObject

void modifyDataObject(DOReader oldReader,
                      DOReader newReader)
                      throws ResourceIndexException
Modifies a data object.

Parameters:
oldReader - the original data object.
newReader - the modified data object.
Throws:
ResourceIndexException - if the operation fails for any reason.

deleteBDefObject

void deleteBDefObject(BDefReader oldReader)
                      throws ResourceIndexException
Deletes a behavior definition object.

Parameters:
oldReader - the original behavior definition.
Throws:
ResourceIndexException

deleteBMechObject

void deleteBMechObject(BMechReader oldReader)
                       throws ResourceIndexException
Deletes a behavior definition object.

Parameters:
oldReader - the original behavior mechanism.
Throws:
ResourceIndexException

deleteDataObject

void deleteDataObject(DOReader oldReader)
                      throws ResourceIndexException
Deletes a behavior definition object.

Parameters:
oldReader - the original data object.
Throws:
ResourceIndexException

export

void export(java.io.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.