Re: [sdo] Issue 118 - Proposal for review

From
Blaise Doughan <>
Date
2008-09-08T15:11:33+00:00
ID
Thread
Re: [sdo] Issue 118 - Proposal for review
Here is the proposal that that we discussed in today's TC call:

1. Add the following abstract type to sdoModel.xsd:

  <xsd:complexType name="DataTypeWrapper" abstract="true"/>

2. Users can use this type to determine when a DataObject is a wrapper:

  DataObject someObject = ...
  Type dataTypeWrapperType = typeHelper.getType("commonj.sdo", 
"DataTypeWrapper");
  if (dataTypeWrapperType.isInstance(someObject)) ... // "someObject" is a 
wrapper

The actual type of a wrapper object is implementation dependent, but it 
will always extend from {commonj.sdo}DataTypeWrapper.

Wrapper types are the special implementation-dependant types used to hold 
a simpleType value for an XMLDocument rootObject or for the value of an 
anyType property. Formally defined complexTypes that extend simpleType are 
not considered wrapper types (i.e., they will not extend DataTypeWrapper), 
even though they also have a "value" property. 

Frank.




Frank Budinsky/Toronto/IBM@IBMCA 
08/20/2008 03:51 PM

To

cc

Subject
Re: Fw: [sdo] Issue 118 - Creating wrapper objects for simple types






Hi Blaise,

The two cases that I remember were:

1) reading an anyType property, which maps to sdo:DataObject, but it may 
be just a DataType value.
2) the root element of an XMLDocument, which is always returned as a 
DataObject, even if the actual document simply had a simple DataType at 
the root.

Frank.




Blaise Doughan <> 
08/20/2008 03:24 PM

To

cc

Subject
Re: Fw: [sdo] Issue 118 - Creating wrapper objects for simple types






Hi Frank,

For what use case does the user need to know if the type is a data type 
wrapper?

-Blaise

Frank Budinsky wrote: