Class JDXSource

java.lang.Object
jspecview.source.JDXHeader
jspecview.source.JDXSource

public class JDXSource extends JDXHeader
JDXSource is representation of all the data in the JCAMP-DX file or source. Note: All Jdx Source are viewed as having a set of Spectra
Author:
Debbie-Ann Facey, Khari A. Bryan, Prof. Robert J. Lancashire
  • Field Details

    • TYPE_VIEW

      public static final int TYPE_VIEW
      See Also:
    • TYPE_UNKNOWN

      public static final int TYPE_UNKNOWN
      See Also:
    • TYPE_SIMPLE

      public static final int TYPE_SIMPLE
      See Also:
    • TYPE_BLOCK

      public static final int TYPE_BLOCK
      See Also:
    • TYPE_NTUPLE

      public static final int TYPE_NTUPLE
      See Also:
    • type

      public int type
    • isCompoundSource

      public boolean isCompoundSource
    • peakCount

      public int peakCount
    • isView

      public boolean isView
  • Constructor Details

    • JDXSource

      public JDXSource(int type, String filePath)
  • Method Details

    • dispose

      public void dispose()
    • getJDXSpectrum

      public Spectrum getJDXSpectrum(int index)
      Returns the Spectrum at a given index in the list
      Parameters:
      index - the spectrum index
      Returns:
      the Spectrum at a given index in the list
    • addJDXSpectrum

      public void addJDXSpectrum(String filePath, Spectrum spectrum, boolean forceSub)
      Adds a Spectrum to the list
      Parameters:
      filePath -
      spectrum - the spectrum to be added
      forceSub -
    • getNumberOfSpectra

      public int getNumberOfSpectra()
      Returns the number of Spectra in this Source
      Returns:
      the number of Spectra in this Source
    • getSpectra

      public Lst<Spectrum> getSpectra()
      Returns the Vector of Spectra
      Returns:
      the Vector of Spectra
    • getSpectraAsArray

      public Spectrum[] getSpectraAsArray()
      Used in Android
      Returns:
      array of JDXpectrum
    • getErrorLog

      public String getErrorLog()
      Returns the error log for this source
      Returns:
      the error log for this source
    • setErrorLog

      public void setErrorLog(String errors)
      Sets the error log for this source
      Parameters:
      errors - error log for this source
    • setFilePath

      public void setFilePath(String filePath)
    • getFilePath

      public String getFilePath()
    • createView

      public static JDXSource createView(Lst<Spectrum> specs)
    • getHeaderRowDataAsArray

      public String[][] getHeaderRowDataAsArray(boolean addDataClass, String[][] rowData)
    • setID

      public void setID(String id)
    • matchesFilePath

      public boolean matchesFilePath(String filePath)
    • setInlineData

      public void setInlineData(String data)