Interface MDBService

All Superinterfaces:
loci.common.services.Service
All Known Implementing Classes:
MDBServiceImpl

public interface MDBService extends loci.common.services.Service
Interface defining methods for parsing MDB database files.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the currently initialized file.
    void
    initialize(String filename)
    Prepare the given .mdb file for reading.
    Read all tables from a pre-initialized .mdb files.
    default Vector<String[]>
    Read named table from a pre-initialized .mdb files.
  • Method Details

    • initialize

      void initialize(String filename) throws IOException
      Prepare the given .mdb file for reading. This method must be called before parseDatabase().
      Throws:
      IOException - if a problem occurs when opening the file
    • parseDatabase

      Vector<Vector<String[]>> parseDatabase() throws IOException
      Read all tables from a pre-initialized .mdb files. Each Vector<String[]> in the outer Vector represents a table; each String[] in a table represents a row, and each element of the String[] represents the value of a particular column within the row. The first row in each table contains the names for each column. The first entry in the column name row is the name of the table. initialize(String) must be called before calling parseDatabase().
      Throws:
      IOException - if there is a problem reading the table data
    • parseTable

      default Vector<String[]> parseTable(String name) throws IOException
      Read named table from a pre-initialized .mdb files. Each String[] in a table represents a row, and each element of the String[] represents the value of a particular column within the row. The first row in the table contains the names for each column. initialize(String) must be called before calling parseTable.
      Parameters:
      name - table name
      Returns:
      table data or null if the named table does not exist
      Throws:
      IOException - if there is a problem reading the table data
    • close

      void close()
      Close the currently initialized file.