|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openscience.cdk.io.iterator.DefaultIteratingChemObjectReader
public abstract class DefaultIteratingChemObjectReader
Abstract class that IteratingChemObjectReader's can implement to have it take care of basic stuff, like managing the ReaderListeners.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.openscience.cdk.io.IChemObjectReader |
|---|
IChemObjectReader.Mode |
| Constructor Summary | |
|---|---|
DefaultIteratingChemObjectReader()
|
|
| Method Summary | |
|---|---|
boolean |
accepts(Class objectClass)
Returns whether the given IChemObject can be read or written. |
void |
addChemObjectIOListener(IChemObjectIOListener listener)
Adds a IChemObjectIOListener to this IChemObjectIO. |
IOSetting[] |
getIOSettings()
Returns an array of IOSettings 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 |
remove()
File IO generally does not support removing of entries. |
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openscience.cdk.io.IChemObjectReader |
|---|
setReader, setReader |
| Methods inherited from interface org.openscience.cdk.io.IChemObjectIO |
|---|
close, getFormat |
| Methods inherited from interface java.util.Iterator |
|---|
hasNext, next |
| Constructor Detail |
|---|
public DefaultIteratingChemObjectReader()
| Method Detail |
|---|
public void addChemObjectIOListener(IChemObjectIOListener listener)
IChemObjectIOIChemObjectIOListener to this IChemObjectIO.
addChemObjectIOListener in interface IChemObjectIOlistener - the reader listener to add.public void removeChemObjectIOListener(IChemObjectIOListener listener)
IChemObjectIOIChemObjectIOListener from this IChemObjectIO.
removeChemObjectIOListener in interface IChemObjectIOlistener - the listener to be removed.public boolean accepts(Class objectClass)
IChemObjectIOIChemObject can be read or written.
accepts in interface IChemObjectIOobjectClass - IChemObject of which is tested if it can be handled.
IChemObject can be handled.public void remove()
remove in interface Iteratorpublic IOSetting[] getIOSettings()
IChemObjectIOIOSettings defined by this IChemObjectIO class.
getIOSettings in interface IChemObjectIOIOSettings for this class.public void setReaderMode(IChemObjectReader.Mode mode)
IChemObjectReader
setReaderMode in interface IChemObjectReaderpublic void setErrorHandler(IChemObjectReaderErrorHandler handler)
setErrorHandler in interface IChemObjectReaderhandler - 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 IChemObjectReadermessage - 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 IChemObjectReadermessage - 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 IChemObjectReadermessage - 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 IChemObjectReadermessage - 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||