Class BlankCondition
java.lang.Object
com.norconex.importer.handler.condition.impl.BlankCondition
- All Implemented Interfaces:
Configurable<BlankConditionConfig>,Condition,ConfigurableCondition<BlankConditionConfig>,FailablePredicate<DocHandlerContext,IOException>
A condition based on whether the document content (default) or
any of the specified metadata fields are blank or inexistent.
For metadata fields,
control characters (char <= 32) are removed before evaluating whether
their values are empty. Dealing with the document content will
instead check if it is null or empty (no bytes returned
when read).
Multiple fields and values:
By default, ALL values for all fields matched by your field matcher
expression must be blank for this condition to be true.
You can change the logic to have ANY values to be blank for the condition
to be true with
BlankConditionConfig.setMatchAnyBlank(boolean).
If no fields are matched, the conditions is also considered empty
(true).
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTYFields inherited from interface org.apache.commons.lang3.function.FailablePredicate
FALSE, TRUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleaninthashCode()booleantest(DocHandlerContext docCtx) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.lang3.function.FailablePredicate
and, negate, or
-
Constructor Details
-
BlankCondition
public BlankCondition()
-
-
Method Details
-
test
- Specified by:
testin interfaceFailablePredicate<DocHandlerContext,IOException> - Throws:
IOException
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getConfiguration
- Specified by:
getConfigurationin interfaceConfigurable<BlankConditionConfig>
-