Class XMLWriter


  • public class XMLWriter
    extends java.lang.Object
    Methods to write the XML tags to the files.
    Since:
    3.0-Beta4
    Version:
    3.0 (Internal version: $Revision: $Date: $)
    Author:
    Jean-Marie Burel      j.burel@dundee.ac.uk, Donald MacDonald      donald@lifesci.dundee.ac.uk
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLWriter()
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void writeFile​(java.io.File file, OME ome)
      Writes the data to the file.
      void writeFile​(java.io.File file, OME ome, boolean binaryData)
      Writes the data to the file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ID_ATTRIBUTE

        public static final java.lang.String ID_ATTRIBUTE
        Identifies the ID attribute.
        See Also:
        Constant Field Values
      • NAME_ATTRIBUTE

        public static final java.lang.String NAME_ATTRIBUTE
        Identifies the Name attribute.
        See Also:
        Constant Field Values
      • DIMENSION_ORDER_ATTRIBUTE

        public static final java.lang.String DIMENSION_ORDER_ATTRIBUTE
        Identifies the DimensionOrder attribute.
        See Also:
        Constant Field Values
      • PIXELS_TYPE_ATTRIBUTE

        public static final java.lang.String PIXELS_TYPE_ATTRIBUTE
        Identifies the PixelType attribute.
        See Also:
        Constant Field Values
      • SIZE_C_ATTRIBUTE

        public static final java.lang.String SIZE_C_ATTRIBUTE
        Identifies the SizeC attribute.
        See Also:
        Constant Field Values
      • SIZE_T_ATTRIBUTE

        public static final java.lang.String SIZE_T_ATTRIBUTE
        Identifies the SizeT attribute.
        See Also:
        Constant Field Values
      • SIZE_Z_ATTRIBUTE

        public static final java.lang.String SIZE_Z_ATTRIBUTE
        Identifies the SizeZ attribute.
        See Also:
        Constant Field Values
      • SIZE_X_ATTRIBUTE

        public static final java.lang.String SIZE_X_ATTRIBUTE
        Identifies the SizeX attribute.
        See Also:
        Constant Field Values
      • SIZE_Y_ATTRIBUTE

        public static final java.lang.String SIZE_Y_ATTRIBUTE
        Identifies the SizeY attribute.
        See Also:
        Constant Field Values
      • COMPRESSION_ATTRIBUTE

        public static final java.lang.String COMPRESSION_ATTRIBUTE
        Identifies the Compression attribute.
        See Also:
        Constant Field Values
      • BIG_ENDIAN_ATTRIBUTE

        public static final java.lang.String BIG_ENDIAN_ATTRIBUTE
        Identifies the BigEndian attribute.
        See Also:
        Constant Field Values
      • LENGTH_ATTRIBUTE

        public static final java.lang.String LENGTH_ATTRIBUTE
        Identifies the Length attribute.
        See Also:
        Constant Field Values
      • OME_TAG

        public static final java.lang.String OME_TAG
        Identifies the OME tag.
        See Also:
        Constant Field Values
      • IMAGE_TAG

        public static final java.lang.String IMAGE_TAG
        Identifies the Image tag.
        See Also:
        Constant Field Values
      • PIXELS_TAG

        public static final java.lang.String PIXELS_TAG
        Identifies the Pixels tag.
        See Also:
        Constant Field Values
      • BIN_DATA_TAG

        public static final java.lang.String BIN_DATA_TAG
        Identifies the BinData tag.
        See Also:
        Constant Field Values
    • Constructor Detail

      • XMLWriter

        public XMLWriter()
        Creates a new instance.
    • Method Detail

      • writeFile

        public void writeFile​(java.io.File file,
                              OME ome)
                       throws java.lang.Exception
        Writes the data to the file. Binary data will be added.
        Parameters:
        file - The file to handle.
        ome - The element to write to the file.
        Throws:
        java.lang.Exception - Thrown if an error occurred while writing the XML file.
      • writeFile

        public void writeFile​(java.io.File file,
                              OME ome,
                              boolean binaryData)
                       throws java.lang.Exception
        Writes the data to the file.
        Parameters:
        file - The file to handle.
        ome - The element to write to the file.
        binaryData - Pass true to add the binary data, false otherwise.
        Throws:
        java.lang.Exception - Thrown if an error occurred while writing the XML file.