Package org.nuxeo.ecm.core.utils
Class BlobsExtractor
- java.lang.Object
-
- org.nuxeo.ecm.core.utils.BlobsExtractor
-
public class BlobsExtractor extends Object
Extractor for all the blobs of a document.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,List<String>>docBlobPaths
-
Constructor Summary
Constructors Constructor Description BlobsExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfindBlobPaths(ComplexType complexType, String path, Schema schema, List<String> paths)protected voidfindBlobsProperties(Property property, List<String> split, List<Property> properties)List<String>getBlobPaths(DocumentType documentType)Gets the blob paths of the document type.List<Blob>getBlobs(DocumentModel doc)Gets the blobs of the document.List<Property>getBlobsProperties(DocumentModel doc)Gets the blob properties of the document.protected booleanisInterestingPath(String path)protected Set<String>normalizePaths(Set<String> paths)Removes the "/data" suffix used by FulltextConfiguration.voidsetExtractorProperties(Set<String> includedPaths, Set<String> excludedPaths, boolean allBlobs)Sets extractor properties, controlling what properties or values are returned bygetBlobsProperties(org.nuxeo.ecm.core.api.DocumentModel)orgetBlobs(org.nuxeo.ecm.core.api.DocumentModel).
-
-
-
Field Detail
-
docBlobPaths
protected final Map<String,List<String>> docBlobPaths
-
-
Constructor Detail
-
BlobsExtractor
public BlobsExtractor()
-
-
Method Detail
-
setExtractorProperties
public void setExtractorProperties(Set<String> includedPaths, Set<String> excludedPaths, boolean allBlobs)
Sets extractor properties, controlling what properties or values are returned bygetBlobsProperties(org.nuxeo.ecm.core.api.DocumentModel)orgetBlobs(org.nuxeo.ecm.core.api.DocumentModel).The properties have to be defined without prefix if there is no prefix in the schema definition. For blob properties, the path must include the
/datapart.
-
isInterestingPath
protected boolean isInterestingPath(String path)
-
normalizePaths
protected Set<String> normalizePaths(Set<String> paths)
Removes the "/data" suffix used by FulltextConfiguration.Adds missing schema name as prefix if no prefix ("content" -> "file:content").
-
getBlobs
public List<Blob> getBlobs(DocumentModel doc)
Gets the blobs of the document.- Parameters:
doc- the document- Returns:
- the list of blobs
-
getBlobsProperties
public List<Property> getBlobsProperties(DocumentModel doc)
Gets the blob properties of the document.- Parameters:
doc- the document- Returns:
- the list of blob properties
-
getBlobPaths
public List<String> getBlobPaths(DocumentType documentType)
Gets the blob paths of the document type. Extractor properties are ignored.- Parameters:
documentType- the document type- Returns:
- the list of blob paths
- Since:
- 8.3
-
findBlobsProperties
protected void findBlobsProperties(Property property, List<String> split, List<Property> properties)
-
findBlobPaths
protected void findBlobPaths(ComplexType complexType, String path, Schema schema, List<String> paths)
-
-