public class SingleShadowDocumentWriter extends AbstractDocumentModelWriter
DocumentModelWriter
that creates a shallow DocumentModel (ie: no path and no uuid).Modifier and Type | Field and Description |
---|---|
protected DocumentModel |
dm |
root, session, unsavedDocuments
Constructor and Description |
---|
SingleShadowDocumentWriter(CoreSession session,
String parentPath) |
Modifier and Type | Method and Description |
---|---|
protected DocumentModel |
createDocument(ExportedDocument xdoc,
Path toPath)
Creates a new document given its path.
|
DocumentModel |
getShadowDocument() |
DocumentTranslationMap |
write(ExportedDocument doc)
Writes a single document.
|
close, getFieldClass, getSaveInterval, getTranslationMap, loadFacetsInfo, loadSchema, loadSchemas, loadSystemInfo, saveIfNeeded, setSaveInterval, updateDocument
createCompactFormat, createPrettyPrint, write, write
protected DocumentModel dm
public SingleShadowDocumentWriter(CoreSession session, String parentPath)
public DocumentTranslationMap write(ExportedDocument doc) throws IOException
DocumentWriter
write
in interface DocumentWriter
write
in class AbstractDocumentWriter
doc
- the document to writeIOException
protected DocumentModel createDocument(ExportedDocument xdoc, Path toPath)
AbstractDocumentModelWriter
The parent of this document is assumed to exist.
createDocument
in class AbstractDocumentModelWriter
xdoc
- the document containingtoPath
- the path of the doc to createpublic DocumentModel getShadowDocument()
Copyright © 2015 Nuxeo SA. All rights reserved.