Class JMadModelDefinitionExporterImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.modeldefs.io.impl.JMadModelDefinitionExporterImpl
-
- All Implemented Interfaces:
JMadModelDefinitionExporter
public class JMadModelDefinitionExporterImpl extends java.lang.Object implements JMadModelDefinitionExporter
This is the default implementation of theJMadModelDefinitionExporter
-
-
Constructor Summary
Constructors Constructor Description JMadModelDefinitionExporterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Fileexport(JMadModelDefinitionExportRequest exportRequest, java.io.File exportPath)exports the model definition to the given path.java.io.FileexportAsFiles(JMadModelDefinitionExportRequest exportRequest, java.io.File exportPath)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.java.io.FileexportAsZip(JMadModelDefinitionExportRequest exportRequest, java.io.File file)exports the model definition to a zip file containing all the required files.voidsetFileFinderManager(ModelFileFinderManager fileFinderManager)voidsetPersistenceServices(java.util.List<ModelDefinitionPersistenceService> persistenceServices)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cern.accsoft.steering.jmad.modeldefs.io.JMadModelDefinitionExporter
export, exportAsFiles, exportAsZip
-
-
-
-
Method Detail
-
export
public java.io.File export(JMadModelDefinitionExportRequest exportRequest, java.io.File exportPath)
Description copied from interface:JMadModelDefinitionExporterexports 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.- Specified by:
exportin interfaceJMadModelDefinitionExporter- 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
public java.io.File exportAsFiles(JMadModelDefinitionExportRequest exportRequest, java.io.File exportPath)
Description copied from interface:JMadModelDefinitionExporterexports the model definition to separate files within the destination directory only the optics, sequences and ranges according to the export request are actually exported.- Specified by:
exportAsFilesin interfaceJMadModelDefinitionExporterexportPath- the destination directory- Returns:
- the xml file to which the model definition was written to
-
exportAsZip
public java.io.File exportAsZip(JMadModelDefinitionExportRequest exportRequest, java.io.File file)
Description copied from interface:JMadModelDefinitionExporterexports 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.- Specified by:
exportAsZipin interfaceJMadModelDefinitionExporterfile- 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)
-
setFileFinderManager
public void setFileFinderManager(ModelFileFinderManager fileFinderManager)
-
setPersistenceServices
public void setPersistenceServices(java.util.List<ModelDefinitionPersistenceService> persistenceServices)
-
-