org.odftoolkit.odfdom.doc
Class OdfImageDocument

java.lang.Object
  extended by org.odftoolkit.odfdom.doc.OdfDocument
      extended by org.odftoolkit.odfdom.doc.OdfImageDocument

public class OdfImageDocument
extends OdfDocument

This class represents an ODF image document.


Nested Class Summary
static class OdfImageDocument.OdfMediaType
          This enum contains all possible media types of OdfImageDocument documents.
 
Nested classes/interfaces inherited from class org.odftoolkit.odfdom.doc.OdfDocument
OdfDocument.OdfXMLFile, OdfDocument.Resource
 
Constructor Summary
protected OdfImageDocument()
           
 
Method Summary
 void changeMode(OdfImageDocument.OdfMediaType type)
          Switches this instance to the given type.
 OdfOfficeImage getContentRoot()
          Get the content root of a image document.
static OdfImageDocument newImageDocument()
          Creates an empty image document.
static OdfImageDocument newImageTemplateDocument()
          Creates an empty image template.
 
Methods inherited from class org.odftoolkit.odfdom.doc.OdfDocument
close, embedDocument, getBaseURI, getContentDom, getContentStream, getDocumentPackagePath, getDocumentStyles, getEmbeddedDocument, getEmbeddedDocuments, getEmbeddedDocuments, getMediaType, getMetaDom, getMetaStream, getOfficeBody, getOfficeMasterStyles, getOfficeMetadata, getOrCreateDocumentStyles, getPackage, getRootDocument, getSettingsStream, getStylesDom, getStylesStream, getTableByName, getTableList, getXMLFilePath, getXPath, loadDocument, loadDocument, loadDocument, loadDocument, loadTemplate, newImage, RemoveEmbedDocument, save, save, save, setMediaType, setPackage, setRootDocument, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OdfImageDocument

protected OdfImageDocument()
Method Detail

newImageDocument

public static OdfImageDocument newImageDocument()
                                         throws java.lang.Exception
Creates an empty image document.

Returns:
ODF image document based on a default template
Throws:
java.lang.Exception - - if the document could not be created

newImageTemplateDocument

public static OdfImageDocument newImageTemplateDocument()
                                                 throws java.lang.Exception
Creates an empty image template.

Returns:
ODF image template based on a default
Throws:
java.lang.Exception - - if the template could not be created

getContentRoot

public OdfOfficeImage getContentRoot()
                              throws java.lang.Exception
Get the content root of a image document.

Returns:
content root, representing the office:drawing tag
Throws:
java.lang.Exception - if the file DOM could not be created.

changeMode

public void changeMode(OdfImageDocument.OdfMediaType type)
Switches this instance to the given type. This method can be used to e.g. convert a document instance to a template and vice versa.

Parameters:
type -


Copyright © 2008-2010 ODF Toolkit Project. All Rights Reserved.