Package org.openscience.cdk.io
Class RGroupQueryWriter
- java.lang.Object
-
- org.openscience.cdk.io.ChemObjectIO
-
- org.openscience.cdk.io.DefaultChemObjectWriter
-
- org.openscience.cdk.io.RGroupQueryWriter
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IChemObjectIO
,IChemObjectWriter
public class RGroupQueryWriter extends DefaultChemObjectWriter
A writer for Symyx' Rgroup files (RGFiles).
An RGfile describes a single molecular query with Rgroups. Each RGfile is a combination of Ctabs defining the root molecule and each member of each Rgroup in the query.
This class relies on theMDLV2000Writer
to create CTAB data blocks.- Author:
- Mark Rijnbeek
- Source code:
- main
- Belongs to CDK module:
- io
- Keywords:
- Rgroup, R group, R-group
-
-
Constructor Summary
Constructors Constructor Description RGroupQueryWriter()
Zero argument constructor.RGroupQueryWriter(Writer out)
Constructs a new writer that can write anIRGroupQuery
to the Symx RGFile format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(Class<? extends IChemObject> classObject)
Returns true for accepted input types.void
close()
Flushes the output and closes this object.IResourceFormat
getFormat()
Returns output format.void
setWriter(OutputStream output)
Sets the writer to given output stream.void
setWriter(Writer out)
Sets the writer.void
write(IChemObject object)
The actual writing of the output.-
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
-
-
-
-
Constructor Detail
-
RGroupQueryWriter
public RGroupQueryWriter(Writer out)
Constructs a new writer that can write anIRGroupQuery
to the Symx RGFile format.- Parameters:
out
- The Writer to write to
-
RGroupQueryWriter
public RGroupQueryWriter()
Zero argument constructor.
-
-
Method Detail
-
accepts
public boolean accepts(Class<? extends IChemObject> classObject)
Returns true for accepted input types.- Parameters:
classObject
-IChemObject
of which is tested if it can be handled.- Returns:
- true, if the
IChemObject
can be handled.
-
close
public void close() throws IOException
Flushes the output and closes this object.- Throws:
IOException
- when the wrapper IO class cannot be closed.
-
getFormat
public IResourceFormat getFormat()
Returns output format.
-
setWriter
public void setWriter(OutputStream output) throws CDKException
Sets the writer to given output stream.- Throws:
CDKException
-
setWriter
public void setWriter(Writer out) throws CDKException
Sets the writer.- Throws:
CDKException
-
write
public void write(IChemObject object) throws CDKException
The actual writing of the output.- Parameters:
object
- the object of which the content is outputted- Throws:
CDKException
- could not write RGroup query
-
-