Skip to content

Commit

Permalink
Sim Context field description may be empty string.
Browse files Browse the repository at this point in the history
Now export to / import from VCML round trips correctly for an empty
string, but save to database still does not work.
  • Loading branch information
danv61 committed Feb 12, 2020
1 parent a6256cf commit 63fe564
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vcell-core/src/main/java/cbit/vcell/xml/XmlReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -6122,7 +6122,7 @@ private SimulationContext getSimulationContext(Element param, BioModel biomodel)
newsimcontext.setName(name);
//Add annotation
String annotation = param.getChildText(XMLTags.AnnotationTag, vcNamespace);
if (annotation!=null && annotation.length()>0) {
if (annotation!=null/* && annotation.length()>0*/) {
newsimcontext.setDescription(unMangle(annotation));
}
//set if using concentration
Expand Down
2 changes: 1 addition & 1 deletion vcell-core/src/main/java/cbit/vcell/xml/Xmlproducer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ public Element getXML(SimulationContext param, BioModel bioModel) throws XmlPars

//simulationcontext.setAttribute(XMLTags.AnnotationAttrTag, this.mangle(param.getDescription()));
//add annotation
if (param.getDescription()!=null && param.getDescription().length()>0) {
if (param.getDescription()!=null /*&& param.getDescription().length()>0*/) {
Element annotationElem = new Element(XMLTags.AnnotationTag);
annotationElem.setText(mangle(param.getDescription()));
simulationcontext.addContent(annotationElem);
Expand Down

0 comments on commit 63fe564

Please sign in to comment.