Package org.biojava.bio.program.indexdb
Interface IndexStore
- All Known Implementing Classes:
BioStore
public interface IndexStore
IndexStore is 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
Modifier and TypeMethodDescriptiongetreturns a record specified by a primary identifier.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.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 Details
-
get
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
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
getMetaDatareturns a data structure which represents an OBDA "config.dat" flatfile indexing configuration file.- Returns:
- an
Annotation.
-
writeRecord
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.
-