Class BaseChecksummerConfig
java.lang.Object
com.norconex.crawler.core.doc.operations.checksum.BaseChecksummerConfig
- Direct Known Subclasses:
GenericMetadataChecksummerConfig,Md5DocumentChecksummerConfig
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.
Implementors should offer this XML configuration usage:
toField is ignored unless the keep
attribute is set to true.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleangetOnSet()The property setter to use when a value is set.The metadata field to use to store the checksum value.inthashCode()booleanisKeep()Whether to keep the metadata checksum value as a new metadata field.setKeep(boolean keep) Whether to keep the metadata checksum value as a new metadata field.setOnSet(PropertySetter onSet) The property setter to use when a value is set.setToField(String toField) The metadata field to use to store the checksum value.toString()
-
Constructor Details
-
BaseChecksummerConfig
public BaseChecksummerConfig()
-
-
Method Details
-
isKeep
public boolean isKeep()Whether to keep the metadata checksum value as a new metadata field. -
getToField
The metadata field to use to store the checksum value. A default field name may be set by checksummer implementations. Only applicable ifisKeep()returnstrue -
getOnSet
The property setter to use when a value is set. -
setKeep
Whether to keep the metadata checksum value as a new metadata field.- Returns:
this.
-
setToField
The metadata field to use to store the checksum value. A default field name may be set by checksummer implementations. Only applicable ifisKeep()returnstrue- Returns:
this.
-
setOnSet
The property setter to use when a value is set.- Returns:
this.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-