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 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<String,Object> 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<Object> 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)
protected boolean
requiresCDATA(String s)
void
setDocument(org.dom4j.Document document)
void
setId(String id)
void
setPath(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:
getSourceLocation
in interfaceExportedDocument
- Returns:
- the source DocumentLocation
-
getPath
public Path getPath()
- Specified by:
getPath
in interfaceExportedDocument
-
setPath
public void setPath(Path path)
- Specified by:
setPath
in interfaceExportedDocument
-
getId
public String getId()
- Specified by:
getId
in interfaceExportedDocument
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceExportedDocument
-
getType
public String getType()
- Specified by:
getType
in interfaceExportedDocument
-
getDocument
public org.dom4j.Document getDocument()
- Specified by:
getDocument
in interfaceExportedDocument
-
setDocument
public void setDocument(org.dom4j.Document document)
- Specified by:
setDocument
in interfaceExportedDocument
-
getBlobs
public Map<String,Blob> getBlobs()
- Specified by:
getBlobs
in interfaceExportedDocument
-
putBlob
public void putBlob(String blobId, Blob blob)
- Specified by:
putBlob
in interfaceExportedDocument
-
removeBlob
public Blob removeBlob(String blobId)
- Specified by:
removeBlob
in interfaceExportedDocument
-
getBlob
public Blob getBlob(String blobId)
- Specified by:
getBlob
in interfaceExportedDocument
-
hasExternalBlobs
public boolean hasExternalBlobs()
- Specified by:
hasExternalBlobs
in interfaceExportedDocument
-
getDocuments
public Map<String,org.dom4j.Document> getDocuments()
- Specified by:
getDocuments
in interfaceExportedDocument
-
getDocument
public org.dom4j.Document getDocument(String docId)
- Specified by:
getDocument
in interfaceExportedDocument
-
putDocument
public void putDocument(String docId, org.dom4j.Document doc)
- Specified by:
putDocument
in interfaceExportedDocument
-
removeDocument
public org.dom4j.Document removeDocument(String docId)
- Specified by:
removeDocument
in interfaceExportedDocument
-
getFilesCount
public int getFilesCount()
Description copied from interface:ExportedDocument
The number of files describing the document.- Specified by:
getFilesCount
in 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)
-
-