logger.warn("Syntax error in your RDF annotation");
}
}
// A RDFAnnotation can modify a contextObject which is a ModelHistory instance.
else if (contextObject instanceof History){
History modelHistory = (History) contextObject;
// we should be into a 'creator' node and the first element should be a Bag element.
if (elementName.equals("Bag")){
this.previousElements.put("creator", "Bag");
}
// After the 'Bag' node of the 'creator' element, it should be a 'li' node.
// If the SBML specifications are respected, a new ModelCreator will be created
// and added to the listOfCreators of modelHistory. In this case, it will return the new ModelCreator instance.
else if (elementName.equals("li") && previousElements.containsKey("creator")){
if (previousElements.get("creator").equals("Bag")){
this.previousElements.put("creator", "li");
Creator modelCreator = new Creator();
modelHistory.addCreator(modelCreator);
return modelCreator;
}
else {
logger.warn("Syntax error in your RDF annotation");
}