Package org.nuxeo.ecm.core.utils
Class BlobsExtractor
java.lang.Object
org.nuxeo.ecm.core.utils.BlobsExtractor
Extractor for all the blobs of a document.
-
Field Summary
Modifier and TypeFieldDescriptionLocal cache of blob paths per doc type.Local cache of blob paths per schema. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
findBlobPaths
(ComplexType complexType, String path, Schema schema, List<String> paths) protected void
getBlobPaths
(DocumentType documentType) Gets the blob paths of the document type.getBlobPaths
(Schema schema) Gets the blob paths of the document's schemas.getBlobs
(DocumentModel doc) Gets the blobs of the document.Gets the blob properties of the document.protected boolean
isInterestingPath
(String path) normalizePaths
(Set<String> paths) Removes the "/data" suffix used by FulltextConfiguration.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)
.
-
Field Details
-
docBlobPaths
Local cache of blob paths per doc type. -
docBlobPathsPerSchema
Local cache of blob paths per schema.
-
-
Constructor Details
-
BlobsExtractor
public BlobsExtractor()
-
-
Method Details
-
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
/data
part. -
isInterestingPath
-
normalizePaths
Removes the "/data" suffix used by FulltextConfiguration.Adds missing schema name as prefix if no prefix ("content" -> "file:content").
-
getBlobs
Gets the blobs of the document.- Parameters:
doc
- the document- Returns:
- the list of blobs
-
getBlobsProperties
Gets the blob properties of the document.- Parameters:
doc
- the document- Returns:
- the list of blob properties
-
getBlobPaths
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
-
getBlobPaths
Gets the blob paths of the document's schemas. Extractor properties are ignored.- Parameters:
schema
- the schema- Returns:
- the list of blob paths
- Since:
- 2021.32
-
findBlobsProperties
-
findBlobPaths
protected void findBlobPaths(ComplexType complexType, String path, Schema schema, List<String> paths)
-