public class XDOMOfficeDocument extends Object implements OfficeDocument
OfficeDocument
backed by an XDOM
document.Constructor and Description |
---|
XDOMOfficeDocument(XDOM xdom,
Set<File> artifactFiles,
org.xwiki.component.manager.ComponentManager componentManager,
OfficeConverterResult converterResult)
Creates a new
XDOMOfficeDocument . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Set<File> |
getArtifactsFiles()
Returns the files corresponding to all the artifacts for this office document, except the conversion of the
document itself.
|
String |
getContentAsString()
Returns the content of this document as a string.
|
String |
getContentAsString(String syntaxId)
Renders the XDOM encapsulated by this document into the given syntax.
|
XDOM |
getContentDocument()
Returns the content of this office document.
|
OfficeConverterResult |
getConverterResult() |
String |
getTitle()
Tries to extract a title suitable for this document.
|
@Unstable public XDOMOfficeDocument(XDOM xdom, Set<File> artifactFiles, org.xwiki.component.manager.ComponentManager componentManager, OfficeConverterResult converterResult)
XDOMOfficeDocument
.xdom
- XDOM
corresponding to office document content.artifactFiles
- artifacts for this office document.componentManager
- ComponentManager
used to lookup for various renderers.converterResult
- the OfficeConverterResult
used to build that object.public XDOM getContentDocument()
OfficeDocument
getContentDocument
in interface OfficeDocument
public String getContentAsString()
OfficeDocument
getContentAsString
in interface OfficeDocument
public String getContentAsString(String syntaxId)
syntaxId
- string identifier of the syntax.public Set<File> getArtifactsFiles()
OfficeDocument
getArtifactsFiles
in interface OfficeDocument
public String getTitle()
XDOM
and
finding a matching header block.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface OfficeDocument
IOException
public OfficeConverterResult getConverterResult()
getConverterResult
in interface OfficeDocument
Copyright © 2004–2021 XWiki. All rights reserved.