[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: AW: [sdo] ISSUE 124: Another attempt
Hi Christophe,
The first part of your question is maybe something
that should be addressed in the JSR 235 group, it seems to be unclear in the
spec. I would have expected that the object provided by the user is the
data graph's root object (or the child of the root object, if you consider the
wrapper supplied by data graph). I would have expected the business
root is contained by the DataGraph, effectively detached from your node
"1".
Whether "1" should be serialized is somewhat orthogonal to
the rest of the discussion. I would say that 3.0 should be consistent with
2.1.1.
For the orphan object, yes, this is exactly what I am
saying. The actually "orphan" is node "5". Node "7" is serialized
only as a part of serializing node "5".
Ron Von: Christophe Boutard [mailto:christophe.boutard@xcalia.com] Gesendet: Mittwoch, 7. Mai 2008 09:12 An: Barack, Ron; sdo@lists.oasis-open.org Betreff: RE: [sdo] ISSUE 124: Another attempt HI Ron, everyone, First of all your proposal sounds good to
us. I’ve added a picture to this email in order
to be sure of the expected behavior when you pack objects into a data
graph. So here is the
scenario: I would like to pack my data into a data
graph and the object provided by the user is “2”. I expect that “1” will be considered as the
business root because it is the container of “2”. Then “4” will be added to the orphans
list. It should be the same for “5” even if the
referenced object is “7”. The thing is that “7” is referenced by containment and
should not be considered as orphan. In that case we have to retrieve the first
object without container and mark it as orphan. In our case it is
“5”. I hope everything is
clear… Thanks, --Christophe De : Barack, Ron
[mailto:ron.barack@sap.com] 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
) ________
____________________
<xsd:complexType
name="BaseDataGraphType" abstract="true"> ______________________
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]