Skip to content
Snippets Groups Projects

Resolve "SBML Reaction glyphs missing curve segment result in NullPointer exception"

2 files
+ 9
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -527,8 +527,14 @@ public class SbmlSpeciesExporter extends SbmlElementExporter<Species, org.sbml.j
GeneralGlyph modificationGlyph = getLayout().createGeneralGlyph("modification_" + (idCounter++),
modificationFeatureValue.getId());
ReferenceGlyph referenceGlyph = new ReferenceGlyph("modification_reference_" + (idCounter++));
referenceGlyph.setReference(speciesGlyph.getId());
referenceGlyph.setGlyph(speciesGlyph.getId());
referenceGlyph.setBoundingBox(createBoundingBoxForModification(mr));
modificationGlyph.addReferenceGlyph(referenceGlyph);
modificationGlyph.setBoundingBox(createBoundingBoxForModification(mr));
}
private BoundingBox createBoundingBoxForModification(ModificationResidue mr) {
double width, height;
if (mr instanceof AbstractRegionModification) {
width = ((AbstractRegionModification) mr).getWidth();
@@ -545,7 +551,7 @@ public class SbmlSpeciesExporter extends SbmlElementExporter<Species, org.sbml.j
dimensions.setWidth(width);
dimensions.setHeight(height);
boundingBox.setDimensions(dimensions);
modificationGlyph.setBoundingBox(boundingBox);
return boundingBox;
}
private int modificationResidueCounter = 0;
Loading