Class InternalNameMetadataExtractor
java.lang.Object
org.craftercms.search.metadata.impl.AbstractMetadataExtractor
org.craftercms.search.metadata.impl.InternalNameMetadataExtractor
- All Implemented Interfaces:
MetadataExtractor
Implementation of
MetadataExtractor for the internalName field- Since:
- 3.1.1
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected StringThe XPath selector used to extract the internal name from descriptorsprotected StringThe name of the metadata property to returnFields inherited from class org.craftercms.search.metadata.impl.AbstractMetadataExtractor
includePatterns -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoExtract(String path, org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.core.service.Context context) Performs the actual metadata extractionprotected booleanisCompatible(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 instancevoidsetPropertyName(String propertyName) Methods inherited from class org.craftercms.search.metadata.impl.AbstractMetadataExtractor
extract, setIncludePatterns
-
Field Details
-
DEFAULT_PROPERTY_NAME
- See Also:
-
propertyName
The name of the metadata property to return -
internalNameFieldXpath
The XPath selector used to extract the internal name from descriptors
-
-
Constructor Details
-
InternalNameMetadataExtractor
-
-
Method Details
-
setPropertyName
-
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:
isCompatiblein classAbstractMetadataExtractor- Parameters:
path- the path of the file to checkcontentStoreService- the content store servicecontext- 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:
doExtractin classAbstractMetadataExtractor- Parameters:
path- the path of the filecontentStoreService- the content store servicecontext- the current context- Returns:
- the extracted metadata
-