Skip to content
Snippets Groups Projects
Commit bb9b51a5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

version of minerva added; layout contains proper sbml identifier

parent 6cccf928
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!508Resolve "Export to SBML results in invalid SBML file"
......@@ -16,6 +16,7 @@ import org.sbml.jsbml.ext.layout.LayoutModelPlugin;
import org.sbml.jsbml.ext.render.GlobalRenderInformation;
import org.sbml.jsbml.ext.render.RenderLayoutPlugin;
import lcsb.mapviewer.common.Configuration;
import lcsb.mapviewer.common.exception.InvalidStateException;
import lcsb.mapviewer.converter.model.sbml.reaction.SbmlReactionExporter;
import lcsb.mapviewer.converter.model.sbml.species.SbmlSpeciesExporter;
......@@ -51,7 +52,7 @@ public class SbmlExporter {
functionExporter.exportFunction(result);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
SBMLWriter.write(doc, stream, "minerva", "1.0");
SBMLWriter.write(doc, stream, "minerva", Configuration.getSystemVersion(null));
return stream.toString("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new InvalidStateException(e);
......@@ -61,6 +62,7 @@ public class SbmlExporter {
public Layout createSbmlLayout(lcsb.mapviewer.model.map.model.Model model, Model result) {
LayoutModelPlugin layoutPlugin = new LayoutModelPlugin(result);
Layout layout = new Layout();
layout.setId("minerva_layout");
Dimensions dimensions = new Dimensions();
if (model.getHeight() != null) {
dimensions.setHeight(model.getHeight());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment