Docmosis API 2.1.0

com.docmosis.document.converter
Class ConversionFormat

java.lang.Object
  extended bycom.docmosis.document.converter.ConversionFormat
All Implemented Interfaces:
Serializable

public class ConversionFormat
extends Object
implements Serializable

This class specifies the available target formats for document production. A ConversionInstruction instance will specify the format(s) it would like the final document(s) rendered in. The available formats are public constants.

See Also:
ConversionInstruction, Serialized Form

Field Summary
static ConversionFormat FORMAT_HTML
          Specify HTML as the format
static ConversionFormat FORMAT_ODT
          Specify ODT (Open Document Text) as the format
static ConversionFormat FORMAT_PDF
          Specify PDF as the format
static ConversionFormat FORMAT_RTF
          Specify RTF (Rich Text Format) as the format
static ConversionFormat FORMAT_TEXT
          Specify TEXT as the format
static ConversionFormat FORMAT_WORD
          Specify Word as the format
static ConversionFormat FORMAT_WORD_XML
          Specify Word XML as the format
 
Method Summary
 boolean equals(Object other)
           
 String getExtension()
          Get the typical file extension of this format.
static ConversionFormat getFormatForFileName(String fileName)
          Get the format matching the given file name (by using the extension in a case-insensitive manner).
 String getFormatName()
          Get the name of this format.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_PDF

public static final ConversionFormat FORMAT_PDF
Specify PDF as the format


FORMAT_WORD

public static final ConversionFormat FORMAT_WORD
Specify Word as the format


FORMAT_WORD_XML

public static final ConversionFormat FORMAT_WORD_XML
Specify Word XML as the format


FORMAT_ODT

public static final ConversionFormat FORMAT_ODT
Specify ODT (Open Document Text) as the format


FORMAT_RTF

public static final ConversionFormat FORMAT_RTF
Specify RTF (Rich Text Format) as the format


FORMAT_HTML

public static final ConversionFormat FORMAT_HTML
Specify HTML as the format


FORMAT_TEXT

public static final ConversionFormat FORMAT_TEXT
Specify TEXT as the format

Method Detail

getFormatName

public String getFormatName()
Get the name of this format.

Returns:
a textual representation of the name of this format

getFormatForFileName

public static ConversionFormat getFormatForFileName(String fileName)
Get the format matching the given file name (by using the extension in a case-insensitive manner).

Parameters:
fileName - the name of the file upon which the format will be based
Returns:
null if the filename does not correlate with a format.

getExtension

public String getExtension()
Get the typical file extension of this format.

Returns:
a textual representation of the file extension of this format including the leading "."

hashCode

public int hashCode()

equals

public boolean equals(Object other)

Docmosis API 2.1.0

Copyright © 2007 Docmosis. All Rights Reserved.