public class BlobsExtractor extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,Map<String,List<String>>> |
blobFieldPaths |
protected List<String> |
docTypeCached |
protected static org.apache.commons.logging.Log |
log |
protected SchemaManager |
schemaManager |
Constructor and Description |
---|
BlobsExtractor() |
Modifier and Type | Method and Description |
---|---|
protected void |
blobMatched(DocumentType docType,
Schema schema,
String path,
Field field)
Call during the parsing of the schema structure in
findInteresting(org.nuxeo.ecm.core.schema.DocumentType, org.nuxeo.ecm.core.schema.types.Schema, java.lang.String, org.nuxeo.ecm.core.schema.types.ComplexType) if field is a Blob
Type. |
protected void |
containsBlob(DocumentType docType,
Schema schema,
String path,
Field field)
Called during the parsing of the schema structure in
findInteresting(org.nuxeo.ecm.core.schema.DocumentType, org.nuxeo.ecm.core.schema.types.Schema, java.lang.String, org.nuxeo.ecm.core.schema.types.ComplexType) if field contains a
subfield of type Blob. |
protected void |
createCacheForDocumentType(DocumentType docType) |
protected boolean |
findInteresting(DocumentType docType,
Schema schema,
String path,
ComplexType ct)
Analyzes the document's schemas to find which fields and complex types contain blobs.
|
Map<String,List<String>> |
getBlobFieldPathForDocumentType(String documentType)
Get path list of properties that may contain a blob for the given document type.
|
List<Blob> |
getBlobs(DocumentModel doc)
Finds all the blobs of the document.
|
List<Property> |
getBlobsProperties(DocumentModel doc)
Get properties of the given document that contain a blob value.
|
protected void |
getBlobValue(Property prop,
List<String> subPath,
String completePath,
List<Property> result) |
protected SchemaManager |
getSchemaManager() |
void |
invalidateCache() |
void |
invalidateDocumentTypeCache(String docType) |
void |
setExtractorProperties(Set<String> pathProps,
Set<String> excludedPathProps,
boolean indexBlobs) |
protected static final org.apache.commons.logging.Log log
protected List<String> docTypeCached
protected SchemaManager schemaManager
public BlobsExtractor()
protected SchemaManager getSchemaManager()
public List<Property> getBlobsProperties(DocumentModel doc)
public Map<String,List<String>> getBlobFieldPathForDocumentType(String documentType)
documentType
- document type namepublic void invalidateDocumentTypeCache(String docType)
public void invalidateCache()
protected void createCacheForDocumentType(DocumentType docType)
protected boolean findInteresting(DocumentType docType, Schema schema, String path, ComplexType ct)
blobMatched(DocumentType, Schema, String, Field)
is called and for each property
that contains a subProperty containing a Blob,
containsBlob(DocumentType, Schema, String, Field)
is calledschema
- The parent schema that contains the fieldct
- Current type parsedtrue
if the passed complex type contains at least one blob fieldprotected void blobMatched(DocumentType docType, Schema schema, String path, Field field)
findInteresting(org.nuxeo.ecm.core.schema.DocumentType, org.nuxeo.ecm.core.schema.types.Schema, java.lang.String, org.nuxeo.ecm.core.schema.types.ComplexType)
if field is a Blob
Type. This method stores the path to that Field.schema
- The parent schema that contains the fieldfield
- Field that is a BlobTypeprotected void containsBlob(DocumentType docType, Schema schema, String path, Field field)
findInteresting(org.nuxeo.ecm.core.schema.DocumentType, org.nuxeo.ecm.core.schema.types.Schema, java.lang.String, org.nuxeo.ecm.core.schema.types.ComplexType)
if field contains a
subfield of type Blob. This method does nothing.schema
- The parent schema that contains the fieldfield
- Field that contains a subField of type BlobTypeprotected void getBlobValue(Property prop, List<String> subPath, String completePath, List<Property> result)
public List<Blob> getBlobs(DocumentModel doc)
This method is not thread-safe.
doc
- the documentpublic void setExtractorProperties(Set<String> pathProps, Set<String> excludedPathProps, boolean indexBlobs)
Copyright © 2015 Nuxeo SA. All rights reserved.