OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

sdo message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: ISSUE 124: Another attempt

Title: ISSUE 124: Another attempt

Hi Everyone,

In Tuesday's call there seemed to be some consensus that performing a XMLHelper.save() operation using a {commonj.sdo}DataGraph as an argument should never throw a GraphNotClosed exception.  That is, DataGraph should act as a technical root, and any orphans referenced but not contained in the DataGraph’s business root should be serialized as children of the DataGraph.

I've been looking at trying to make a proposal out of this.  It seems to me the most natural place to describe this behavior is in Chapter 12, which deals specifically with the XML serialization of DataGraphs.

I would like to add the following paragraph at line 3424 (based on the word document http://www.oasis-open.org/apps/org/workgroup/sdo/download.php/26863/OASIS%20SDO%20For%20Java%20Spec.doc )

The serialization of a DataGraph, whether invoked through a DAS or java.io.Serializable or in a Web service, includes the transitive closure of all DataObjects reachable from the DataGraph’s root object, whether or not the DataObject are contained, directly or indirectly, by the root DataObject.  DataObjects that are referenced but not contained must be included in the “orphan” elements that are part of the DataGraphs XML representation.  Each “orphan” element is serialized as part of the containment tree in which it is located, and any DataObjects referenced but not contained in this tree must also be included among the DataGraph’s orphans, so that the transitive closure is obtained.  References to orphaned DataObjects follow the normal rules of XML serialization.  The serialization of a DataGraph never throws an exception because the graph is not closed.

The XSD at the end of the chapter would also need to be modified:


Another small change will have to be made around line 3407, but this is mainly editorial, and can be left to the editors.


You might notice in the above text that not only is the orphaned DataObject itself serialized, but also the complete containment tree in which the object is located.  I think this is necessary: first of all, because an object reachable through getContainer() is non-the-less reachable, and otherwise we don't really have transitive closure.  More pragmatically, I think it will otherwise be very difficult to create the URIs that reference the objects in any efficient manner…suppose the reference to a leaf is found first, then later a reference to the root.

Of course, I'd agree to this proposal as a compromise, but I do want to point out what we are losing by declaring this functionality on DataGraph, rather than creating a new kind of property, which DataGraph happens to have.  With this proposal, DataGraph contains ChangeSummary, XSD, the business object, and now orphans,  If we want to create a new type of container, eg, with only orphans, we cannot do it.  The functionality is specific to DataGraph.  It seems to me allowing users to define such types is not a bad thing.  Effectively, that is the only difference between last week's proposal and this one.

Best Regards,

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]