org.openscience.cdk.io.iterator
Class IteratingPCCompoundASNReader

java.lang.Object
  extended by org.openscience.cdk.io.ChemObjectIO
      extended by org.openscience.cdk.io.iterator.DefaultIteratingChemObjectReader<IAtomContainer>
          extended by org.openscience.cdk.io.iterator.IteratingPCCompoundASNReader
All Implemented Interfaces:
Closeable, Iterator<IAtomContainer>, IChemObjectIO, IChemObjectReader, IIteratingChemObjectReader<IAtomContainer>

public class IteratingPCCompoundASNReader
extends DefaultIteratingChemObjectReader<IAtomContainer>

Iterating PubChem PCCompound ASN reader.

Author:
Egon Willighagen
See Also:
PCCompoundASNReader
Keywords:
file format, ASN, PubChem
Created on:
2008-05-05
Belongs to CDK module:
io
Source code:
cdk-1.4.x

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openscience.cdk.io.IChemObjectReader
IChemObjectReader.Mode
 
Constructor Summary
IteratingPCCompoundASNReader(InputStream in, IChemObjectBuilder builder)
          Constructs a new IteratingPCCompoundASNReader that can read Molecule from a given InputStream and IChemObjectBuilder.
IteratingPCCompoundASNReader(Reader in, IChemObjectBuilder builder)
          Constructs a new IteratingPCCompoundASNReader that can read Molecule from a given Reader.
 
Method Summary
 void close()
          Closes this IChemObjectIO's resources.
 IResourceFormat getFormat()
          Returns the IResourceFormat class for this IO class.
 boolean hasNext()
           
 IAtomContainer 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, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
 
Methods inherited from class java.lang.Object
equals, 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
 

Constructor Detail

IteratingPCCompoundASNReader

public IteratingPCCompoundASNReader(Reader in,
                                    IChemObjectBuilder builder)
Constructs a new IteratingPCCompoundASNReader that can read Molecule from a given Reader.

Parameters:
in - The Reader to read from

IteratingPCCompoundASNReader

public IteratingPCCompoundASNReader(InputStream in,
                                    IChemObjectBuilder builder)
Constructs a new IteratingPCCompoundASNReader that can read Molecule from a given InputStream and IChemObjectBuilder.

Parameters:
in - The input stream
builder - The builder
Method Detail

getFormat

@TestMethod(value="testGetFormat")
public IResourceFormat getFormat()
Description copied from interface: IChemObjectIO
Returns the IResourceFormat class for this IO class.


hasNext

public boolean hasNext()

next

public IAtomContainer next()

close

@TestMethod(value="testClose")
public void close()
           throws IOException
Description copied from interface: IChemObjectIO
Closes this IChemObjectIO's resources.

Throws:
IOException

remove

public void remove()
Description copied from class: DefaultIteratingChemObjectReader
File IO generally does not support removing of entries.

Specified by:
remove in interface Iterator<IAtomContainer>
Overrides:
remove in class DefaultIteratingChemObjectReader<IAtomContainer>

setReader

@TestMethod(value="testSetReader_Reader")
public void setReader(Reader reader)
Description copied from interface: IChemObjectReader
Sets the Reader from which this ChemObjectReader should read the contents.


setReader

@TestMethod(value="testSetReader_InputStream")
public void setReader(InputStream reader)
Description copied from interface: IChemObjectReader
Sets the InputStream from which this ChemObjectReader should read the contents.