Search in sources :

Example 1 with SBMLReader

use of org.sbml.jsbml.xml.stax.SBMLReader in project vcell by virtualcell.

the class VCellService method getSBML.

private static SBMLDocument getSBML(final SimulationServiceImpl client, final String vcml, final String applicationName) throws ThriftDataAccessException, XMLStreamException, IOException {
    final String sbml;
    try {
        sbml = client.getSBML(vcml, applicationName);
    } catch (final TException e) {
        throw new IOException(e);
    }
    final SBMLReader reader = new SBMLReader();
    final SBMLDocument document = reader.readSBMLFromString(sbml);
    return document;
}
Also used : TException(org.apache.thrift.TException) SBMLReader(org.sbml.jsbml.xml.stax.SBMLReader) SBMLDocument(org.sbml.jsbml.SBMLDocument) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 TException (org.apache.thrift.TException)1 SBMLDocument (org.sbml.jsbml.SBMLDocument)1 SBMLReader (org.sbml.jsbml.xml.stax.SBMLReader)1