Class WriterFactory


  • public class WriterFactory
    extends Object
    Helper tool to create IChemObjectWriters.
    Author:
    Egon Willighagen <ewilligh@uni-koeln.de>
    Source code:
    main
    Belongs to CDK module:
    io
    • Constructor Detail

      • WriterFactory

        public WriterFactory()
        Constructs a ChemObjectIOInstantionTests.
    • Method Detail

      • registerWriter

        public void registerWriter​(Class<?> writer)
      • findChemFormats

        public IChemFormat[] findChemFormats​(int features)
        Finds IChemFormats that provide a container for serialization for the given features. The syntax of the integer is explained in the DataFeatures class.
        Parameters:
        features - the data features for which a IChemFormat is searched
        Returns:
        an array of IChemFormat's that can contain the given features
        See Also:
        DataFeatures
      • formatCount

        public int formatCount()
      • createWriter

        public IChemObjectWriter createWriter​(IChemFormat format)
        Creates a new IChemObjectWriter based on the given IChemFormat.