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 Details

    • docBlobPaths

      protected final Map<String,List<String>> docBlobPaths
      Local cache of blob paths per doc type.
    • docBlobPathsPerSchema

      protected final Map<String,List<String>> 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 by getBlobsProperties(org.nuxeo.ecm.core.api.DocumentModel) or getBlobs(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

      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
    • getBlobPaths

      public List<String> getBlobPaths(Schema schema)
      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

      protected void findBlobsProperties(Property property, List<String> split, List<Property> properties)
    • findBlobPaths

      protected void findBlobPaths(ComplexType complexType, String path, Schema schema, List<String> paths)