This page last changed on Aug 02, 2010 by brian.

Java Libraries

Standard libraries for providing read-only access to MBARI's Expedition database (EXPD) via Java.

Getting the Libraries

Maven

The libraries are hosted on MBARI's internal Maven repository manager. The easiest way to include the library and it's dependencies is to add the following snippet to your pom.xml file in your Maven build.

<dependency>
  <groupId>org.mbari</groupId>
  <artifactId>expd-jdbc</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>

Make sure you've added the MBARI's maven repository, directions are in the link above.

The Hard Way

Alternatively, you can download all the dependencies from Archiva. At the time of writing this you will need to search for and include the following jars in your projecct:

Usage

The code is separated into interfaces and implementations. Here's an example of creating a DAO object for accessing dive info:

import org.mbari.expd.Dive;
import org.mbari.expd.DiveDAO;
import org.mbari.expd.jdbc.DiveDAOImpl;

...

DiveDAO dao = new DiveDAOImpl();
Dive dive = dao.findByPlatformAndDiveNumber("Ventana", 1233);

Alternatively, you can use Guice and inject the dependencies:

import com.google.inject.Guice;
import com.google.inject.Injector;
import org.mbari.expd.Dive;
import org.mbari.expd.DiveDAO;
import org.mbari.expd.jdbc.ExpdModule;

...

Injector injector = Guice.createInjector(new ExpdModule());
DiveDAO dao = injector.getInstance(DiveDAO.class);
Dive dive = dao.findByPlatformAndDiveNumber("Ventana", 1233);

Javadocs

Rather than struggle to keep the javadocs updated and current, your best bet is to check out the source code and run the following Maven command to generate documentation:

mvn javadoc:javadoc

Source Code

To check out the source code use the command

svn co svn+ssh://kahuna.shore.mbari.org/svn/repos/expd expd

Status

  • 2010-01-14 - Created project based on code Brian Schlining was using for VARS merge code. The library is not anywhere near feature complete. But the functions implemented are working and will be used to replace the existing code VARS uses to access EXPD
  • 2010-03-10 - The VARS-REDUX codebase uses this library for all EXPD data access
Document generated by Confluence on Feb 04, 2026 08:53