use of org.vcell.cellml.CellQuanVCTranslator in project vcell by virtualcell.
the class XmlHelper method importMathCellML.
public static VCDocument importMathCellML(VCLogger vcLogger, XMLSource xmlSource) throws Exception {
// checks that the string is not empty
if (xmlSource == null) {
throw new XmlParseException("Invalid params for importing cellml model to Mathmodel.");
}
Document xmlDoc = xmlSource.getXmlDoc();
String xmlString = XmlUtil.xmlToString(xmlDoc, false);
CellQuanVCTranslator cellmlTranslator = new CellQuanVCTranslator();
VCDocument vcDoc = cellmlTranslator.translate(new StringReader(xmlString), false);
vcDoc.refreshDependencies();
return vcDoc;
}
Aggregations