Package org.openscience.cdk.io
Class RssWriter
java.lang.Object
org.openscience.cdk.io.ChemObjectIO
org.openscience.cdk.io.DefaultChemObjectWriter
org.openscience.cdk.io.RssWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IChemObjectIO
,IChemObjectWriter
Generates an RSS feed. It the object is a
IAtomContainerSet
, the molecules
are put in separately. All other objects are made CML and put in.- Author:
- Stefan Kuhn
- Source code:
- main
- Belongs to CDK module:
- libiocml
- Keywords:
- RSS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts
(Class<? extends IChemObject> classObject) Returns whether the givenIChemObject
can be read or written.void
close()
Flushes the output and closes this object.Returns theIResourceFormat
class for this IO class.void
void
setCreator
(String creator) void
setCreatormap
(Map creatormap) void
setDatemap
(Map datemap) void
setDescription
(String description) void
setImagelink
(String imagelink) void
setInchimap
(Map inchimap) void
void
setLinkmap
(Map linkmap) void
setMultiMap
(Map multiMap) void
setPublisher
(String publisher) void
setTimezone
(String timezone) void
void
setTitlemap
(Map titlemap) void
setWriter
(OutputStream output) Sets the OutputStream from which this ChemObjectWriter should write the contents.void
Sets the Writer from which this ChemObjectWriter should write the contents.void
write
(IChemObject object) Writes a IChemObject to the MDL molfile formated 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 Details
-
RssWriter
public RssWriter()
-
-
Method Details
-
close
Flushes the output and closes this object.- Throws:
IOException
- when the wrapper IO class cannot be closed.
-
getFormat
Description copied from interface:IChemObjectIO
Returns theIResourceFormat
class for this IO class. -
setWriter
Description copied from interface:IChemObjectWriter
Sets the Writer from which this ChemObjectWriter should write the contents.- Throws:
CDKException
-
setWriter
Description copied from interface:IChemObjectWriter
Sets the OutputStream from which this ChemObjectWriter should write the contents.- Throws:
CDKException
-
accepts
Description copied from interface:IChemObjectIO
Returns whether the givenIChemObject
can be read or written.- Parameters:
classObject
-IChemObject
of which is tested if it can be handled.- Returns:
- true, if the
IChemObject
can be handled.
-
write
Writes a IChemObject to the MDL molfile formated output.- Parameters:
object
- Best choice is a set of molecules- Throws:
CDKException
- is thrown if the output does not support the data in the object
-
getDatemap
- Returns:
- the datemap. If you put a java.util.Date in this map with one of the objects you want to write as key, it will be added as a date to this object (no validity check is done)
-
setDatemap
- Parameters:
datemap
- the datemap. If you put a java.uitl.Date in this map with one of the objects you want to write as key, it will be added as a datek to this object (no validity check is done)
-
getLinkmap
- Returns:
- the linkmap. If you put a String in this map with one of the objects you want to write as key, it will be added as a link to this object (no validity check is done)
-
setLinkmap
- Parameters:
linkmap
- the linkmap. If you put a String in this map with one of the objects you want to write as key, it will be added as a link to this object (no validity check is done)
-
getTitlemap
- Returns:
- the titlemap. If you put a String in this map with one of the objects you want to write as key, it will be added as a title to this object (no validity check is done)
-
setTitlemap
- Parameters:
titlemap
- the titlemap. If you put a String in this map with one of the objects you want to write as key, it will be added as a titel to this object (no validity check is done)
-
getCreatormap
- Returns:
- the creatoremap. If you put a String in this map with one of the objects you want to write as key, it will be added as a creator to this object (no validity check is done)
-
setCreatormap
- Parameters:
creatormap
- the creatormap. If you put a String in this map with one of the objects you want to write as key, it will be added as a creator to this object (no validity check is done)
-
setAbout
- Parameters:
about
- This will be the about for the rss feed
-
setCreator
- Parameters:
creator
- This will be the creator for the rss feed
-
setDescription
- Parameters:
description
- This will be the description for the rss feed
-
setImagelink
- Parameters:
imagelink
- This will be the imagelink for the rss feed
-
setLink
- Parameters:
link
- This will be the link for the rss feed
-
setPublisher
- Parameters:
publisher
- This will be the publisher for the rss feed
-
setTitle
- Parameters:
title
- This will be the title for the rss feed
-
getMultiMap
- Returns:
- the multimap. If you put any number of nu.xom.Elements in this map with one of the objects you want to write as key, it will be added as a child to the same node as the cml code of the object
-
setMultiMap
- Parameters:
multiMap
- If you put any number of nu.xom.Elements in this map with one of the objects you want to write as key, it will be added as a child to the same node as the cml code of the object
-
setTimezone
- Parameters:
timezone
- This will be added to the data as timezone. format according to 23c. Examples "+01:00" "-05:00"
-
getInchimap
- Returns:
- inchimap If you put any number of Strings in this map with one of the objects you want to write as key, it will be added as a child to the same node as the cml code of the object
-
setInchimap
- Parameters:
inchimap
- If you put any number of Strings in this map with one of the objects you want to write as key, it will be added as a child to the same node as the cml code of the object
-