Skip to content

Commit

Permalink
Adding option to export to pynn
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Feb 17, 2016
1 parent a1a33d5 commit e29b043
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/org/neuroml/JNeuroML.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.neuroml.export.info.InfoWriter;
import org.neuroml.export.nest.NestWriter;
import org.neuroml.export.neuron.NeuronWriter;
import org.neuroml.export.pynn.PyNNWriter;
import org.neuroml.export.sbml.SBMLWriter;
import org.neuroml.export.svg.SVGWriter;
import org.neuroml.export.utils.Format;
Expand Down Expand Up @@ -99,6 +100,8 @@ public class JNeuroML
public static final String CELLML_EXPORT_FLAG = "-cellml";

public static final String NEURON_EXPORT_FLAG = "-neuron";

public static final String PYNN_EXPORT_FLAG = "-pynn";

public static final String VERTEX_EXPORT_FLAG = "-vertex";

Expand Down Expand Up @@ -539,6 +542,19 @@ else if(args[1].equals(NEST_EXPORT_FLAG))
System.out.println("Writing to: " + genFile.getAbsolutePath());
}
}
else if(args[1].equals(PYNN_EXPORT_FLAG))
{
File lemsFile = (new File(args[0])).getAbsoluteFile();
Lems lems = loadLemsFile(lemsFile);

String nFile = generateFormatFilename(lemsFile, Format.PYNN, null);

PyNNWriter pw = new PyNNWriter(lems, lemsFile.getParentFile(), nFile);
for(File genFile : pw.convert())
{
System.out.println("Writing to: " + genFile.getAbsolutePath());
}
}
else if(args[1].equals(GEPPETTO_EXPORT_FLAG))
{

Expand Down

0 comments on commit e29b043

Please sign in to comment.