Skip to content

Commit 1e9e281

Browse files
committed
Initial EDEN export
1 parent 9938d85 commit 1e9e281

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/main/java/org/neuroml/JNeuroML.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.neuroml.export.info.InfoWriter;
3333
import org.neuroml.export.nest.NestWriter;
3434
import org.neuroml.export.moose.MooseWriter;
35+
import org.neuroml.export.eden.EDENWriter;
3536
import org.neuroml.export.netpyne.NetPyNEWriter;
3637
import org.neuroml.export.neuron.NeuronWriter;
3738
import org.neuroml.export.pynn.PyNNWriter;
@@ -125,6 +126,8 @@ public class JNeuroML
125126

126127
public static final String MOOSE_EXPORT_FLAG = "-moose";
127128

129+
public static final String EDEN_EXPORT_FLAG = "-eden";
130+
128131
//public static final String GEPPETTO_EXPORT_FLAG = "-geppetto";
129132

130133
public static final String SBML_IMPORT_FLAG = "-sbml-import";
@@ -174,6 +177,9 @@ public class JNeuroML
174177
+ " " + JNML_SCRIPT + " LEMSFile.xml " + MOOSE_EXPORT_FLAG + "\n"
175178
+ " Load LEMSFile.xml using jLEMS, and convert it to MOOSE format (**EXPERIMENTAL**)\n\n"
176179

180+
+ " " + JNML_SCRIPT + " LEMSFile.xml " + EDEN_EXPORT_FLAG + "\n"
181+
+ " Generate a Python script for loading LEMSFile.xml in the EDEN simulator\n\n"
182+
177183
+ " " + JNML_SCRIPT + " NMLFile.nml " + SVG_FLAG + "\n"
178184
+ " Load NMLFile.nml and convert cells & networks to SVG image format \n\n"
179185

@@ -727,6 +733,21 @@ else if(args[1].equals(MOOSE_EXPORT_FLAG))
727733
System.out.println("Writing to: " + genFile.getAbsolutePath());
728734
}
729735
}
736+
else if(args[1].equals(EDEN_EXPORT_FLAG))
737+
{
738+
739+
File lemsFile = (new File(args[0])).getAbsoluteFile();
740+
Lems lems = loadLemsFile(lemsFile);
741+
742+
String suffix = "_eden";
743+
String nFile = generateFormatFilename(lemsFile, Format.EDEN, suffix);
744+
745+
EDENWriter nw = new EDENWriter(lems, lemsFile, lemsFile.getParentFile(), nFile);
746+
for(File genFile : nw.convert())
747+
{
748+
System.out.println("Writing to: " + genFile.getAbsolutePath());
749+
}
750+
}
730751

731752
/*
732753
Needs to be updated!!

0 commit comments

Comments
 (0)