Class XHTMLOfficeDocument
- java.lang.Object
-
- org.xwiki.officeimporter.document.XHTMLOfficeDocument
-
- All Implemented Interfaces:
Closeable,AutoCloseable,OfficeDocument
public class XHTMLOfficeDocument extends Object implements OfficeDocument
AOfficeDocumentbacked by a w3cDocumentcontaining xhtml markup.- Since:
- 2.1M1
- Version:
- $Id: 863f9a95c13fb224d482c7bd18c410c178357bf2 $
-
-
Constructor Summary
Constructors Constructor Description XHTMLOfficeDocument(Document document, Map<String,OfficeDocumentArtifact> artifacts, OfficeConverterResult converterResult)Creates a newXHTMLOfficeDocument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Map<String,OfficeDocumentArtifact>getArtifactsMap()Returns the files corresponding to all the artifacts for this office document, except the conversion of the document itself.StringgetContentAsString()Returns the content of this document as a string.DocumentgetContentDocument()Returns the content of this office document.OfficeConverterResultgetConverterResult()
-
-
-
Constructor Detail
-
XHTMLOfficeDocument
@Unstable public XHTMLOfficeDocument(Document document, Map<String,OfficeDocumentArtifact> artifacts, OfficeConverterResult converterResult)
Creates a newXHTMLOfficeDocument.- Parameters:
document- the w3c dom representing the office document.artifacts- artifacts for this office document.converterResult- theOfficeConverterResultused to build that object.- Since:
- 14.10.8, 15.3RC1
-
-
Method Detail
-
getContentDocument
public Document getContentDocument()
Description copied from interface:OfficeDocumentReturns the content of this office document. Content document type may vary depending on the implementation. For an example, a particular implementation might return an html DOM object while another implementation might return an XDOM.- Specified by:
getContentDocumentin interfaceOfficeDocument- Returns:
- content of this document.
-
getContentAsString
public String getContentAsString()
Description copied from interface:OfficeDocumentReturns the content of this document as a string.- Specified by:
getContentAsStringin interfaceOfficeDocument- Returns:
- content of this document as a string.
-
getArtifactsMap
public Map<String,OfficeDocumentArtifact> getArtifactsMap()
Description copied from interface:OfficeDocumentReturns the files corresponding to all the artifacts for this office document, except the conversion of the document itself. Artifacts are generated during the import operation if the original office document contains embedded non-textual elements. Also, some office formats (like presentations) result in multiple output files when converted into html. In this case all these output files will be considered as artifacts.The key of the map is the artifact name.
- Specified by:
getArtifactsMapin interfaceOfficeDocument- Returns:
- the map of artifact names to artifacts related to this office document
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceOfficeDocument- Throws:
IOException
-
getConverterResult
public OfficeConverterResult getConverterResult()
- Specified by:
getConverterResultin interfaceOfficeDocument- Returns:
- the converter result.
-
-