public abstract class DefaultChemObjectReader extends Object implements ISimpleChemObjectReader
IChemObjectReader.Mode
Constructor and Description |
---|
DefaultChemObjectReader() |
Modifier and Type | Method and Description |
---|---|
void |
addChemObjectIOListener(IChemObjectIOListener listener)
Adds a
IChemObjectIOListener to this IChemObjectIO. |
IOSetting[] |
getIOSettings()
Returns an array of
IOSetting s defined by this IChemObjectIO class. |
void |
handleError(String message)
Redirects an error message to the
IChemObjectReaderErrorHandler . |
void |
handleError(String message,
Exception exception)
Redirects an error message to the
IChemObjectReaderErrorHandler . |
void |
handleError(String message,
int row,
int colStart,
int colEnd)
Redirects an error message to the
IChemObjectReaderErrorHandler . |
void |
handleError(String message,
int row,
int colStart,
int colEnd,
Exception exception)
Redirects an error message to the
IChemObjectReaderErrorHandler . |
void |
removeChemObjectIOListener(IChemObjectIOListener listener)
Removes a
IChemObjectIOListener from this IChemObjectIO. |
void |
setErrorHandler(IChemObjectReaderErrorHandler handler)
Sets an error handler that is sent events when file format issues occur.
|
void |
setReaderMode(IChemObjectReader.Mode mode)
Sets the reader mode.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read
setReader, setReader
accepts, close, getFormat
public void addChemObjectIOListener(IChemObjectIOListener listener)
IChemObjectIO
IChemObjectIOListener
to this IChemObjectIO.addChemObjectIOListener
in interface IChemObjectIO
listener
- the reader listener to add.public void removeChemObjectIOListener(IChemObjectIOListener listener)
IChemObjectIO
IChemObjectIOListener
from this IChemObjectIO.removeChemObjectIOListener
in interface IChemObjectIO
listener
- the listener to be removed.public IOSetting[] getIOSettings()
IChemObjectIO
IOSetting
s defined by this IChemObjectIO class.getIOSettings
in interface IChemObjectIO
IOSetting
s for this class.public void setReaderMode(IChemObjectReader.Mode mode)
IChemObjectReader
setReaderMode
in interface IChemObjectReader
public void setErrorHandler(IChemObjectReaderErrorHandler handler)
setErrorHandler
in interface IChemObjectReader
handler
- IChemObjectReaderErrorHandler
to send error
messages to.public void handleError(String message) throws CDKException
IChemObjectReaderErrorHandler
.
Throws an CDKException
when in STRICT IChemObjectReader.Mode
.handleError
in interface IChemObjectReader
message
- the error message.CDKException
public void handleError(String message, Exception exception) throws CDKException
IChemObjectReaderErrorHandler
.
Throws an CDKException
when in STRICT IChemObjectReader.Mode
.handleError
in interface IChemObjectReader
message
- the error message.exception
- the corresponding Exception
.CDKException
public void handleError(String message, int row, int colStart, int colEnd) throws CDKException
IChemObjectReaderErrorHandler
.
Throws an CDKException
when in STRICT IChemObjectReader.Mode
.handleError
in interface IChemObjectReader
message
- the error message.row
- Row in the file where the error is found.colStart
- Start column in the file where the error is found.colEnd
- End column in the file where the error is found.CDKException
public void handleError(String message, int row, int colStart, int colEnd, Exception exception) throws CDKException
IChemObjectReaderErrorHandler
.
Throws an CDKException
when in STRICT IChemObjectReader.Mode
.handleError
in interface IChemObjectReader
message
- the error message.row
- Row in the file where the error is found.colStart
- Start column in the file where the error is found.colEnd
- End column in the file where the error is found.exception
- the corresponding Exception
.CDKException