|
||||||||||
| 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,
String internalPath,
String mediaTypeString)
Creates a new OdfSchemaDocument. |
| Method Summary | |
|---|---|
void |
close()
Close the OdfPackage and release all temporary created data. |
String |
getBaseURI()
Get the URI, where this ODF document is stored. |
OdfContentDom |
getContentDom()
Return the ODF type-based content DOM of the content.xml |
InputStream |
getContentStream()
Gets the ODF content.xml file as stream. |
OdfOfficeStyles |
getDocumentStyles()
|
OdfFileDom |
getFileDom(OdfSchemaDocument.OdfXMLFile file)
|
OdfMetaDom |
getMetaDom()
Return the ODF type-based metadata DOM of the meta.xml |
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 |
InputStream |
getSettingsStream()
Gets the ODF settings.xml file as stream. |
OdfStylesDom |
getStylesDom()
Return the ODF type-based styles DOM of the styles.xml |
InputStream |
getStylesStream()
Gets the ODF style.xml file as stream. |
protected 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,
String internalPath,
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 InputStream getContentStream()
throws Exception
Exception - - if the stream can not be extracted
public InputStream getStylesStream()
throws Exception
Exception - - if the stream can not be extracted
public InputStream getSettingsStream()
throws Exception
Exception - - if the stream can not be extracted
public InputStream getMetaStream()
throws Exception
Exception - - if the stream can not be extractedprotected String getXMLFilePath(OdfSchemaDocument.OdfXMLFile file)
file - represents one of the standardized XML ODF files.
public String getBaseURI()
public OdfContentDom getContentDom()
throws Exception
Exception - if content DOM could not be initialized
public OdfStylesDom getStylesDom()
throws Exception
Exception - if styles DOM could not be initialized
public OdfMetaDom getMetaDom()
throws Exception
Exception - if meta DOM could not be initialized
public OdfSettingsDom getSettingsDom()
throws Exception
Exception - if settings DOM could not be initializedpublic OdfOfficeStyles getDocumentStyles()
public OdfOfficeMasterStyles getOfficeMasterStyles()
public OdfOfficeStyles getOrCreateDocumentStyles()
public void close()
close in interface Closeableclose in class OdfPackageDocument
public OdfFileDom getFileDom(OdfSchemaDocument.OdfXMLFile file)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||