Class YaspDispersionMeasurementReader
- java.lang.Object
-
- cern.accsoft.steering.aloha.read.yasp.AbstractYaspMeasurementReader<DispersionMeasurement>
-
- cern.accsoft.steering.aloha.plugin.disp.read.yasp.YaspDispersionMeasurementReader
-
- All Implemented Interfaces:
AlohaBeanFactoryAware,BeanAware,MachineElementsManagerAware,DispersionMeasurementReader,MeasurementReader<DispersionMeasurement>,Reader
public class YaspDispersionMeasurementReader extends AbstractYaspMeasurementReader<DispersionMeasurement> implements DispersionMeasurementReader, AlohaBeanFactoryAware, MachineElementsManagerAware
this is the implementation of a reader for dispersion data out of yasp files
-
-
Constructor Summary
Constructors Constructor Description YaspDispersionMeasurementReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()javax.swing.filechooser.FileFiltergetFileFilter()static booleanisDispersionFile(java.lang.String fileName)determines, a file of the given name is a yasp dispersion-file.booleanisHandling(java.util.List<java.io.File> files)DispersionMeasurementread(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 theAlohaBeanFactoryjava.lang.StringtoString()-
Methods inherited from class cern.accsoft.steering.aloha.read.yasp.AbstractYaspMeasurementReader
proposedModelDefinitionUri
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cern.accsoft.steering.aloha.read.MeasurementReader
proposedModelDefinitionUri
-
-
-
-
Method Detail
-
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
-
isDispersionFile
public static final boolean isDispersionFile(java.lang.String fileName)
determines, a file of the given name is a yasp dispersion-file.- Parameters:
fileName- the filename to check- Returns:
- true, if it is a dispersion-file, false if not.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
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
-
setAlohaBeanFactory
public void setAlohaBeanFactory(AlohaBeanFactory alohaBeanFactory)
Description copied from interface:AlohaBeanFactoryAwarethis method is used by theAlohaBeanFactoryto inject itself.- Specified by:
setAlohaBeanFactoryin interfaceAlohaBeanFactoryAware
-
read
public DispersionMeasurement 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<DispersionMeasurement>- 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
-
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<DispersionMeasurement>- Returns:
- true if options are required, false if not
-
-