Package pulse.io.export
Class CurveExporter
- java.lang.Object
-
- pulse.io.export.CurveExporter
-
- All Implemented Interfaces:
Exporter<AbstractData>,Reflexive
public class CurveExporter extends Object implements Exporter<AbstractData>
A singleton exporter allows writing the data contained in aAbstractDataobject in a two-column format to create files conforming to either csv or html extension. The first column always represents the time sequence, which may be shifted if the associated property of the heating curve is non-zero. The second column represents the baseline-adjusted signal.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CurveExportergetInstance()Returns the single instance of this subclass.Extension[]getSupportedExtensions()Currentlyhtmlandcsvextensions are supported.voidprintToStream(AbstractData hc, FileOutputStream fos, Extension extension)The interface method is implemented by the subclasses to define the exportable content in detail.Class<AbstractData>target()Defines the class, instances of which can be fed into the exporter to produce a result.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface pulse.io.export.Exporter
askToExport, export
-
-
-
-
Method Detail
-
printToStream
public void printToStream(AbstractData hc, FileOutputStream fos, Extension extension)
Description copied from interface:ExporterThe interface method is implemented by the subclasses to define the exportable content in detail. Depending on the supported extensions, this will typically involve a switch statement that will invoke private methods defined in the subclass handling the different choices. The streamfosis usually closed implicitly in a try-with-resource clause.- Specified by:
printToStreamin interfaceExporter<AbstractData>- Parameters:
hc- the exported targetfos- a FileOutputStream created by theexportmethodextension- an extension of the file saved on disk- See Also:
Exporter.export(T,java.io.File,pulse.io.export.Extension),Exporter.askToExport(T,javax.swing.JFrame,java.lang.String,java.io.File)
-
getSupportedExtensions
public Extension[] getSupportedExtensions()
Currentlyhtmlandcsvextensions are supported.- Specified by:
getSupportedExtensionsin interfaceExporter<AbstractData>- Returns:
- an array with
Extensiontype objects.
-
getInstance
public static CurveExporter getInstance()
Returns the single instance of this subclass.- Returns:
- an instance of
HeatingCurveExporter.
-
target
public Class<AbstractData> target()
Description copied from interface:ExporterDefines the class, instances of which can be fed into the exporter to produce a result.- Specified by:
targetin interfaceExporter<AbstractData>- Returns:
- the
AbstractDataclass.
-
-