Class MultiturnMeasurementReaderImpl
- java.lang.Object
-
- cern.accsoft.steering.aloha.plugin.multiturn.read.MultiturnMeasurementReaderImpl
-
- All Implemented Interfaces:
AlohaBeanFactoryAware,BeanAware,MachineElementsManagerAware,MultiturnMeasurementReader,MeasurementReader<MultiturnMeasurement>,Reader
public class MultiturnMeasurementReaderImpl extends java.lang.Object implements MultiturnMeasurementReader, AlohaBeanFactoryAware, MachineElementsManagerAware
This is the implementation of the reader for multiturn data
-
-
Constructor Summary
Constructors Constructor Description MultiturnMeasurementReaderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()javax.swing.filechooser.FileFiltergetFileFilter()voidinit()booleanisHandling(java.util.List<java.io.File> files)java.net.URIproposedModelDefinitionUri(java.util.List<java.io.File> files)The proposed JMad model definition URI.MultiturnMeasurementread(java.util.List<java.io.File> files, ModelDelegate modelDelegate, MeasurementReaderOptions options)reads the file and returns a measurement that uses the model defined by the given model-delegatebooleanrequiresOptions()has to tell, if this measurement reader requires options.voidsetAlohaBeanFactory(AlohaBeanFactory alohaBeanFactory)this method is used by theAlohaBeanFactoryto inject itself.voidsetMachineElementsManager(MachineElementsManager machineElementsManager)by the use of this method theMachineElementsManageris injected if the class is configured by theAlohaBeanFactory
-
-
-
Method Detail
-
init
public void init()
-
read
public MultiturnMeasurement read(java.util.List<java.io.File> files, ModelDelegate modelDelegate, MeasurementReaderOptions options) throws ReaderException
Description copied from interface:MeasurementReaderreads the file and returns a measurement that uses the model defined by the given model-delegate- Specified by:
readin interfaceMeasurementReader<MultiturnMeasurement>- Parameters:
files- the file to readmodelDelegate- the model-delegate to use for the measurement.options- the options for reading the files- Returns:
- the measurement
- Throws:
ReaderException
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceReader- Returns:
- a description of the files to handle
-
getFileFilter
public javax.swing.filechooser.FileFilter getFileFilter()
- Specified by:
getFileFilterin interfaceReader- Returns:
- the file filter which can be used for a file-open dialog.
-
isHandling
public boolean isHandling(java.util.List<java.io.File> files)
- Specified by:
isHandlingin interfaceReader- Parameters:
files- the files to test- Returns:
- true if this Reader can handle all the given files, false if not
-
setAlohaBeanFactory
public void setAlohaBeanFactory(AlohaBeanFactory alohaBeanFactory)
Description copied from interface:AlohaBeanFactoryAwarethis method is used by theAlohaBeanFactoryto inject itself.- Specified by:
setAlohaBeanFactoryin interfaceAlohaBeanFactoryAware
-
setMachineElementsManager
public void setMachineElementsManager(MachineElementsManager machineElementsManager)
Description copied from interface:MachineElementsManagerAwareby the use of this method theMachineElementsManageris injected if the class is configured by theAlohaBeanFactory- Specified by:
setMachineElementsManagerin interfaceMachineElementsManagerAware
-
requiresOptions
public boolean requiresOptions()
Description copied from interface:MeasurementReaderhas to tell, if this measurement reader requires options. This is useful to decide in the gui, if the user has to be asked for them or not.- Specified by:
requiresOptionsin interfaceMeasurementReader<MultiturnMeasurement>- Returns:
- true if options are required, false if not
-
proposedModelDefinitionUri
public java.net.URI proposedModelDefinitionUri(java.util.List<java.io.File> files)
Description copied from interface:MeasurementReaderThe proposed JMad model definition URI. Null if this reader does not propose a particular JMad model and the user should choose.- Specified by:
proposedModelDefinitionUriin interfaceMeasurementReader<MultiturnMeasurement>- Returns:
- the proposed model URI, if any
-
-