Class RssWriter

All Implemented Interfaces:
Closeable, AutoCloseable, IChemObjectIO, IChemObjectWriter

public class RssWriter extends DefaultChemObjectWriter
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 Details

    • RssWriter

      public RssWriter()
  • Method Details

    • 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 the IResourceFormat 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 given IChemObject 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