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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Record
get(String id)
get
returns a record specified by a primary identifier.List
get(String id, String namespace)
get
returns a list ofRecord
s by searching against the primary identifiers if the namespace argument is equal to the primary namespace or otherwise by searching the secondary namespaces.Annotation
getMetaData()
getMetaData
returns a data structure which represents an OBDA "config.dat" flatfile indexing configuration file.void
writeRecord(RAF file, long offset, int length, String id, Map secIDs)
writeRecord
creates and writes a newRecord
-
-
-
Method Detail
-
get
Record get(String id) throws BioException
get
returns a record specified by a primary identifier.- Parameters:
id
- aString
primary 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
get
returns a list ofRecord
s 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
- aString
primary ID.namespace
- aString
.- Returns:
- a
List
ofRecord
s. - Throws:
BioException
- if an error occurs.
-
getMetaData
Annotation getMetaData()
getMetaData
returns 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)
writeRecord
creates and writes a newRecord
- Parameters:
file
- aRAF
file.offset
- along
byte offset.length
- anint
byte record length.id
- aString
primary ID.secIDs
- aMap
of primary ID to aList
of secondary IDs.
-
-