Class AbstractMetadataChecksummer<T extends BaseChecksummerConfig>
java.lang.Object
com.norconex.crawler.core.doc.operations.checksum.AbstractMetadataChecksummer<T>
- Type Parameters:
T- configurable type
- All Implemented Interfaces:
Configurable<T>,MetadataChecksummer
- Direct Known Subclasses:
FsMetadataChecksummer,GenericMetadataChecksummer,LastModifiedMetadataChecksummer
public abstract class AbstractMetadataChecksummer<T extends BaseChecksummerConfig>
extends Object
implements MetadataChecksummer, Configurable<T>
Abstract implementation of MetadataChecksummer giving the option
to keep the generated checksum. The checksum can be stored
in a target field name specified. If no target field name is specified,
it stores it under the
metadata field name CrawlerDocMetaConstants.CHECKSUM_METADATA.
Implementors do not need to store the checksum themselves, this abstract class does it.
toField is ignored unless the keep
attribute is set to true.
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanfinal StringcreateMetadataChecksum(Properties metadata) Creates a metadata checksum.protected abstract StringdoCreateMetaChecksum(Properties metadata) booleaninthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.norconex.commons.lang.config.Configurable
getConfiguration
-
Constructor Details
-
AbstractMetadataChecksummer
public AbstractMetadataChecksummer()
-
-
Method Details
-
createMetadataChecksum
Description copied from interface:MetadataChecksummerCreates a metadata checksum.- Specified by:
createMetadataChecksumin interfaceMetadataChecksummer- Parameters:
metadata- all metadata values- Returns:
- a checksum value
-
doCreateMetaChecksum
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-