org.odftoolkit.odfdom.doc
Class OdfChartDocument

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

public class OdfChartDocument
extends OdfDocument

This class represents an empty ODF document , which will be in general embedded in an existing ODF (Spreadsheet) document.


Nested Class Summary
static class OdfChartDocument.OdfMediaType
          This enum contains all possible media types of OdfChartDocument documents.
 
Nested classes/interfaces inherited from class org.odftoolkit.odfdom.doc.OdfDocument
OdfDocument.OdfXMLFile, OdfDocument.Resource
 
Constructor Summary
protected OdfChartDocument()
           
 
Method Summary
 void changeMode(OdfChartDocument.OdfMediaType type)
          Switches this instance to the given type.
 OdfOfficeChart getContentRoot()
          Get the content root of a chart document.
static OdfChartDocument newChartDocument()
          Creates an empty charts document
static OdfChartDocument newChartTemplateDocument()
          Creates an empty charts 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

OdfChartDocument

protected OdfChartDocument()
Method Detail

newChartDocument

public static OdfChartDocument newChartDocument()
                                         throws java.lang.Exception
Creates an empty charts document. *
Note: ODF Chart documents are (with OOo 3.0) only used as embedded document and not used stand-alone.

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

newChartTemplateDocument

public static OdfChartDocument newChartTemplateDocument()
                                                 throws java.lang.Exception
Creates an empty charts template. *
Note: ODF Chart documents are (with OOo 3.0) only used as embedded document and not used stand-alone.

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

getContentRoot

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

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

changeMode

public void changeMode(OdfChartDocument.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.