Class ContentDataExtractor

java.lang.Object
fr.becpg.repo.helper.extractors.AbstractNodeDataExtractor
fr.becpg.repo.helper.extractors.ContentDataExtractor
All Implemented Interfaces:
NodeDataExtractor

public class ContentDataExtractor extends AbstractNodeDataExtractor

ContentDataExtractor class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • logger

      private static final org.apache.commons.logging.Log logger
    • metadataFields

      private List<AttributeExtractorField> metadataFields
  • Constructor Details

    • ContentDataExtractor

      public ContentDataExtractor(org.alfresco.service.ServiceRegistry serviceRegistry, AttributeExtractorService attributeExtractorService)

      Constructor for ContentDataExtractor.

      Parameters:
      serviceRegistry - a ServiceRegistry object.
      attributeExtractorService - a AttributeExtractorService object.
    • ContentDataExtractor

      public ContentDataExtractor(List<AttributeExtractorField> metadataFields, org.alfresco.service.ServiceRegistry serviceRegistry, AttributeExtractorService attributeExtractorService)

      Constructor for ContentDataExtractor.

      Parameters:
      metadataFields - a List object.
      serviceRegistry - a ServiceRegistry object.
      attributeExtractorService - a AttributeExtractorService object.
  • Method Details

    • doExtract

      protected Map<String,Object> doExtract(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName itemType, org.alfresco.service.cmr.site.SiteInfo site)

      doExtract.

      Specified by:
      doExtract in class AbstractNodeDataExtractor
      Parameters:
      nodeRef - a NodeRef object.
      itemType - a QName object.
      site - a SiteInfo object.
      Returns:
      a Map object.
    • toPrefixStringOrRaw

      private String toPrefixStringOrRaw(org.alfresco.service.namespace.QName aspect, org.alfresco.service.cmr.repository.NodeRef nodeRef)

      Prefixes an aspect name, without ever failing the whole search.

      A node can carry an aspect coming from a model that is no longer registered - a custom model removed from an instance, typically. QName.toPrefixString() then throws a NamespaceException and, called from the search web script, that single node used to break the whole result page. Fall back on the full "{uri}localName" form and log the nodeRef, so the offending data can actually be found.
      Parameters:
      aspect - a QName object
      nodeRef - a NodeRef object
      Returns:
      the prefixed name, or the full QName when its namespace is unknown