Class DuplicationValidator
java.lang.Object
org.codice.ddf.validator.metacard.duplication.DuplicationValidator
- All Implemented Interfaces:
ddf.catalog.util.Describable,ddf.catalog.validation.MetacardValidator,ddf.catalog.validation.ReportingMetacardValidator,org.codice.ddf.platform.services.common.Describable
public class DuplicationValidator
extends Object
implements ddf.catalog.validation.MetacardValidator, ddf.catalog.validation.ReportingMetacardValidator, ddf.catalog.util.Describable, org.codice.ddf.platform.services.common.Describable
-
Constructor Summary
ConstructorsConstructorDescriptionDuplicationValidator(ddf.catalog.CatalogFramework catalogFramework, ddf.catalog.filter.FilterBuilder filterBuilder) -
Method Summary
Modifier and TypeMethodDescriptiongetId()getTitle()voidsetErrorOnDuplicateAttributes(String[] attributeStrings) Setter for the list of attributes to test for duplication in the local catalog.voidsetWarnOnDuplicateAttributes(String[] attributeStrings) Setter for the list of attributes to test for duplication in the local catalog.voidvalidate(ddf.catalog.data.Metacard metacard) Optional<ddf.catalog.validation.report.MetacardValidationReport>validateMetacard(ddf.catalog.data.Metacard metacard)
-
Constructor Details
-
DuplicationValidator
public DuplicationValidator(ddf.catalog.CatalogFramework catalogFramework, ddf.catalog.filter.FilterBuilder filterBuilder)
-
-
Method Details
-
setErrorOnDuplicateAttributes
Setter for the list of attributes to test for duplication in the local catalog. Resulting attributes will cause theValidation.VALIDATION_ERRORSattribute to be set on the metacard.- Parameters:
attributeStrings-
-
setWarnOnDuplicateAttributes
Setter for the list of attributes to test for duplication in the local catalog. Resulting attributes will cause theValidation.VALIDATION_WARNINGSattribute to be set on the metacard.- Parameters:
attributeStrings-
-
validateMetacard
public Optional<ddf.catalog.validation.report.MetacardValidationReport> validateMetacard(ddf.catalog.data.Metacard metacard) - Specified by:
validateMetacardin interfaceddf.catalog.validation.ReportingMetacardValidator
-
validate
public void validate(ddf.catalog.data.Metacard metacard) throws ddf.catalog.validation.ValidationException - Specified by:
validatein interfaceddf.catalog.validation.MetacardValidator- Throws:
ddf.catalog.validation.ValidationException
-
getVersion
- Specified by:
getVersionin interfaceddf.catalog.util.Describable- Specified by:
getVersionin interfaceorg.codice.ddf.platform.services.common.Describable
-
getId
- Specified by:
getIdin interfaceddf.catalog.util.Describable- Specified by:
getIdin interfaceorg.codice.ddf.platform.services.common.Describable
-
getTitle
- Specified by:
getTitlein interfaceddf.catalog.util.Describable- Specified by:
getTitlein interfaceorg.codice.ddf.platform.services.common.Describable
-
getDescription
- Specified by:
getDescriptionin interfaceddf.catalog.util.Describable- Specified by:
getDescriptionin interfaceorg.codice.ddf.platform.services.common.Describable
-
getOrganization
- Specified by:
getOrganizationin interfaceddf.catalog.util.Describable- Specified by:
getOrganizationin interfaceorg.codice.ddf.platform.services.common.Describable
-