|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.io.MRecordImporter
public class MRecordImporter
Marvin molecule file reader.
| Constructor Summary | |
|---|---|
MRecordImporter(MolInputStream in,
java.lang.String opts)
Creates a reader for the specified molecule input stream. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the input stream. |
static MolImportModule |
createImportMod(MolInputStream mis,
java.lang.String[] opts)
Creates an importer for the specified molecule input stream. |
Molecule |
createMol()
Creates an empty target molecule for import. |
long |
getFilePointer()
Gets the current position in the input file. |
java.lang.String |
getFormat()
Gets the file format. |
MPropertyContainer |
getGlobalProperties()
Gets the global properties. |
int |
getLineCount()
Gets the current line number in the input file. |
java.lang.String |
getMoleculeString()
Gets the last molecule as a string. |
java.lang.String |
getOptions()
Gets the options for the import module. |
boolean |
getQueryMode()
Gets the query mode. |
MRecordReader |
getRecordReader()
Gets the record reader. |
boolean |
isSeekable()
Tests whether the record reader is seekable. |
long |
length()
Gets the length of the input file. |
MDocument |
readDoc()
Reads the next document. |
Molecule |
readMol(Molecule mol)
Reads the next molecule. |
Molecule |
readMultiSet(Molecule m)
Reads molecules as one multi-set molecule. |
java.lang.String |
readRecordAsText()
Reads the next record. |
void |
seek(long p,
int lcount,
int k)
Sets the file-pointer offset, measured from the beginning of this file, at which the next read or write occurs. |
void |
setOptions(java.lang.String opts)
Sets the options for the import module. |
void |
setProgressMonitor(MProgressMonitor pmon)
Sets the progress monitor. |
void |
setQueryMode(boolean q)
Sets the query mode. |
MRecord |
skipRecord()
Skips the next document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MRecordImporter(MolInputStream in,
java.lang.String opts)
throws MolFormatException,
java.io.IOException
in - the molecule input streamopts - input options or null
MolFormatException - If the format is not recognizable
java.io.IOException - If I/O error occured
java.nio.charset.IllegalCharsetNameException - if illegal encoding is used
java.nio.charset.UnsupportedCharsetException - if unsupported encoding is used| Method Detail |
|---|
public void setProgressMonitor(MProgressMonitor pmon)
pmon - the progress monitor
public static MolImportModule createImportMod(MolInputStream mis,
java.lang.String[] opts)
throws java.io.IOException,
MolFormatException
mis - the molecule input streamopts - one-element array containing the input options, may be
changed by this function
MolFormatException - If the format is not recognizable
java.io.IOException - If I/O error occuredpublic java.lang.String getOptions()
public void setOptions(java.lang.String opts)
opts - options passed to the import module or null
public MDocument readDoc()
throws MRecordParseException,
MolFormatException,
java.io.IOException
null at end of file
MRecordParseException - If the record could not be parsed
MolFormatException - If the file format is invalid
java.io.IOException - If I/O error occured
public Molecule readMol(Molecule mol)
throws MRecordParseException,
MolFormatException,
java.io.IOException
mol - target object or null
null at end of file
MRecordParseException - If the record could not be parsed
MolFormatException - If the file format is invalid
java.io.IOException - If I/O error occured
public Molecule readMultiSet(Molecule m)
throws MRecordParseException,
MolFormatException,
java.io.IOException
m - the output molecule object
java.io.IOException - cannot read molecule (bad format or I/O error)
MRecordParseException
MolFormatException
public java.lang.String readRecordAsText()
throws MRecordParseException,
java.io.IOException
null at end of file
MRecordParseException - If the record could not be parsed
java.io.IOException - If I/O error occuredpublic MPropertyContainer getGlobalProperties()
nullpublic boolean isSeekable()
true if it is seekable,
false otherwisepublic java.lang.String getFormat()
public boolean getQueryMode()
public void setQueryMode(boolean q)
q - query modepublic long getFilePointer()
public long length()
throws java.io.IOException
java.io.IOException - if the length cannot be determinedpublic int getLineCount()
public void seek(long p,
int lcount,
int k)
throws java.io.IOException
p - the file pointerlcount - the line count at the specified positionk - the record count at the specified position
java.io.IOException - if pos is less than
0 or if an I/O error occurs.
public MRecord skipRecord()
throws MRecordParseException,
MolFormatException,
java.io.IOException
null if there are no more records
java.io.IOException - If I/O error occured
MRecordParseException
MolFormatException
public void close()
throws java.io.IOException
java.io.IOException - If I/O error occuredpublic java.lang.String getMoleculeString()
public Molecule createMol()
public MRecordReader getRecordReader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||