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
public class RssWriter extends DefaultChemObjectWriter
Generates an RSS feed. It the object is aIAtomContainerSet
, 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 Constructor Description RssWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(Class<? extends IChemObject> classObject)
Returns whether the givenIChemObject
can be read or written.void
close()
Flushes the output and closes this object.Map
getCreatormap()
Map
getDatemap()
IResourceFormat
getFormat()
Returns theIResourceFormat
class for this IO class.Map
getInchimap()
Map
getLinkmap()
Map
getMultiMap()
Map
getTitlemap()
void
setAbout(String about)
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
setLink(String link)
void
setLinkmap(Map linkmap)
void
setMultiMap(Map multiMap)
void
setPublisher(String publisher)
void
setTimezone(String timezone)
void
setTitle(String title)
void
setTitlemap(Map titlemap)
void
setWriter(OutputStream output)
Sets the OutputStream from which this ChemObjectWriter should write the contents.void
setWriter(Writer out)
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
-
-
-
-
Method Detail
-
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()
Description copied from interface:IChemObjectIO
Returns theIResourceFormat
class for this IO class.
-
setWriter
public void setWriter(Writer out) throws CDKException
Description copied from interface:IChemObjectWriter
Sets the Writer from which this ChemObjectWriter should write the contents.- Throws:
CDKException
-
setWriter
public void setWriter(OutputStream output) throws CDKException
Description copied from interface:IChemObjectWriter
Sets the OutputStream from which this ChemObjectWriter should write the contents.- Throws:
CDKException
-
accepts
public boolean accepts(Class<? extends IChemObject> classObject)
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
public void write(IChemObject object) throws CDKException
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
public Map 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
public void setDatemap(Map datemap)
- 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
public Map 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
public void setLinkmap(Map linkmap)
- 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
public Map 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
public void setTitlemap(Map titlemap)
- 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
public Map 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
public void setCreatormap(Map creatormap)
- 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
public void setAbout(String about)
- Parameters:
about
- This will be the about for the rss feed
-
setCreator
public void setCreator(String creator)
- Parameters:
creator
- This will be the creator for the rss feed
-
setDescription
public void setDescription(String description)
- Parameters:
description
- This will be the description for the rss feed
-
setImagelink
public void setImagelink(String imagelink)
- Parameters:
imagelink
- This will be the imagelink for the rss feed
-
setLink
public void setLink(String link)
- Parameters:
link
- This will be the link for the rss feed
-
setPublisher
public void setPublisher(String publisher)
- Parameters:
publisher
- This will be the publisher for the rss feed
-
setTitle
public void setTitle(String title)
- Parameters:
title
- This will be the title for the rss feed
-
getMultiMap
public Map 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
public void setMultiMap(Map multiMap)
- 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
public void setTimezone(String timezone)
- Parameters:
timezone
- This will be added to the data as timezone. format according to 23c. Examples "+01:00" "-05:00"
-
getInchimap
public Map 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
public void setInchimap(Map inchimap)
- 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
-
-