From: Frank B. <fbergman@u.washington.edu> - 2009-02-17 00:09:10
|
Personally I don't mind, as I would not consume the schema as such. Though your concerns are valid at which point would we stop adding non-critical elements. For the problem at hand it might make more sense to take 'notes' and 'annotation' out from the sbml-math schema. I would prefer to have the sed-ml file annotated, rather than the math-ml ... If that won't work, perhaps you could keep the JAXB annotations separate from the miase schema in jlibsedml, perhaps having your ant script merge the two. What do you think? Best Frank > -----Original Message----- > From: Richard Adams [mailto:ra...@st...] > Sent: Monday, February 16, 2009 8:08 AM > To: mia...@li... > Subject: [Miase-discuss] Schema annotations > > > 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. > > > > ----------------------------------------------------------------------- > ------- > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Miase-discuss mailing list > Mia...@li... > https://lists.sourceforge.net/lists/listinfo/miase-discuss |