Class XMLDocumentWriter
- java.lang.Object
-
- org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter
-
- org.nuxeo.ecm.core.io.impl.plugins.XMLDocumentWriter
-
- All Implemented Interfaces:
DocumentWriter
- Direct Known Subclasses:
XMLDocumentTreeWriter
public class XMLDocumentWriter extends AbstractDocumentWriter
Writes to a file or output stream the XML corresponding to the document content.Note that additional xml descriptors (like relations.xml, workflow.xml etc) are ignored
Also blobs are not handled specially. The value existing in the blob data element will be written down. By default blobs are referred as external references, so if their content is not written in the XML document.
In order to write Blobs are encoded as Base64 and included in the XML document
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected OutputStream
out
-
Constructor Summary
Constructors Constructor Description XMLDocumentWriter(File file)
XMLDocumentWriter(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the writer.DocumentTranslationMap
write(ExportedDocument doc)
Writes a single document.-
Methods inherited from class org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter
createCompactFormat, createPrettyPrint, write, write
-
-
-
-
Field Detail
-
out
protected final OutputStream out
-
-
Constructor Detail
-
XMLDocumentWriter
public XMLDocumentWriter(File file) throws IOException
- Throws:
IOException
-
XMLDocumentWriter
public XMLDocumentWriter(OutputStream out)
-
-
Method Detail
-
write
public DocumentTranslationMap write(ExportedDocument doc) throws IOException
Description copied from interface:DocumentWriter
Writes a single document.- Specified by:
write
in interfaceDocumentWriter
- Specified by:
write
in classAbstractDocumentWriter
- Parameters:
doc
- the document to write- Returns:
- the translation map.
- Throws:
IOException
-
close
public void close()
Description copied from interface:DocumentWriter
Closes the writer.
-
-