Skip to content

Commit 04d8956

Browse files
committed
set XmlHelper.cloneUsingXML from libvcell, still errors in VCell Tests
1 parent b981582 commit 04d8956

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

vcell-native/src/main/java/org/vcell/libvcell/ModelUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public static void sbml_to_vcml(String sbml_content, Path vcmlPath)
3535

3636
GeometrySpec.avoidAWTImageCreation = true;
3737
VCMongoMessage.enabled = false;
38+
XmlHelper.cloneUsingXML = true;
3839

3940
record LoggerMessage(VCLogger.Priority priority, VCLogger.ErrorType errorType, String message) {};
4041
final ArrayList<LoggerMessage> messages = new ArrayList<>();
@@ -76,6 +77,7 @@ public static void vcml_to_sbml(String vcml_content, String applicationName, Pat
7677
throws XmlParseException, IOException, XMLStreamException, SbmlException, MappingException, ImageException, GeometryException, ExpressionException {
7778
GeometrySpec.avoidAWTImageCreation = true;
7879
VCMongoMessage.enabled = false;
80+
XmlHelper.cloneUsingXML = true;
7981

8082
BioModel bioModel = XmlHelper.XMLToBioModel(new XMLSource(vcml_content));
8183
bioModel.updateAll(false);
@@ -115,6 +117,7 @@ public static void vcml_to_sbml(String vcml_content, String applicationName, Pat
115117
public static void vcml_to_vcml(String vcml_content, Path vcmlPath) throws XmlParseException, IOException, MappingException {
116118
GeometrySpec.avoidAWTImageCreation = true;
117119
VCMongoMessage.enabled = false;
120+
XmlHelper.cloneUsingXML = true;
118121

119122
BioModel bioModel = XmlHelper.XMLToBioModel(new XMLSource(vcml_content));
120123
bioModel.updateAll(false);

vcell-native/src/main/java/org/vcell/libvcell/SolverUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public class SolverUtils {
4141
public static void vcmlToFiniteVolumeInput(String vcml_content, String simulation_name, File parentDir, File outputDir) throws XmlParseException, MappingException, SolverException, ExpressionException, MathException {
4242
GeometrySpec.avoidAWTImageCreation = true;
4343
VCMongoMessage.enabled = false;
44+
XmlHelper.cloneUsingXML = true;
45+
4446
if (vcml_content.substring(0, 300).contains("<sbml xmlns=\"http://www.sbml.org/sbml")) {
4547
throw new IllegalArgumentException("expecting VCML content, not SBML");
4648
}
@@ -134,6 +136,8 @@ private static FieldDataIdentifierSpec[] getFieldDataIdentifierSpecs(Simulation
134136
public static void sbmlToFiniteVolumeInput(String sbml_content, File outputDir) throws MappingException, PropertyVetoException, SolverException, ExpressionException, VCLoggerException {
135137
GeometrySpec.avoidAWTImageCreation = true;
136138
VCMongoMessage.enabled = false;
139+
XmlHelper.cloneUsingXML = true;
140+
137141
SBMLExporter.MemoryVCLogger vcl = new SBMLExporter.MemoryVCLogger();
138142
boolean bValidateSBML = true;
139143
// input stream from sbml_content String

0 commit comments

Comments
 (0)