Package org.nuxeo.ecm.core.io.impl
Class ExportedDocumentImpl
- java.lang.Object
-
- org.nuxeo.ecm.core.io.impl.ExportedDocumentImpl
-
- All Implemented Interfaces:
ExportedDocument
- Direct Known Subclasses:
TypedExportedDocumentImpl
public class ExportedDocumentImpl extends Object implements ExportedDocument
A representation for an exported document.It contains all the information needed to restore document data and state.
- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description ExportedDocumentImpl()ExportedDocumentImpl(DocumentModel doc)ExportedDocumentImpl(DocumentModel doc, boolean inlineBlobs)ExportedDocumentImpl(DocumentModel doc, Path path, boolean inlineBlobs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BlobgetBlob(String blobId)Map<String,Blob>getBlobs()org.dom4j.DocumentgetDocument()org.dom4j.DocumentgetDocument(String docId)Map<String,org.dom4j.Document>getDocuments()intgetFilesCount()The number of files describing the document.StringgetId()PathgetPath()DocumentLocationgetSourceLocation()StringgetType()booleanhasExternalBlobs()voidputBlob(String blobId, Blob blob)voidputDocument(String docId, org.dom4j.Document doc)protected static voidreadACP(org.dom4j.Element element, ACP acp)protected voidreadBlob(org.dom4j.Element element, ComplexType ctype, Blob blob, boolean inlineBlobs)protected voidreadComplex(org.dom4j.Element element, ComplexType ctype, Map<String,Object> map, boolean inlineBlobs)protected voidreadDocument(DocumentModel doc, boolean inlineBlobs)protected voidreadDocumentSchemas(org.dom4j.Element element, DocumentModel doc, boolean inlineBlobs)protected voidreadFacets(org.dom4j.Element element, DocumentModel doc)protected voidreadLifeCycleInfo(org.dom4j.Element element, DocumentModel doc)protected voidreadList(org.dom4j.Element element, ListType ltype, List<Object> list, boolean inlineBlobs)protected voidreadProperty(org.dom4j.Element parent, Namespace targetNs, Field field, Object value, boolean inlineBlobs)BlobremoveBlob(String blobId)org.dom4j.DocumentremoveDocument(String docId)protected booleanrequiresCDATA(String s)voidsetDocument(org.dom4j.Document document)voidsetId(String id)voidsetPath(Path path)
-
-
-
Constructor Detail
-
ExportedDocumentImpl
public ExportedDocumentImpl()
-
ExportedDocumentImpl
public ExportedDocumentImpl(DocumentModel doc, Path path, boolean inlineBlobs) throws IOException
- Parameters:
path- the path to use for this document this is used to remove full paths- Throws:
IOException
-
ExportedDocumentImpl
public ExportedDocumentImpl(DocumentModel doc) throws IOException
- Throws:
IOException
-
ExportedDocumentImpl
public ExportedDocumentImpl(DocumentModel doc, boolean inlineBlobs) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSourceLocation
public DocumentLocation getSourceLocation()
- Specified by:
getSourceLocationin interfaceExportedDocument- Returns:
- the source DocumentLocation
-
getPath
public Path getPath()
- Specified by:
getPathin interfaceExportedDocument
-
setPath
public void setPath(Path path)
- Specified by:
setPathin interfaceExportedDocument
-
getId
public String getId()
- Specified by:
getIdin interfaceExportedDocument
-
setId
public void setId(String id)
- Specified by:
setIdin interfaceExportedDocument
-
getType
public String getType()
- Specified by:
getTypein interfaceExportedDocument
-
getDocument
public org.dom4j.Document getDocument()
- Specified by:
getDocumentin interfaceExportedDocument
-
setDocument
public void setDocument(org.dom4j.Document document)
- Specified by:
setDocumentin interfaceExportedDocument
-
getBlobs
public Map<String,Blob> getBlobs()
- Specified by:
getBlobsin interfaceExportedDocument
-
putBlob
public void putBlob(String blobId, Blob blob)
- Specified by:
putBlobin interfaceExportedDocument
-
removeBlob
public Blob removeBlob(String blobId)
- Specified by:
removeBlobin interfaceExportedDocument
-
getBlob
public Blob getBlob(String blobId)
- Specified by:
getBlobin interfaceExportedDocument
-
hasExternalBlobs
public boolean hasExternalBlobs()
- Specified by:
hasExternalBlobsin interfaceExportedDocument
-
getDocuments
public Map<String,org.dom4j.Document> getDocuments()
- Specified by:
getDocumentsin interfaceExportedDocument
-
getDocument
public org.dom4j.Document getDocument(String docId)
- Specified by:
getDocumentin interfaceExportedDocument
-
putDocument
public void putDocument(String docId, org.dom4j.Document doc)
- Specified by:
putDocumentin interfaceExportedDocument
-
removeDocument
public org.dom4j.Document removeDocument(String docId)
- Specified by:
removeDocumentin interfaceExportedDocument
-
getFilesCount
public int getFilesCount()
Description copied from interface:ExportedDocumentThe number of files describing the document.- Specified by:
getFilesCountin interfaceExportedDocument- Returns:
- the number of files describing the document.
-
readDocument
protected void readDocument(DocumentModel doc, boolean inlineBlobs) throws IOException
- Throws:
IOException
-
readLifeCycleInfo
protected void readLifeCycleInfo(org.dom4j.Element element, DocumentModel doc)
-
readFacets
protected void readFacets(org.dom4j.Element element, DocumentModel doc)
-
readDocumentSchemas
protected void readDocumentSchemas(org.dom4j.Element element, DocumentModel doc, boolean inlineBlobs) throws IOException- Throws:
IOException
-
readProperty
protected void readProperty(org.dom4j.Element parent, Namespace targetNs, Field field, Object value, boolean inlineBlobs) throws IOException- Throws:
IOException
-
requiresCDATA
protected boolean requiresCDATA(String s)
-
readBlob
protected final void readBlob(org.dom4j.Element element, ComplexType ctype, Blob blob, boolean inlineBlobs) throws IOException- Throws:
IOException
-
readComplex
protected final void readComplex(org.dom4j.Element element, ComplexType ctype, Map<String,Object> map, boolean inlineBlobs) throws IOException- Throws:
IOException
-
readList
protected final void readList(org.dom4j.Element element, ListType ltype, List<Object> list, boolean inlineBlobs) throws IOException- Throws:
IOException
-
readACP
protected static void readACP(org.dom4j.Element element, ACP acp)
-
-