Package org.openscience.cdk.io.iterator
Class IteratingPCSubstancesXMLReader
- java.lang.Object
-
- org.openscience.cdk.io.ChemObjectIO
-
- org.openscience.cdk.io.iterator.DefaultIteratingChemObjectReader<IChemModel>
-
- org.openscience.cdk.io.iterator.IteratingPCSubstancesXMLReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterator<IChemModel>
,IChemObjectIO
,IChemObjectReader
,IIteratingChemObjectReader<IChemModel>
public class IteratingPCSubstancesXMLReader extends DefaultIteratingChemObjectReader<IChemModel>
Iterating PubChem PC-Substances ASN.1 XML reader.- Author:
- Egon Willighagen <egonw@users.sf.net>
- Source code:
- main
- Belongs to CDK module:
- io
- Keywords:
- file format, ASN, PubChem
- Created on:
- 2008-05-05
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openscience.cdk.io.IChemObjectReader
IChemObjectReader.Mode
-
-
Field Summary
-
Fields inherited from class org.openscience.cdk.io.iterator.DefaultIteratingChemObjectReader
errorHandler, mode
-
-
Constructor Summary
Constructors Constructor Description IteratingPCSubstancesXMLReader(InputStream in, IChemObjectBuilder builder)
Constructs a new IteratingPCSubstancesXMLReader that can read Molecule from a given InputStream and IChemObjectBuilder.IteratingPCSubstancesXMLReader(Reader in, IChemObjectBuilder builder)
Constructs a new IteratingPCSubstancesXMLReader that can read Molecule from a given Reader and IChemObjectBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes this IChemObjectIO's resources.IResourceFormat
getFormat()
Returns theIResourceFormat
class for this IO class.boolean
hasNext()
IChemModel
next()
void
remove()
File IO generally does not support removing of entries.void
setReader(InputStream reader)
Sets the InputStream from which this ChemObjectReader should read the contents.void
setReader(Reader reader)
Sets the Reader from which this ChemObjectReader should read the contents.-
Methods inherited from class org.openscience.cdk.io.iterator.DefaultIteratingChemObjectReader
accepts, handleError, handleError, handleError, handleError, setErrorHandler, setReaderMode
-
Methods inherited from class org.openscience.cdk.io.ChemObjectIO
addChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openscience.cdk.io.IChemObjectIO
addChemObjectIOListener, addSetting, addSettings, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
IteratingPCSubstancesXMLReader
public IteratingPCSubstancesXMLReader(Reader in, IChemObjectBuilder builder) throws IOException, XMLStreamException
Constructs a new IteratingPCSubstancesXMLReader that can read Molecule from a given Reader and IChemObjectBuilder.- Parameters:
in
- The input streambuilder
- The builder- Throws:
IOException
- if there is error in getting theIsotopeFactory
XMLStreamException
- an error in reading XML
-
IteratingPCSubstancesXMLReader
public IteratingPCSubstancesXMLReader(InputStream in, IChemObjectBuilder builder) throws Exception
Constructs a new IteratingPCSubstancesXMLReader that can read Molecule from a given InputStream and IChemObjectBuilder.- Parameters:
in
- The input streambuilder
- The builder. In general, useDefaultChemObjectBuilder
- Throws:
Exception
- if there is a problem creating an InputStreamReader
-
-
Method Detail
-
getFormat
public IResourceFormat getFormat()
Description copied from interface:IChemObjectIO
Returns theIResourceFormat
class for this IO class.
-
hasNext
public boolean hasNext()
-
next
public IChemModel next()
-
close
public void close() throws IOException
Description copied from interface:IChemObjectIO
Closes this IChemObjectIO's resources.- Throws:
IOException
- when the wrapper IO class cannot be closed.
-
remove
public void remove()
Description copied from class:DefaultIteratingChemObjectReader
File IO generally does not support removing of entries.- Specified by:
remove
in interfaceIterator<IChemModel>
- Overrides:
remove
in classDefaultIteratingChemObjectReader<IChemModel>
-
setReader
public void setReader(Reader reader) throws CDKException
Description copied from interface:IChemObjectReader
Sets the Reader from which this ChemObjectReader should read the contents.- Throws:
CDKException
-
setReader
public void setReader(InputStream reader) throws CDKException
Description copied from interface:IChemObjectReader
Sets the InputStream from which this ChemObjectReader should read the contents.- Throws:
CDKException
-
-