Package org.biojava.bio.program.indexdb
Interface IndexStore
-
- All Known Implementing Classes:
BioStore
public interface IndexStore
IndexStoreis an interface for indexing flatfiles according to the OBDA specification. It represents a map of Record instances by a primary ID and any number of Records associated with an ID in some seccondary namespace.- Author:
- Matthew Pocock, Keith James
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Recordget(String id)getreturns a record specified by a primary identifier.Listget(String id, String namespace)getreturns a list ofRecords by searching against the primary identifiers if the namespace argument is equal to the primary namespace or otherwise by searching the secondary namespaces.AnnotationgetMetaData()getMetaDatareturns a data structure which represents an OBDA "config.dat" flatfile indexing configuration file.voidwriteRecord(RAF file, long offset, int length, String id, Map secIDs)writeRecordcreates and writes a newRecord
-
-
-
Method Detail
-
get
Record get(String id) throws BioException
getreturns a record specified by a primary identifier.- Parameters:
id- aStringprimary ID.- Returns:
- a
Record. - Throws:
BioException- if an error occurs or if there is no Record associated with the id
-
get
List get(String id, String namespace) throws BioException
getreturns a list ofRecords by searching against the primary identifiers if the namespace argument is equal to the primary namespace or otherwise by searching the secondary namespaces. The list of Record instances retuned may be empty, but is never null.- Parameters:
id- aStringprimary ID.namespace- aString.- Returns:
- a
ListofRecords. - Throws:
BioException- if an error occurs.
-
getMetaData
Annotation getMetaData()
getMetaDatareturns a data structure which represents an OBDA "config.dat" flatfile indexing configuration file.- Returns:
- an
Annotation.
-
writeRecord
void writeRecord(RAF file, long offset, int length, String id, Map secIDs)
writeRecordcreates and writes a newRecord- Parameters:
file- aRAFfile.offset- alongbyte offset.length- anintbyte record length.id- aStringprimary ID.secIDs- aMapof primary ID to aListof secondary IDs.
-
-