Java SDO API

The Java SDO API provides the following interfaces:

  • DataObject - A data object
  • DataGraph - An envelope for a graph of DataObjects
  • ChangeSummary - Summary of changes to the DataObjects in a DataGraph. This Java SDO API is of use to Data Access Service providers and is not part of the client Java SDO API.
  • Sequence - A sequence of settings

All of the Java SDO API code samples provided here used in the SDO tutorial and can be tried out with the SDO download.

Java SDO API Code Example: Opening an XML Document and Writing It to Standard Out

XMLDataAccessService das = XMLDataAccessServiceFactory.create(); DataGraph dataGraph = das.load( new File("customers.xml") ); das.save(dataGraph, System.out, null);

Java SDO API Code Example: Modifying an XML Document

XMLDataAccessService das = XMLDataAccessServiceFactory.create(); DataGraph dataGraph = das.load( new File("customers.xml") ); DataObject root = dataGraph.getRootObject(); root.set("customers/customerRecord/id", "56789"); root.set("customers/customerRecord/name/first/text.0", "Lolly"); root.set("customers/customerRecord/name/last/text.0", "Lamore"); das.save(dataGraph, System.out, null); das.save(dataGraph, new File("customersRevised.xml"));

Java SDO API Code Example: Modifying the Number of Elements in an XML Document

root.set("customers/customerRecord/telephone/number.0/text.0", "(111) 222 3333"); root.set("customers/customerRecord/telephone/number[2]/text.0", "(444) 555 6666"); DataObject telephone = root.getDataObject("customers/customerRecord/telephone"); telephone.set("number.0/text.0", "(111) 222 3333"); telephone.set("number[2]/text.0", "(444) 555 6666");

Java SDO API Code Example: Deleting Data

DataObject name = root.getDataObject("customers/customerRecord/name"); name.unset("first"); List numberList = telephone.getList("number"); DataObject numberToRemove = (DataObject) numberList.get(0); numberToRemove.delete();

Download HydraSDO

HydraSDO for Databases, Java Edition is a pure Java version and comes with the Java SDO API. A later edition will provide a combined Java/C++ version that offers both the Java SDO API and C++ SDO API.

Platform Installer Filename
Windows Windows Installer hydra_sdo-db_java-edition_1_0_0-windows.exe
Linux Linux Installer hydra_sdo-db_java-edition_1_0_0-linux.bin

You will need a license key to evaluate the current version of HydraSDO. Earlier HydraSDO license keys are not valid. If you do not have a license key, you can request one be automatically emailed to you from the HydraSDO Evaluation License Key page. If your organization already has full, unrestricted deployment licenses for HydraSDO, please contact sales@roguewave.com for assistance.

My Account
© 2002-2008 Copyright Rogue Wave Software, Inc. All Rights Reserved.