@@ -24,21 +24,67 @@ public static void main(String[] args) {
2424 PropertyLoader .setProperty (PropertyLoader .vcellServerIDProperty , "none" );
2525 PropertyLoader .setProperty (PropertyLoader .mongodbDatabase , "none" );
2626
27-
27+ // exercise the sbmlToFiniteVolumeInput and vcmlToFiniteVolumeInput methods
2828 try (FileInputStream f_sbml = new FileInputStream (sbml_file )) {
2929 byte [] data = f_sbml .readAllBytes ();
3030 logger .info ("Read " + data .length + " bytes from " + sbml_file .getAbsolutePath ());
3131 String sbml_str = new String (data );
3232 sbmlToFiniteVolumeInput (sbml_str , output_dir );
33- //vcmlToFiniteVolumeInput(vcml_str, sim_name, new File(args[1]));
3433 }
35- // read sbml_file and create a string object
3634 try (FileInputStream f_vcml = new FileInputStream (vcml_file )) {
3735 byte [] data = f_vcml .readAllBytes ();
3836 logger .info ("Read " + data .length + " bytes from " + vcml_file .getAbsolutePath ());
3937 String vcml_str = new String (data );
4038 vcmlToFiniteVolumeInput (vcml_str , vcml_sim_name , output_dir );
4139 }
40+
41+ // use reflection to load jsbml classes and call their default constructors
42+ Class .forName ("org.sbml.jsbml.AlgebraicRule" ).getDeclaredConstructor ().newInstance ();
43+ Class .forName ("org.sbml.jsbml.Annotation" ).getDeclaredConstructor ().newInstance ();
44+ Class .forName ("org.sbml.jsbml.AssignmentRule" ).getDeclaredConstructor ().newInstance ();
45+ Class .forName ("org.sbml.jsbml.Compartment" ).getDeclaredConstructor ().newInstance ();
46+ Class .forName ("org.sbml.jsbml.CompartmentType" ).getDeclaredConstructor ().newInstance ();
47+ Class .forName ("org.sbml.jsbml.Constraint" ).getDeclaredConstructor ().newInstance ();
48+ Class .forName ("org.sbml.jsbml.Delay" ).getDeclaredConstructor ().newInstance ();
49+ Class .forName ("org.sbml.jsbml.Event" ).getDeclaredConstructor ().newInstance ();
50+ Class .forName ("org.sbml.jsbml.EventAssignment" ).getDeclaredConstructor ().newInstance ();
51+ Class .forName ("org.sbml.jsbml.FunctionDefinition" ).getDeclaredConstructor ().newInstance ();
52+ Class .forName ("org.sbml.jsbml.InitialAssignment" ).getDeclaredConstructor ().newInstance ();
53+ Class .forName ("org.sbml.jsbml.KineticLaw" ).getDeclaredConstructor ().newInstance ();
54+ Class .forName ("org.sbml.jsbml.ListOf" ).getDeclaredConstructor ().newInstance ();
55+ Class .forName ("org.sbml.jsbml.LocalParameter" ).getDeclaredConstructor ().newInstance ();
56+ Class .forName ("org.sbml.jsbml.Model" ).getDeclaredConstructor ().newInstance ();
57+ Class .forName ("org.sbml.jsbml.ModifierSpeciesReference" ).getDeclaredConstructor ().newInstance ();
58+ Class .forName ("org.sbml.jsbml.Parameter" ).getDeclaredConstructor ().newInstance ();
59+ Class .forName ("org.sbml.jsbml.Priority" ).getDeclaredConstructor ().newInstance ();
60+ Class .forName ("org.sbml.jsbml.RateRule" ).getDeclaredConstructor ().newInstance ();
61+ Class .forName ("org.sbml.jsbml.Reaction" ).getDeclaredConstructor ().newInstance ();
62+ Class .forName ("org.sbml.jsbml.Species" ).getDeclaredConstructor ().newInstance ();
63+ Class .forName ("org.sbml.jsbml.SpeciesReference" ).getDeclaredConstructor ().newInstance ();
64+ Class .forName ("org.sbml.jsbml.SpeciesType" ).getDeclaredConstructor ().newInstance ();
65+ Class .forName ("org.sbml.jsbml.StoichiometryMath" ).getDeclaredConstructor ().newInstance ();
66+ Class .forName ("org.sbml.jsbml.Trigger" ).getDeclaredConstructor ().newInstance ();
67+ Class .forName ("org.sbml.jsbml.Unit" ).getDeclaredConstructor ().newInstance ();
68+ Class .forName ("org.sbml.jsbml.UnitDefinition" ).getDeclaredConstructor ().newInstance ();
69+ Class .forName ("org.sbml.jsbml.xml.parsers.ArraysParser" ).getDeclaredConstructor ().newInstance ();
70+ Class .forName ("org.sbml.jsbml.xml.parsers.CompParser" ).getDeclaredConstructor ().newInstance ();
71+ Class .forName ("org.sbml.jsbml.xml.parsers.DistribParser" ).getDeclaredConstructor ().newInstance ();
72+ Class .forName ("org.sbml.jsbml.xml.parsers.DynParser" ).getDeclaredConstructor ().newInstance ();
73+ Class .forName ("org.sbml.jsbml.xml.parsers.FBCParser" ).getDeclaredConstructor ().newInstance ();
74+ Class .forName ("org.sbml.jsbml.xml.parsers.GroupsParser" ).getDeclaredConstructor ().newInstance ();
75+ Class .forName ("org.sbml.jsbml.xml.parsers.L3LayoutParser" ).getDeclaredConstructor ().newInstance ();
76+ Class .forName ("org.sbml.jsbml.xml.parsers.LayoutParser" ).getDeclaredConstructor ().newInstance ();
77+ Class .forName ("org.sbml.jsbml.xml.parsers.MathMLStaxParser" ).getDeclaredConstructor ().newInstance ();
78+ Class .forName ("org.sbml.jsbml.xml.parsers.MultiParser" ).getDeclaredConstructor ().newInstance ();
79+ Class .forName ("org.sbml.jsbml.xml.parsers.QualParser" ).getDeclaredConstructor ().newInstance ();
80+ Class .forName ("org.sbml.jsbml.xml.parsers.RenderParser" ).getDeclaredConstructor ().newInstance ();
81+ Class .forName ("org.sbml.jsbml.xml.parsers.ReqParser" ).getDeclaredConstructor ().newInstance ();
82+ Class .forName ("org.sbml.jsbml.xml.parsers.SBMLCoreParser" ).getDeclaredConstructor ().newInstance ();
83+ Class .forName ("org.sbml.jsbml.xml.parsers.SBMLLevel1Rule" ).getDeclaredConstructor ().newInstance ();
84+ Class .forName ("org.sbml.jsbml.xml.parsers.SBMLRDFAnnotationParser" ).getDeclaredConstructor ().newInstance ();
85+ Class .forName ("org.sbml.jsbml.xml.parsers.SpatialParser" ).getDeclaredConstructor ().newInstance ();
86+ Class .forName ("org.sbml.jsbml.xml.parsers.UncertMLXMLNodeReader" ).getDeclaredConstructor ().newInstance ();
87+ Class .forName ("org.sbml.jsbml.xml.parsers.XMLNodeReader" ).getDeclaredConstructor ().newInstance ();
4288 } catch (Exception e ) {
4389 System .out .println (e .getMessage ());
4490 logger .error ("Error processing spatial model" , e );
0 commit comments