Class CMLExporter

java.lang.Object
jspecview.export.CMLExporter
All Implemented Interfaces:
JSVExporter

public class CMLExporter extends Object
class CMLExporter contains static methods to export a Graph as as CIML. CMLExporter uses a template file called 'cml_tmp.vm' or 'cml_nmr.vm'. So any changes in design should be done in these files.
Author:
Prof Robert J. Lancashire, Bob Hanson, hansonr@stolaf.edu
  • Field Details

    • continuous

      protected boolean continuous
    • title

      protected String title
    • ident

      protected String ident
    • state

      protected String state
    • xUnits

      protected String xUnits
    • yUnits

      protected String yUnits
    • xUnitFactor

      protected String xUnitFactor
    • xUnitExponent

      protected String xUnitExponent
    • xUnitLabel

      protected String xUnitLabel
    • yUnitLabel

      protected String yUnitLabel
    • datatype

      protected String datatype
    • owner

      protected String owner
    • origin

      protected String origin
    • spectypeInitials

      protected String spectypeInitials
    • longdate

      protected String longdate
    • date

      protected String date
    • time

      protected String time
    • vendor

      protected String vendor
    • model

      protected String model
    • resolution

      protected String resolution
    • pathlength

      protected String pathlength
    • molform

      protected String molform
    • bp

      protected String bp
    • mp

      protected String mp
    • casRN

      protected String casRN
    • casName

      protected String casName
    • obNucleus

      protected String obNucleus
    • obFreq

      protected double obFreq
    • firstX

      protected double firstX
    • lastX

      protected double lastX
    • deltaX

      protected double deltaX
    • solvRef

      protected String solvRef
    • solvName

      protected String solvName
    • startIndex

      protected int startIndex
    • endIndex

      protected int endIndex
    • xyCoords

      protected Coordinate[] xyCoords
    • npoints

      protected int npoints
    • newXYCoords

      protected Lst<Coordinate> newXYCoords
    • out

      protected OC out
    • vwr

      protected JSViewer vwr
  • Constructor Details

    • CMLExporter

      public CMLExporter()
  • Method Details

    • exportTheSpectrum

      public String exportTheSpectrum(JSViewer viewer, ExportType mode, OC out, Spectrum spec, int startIndex, int endIndex, PanelData pd, boolean asBase64) throws IOException
      Exports the Spectrum that is displayed by JSVPanel to a file given by fileName If display is zoomed then export the current view
      Parameters:
      viewer -
      mode - TODO
      out -
      spec - the spectrum to export
      startIndex - the starting point of the spectrum
      endIndex - the end point
      pd - only for SVG/SVGI
      asBase64 - TODO
      Returns:
      data if fileName is null
      Throws:
      IOException
    • setup

      protected boolean setup(JSViewer viewer, Spectrum spec, OC out, int startIndex, int endIndex)
    • setParameters

      protected boolean setParameters(Spectrum spec)
    • setContext

      protected void setContext()
    • initForm

      protected void initForm(JSViewer viewer, OC out)
    • writeForm

      protected String writeForm(String templateFile) throws IOException
      Throws:
      IOException