toxTree.data
Class MoleculesIterator

java.lang.Object
  extended by toxTree.data.MoleculesIterator
All Implemented Interfaces:
java.util.Iterator, IMoleculesIterator
Direct Known Subclasses:
FilteredMoleculesIterator

public class MoleculesIterator
extends java.lang.Object
implements IMoleculesIterator

Contains molecules

Author:
Nina Jeliazkova Modified 2005-9-3

Field Summary
protected  ListOfAtomContainers containers
           
protected  int currentNo
           
protected  java.lang.String filename
           
protected static TTLogger logger
           
protected  int status
           
 
Fields inherited from interface toxTree.core.IMoleculesIterator
MSG_EMPTYFILE, MSG_ERRORONOPEN, MSG_ERRORONSAVE, MSG_OPENSUCCESS, MSG_SAVESUCCESS, MSG_UNSUPPORTEDFORMAT
 
Constructor Summary
MoleculesIterator()
           
 
Method Summary
 void addMolecule(org.openscience.cdk.interfaces.IAtomContainer mol)
           
 void clear()
           
 java.lang.Object first()
           
 org.openscience.cdk.interfaces.IAtomContainer getAtomContainer(int index)
           
protected  ListOfAtomContainers getContainers()
           
 int getCurrentNo()
           
 java.lang.String getFilename()
           
 org.openscience.cdk.interfaces.IAtomContainer getMolecule()
           
 org.openscience.cdk.interfaces.IMoleculeSet getMoleculeForEdit()
           
 org.openscience.cdk.interfaces.IAtomContainer[] getMolecules()
           
 int getMoleculesCount()
           
 org.openscience.cdk.interfaces.IMoleculeSet getSetOfAtomContainers()
           
 java.lang.String getStatus()
           
 boolean hasNext()
           
 boolean isReading()
           
 boolean isWriting()
           
 java.lang.Object last()
           
 java.lang.Object next()
           
 java.util.List openFile(java.io.File input)
           
 java.lang.Object prev()
           
 void remove()
           
 void saveFile(java.io.File output)
           
 org.openscience.cdk.interfaces.IAtomContainer setCurrentNo(int record)
           
 void setDone(boolean success)
           
 void setMolecule(org.openscience.cdk.interfaces.IAtomContainer mol)
           
 void setMolecules(java.util.List molecules)
           
 void setReading()
           
 void setWriting()
           
 java.lang.String toString()
           
protected  void useIterativeReader(java.io.InputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

containers

protected ListOfAtomContainers containers

currentNo

protected int currentNo

logger

protected static TTLogger logger

status

protected int status

filename

protected java.lang.String filename
Constructor Detail

MoleculesIterator

public MoleculesIterator()
Method Detail

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

getAtomContainer

public org.openscience.cdk.interfaces.IAtomContainer getAtomContainer(int index)
Specified by:
getAtomContainer in interface IMoleculesIterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

getMolecules

public org.openscience.cdk.interfaces.IAtomContainer[] getMolecules()
Specified by:
getMolecules in interface IMoleculesIterator
Returns:
Returns the molecules.

setMolecules

public void setMolecules(java.util.List molecules)
Specified by:
setMolecules in interface IMoleculesIterator
Parameters:
molecules - The molecules to set.

getCurrentNo

public int getCurrentNo()
Specified by:
getCurrentNo in interface IMoleculesIterator
Returns:
Returns the currentNo.

clear

public void clear()
Specified by:
clear in interface IMoleculesIterator

prev

public java.lang.Object prev()
Specified by:
prev in interface IMoleculesIterator

first

public java.lang.Object first()
Specified by:
first in interface IMoleculesIterator

last

public java.lang.Object last()
Specified by:
last in interface IMoleculesIterator

setCurrentNo

public org.openscience.cdk.interfaces.IAtomContainer setCurrentNo(int record)
Specified by:
setCurrentNo in interface IMoleculesIterator

getMolecule

public org.openscience.cdk.interfaces.IAtomContainer getMolecule()
Specified by:
getMolecule in interface IMoleculesIterator
Returns:
Returns the molecule.

getMoleculesCount

public int getMoleculesCount()
Specified by:
getMoleculesCount in interface IMoleculesIterator

addMolecule

public void addMolecule(org.openscience.cdk.interfaces.IAtomContainer mol)
Specified by:
addMolecule in interface IMoleculesIterator

setMolecule

public void setMolecule(org.openscience.cdk.interfaces.IAtomContainer mol)
Specified by:
setMolecule in interface IMoleculesIterator

useIterativeReader

protected void useIterativeReader(java.io.InputStream in)

openFile

public java.util.List openFile(java.io.File input)
                        throws ToxTreeIOException
Specified by:
openFile in interface IMoleculesIterator
Throws:
ToxTreeIOException

saveFile

public void saveFile(java.io.File output)
              throws ToxTreeIOException
Specified by:
saveFile in interface IMoleculesIterator
Throws:
ToxTreeIOException

isReading

public boolean isReading()
Specified by:
isReading in interface IMoleculesIterator

isWriting

public boolean isWriting()
Specified by:
isWriting in interface IMoleculesIterator

getStatus

public java.lang.String getStatus()
Specified by:
getStatus in interface IMoleculesIterator

setReading

public void setReading()
Specified by:
setReading in interface IMoleculesIterator

setWriting

public void setWriting()
Specified by:
setWriting in interface IMoleculesIterator

setDone

public void setDone(boolean success)
Specified by:
setDone in interface IMoleculesIterator

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSetOfAtomContainers

public org.openscience.cdk.interfaces.IMoleculeSet getSetOfAtomContainers()

getMoleculeForEdit

public org.openscience.cdk.interfaces.IMoleculeSet getMoleculeForEdit()
                                                               throws java.lang.Exception
Specified by:
getMoleculeForEdit in interface IMoleculesIterator
Throws:
java.lang.Exception

getFilename

public java.lang.String getFilename()
Specified by:
getFilename in interface IMoleculesIterator

getContainers

protected ListOfAtomContainers getContainers()


Copyright © 2004-2012 Ideaconsult Ltd.. All Rights Reserved.