I've wrote the code to convert from JAXB-generated QTI model to our hand-written one. In place of QtiUtils.itemFromQTI() use QTIUtils.customItemFromJaxbItem(). I wrote unit tests to test it and also eye-balled its output at converting,
http://turadg-prod.wisetest.org/modules/challengeQuestion/exportQTI.php?cqid=245 It doesn't yet convert the outcomeDeclaration and responseProcessing data but that's because there's no correlate to target in the hand-written domain model. (At least I didn't see it.) But the nice thing about JAXB is that it's all unmarshalling already and the all the model code is there. So instead of adding that data to the hand-written model code, perhaps the assessment stuff in PLR can use the model classes generated by JAXB. They are slightly more complicated, as QTI is rather complicated, but they should make it easy to support more and more of QTI. And of course simplified support classes can be written around the canonical model classes. I wanted to test the new customItemFromJaxbItem() method on a full conversion, but I first tried it with the existing conversion code and there's a problem in AssessmentUI of PLR which crashes the VLE. So I'm going to leave the new conversion out of the equation until that can be fixed. I wrote a unit test for WPC that converts real projects from the WISE web site. It tests the conversion but doesn't test whether the output can run because that's a GUI thing. Hopefully the PLR can have reliable tests for that. I've just marked PAS-344 (the JAXB issue) as Resolved:Incomplete, with this explanation: a) it's not tested with a full project conversion and PLR UI b no decision has been made whether to use the JAXB-generated models instead of the hand-written ones c) no discussion has taken place on whether to use enable bound properties in the JAXB-generated code -t On Jan 21, 12:29 am, "Turadg" <[EMAIL PROTECTED]> wrote: > I built Java bindings for QTI and MathML schemas using JAXB and wrote > it up here, > http://www.telscenter.org/confluence/display/SAIL/QTI+Bindings > > I updated WISE Project Converter to use these new bindings instead of > the XMLBeans bindings it had that didn't work very well. I've updated > the JUnit code that was demonstrating the XMLBeans bindings. Using > XMLBeans was too awkward and so the actual assessmentItem parser in the > QTIUtils class is currently using JDOM and a bunch of XPath to find > specific parts. > > With these JAXB bindings, we can unmarshall the whole assessmentItem at > once into beans. We can use these beans directly in the PLR instead of > the hand-written Java bindings we have now. We can even have these > generated beans automatically include property change support: > https://jaxb2-commons.dev.java.net/property-listener-injector/ > > I'm going to look tomorrow at making the ChallengeQuestionConverter use > this instead to parse instead of JDOM. For now I'll have to manually > convert into the hand-written classes of the PLR, but at some point I > hope the PLR can use these generated classes in place of the > hand-written code. > > -t --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SAIL-Dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/SAIL-Dev?hl=en -~----------~----~----~----~------~----~------~--~---
