|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.odftoolkit.odfdom.pkg.OdfPackageDocument
org.odftoolkit.odfdom.dom.OdfSchemaDocument
public abstract class OdfSchemaDocument
A document in ODF is from the package view a directory with a media type. If the media type represents a document described by the ODF 1.2 Schema, certain files are assumed within: content.xml, styles.xml, metadata.xml and settings.xml. The class represents such a document, providing easier access to its XML files.
| Nested Class Summary | |
|---|---|
static class |
OdfSchemaDocument.OdfXMLFile
This enum contains all possible standardized XML ODF files of the OpenDocument document. |
| Nested classes/interfaces inherited from class org.odftoolkit.odfdom.pkg.OdfPackageDocument |
|---|
OdfPackageDocument.Resource |
| Field Summary | |
|---|---|
protected OdfContentDom |
mContentDom
|
protected OdfOfficeStyles |
mDocumentStyles
|
protected OdfMetaDom |
mMetaDom
|
protected OdfSettingsDom |
mSettingsDom
|
protected OdfStylesDom |
mStylesDom
|
| Fields inherited from class org.odftoolkit.odfdom.pkg.OdfPackageDocument |
|---|
mDocumentMediaType, mDocumentPathInPackage, mPackage, ROOT_DOCUMENT_PATH |
| Constructor Summary | |
|---|---|
protected |
OdfSchemaDocument(OdfPackage pkg,
java.lang.String internalPath,
java.lang.String mediaTypeString)
Creates a new OdfSchemaDocument. |
| Method Summary | |
|---|---|
void |
close()
Close the OdfPackage and release all temporary created data. |
java.lang.String |
getBaseURI()
Get the URI, where this ODF document is stored. |
OdfContentDom |
getContentDom()
Return the ODF type-based content DOM of the content.xml |
java.io.InputStream |
getContentStream()
Gets the ODF content.xml file as stream. |
OdfOfficeStyles |
getDocumentStyles()
|
OdfFileDom |
getFileDom(OdfSchemaDocument.OdfXMLFile file)
|
java.util.Map<java.lang.String,StyleMasterPageElement> |
getMasterPages()
Deprecated. This method will be moved to the generated sources as soon code generation was improved! |
OdfMetaDom |
getMetaDom()
Return the ODF type-based metadata DOM of the meta.xml |
java.io.InputStream |
getMetaStream()
Gets the ODF metadata.xml file as stream. |
OdfOfficeMasterStyles |
getOfficeMasterStyles()
return the office:master-styles element of this document. |
OdfOfficeStyles |
getOrCreateDocumentStyles()
|
OdfSettingsDom |
getSettingsDom()
Return the ODF type-based settings DOM of the settings.xml |
java.io.InputStream |
getSettingsStream()
Gets the ODF settings.xml file as stream. |
OdfStylesDom |
getStylesDom()
Return the ODF type-based styles DOM of the styles.xml |
java.io.InputStream |
getStylesStream()
Gets the ODF style.xml file as stream. |
java.util.List<TableTableElement> |
getTables()
Return a list of table features in this document. |
protected java.lang.String |
getXMLFilePath(OdfSchemaDocument.OdfXMLFile file)
Get the relative path for an embedded ODF document including its file name. |
| Methods inherited from class org.odftoolkit.odfdom.pkg.OdfPackageDocument |
|---|
flushDoms, getDocumentPath, getFileDom, getMediaTypeString, getPackage, insertDocument, isExternalReference, isRootDocument, loadDocument, loadSubDocument, normalizeDocumentPath, removeDocument, save, save, setMediaTypeString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected OdfContentDom mContentDom
protected OdfStylesDom mStylesDom
protected OdfMetaDom mMetaDom
protected OdfSettingsDom mSettingsDom
protected OdfOfficeStyles mDocumentStyles
| Constructor Detail |
|---|
protected OdfSchemaDocument(OdfPackage pkg,
java.lang.String internalPath,
java.lang.String mediaTypeString)
pkg - - the ODF Package that contains the document. A baseURL is being generated based on its location.internalPath - - the directory path within the package from where the document should be loaded.mediaTypeString - - media type of stream. If unknown null can be used.| Method Detail |
|---|
public java.io.InputStream getContentStream()
throws java.lang.Exception
java.lang.Exception - - if the stream can not be extracted
public java.io.InputStream getStylesStream()
throws java.lang.Exception
java.lang.Exception - - if the stream can not be extracted
public java.io.InputStream getSettingsStream()
throws java.lang.Exception
java.lang.Exception - - if the stream can not be extracted
public java.io.InputStream getMetaStream()
throws java.lang.Exception
java.lang.Exception - - if the stream can not be extractedprotected java.lang.String getXMLFilePath(OdfSchemaDocument.OdfXMLFile file)
file - represents one of the standardized XML ODF files.
public java.lang.String getBaseURI()
public OdfContentDom getContentDom()
throws java.lang.Exception
java.lang.Exception - if content DOM could not be initialized
public OdfStylesDom getStylesDom()
throws java.lang.Exception
java.lang.Exception - if styles DOM could not be initialized
public OdfMetaDom getMetaDom()
throws java.lang.Exception
java.lang.Exception - if meta DOM could not be initialized
public OdfSettingsDom getSettingsDom()
throws java.lang.Exception
java.lang.Exception - if settings DOM could not be initializedpublic OdfOfficeStyles getDocumentStyles()
public OdfOfficeMasterStyles getOfficeMasterStyles()
public OdfOfficeStyles getOrCreateDocumentStyles()
public java.util.List<TableTableElement> getTables()
public java.util.Map<java.lang.String,StyleMasterPageElement> getMasterPages()
throws java.lang.Exception
java.lang.Exceptionpublic void close()
close in interface java.io.Closeableclose in class OdfPackageDocument
public OdfFileDom getFileDom(OdfSchemaDocument.OdfXMLFile file)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||