Commit 0255e063 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

celldesigner:name tag is unnecessary when name is empty

parent be93f539
Pipeline #29228 passed with stage
in 11 minutes and 24 seconds
......@@ -23,8 +23,10 @@ minerva (15.0.2) stable; urgency=medium
* Bug fix: at random time points there was an issue with cached data (#1323)
* Bug fix: connection to DAPI timeouted sometimes which resulted in error
when checking for all chemicals for specfific protein (#1324)
* Bug fix: complex/compartment with empty name was incorrectly exported to
CellDesigner (#1310)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 29 Jun 2020 11:00:00 +0200
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 1 Jul 2020 16:00:00 +0200
minerva (15.0.1) stable; urgency=medium
* Bug fix: when there was problem with DAPI minerva threw unexpected error
......
......@@ -118,7 +118,9 @@ public class CompartmentXmlParser extends AbstractElementXmlParser<CellDesignerC
sb.append("</notes>\n");
sb.append("<annotation>\n");
sb.append("<celldesigner:extension>\n");
sb.append("<celldesigner:name>" + encodeName(compartment.getName()) + "</celldesigner:name>\n");
if (!compartment.getName().isEmpty()) {
sb.append("<celldesigner:name>" + encodeName(compartment.getName()) + "</celldesigner:name>\n");
}
sb.append("</celldesigner:extension>\n");
sb.append(xmlAnnotationParser.dataSetToXmlString(compartment.getMiriamData(), elements.getElementId(compartment)));
sb.append("</annotation>\n");
......
......@@ -196,7 +196,8 @@ public class SpeciesSbmlParser extends AbstractElementXmlParser<CellDesignerSpec
}
if (rdfNode != null) {
XmlAnnotationParser xmlAnnotationParser = new XmlAnnotationParser(CommonXmlParser.RELATION_TYPES_SUPPORTED_BY_CELL_DESIGNER);
XmlAnnotationParser xmlAnnotationParser = new XmlAnnotationParser(
CommonXmlParser.RELATION_TYPES_SUPPORTED_BY_CELL_DESIGNER);
species.addMiriamData(xmlAnnotationParser.parseRdfNode(rdfNode));
}
......@@ -287,7 +288,8 @@ public class SpeciesSbmlParser extends AbstractElementXmlParser<CellDesignerSpec
builder.append("</celldesigner:extension>\n");
XmlAnnotationParser xmlAnnotationParser = new XmlAnnotationParser(CommonXmlParser.RELATION_TYPES_SUPPORTED_BY_CELL_DESIGNER);
XmlAnnotationParser xmlAnnotationParser = new XmlAnnotationParser(
CommonXmlParser.RELATION_TYPES_SUPPORTED_BY_CELL_DESIGNER);
builder.append(xmlAnnotationParser.dataSetToXmlString(species.getMiriamData(), elements.getElementId(species)));
builder.append("</annotation>\n");
......@@ -327,7 +329,9 @@ public class SpeciesSbmlParser extends AbstractElementXmlParser<CellDesignerSpec
}
SpeciesState state = new SpeciesState(species);
sb.append(speciesStateToXml(state));
sb.append("<celldesigner:name>" + XmlParser.escapeXml(encodeName(species.getName())) + "</celldesigner:name>\n");
if (!species.getName().isEmpty()) {
sb.append("<celldesigner:name>" + XmlParser.escapeXml(encodeName(species.getName())) + "</celldesigner:name>\n");
}
Boolean hypothetical = species.getHypothetical();
if (hypothetical != null) {
......
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