public class ExportedDocumentImpl extends Object implements ExportedDocument
It contains all the information needed to restore document data and state.
Modifier and Type | Field and Description |
---|---|
protected Map<String,Blob> |
blobs |
protected org.dom4j.Document |
document |
protected Map<String,org.dom4j.Document> |
documents |
protected String |
id |
protected Path |
path |
protected DocumentLocation |
srcLocation |
Constructor and Description |
---|
ExportedDocumentImpl() |
ExportedDocumentImpl(DocumentModel doc) |
ExportedDocumentImpl(DocumentModel doc,
boolean inlineBlobs) |
ExportedDocumentImpl(DocumentModel doc,
Path path,
boolean inlineBlobs) |
Modifier and Type | Method and Description |
---|---|
Blob |
getBlob(String blobId) |
Map<String,Blob> |
getBlobs() |
org.dom4j.Document |
getDocument() |
org.dom4j.Document |
getDocument(String docId) |
Map<String,org.dom4j.Document> |
getDocuments() |
int |
getFilesCount()
The number of files describing the document.
|
String |
getId() |
Path |
getPath() |
DocumentLocation |
getSourceLocation() |
String |
getType() |
boolean |
hasExternalBlobs() |
void |
putBlob(String blobId,
Blob blob) |
void |
putDocument(String docId,
org.dom4j.Document doc) |
protected static void |
readACP(org.dom4j.Element element,
ACP acp) |
protected void |
readBlob(org.dom4j.Element element,
ComplexType ctype,
Blob blob,
boolean inlineBlobs) |
protected void |
readComplex(org.dom4j.Element element,
ComplexType ctype,
Map map,
boolean inlineBlobs) |
protected void |
readDocument(DocumentModel doc,
boolean inlineBlobs) |
protected void |
readDocumentSchemas(org.dom4j.Element element,
DocumentModel doc,
boolean inlineBlobs) |
protected void |
readFacets(org.dom4j.Element element,
DocumentModel doc) |
protected void |
readLifeCycleInfo(org.dom4j.Element element,
DocumentModel doc) |
protected void |
readList(org.dom4j.Element element,
ListType ltype,
List list,
boolean inlineBlobs) |
protected void |
readProperty(org.dom4j.Element parent,
Namespace targetNs,
Field field,
Object value,
boolean inlineBlobs) |
Blob |
removeBlob(String blobId) |
org.dom4j.Document |
removeDocument(String docId) |
void |
setDocument(org.dom4j.Document document) |
void |
setId(String id) |
void |
setPath(Path path) |
protected DocumentLocation srcLocation
protected org.dom4j.Document document
public ExportedDocumentImpl()
public ExportedDocumentImpl(DocumentModel doc, Path path, boolean inlineBlobs) throws IOException
path
- the path to use for this document this is used to remove full pathsIOException
public ExportedDocumentImpl(DocumentModel doc) throws IOException
IOException
public ExportedDocumentImpl(DocumentModel doc, boolean inlineBlobs) throws IOException
IOException
public DocumentLocation getSourceLocation()
getSourceLocation
in interface ExportedDocument
public Path getPath()
getPath
in interface ExportedDocument
public void setPath(Path path)
setPath
in interface ExportedDocument
public String getId()
getId
in interface ExportedDocument
public void setId(String id)
setId
in interface ExportedDocument
public String getType()
getType
in interface ExportedDocument
public org.dom4j.Document getDocument()
getDocument
in interface ExportedDocument
public void setDocument(org.dom4j.Document document)
setDocument
in interface ExportedDocument
public void putBlob(String blobId, Blob blob)
putBlob
in interface ExportedDocument
public Blob removeBlob(String blobId)
removeBlob
in interface ExportedDocument
public Blob getBlob(String blobId)
getBlob
in interface ExportedDocument
public boolean hasExternalBlobs()
hasExternalBlobs
in interface ExportedDocument
public Map<String,org.dom4j.Document> getDocuments()
getDocuments
in interface ExportedDocument
public org.dom4j.Document getDocument(String docId)
getDocument
in interface ExportedDocument
public void putDocument(String docId, org.dom4j.Document doc)
putDocument
in interface ExportedDocument
public org.dom4j.Document removeDocument(String docId)
removeDocument
in interface ExportedDocument
public int getFilesCount()
ExportedDocument
getFilesCount
in interface ExportedDocument
protected void readDocument(DocumentModel doc, boolean inlineBlobs) throws IOException
IOException
protected void readLifeCycleInfo(org.dom4j.Element element, DocumentModel doc)
protected void readFacets(org.dom4j.Element element, DocumentModel doc)
protected void readDocumentSchemas(org.dom4j.Element element, DocumentModel doc, boolean inlineBlobs) throws IOException
IOException
protected void readProperty(org.dom4j.Element parent, Namespace targetNs, Field field, Object value, boolean inlineBlobs) throws IOException
IOException
protected final void readBlob(org.dom4j.Element element, ComplexType ctype, Blob blob, boolean inlineBlobs) throws IOException
IOException
protected final void readComplex(org.dom4j.Element element, ComplexType ctype, Map map, boolean inlineBlobs) throws IOException
IOException
protected final void readList(org.dom4j.Element element, ListType ltype, List list, boolean inlineBlobs) throws IOException
IOException
Copyright © 2018 Nuxeo. All rights reserved.