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

comparison against null filxed

parent e701559a
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
crash the upload (#985)
* Bug fix: verificatin of version length added when uploading project
......
......@@ -13,6 +13,8 @@ import org.sbml.jsbml.ext.layout.*;
import org.sbml.jsbml.ext.multi.*;
import org.sbml.jsbml.ext.render.LocalStyle;
import com.google.common.base.Objects;
import lcsb.mapviewer.common.Pair;
import lcsb.mapviewer.common.exception.InvalidStateException;
import lcsb.mapviewer.converter.InvalidInputDataExecption;
......@@ -317,7 +319,8 @@ public class SbmlSpeciesParser extends SbmlElementParser<org.sbml.jsbml.Species>
if (((GeneralGlyph) graphicalObject).getListOfReferenceGlyphs().size() > 0) {
// find a reference to the alias in layout, so we know it's the proper value
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;
}
} else {
......
......@@ -62,6 +62,13 @@ public class SbmlParserTest extends SbmlTestFunctions {
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
public void testParseKinetics() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/layoutExample/SBML.xml"));
......
Supports Markdown
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