The JIRA http://issues.apache.org/jira/browse/TUSCANY-1358 was raised to help one of the community to understand how to load a schema, and use the Types to generated a modified schema. I'm transferring the discussion here to the users' list as I don't think this is a bug, and the rest of the community will benefit more if the discussion is played out here.
The issue reported is that Tuscany SDO explicitly blocks regenerating a schema from types that were generated from a schema. Whatever the reason for this explicit blocking, there are other issues here. First off is that the types generated by the XSDHelper.define call will be immutable, so if the intention is to change the detail of those types then other blocking problems will occur. The Types are, and need to be, immutable; since allowing the possibility of altering a Type would undermine the integrity of existing instances of that Type. I think the reporter is perhaps trying to stretch SDO to something it's not intended for, but I can see two approaches to generating a modified schema using SDO. The first would be to use the SDO metadata API's to traverse the type system generated by the XSDHelper.define call, and to create a data graph composed of DataObects of type commonj.sdo#Type and Property, then make the appropriate changes to reflect the required alteration to the metadata, and use this graph to submit to TypeHelper.define. The type system generated by the TypeHelper.define call could then be used to generate a modified version of the XSD using XSDHelper.generate(). The second approach would be to load the schema as a data graph, and traverse that graph, (as opposed to the Type system as described above). Again the traversal process would be used to create a new data graph of DataObjects of type commonj.sdo#Type and Property and the result be submitted to TypeHelper.define, and the resultant types submitted to XSDHelper.generate. Regards, Kelvin. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]