Class InternalNameMetadataExtractor

java.lang.Object
org.craftercms.search.metadata.impl.AbstractMetadataExtractor
org.craftercms.search.metadata.impl.InternalNameMetadataExtractor
All Implemented Interfaces:
MetadataExtractor

public class InternalNameMetadataExtractor extends AbstractMetadataExtractor
Implementation of MetadataExtractor for the internalName field
Since:
3.1.1
Author:
joseross
  • Field Details

    • DEFAULT_PROPERTY_NAME

      public static final String DEFAULT_PROPERTY_NAME
      See Also:
    • propertyName

      protected String propertyName
      The name of the metadata property to return
    • internalNameFieldXpath

      protected String internalNameFieldXpath
      The XPath selector used to extract the internal name from descriptors
  • Constructor Details

    • InternalNameMetadataExtractor

      public InternalNameMetadataExtractor(String internalNameFieldXpath)
  • Method Details

    • setPropertyName

      public void setPropertyName(String propertyName)
    • isCompatible

      protected boolean isCompatible(String path, org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.core.service.Context context)
      Checks if a given file should be processed by the current instance
      Specified by:
      isCompatible in class AbstractMetadataExtractor
      Parameters:
      path - the path of the file to check
      contentStoreService - the content store service
      context - the current context
      Returns:
      true if the file should be processed
    • doExtract

      protected Map<String,Object> doExtract(String path, org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.core.service.Context context)
      Performs the actual metadata extraction
      Specified by:
      doExtract in class AbstractMetadataExtractor
      Parameters:
      path - the path of the file
      contentStoreService - the content store service
      context - the current context
      Returns:
      the extracted metadata