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 SpectraModifier and Type | Field and Description |
---|---|
boolean |
isCompoundSource |
boolean |
isView |
int |
peakCount |
int |
type |
static int |
TYPE_BLOCK |
static int |
TYPE_NTUPLE |
static int |
TYPE_SIMPLE |
static int |
TYPE_UNKNOWN |
static int |
TYPE_VIEW |
Constructor and Description |
---|
JDXSource(int type,
java.lang.String filePath) |
Modifier and Type | Method and Description |
---|---|
void |
addJDXSpectrum(java.lang.String filePath,
JDXSpectrum spectrum,
boolean forceSub)
Adds a Spectrum to the list
|
static JDXSource |
createView(java.util.List<JDXSpectrum> specs) |
void |
dispose() |
java.lang.String |
getErrorLog()
Returns the error log for this source
|
java.lang.String |
getFilePath() |
java.lang.String[][] |
getHeaderRowDataAsArray(boolean addDataClass,
java.lang.String[][] rowData) |
JDXSpectrum |
getJDXSpectrum(int index)
Returns the Spectrum at a given index in the list
|
int |
getNumberOfSpectra()
Returns the number of Spectra in this Source
|
java.util.List<JDXSpectrum> |
getSpectra()
Returns the Vector of Spectra
|
void |
setErrorLog(java.lang.String errors)
Sets the error log for this source
|
void |
setFilePath(java.lang.String filePath) |
getDataClass, getDataType, getDate, getHeaderRowDataAsArray, getHeaderTable, getJcampdx, getLongDate, getOrigin, getOwner, getQualifiedDataType, getTime, getTitle, setDataClass, setDataType, setDate, setHeaderTable, setJcampdx, setLongDate, setOrigin, setOwner, setTime, setTitle
public static final int TYPE_VIEW
public static final int TYPE_UNKNOWN
public static final int TYPE_SIMPLE
public static final int TYPE_BLOCK
public static final int TYPE_NTUPLE
public int type
public boolean isCompoundSource
public int peakCount
public boolean isView
public void dispose()
public JDXSpectrum getJDXSpectrum(int index)
index
- the spectrum indexpublic void addJDXSpectrum(java.lang.String filePath, JDXSpectrum spectrum, boolean forceSub)
filePath
- spectrum
- the spectrum to be addedforceSub
- public int getNumberOfSpectra()
public java.util.List<JDXSpectrum> getSpectra()
public java.lang.String getErrorLog()
public void setErrorLog(java.lang.String errors)
errors
- error log for this sourcepublic void setFilePath(java.lang.String filePath)
public java.lang.String getFilePath()
public static JDXSource createView(java.util.List<JDXSpectrum> specs)
public java.lang.String[][] getHeaderRowDataAsArray(boolean addDataClass, java.lang.String[][] rowData)