From: Richard A. <ra...@st...> - 2009-02-16 16:44:02
|
Sorry, probably didn't explain very well - the .xsd schema definition allows application specific annotations. The changes to the schema I'm proposing would not be included in .miase files, but in the schema itself, inside the notes and annotation element definitions. The problem arises, as JAXB comes across 'notes' and 'annotation' defined in both sbml-mathml and sedml schemas. When generating classes from the schema, it gets confused as it attempts to create classes of the same name twice. To prevent this happening, you can add a processing instruction in the notes element declaration in the sedml schema, saying 'don't create another notes class for this notes element, create a class called 'SedmlNotes instead'. Just looking through the JAXB docs, there doesn't seem to be an obvious solution readily available, e.g., to make the classes in two different packages, which would prevent the need for these annotations. Basically, there are a quite a lot of processing instructions which could be included, for example, specifying java collection classes, method names, class names, javadoc. Some of these, but not all, can be put in an external file, called a binding file, so I'm just thinking that these schema annotations could pollute the schema definition somewhat. Cheers Richard > I'm sorry, i don't quite see the issue ... the schema right now says > that you are free to put under the annotation element pretty much > anything, and as far as MIASE goes, it will be ignored. The same goes > for the notes section. > i've never used jaxb so I'm not sure what the issues are. Could you > explain further? best Frank On Feb 14, 2009, at 2:28 PM, Richard Adams wrote: > > Hi all, > Just wondering, it is possible to add <xsd:annotation><xsd:appinfo> > elements > into a schema for tool-specific customization of schema processing. > Is this tolerable in the sed-ml schema, or would it clutter up the > schema too much? > > Just wondered as Dagmar's last change ( to add the notes/annotation > elements) causes a namespace conflict to the JAXB schema parser with > the elements of the same name defined in sbml-mathml. One way round > this is to add this jaxb specific annotations in the .xsd file to > produce classes with different names. An alternative is to specify > instructions in a separate 'binding' file, this would be ideal but > I've not got it to work yet. > > Basically it would add: > > <xs:annotation> > <xs:appinfo> > <jxb:class name="SedMLNotes"> > </jxb:class> > </xs:appinfo> -- Dr Richard Adams Senior Software Developer, Computational Systems Biology Group, University of Edinburgh Tel: 0131 650 8281/8285 email : ric...@ed... -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. |