|
Ship and ROV Core Datastreams : expd4java
This page last changed on Aug 02, 2010 by brian.
Java LibrariesStandard libraries for providing read-only access to MBARI's Expedition database (EXPD) via Java. Getting the LibrariesMavenThe 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 WayAlternatively, 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:
UsageThe 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); JavadocsRather 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 CodeTo check out the source code use the command svn co svn+ssh://kahuna.shore.mbari.org/svn/repos/expd expd Status
|
| Document generated by Confluence on Feb 04, 2026 08:53 |