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 Type
    Method
    Description
    get(String id)
    get returns a record specified by a primary identifier.
    get(String id, String namespace)
    get returns a list of Records by searching against the primary identifiers if the namespace argument is equal to the primary namespace or otherwise by searching the secondary namespaces.
    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 new Record
  • Method Details

    • get

      get returns a record specified by a primary identifier.
      Parameters:
      id - a String 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 of Records 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 - a String primary ID.
      namespace - a String.
      Returns:
      a List of Records.
      Throws:
      BioException - if an error occurs.
    • 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 new Record
      Parameters:
      file - a RAF file.
      offset - a long byte offset.
      length - an int byte record length.
      id - a String primary ID.
      secIDs - a Map of primary ID to a List of secondary IDs.