Commit f4281908 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

comparison against null filxed

parent e701559a
Pipeline #15142 passed with stage
in 18 minutes and 36 seconds
minerva (14.0.3) stable; urgency=medium minerva (14.0.3) stable; urgency=medium
* Bug fix: sbml parser had sometimes problems with combining layout and multi
packages (#966)
* Bug fix: parsing of CellDesigner files that contained substanceUnits could * Bug fix: parsing of CellDesigner files that contained substanceUnits could
crash the upload (#985) crash the upload (#985)
* Bug fix: verificatin of version length added when uploading project * Bug fix: verificatin of version length added when uploading project
......
...@@ -13,6 +13,8 @@ import org.sbml.jsbml.ext.layout.*; ...@@ -13,6 +13,8 @@ import org.sbml.jsbml.ext.layout.*;
import org.sbml.jsbml.ext.multi.*; import org.sbml.jsbml.ext.multi.*;
import org.sbml.jsbml.ext.render.LocalStyle; import org.sbml.jsbml.ext.render.LocalStyle;
import com.google.common.base.Objects;
import lcsb.mapviewer.common.Pair; import lcsb.mapviewer.common.Pair;
import lcsb.mapviewer.common.exception.InvalidStateException; import lcsb.mapviewer.common.exception.InvalidStateException;
import lcsb.mapviewer.converter.InvalidInputDataExecption; import lcsb.mapviewer.converter.InvalidInputDataExecption;
...@@ -317,7 +319,8 @@ public class SbmlSpeciesParser extends SbmlElementParser<org.sbml.jsbml.Species> ...@@ -317,7 +319,8 @@ public class SbmlSpeciesParser extends SbmlElementParser<org.sbml.jsbml.Species>
if (((GeneralGlyph) graphicalObject).getListOfReferenceGlyphs().size() > 0) { if (((GeneralGlyph) graphicalObject).getListOfReferenceGlyphs().size() > 0) {
// find a reference to the alias in layout, so we know it's the proper value // find a reference to the alias in layout, so we know it's the proper value
ReferenceGlyph referenceGlyph = ((GeneralGlyph) graphicalObject).getListOfReferenceGlyphs().get(0); ReferenceGlyph referenceGlyph = ((GeneralGlyph) graphicalObject).getListOfReferenceGlyphs().get(0);
if (referenceGlyph.getGlyph().equals(mr.getSpecies().getElementId())) { if (Objects.equal(referenceGlyph.getGlyph(), mr.getSpecies().getElementId())) {
// if (referenceGlyph.getGlyph().equals(mr.getSpecies().getElementId())) {
residueGlyph = (GeneralGlyph) graphicalObject; residueGlyph = (GeneralGlyph) graphicalObject;
} }
} else { } else {
......
...@@ -62,6 +62,13 @@ public class SbmlParserTest extends SbmlTestFunctions { ...@@ -62,6 +62,13 @@ public class SbmlParserTest extends SbmlTestFunctions {
assertEquals(2, model.getMiriamData().size()); assertEquals(2, model.getMiriamData().size());
} }
@Test
public void testParseProblematicMultiLayout() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(
new ConverterParams().filename("testFiles/small/problematic_inflamation_sbml_layout.xml"));
assertNotNull(model);
}
@Test @Test
public void testParseKinetics() throws FileNotFoundException, InvalidInputDataExecption { public void testParseKinetics() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/layoutExample/SBML.xml")); Model model = parser.createModel(new ConverterParams().filename("testFiles/layoutExample/SBML.xml"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment