|
|||||||||
| Home >> All >> joelib >> io >> [ types overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
joelib.io.types
Class JCAMP

java.lang.Objectjoelib.io.types.JCAMP
- All Implemented Interfaces:
- joelib.io.MoleculeFileType
- public class JCAMP
- extends java.lang.Object
- implements joelib.io.MoleculeFileType
- extends java.lang.Object
A class to interpret JCAMP-DX data (JCAMP-CS is not implemented yet). The
supported data types are XYPAIRS, XYDATA=(X++(Y..Y)), PEAK TABLE and LINK.
If you want load a file with multiple blocks or inner blocks you must use
JCampMultipleFile.
This class can only load separated single blocks with one TITLE and END
label !
- ... The International Union of Pure and Applied Chemistry (IUPAC)
took over responsibility from the Joint Commitee on Atomic and Molecular
Physical Data (JCAMP) in 1995 ...
I U P A C
Committee on Printed and Electronic Publications
Working Party on Spectroscopic Data Standards (JCAMP-DX)
- The Department of Chemistry at the University of the West Indies
| Field Summary | |
private static java.lang.String |
description
|
private static java.lang.String[] |
extensions
|
private joelib.jcamp.JCAMPData |
jcamp
|
private java.lang.String |
JCAMP_CHEMICAL_STRUCTURE
|
private java.lang.String |
JCAMP_SPECTRA
|
private java.lang.String |
JCAMP_START
|
private java.lang.String |
JCAMP_STOP
|
private int |
jcampCount
|
private java.lang.String |
LINK_TYPE
|
private java.lang.String |
LINK_TYPE_DATA
|
private java.io.LineNumberReader |
lnr
|
private static org.apache.log4j.Category |
logger
Obtain a suitable logger. |
private cformat.PrintfStream |
ps
|
| Constructor Summary | |
JCAMP()
Constructor for the Undefined object |
|
| Method Summary | |
private boolean |
addDataBlock(joelib.jcamp.JCAMPDataBlock block)
Adds a JCAMP block. |
void |
closeReader()
Description of the Method |
void |
closeWriter()
Description of the Method |
java.lang.String |
getJCAMPData()
|
void |
initReader(java.io.InputStream is)
Description of the Method |
void |
initWriter(java.io.OutputStream os)
Description of the Method |
java.lang.String |
inputDescription()
Description of the Method |
java.lang.String[] |
inputFileExtensions()
Description of the Method |
java.lang.String |
outputDescription()
Description of the Method |
java.lang.String[] |
outputFileExtensions()
Description of the Method |
java.lang.String |
read()
Reads an molecule entry as (unparsed) String representation. |
boolean |
read(joelib.molecule.JOEMol mol)
Description of the Method |
boolean |
read(joelib.molecule.JOEMol mol,
java.lang.String title)
Description of the Method |
boolean |
readable()
Description of the Method |
private joelib.jcamp.JCAMPDataBlock |
resolveJCAMPBlocks(int _depth,
java.lang.String previousLine,
int blockID)
Gets the single JCAMP data blocks. |
boolean |
skipReaderEntry()
Skips an molecule or the rest of a molecule entry to grant the next read(JOEMol mol) invocation a proper starting position. |
boolean |
skipReaderEntry(int actualDepth)
Description of the Method |
boolean |
write(joelib.molecule.JOEMol mol)
Description of the Method |
boolean |
write(joelib.molecule.JOEMol mol,
java.lang.String title)
Description of the Method |
boolean |
writeable()
Description of the Method |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
logger
private static org.apache.log4j.Category logger
- Obtain a suitable logger.
description
private static final java.lang.String description
extensions
private static final java.lang.String[] extensions
JCAMP_CHEMICAL_STRUCTURE
private final java.lang.String JCAMP_CHEMICAL_STRUCTURE
- See Also:
- Constant Field Values
JCAMP_SPECTRA
private final java.lang.String JCAMP_SPECTRA
- See Also:
- Constant Field Values
JCAMP_START
private final java.lang.String JCAMP_START
- See Also:
- Constant Field Values
JCAMP_STOP
private final java.lang.String JCAMP_STOP
- See Also:
- Constant Field Values
LINK_TYPE
private final java.lang.String LINK_TYPE
- See Also:
- Constant Field Values
LINK_TYPE_DATA
private final java.lang.String LINK_TYPE_DATA
- See Also:
- Constant Field Values
jcamp
private joelib.jcamp.JCAMPData jcamp
lnr
private java.io.LineNumberReader lnr
ps
private cformat.PrintfStream ps
jcampCount
private int jcampCount
| Constructor Detail |
JCAMP
public JCAMP()
- Constructor for the Undefined object
| Method Detail |
getJCAMPData
public java.lang.String getJCAMPData()
closeReader
public void closeReader()
throws java.io.IOException
- Description of the Method
- Specified by:
closeReaderin interfacejoelib.io.MoleculeFileType
closeWriter
public void closeWriter()
throws java.io.IOException
- Description of the Method
- Specified by:
closeWriterin interfacejoelib.io.MoleculeFileType
initReader
public void initReader(java.io.InputStream is) throws java.io.IOException
- Description of the Method
- Specified by:
initReaderin interfacejoelib.io.MoleculeFileType
initWriter
public void initWriter(java.io.OutputStream os) throws java.io.IOException
- Description of the Method
- Specified by:
initWriterin interfacejoelib.io.MoleculeFileType
inputDescription
public java.lang.String inputDescription()
- Description of the Method
- Specified by:
inputDescriptionin interfacejoelib.io.MoleculeFileType
inputFileExtensions
public java.lang.String[] inputFileExtensions()
- Description of the Method
- Specified by:
inputFileExtensionsin interfacejoelib.io.MoleculeFileType
outputDescription
public java.lang.String outputDescription()
- Description of the Method
- Specified by:
outputDescriptionin interfacejoelib.io.MoleculeFileType
outputFileExtensions
public java.lang.String[] outputFileExtensions()
- Description of the Method
- Specified by:
outputFileExtensionsin interfacejoelib.io.MoleculeFileType
read
public java.lang.String read() throws java.io.IOException
- Reads an molecule entry as (unparsed) String representation.
- Specified by:
readin interfacejoelib.io.MoleculeFileType
read
public boolean read(joelib.molecule.JOEMol mol) throws java.io.IOException
- Description of the Method
- Specified by:
readin interfacejoelib.io.MoleculeFileType
read
public boolean read(joelib.molecule.JOEMol mol, java.lang.String title) throws java.io.IOException
- Description of the Method
- Specified by:
readin interfacejoelib.io.MoleculeFileType
readable
public boolean readable()
- Description of the Method
- Specified by:
readablein interfacejoelib.io.MoleculeFileType
skipReaderEntry
public boolean skipReaderEntry()
throws java.io.IOException
- Description copied from interface:
joelib.io.MoleculeFileType - Skips an molecule or the rest of a molecule entry to grant the
next read(JOEMol mol) invocation a proper starting position.
This method should always be called if you plan to throw an
MoleculeIOException.
- Specified by:
skipReaderEntryin interfacejoelib.io.MoleculeFileType
skipReaderEntry
public boolean skipReaderEntry(int actualDepth)
throws java.io.IOException
- Description of the Method
write
public boolean write(joelib.molecule.JOEMol mol) throws java.io.IOException
- Description of the Method
- Specified by:
writein interfacejoelib.io.MoleculeFileType
write
public boolean write(joelib.molecule.JOEMol mol, java.lang.String title) throws java.io.IOException
- Description of the Method
- Specified by:
writein interfacejoelib.io.MoleculeFileType
writeable
public boolean writeable()
- Description of the Method
- Specified by:
writeablein interfacejoelib.io.MoleculeFileType
addDataBlock
private boolean addDataBlock(joelib.jcamp.JCAMPDataBlock block)
- Adds a JCAMP block.
resolveJCAMPBlocks
private joelib.jcamp.JCAMPDataBlock resolveJCAMPBlocks(int _depth, java.lang.String previousLine, int blockID) throws java.io.IOException
- Gets the single JCAMP data blocks.
|
|||||||||
| Home >> All >> joelib >> io >> [ types overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
joelib.io.types.JCAMP