Package ome.specification
Class XMLWriter
- java.lang.Object
-
- ome.specification.XMLWriter
-
public class XMLWriter extends 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
-
-
Field Summary
Fields Modifier and Type Field Description static String
BIG_ENDIAN_ATTRIBUTE
Identifies theBigEndian
attribute.static String
BIN_DATA_TAG
Identifies theBinData
tag.static String
COMPRESSION_ATTRIBUTE
Identifies theCompression
attribute.static String
DIMENSION_ORDER_ATTRIBUTE
Identifies theDimensionOrder
attribute.static String
ID_ATTRIBUTE
Identifies theID
attribute.static String
IMAGE_TAG
Identifies theImage
tag.static String
LENGTH_ATTRIBUTE
Identifies theLength
attribute.static String
NAME_ATTRIBUTE
Identifies theName
attribute.static String
OME_TAG
Identifies theOME
tag.static String
PIXELS_TAG
Identifies thePixels
tag.static String
PIXELS_TYPE_ATTRIBUTE
Identifies thePixelType
attribute.static String
SIZE_C_ATTRIBUTE
Identifies theSizeC
attribute.static String
SIZE_T_ATTRIBUTE
Identifies theSizeT
attribute.static String
SIZE_X_ATTRIBUTE
Identifies theSizeX
attribute.static String
SIZE_Y_ATTRIBUTE
Identifies theSizeY
attribute.static String
SIZE_Z_ATTRIBUTE
Identifies theSizeZ
attribute.
-
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(File file, OME ome)
Writes the data to the file.void
writeFile(File file, OME ome, boolean binaryData)
Writes the data to the file.
-
-
-
Field Detail
-
ID_ATTRIBUTE
public static final String ID_ATTRIBUTE
Identifies theID
attribute.- See Also:
- Constant Field Values
-
NAME_ATTRIBUTE
public static final String NAME_ATTRIBUTE
Identifies theName
attribute.- See Also:
- Constant Field Values
-
DIMENSION_ORDER_ATTRIBUTE
public static final String DIMENSION_ORDER_ATTRIBUTE
Identifies theDimensionOrder
attribute.- See Also:
- Constant Field Values
-
PIXELS_TYPE_ATTRIBUTE
public static final String PIXELS_TYPE_ATTRIBUTE
Identifies thePixelType
attribute.- See Also:
- Constant Field Values
-
SIZE_C_ATTRIBUTE
public static final String SIZE_C_ATTRIBUTE
Identifies theSizeC
attribute.- See Also:
- Constant Field Values
-
SIZE_T_ATTRIBUTE
public static final String SIZE_T_ATTRIBUTE
Identifies theSizeT
attribute.- See Also:
- Constant Field Values
-
SIZE_Z_ATTRIBUTE
public static final String SIZE_Z_ATTRIBUTE
Identifies theSizeZ
attribute.- See Also:
- Constant Field Values
-
SIZE_X_ATTRIBUTE
public static final String SIZE_X_ATTRIBUTE
Identifies theSizeX
attribute.- See Also:
- Constant Field Values
-
SIZE_Y_ATTRIBUTE
public static final String SIZE_Y_ATTRIBUTE
Identifies theSizeY
attribute.- See Also:
- Constant Field Values
-
COMPRESSION_ATTRIBUTE
public static final String COMPRESSION_ATTRIBUTE
Identifies theCompression
attribute.- See Also:
- Constant Field Values
-
BIG_ENDIAN_ATTRIBUTE
public static final String BIG_ENDIAN_ATTRIBUTE
Identifies theBigEndian
attribute.- See Also:
- Constant Field Values
-
LENGTH_ATTRIBUTE
public static final String LENGTH_ATTRIBUTE
Identifies theLength
attribute.- See Also:
- Constant Field Values
-
OME_TAG
public static final String OME_TAG
Identifies theOME
tag.- See Also:
- Constant Field Values
-
IMAGE_TAG
public static final String IMAGE_TAG
Identifies theImage
tag.- See Also:
- Constant Field Values
-
PIXELS_TAG
public static final String PIXELS_TAG
Identifies thePixels
tag.- See Also:
- Constant Field Values
-
BIN_DATA_TAG
public static final String BIN_DATA_TAG
Identifies theBinData
tag.- See Also:
- Constant Field Values
-
-
Method Detail
-
writeFile
public void writeFile(File file, OME ome) throws 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:
Exception
- Thrown if an error occurred while writing the XML file.
-
writeFile
public void writeFile(File file, OME ome, boolean binaryData) throws Exception
Writes the data to the file.- Parameters:
file
- The file to handle.ome
- The element to write to the file.binaryData
- Passtrue
to add the binary data,false
otherwise.- Throws:
Exception
- Thrown if an error occurred while writing the XML file.
-
-