[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [sdo] [SDO-6]: Reference properties and JAXB 2.0
Omar Halaseh: These are comments from Blaise Doughan: "JAXB 2.0 (Referential Integrity, page 226) describes two possible strategies for marshalling referenced properties:" While the JAXB 2.0 spec does offer two options (page 224 on the latest version of the spec). As a member of the JAXB 2.0 expert group I can say that it is currently expected that all relationships for a property be of the same type (all containment or all reference). Relationships are containment by default and the @XMLID & @XMLIDRef annotations can be used to make the relationships by reference. — "To have closure, the first option forces you to have these referenced objects contained in some root data object in schema. This is a requirement in XML only, and its not required in the object representation in Java as referenced objects are treated just like contained objects from an object access point of view." While Java does not make a distinction between references and contained objects, SDO does. SDO properties are explicity reference or containment based on the "isContainment" property. Changes would need to be made to Property to have it act as both containment and reference. — "<xsd:complexType name="Line" Type="Line"> <xsd:sequence> <xsd:element name="ID" type="xsd:int"> <xsd:element name="Buyer" type="BuyerType" sdo:marshalReferenceInPlace=true/> </xsd:sequence> </xsd:complexType>" If this is the XML Schema then the "Buyer" element will need to specify the nodes defined in "BuyerType". It won't be possbile to just replace the expected "Buyer" element with <Buyer sdo:ref="456"/>. Changes would need to be made to the XML Schema. This would impact XSDHelper and XMLHelper. Steve Brodsky: People who start with XSD will not be able to understand documents with behavior that has object reference serialization rules. Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]