Class RExportManager

java.lang.Object
export.RExport.RExportManager
All Implemented Interfaces:
PamDataUnitExporter

public class RExportManager extends Object implements PamDataUnitExporter
Handles exporting pam data units into an rdata.
Author:
Jamie Macaulay
  • Constructor Details

  • Method Details

    • exportData

      public boolean exportData(File fileName, List<PamDataUnit> dataUnits, boolean append)
      Description copied from interface: PamDataUnitExporter
      Export the data to a folder.
      Specified by:
      exportData in interface PamDataUnitExporter
      Parameters:
      fileName - - the file to export to
      dataUnits - - the data units to export.
      Returns:
      true if exported successfully.
    • hasCompatibleUnits

      public boolean hasCompatibleUnits(List<PamDataUnit> dataUnits)
      Check whether there are compatible data units to be exported.
      Parameters:
      dataUnits - - the data unit list
      Returns:
      true if r export is possible for the current data units.
    • hasCompatibleUnits

      public boolean hasCompatibleUnits(Class dataUnitType)
      Description copied from interface: PamDataUnitExporter
      Check whether a particular data unit class is compatible
      Specified by:
      hasCompatibleUnits in interface PamDataUnitExporter
      Parameters:
      dataUnitType - - the data unit type to test.
      Returns:
      true if it can be exported.
    • dataUnits2R

      public RExportManager.RData dataUnits2R(List<PamDataUnit> dataUnits)
      Sort a list of data units into lists of the same type of units. Convert to a list of structures.
      Parameters:
      dataUnits - - a list of data units to convert to matlab structures.
      Returns:
      list of list of R strucutures ready for saving to .RData file.
    • dataUnits2R

      public RExportManager.RData dataUnits2R(List<PamDataUnit> dataUnits, String name, org.renjin.sexp.PairList.Builder allData)
      Sort a list of data units into lists of the same type of units. Convert to a list of structures.
      Parameters:
      dataUnits - - a list of data units to convert to matlab structures.
      Returns:
      list of list of R strucutures ready for saving to .RData file.
    • getFileExtension

      public String getFileExtension()
      Description copied from interface: PamDataUnitExporter
      Get the extension for the output file type
      Specified by:
      getFileExtension in interface PamDataUnitExporter
      Returns:
      the extension for the file type e.g. "mat"
    • getIconString

      public String getIconString()
      Description copied from interface: PamDataUnitExporter
      Get the ikonli icon string for the exporter.
      Specified by:
      getIconString in interface PamDataUnitExporter
      Returns:
      the ikon string.
    • getName

      public String getName()
      Description copied from interface: PamDataUnitExporter
      Get the name of the exporter.
      Specified by:
      getName in interface PamDataUnitExporter
      Returns:
      the name of the exporter.
    • close

      public void close()
      Description copied from interface: PamDataUnitExporter
      Close the exporter.
      Specified by:
      close in interface PamDataUnitExporter
    • isNeedsNewFile

      public boolean isNeedsNewFile()
      Description copied from interface: PamDataUnitExporter
      Check whether and exporter needs a new file
      Specified by:
      isNeedsNewFile in interface PamDataUnitExporter
      Returns:
      true if we need a new file.
    • getOptionsPanel

      public Component getOptionsPanel()
      Description copied from interface: PamDataUnitExporter
      An optional panel that displays additional options for the user.
      Specified by:
      getOptionsPanel in interface PamDataUnitExporter
      Returns:
      additional options panel - can be null.
    • getOptionsPane

      public javafx.scene.layout.Pane getOptionsPane()
      Description copied from interface: PamDataUnitExporter
      An optional JavaFX pane that displays additional options for the user.
      Specified by:
      getOptionsPane in interface PamDataUnitExporter
      Returns:
      pane with additonal options - can be null.
    • prepareExport

      public void prepareExport()
      Description copied from interface: PamDataUnitExporter
      Called whenever a new export run is prepared.
      Specified by:
      prepareExport in interface PamDataUnitExporter