Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.io.impl.plugins
Class XMLDocumentWriter

java.lang.Object
  extended by org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter
      extended by 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. If you want to encode blobs as base64 inside the document you must use the InlineBlobTransformer

In order to write Blobs are encoded as Base64 and included in the XML document

Author:
Bogdan Stefanescu

Constructor Summary
XMLDocumentWriter(File file)
           
XMLDocumentWriter(OutputStream out)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface DocumentWriter
Specified by:
write in class AbstractDocumentWriter
Parameters:
doc - the document to write
Returns:
the translation map.
Throws:
IOException

close

public void close()
Description copied from interface: DocumentWriter
Closes the writer.


Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.