public class QTIDocumentParser implements IParser {
private ParserManager parserManager = new ParserManager();
public Object parse(Element element) {
//assert element.getName().equalsIgnoreCase("questestinterop");
QTIDocument qtiDocument= new QTIDocument();
Object tmp = null;
Element qticomment = element.element("qticomment");
qtiDocument.setQticomment((QTIObject)parserManager.parse(qticomment));
Element objectbank = element.element("objectbank");
tmp = parserManager.parse(objectbank);
if(tmp!=null) {
qtiDocument.setObjectbank((QTIObject)tmp);
}
Element assesment = element.element("assessment");
tmp = parserManager.parse(assesment);
if(tmp!=null) {
qtiDocument.setAssessment((Assessment)tmp);
}
return qtiDocument;
}