|
22 | 22 | import org.neuroml.export.utils.support.ModelFeature; |
23 | 23 | import org.neuroml.model.util.NeuroMLException; |
24 | 24 | import org.neuroml.export.utils.support.SupportLevelInfo; |
| 25 | +import org.neuroml.export.sbml.SBMLWriter; |
25 | 26 |
|
26 | 27 | public class SEDMLWriter extends AXMLWriter |
27 | 28 | { |
@@ -274,24 +275,31 @@ public static void main(String[] args) throws Exception, ModelFeatureSupportExce |
274 | 275 | ArrayList<File> lemsFiles = new ArrayList<File>(); |
275 | 276 |
|
276 | 277 |
|
277 | | - lemsFiles.add(new File("../neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/LEMS_TwoCell.xml")); |
| 278 | + //lemsFiles.add(new File("../neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/LEMS_TwoCell.xml")); |
278 | 279 | //lemsFiles.add(new File("../OpenCortex/examples/LEMS_ACNet.xml")); |
279 | 280 |
|
280 | 281 | //lemsFiles.add(new File("../OpenCortex/examples/LEMS_SpikingNet.xml")); |
281 | 282 | //lemsFiles.add(new File("../OpenCortex/examples/LEMS_SimpleNet.xml")); |
282 | 283 | lemsFiles.add(new File("../neuroConstruct/osb/showcase/SBMLShowcase/NeuroML2/LEMS_NML2_Ex9_FN.xml")); |
| 284 | + lemsFiles.add(new File("../neuroConstruct/osb/generic/HindmarshRose1984/NeuroML2/LEMS_Regular_HindmarshRose.xml")); |
283 | 285 |
|
284 | 286 |
|
285 | 287 | SEDMLWriter nw; |
286 | 288 | for(File lemsFile : lemsFiles) |
287 | 289 | { |
288 | 290 | Lems lems = Utils.readLemsNeuroMLFile(lemsFile.getAbsoluteFile()).getLems(); |
289 | | - nw = new SEDMLWriter(lems, lemsFile.getParentFile(), lemsFile.getName().replaceAll(".xml", ".sedml"), lemsFile.getName(), Format.SBML); |
290 | 291 |
|
| 292 | + SBMLWriter sbmlw = new SBMLWriter(lems, lemsFile.getParentFile(), lemsFile.getName().replaceAll(".xml", ".sbml")); |
| 293 | + for(File genFile : sbmlw.convert()) |
| 294 | + { |
| 295 | + System.out.println("Generated SBML: " + genFile.getAbsolutePath()); |
| 296 | + } |
| 297 | + |
| 298 | + nw = new SEDMLWriter(lems, lemsFile.getParentFile(), lemsFile.getName().replaceAll(".xml", ".sedml"), lemsFile.getName(), Format.SBML); |
291 | 299 | List<File> ff = nw.convert(); |
292 | 300 | for(File f : ff) |
293 | 301 | { |
294 | | - System.out.println("Generated sed-ml: " + f.getCanonicalPath()); |
| 302 | + System.out.println("Generated SED-ML: " + f.getCanonicalPath()); |
295 | 303 | } |
296 | 304 |
|
297 | 305 | } |
|
0 commit comments