Interface JMadModelDefinitionExporter
-
- All Known Implementing Classes:
JMadModelDefinitionExporterImpl
public interface JMadModelDefinitionExporter
This is the interface of a class that can export jmad model-definitions to flat files or zip files.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.io.File
export(JMadModelDefinition modelDefinition, java.io.File exportPath)
exports the model definition to the given path.java.io.File
export(JMadModelDefinitionExportRequest exportRequest, java.io.File exportPath)
exports the model definition to the given path.default java.io.File
exportAsFiles(JMadModelDefinition modelDefinition, java.io.File destDir)
exports the model definition to separate files within the destination directoryjava.io.File
exportAsFiles(JMadModelDefinitionExportRequest exportSpecification, java.io.File destDir)
exports the model definition to separate files within the destination directory only the optics, sequences and ranges according to the export request are actually exported.default java.io.File
exportAsZip(JMadModelDefinition modelDefinition, java.io.File zipFile)
exports the model definition to a zip file containing all the required files.java.io.File
exportAsZip(JMadModelDefinitionExportRequest exportSpecification, java.io.File zipFile)
exports the model definition to a zip file containing all the required files.
-
-
-
Method Detail
-
export
java.io.File export(JMadModelDefinitionExportRequest exportRequest, java.io.File exportPath)
exports the model definition to the given path. If the path is a directory then it is exported as separated local files, If is a filename then it is exported as a jmd.zip file. only the optics, sequences and ranges according to the export request are actually exported.- Parameters:
exportRequest
- the export request to select the scope of the exportexportPath
- the destination path- Returns:
- either the xml file to which the model definition was written if the export was to separate files or the zip file to which the whole model definition and files were written.
-
exportAsFiles
java.io.File exportAsFiles(JMadModelDefinitionExportRequest exportSpecification, java.io.File destDir)
exports the model definition to separate files within the destination directory only the optics, sequences and ranges according to the export request are actually exported.- Parameters:
destDir
- the destination directory- Returns:
- the xml file to which the model definition was written to
-
exportAsZip
java.io.File exportAsZip(JMadModelDefinitionExportRequest exportSpecification, java.io.File zipFile)
exports the model definition to a zip file containing all the required files. only the optics, sequences and ranges according to the export request are actually exported.- Parameters:
zipFile
- the zip file which shall finally contain the model definitioin- Returns:
- the zip file to which the data was written (can be different since the default extension might have been added)
-
export
default java.io.File export(JMadModelDefinition modelDefinition, java.io.File exportPath)
exports the model definition to the given path. If the path is a directory then it is exported as separated local files, If is a filename then it is exported as a jmd.zip file.- Parameters:
modelDefinition
- the model definition to export.exportPath
- the destination path- Returns:
- either the xml file to which the model definition was written if the export was to separate files or the zip file to which the whole model definition and files were written.
-
exportAsFiles
default java.io.File exportAsFiles(JMadModelDefinition modelDefinition, java.io.File destDir)
exports the model definition to separate files within the destination directory- Parameters:
modelDefinition
- the modelDefinition to exportdestDir
- the destination directory- Returns:
- the xml file to which the model definition was written to
-
exportAsZip
default java.io.File exportAsZip(JMadModelDefinition modelDefinition, java.io.File zipFile)
exports the model definition to a zip file containing all the required files.- Parameters:
modelDefinition
- theJMadModelDefinition
to exportzipFile
- the zip file which shall finally contain the model definitioin- Returns:
- the zip file to which the data was written (can be different since the default extension might have been added)
-
-