Information Technology Reference
In-Depth Information
A DataObject has a relatively simple structure. It consists only of a set of proper-
ties (properties are either “primitives” or references to other DataObjects in the data
graph). The properties are exposed through “getters” and “setters.” Applications can
access DataObjects by navigating through the data graph or by using accessors with
an XPath syntax [44] .
Data graphs may include an XML schema [43] that describes the structure of its
DataObjects. Depending on whether or not the schema was known to the application
developers, applications can access DataObjects in one of two styles: “static” (known
schema) and “dynamic” (unknown schema). The static style allows tools to generate
typed interfaces to the DataObjects and can potentially improve performance since
the DAS can optimize access for a known type. The dynamic style further decouples
application developers from the data used in the application, but at the expense of a
generic interface to the DataObjects.
We implemented a subset of order entry using SDOs in order to illustrate the
current state of SDO programming. This sample was built and tested using Eclipse
3.02, and SDO EMF Tools version 2.0.1 [38] .
Since the current Eclipse SDO support does not provide any DAS implemen-
tations, we create the OrderEntry data graph manually using EMF-specific APIs
( Sample 1 ). The remainder of the example uses only the APIs of the SDO 1.0 speci-
fication [36] .
OrderEntry is the “root” DataObject for order entry .Ifa DataGraph API were
used, OrderEntry would be returned by DataGraph.getRootObject() .All
the “entity” DataObjects from order entry are created as contained DataObjects un-
der OrderEntry.
Sample 2 shows the creation of a Agent DataObject contained within OrderEntry.
Note that currently no Java interface is generated which extends both DataObject and
OrderentryFactoryImpl oeFactory = new OrderentryFactoryImpl();
OrderEntry orderEntry = oeFactory.createOrderEntry();
S AMPLE 1. Create root DataObject OrderEntry.
DataObject orderEntryDO = (DataObject) orderEntry;
DataObject agentAsDO = orderEntryDO.createDataObject("agents");
S AMPLE 2. Create Agent DataObject.
Search WWH ::




Custom Search