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 Details

    • DuplicationValidator

      public DuplicationValidator(ddf.catalog.CatalogFramework catalogFramework, ddf.catalog.filter.FilterBuilder filterBuilder)
  • Method Details

    • setErrorOnDuplicateAttributes

      public void setErrorOnDuplicateAttributes(String[] attributeStrings)
      Setter for the list of attributes to test for duplication in the local catalog. Resulting attributes will cause the Validation.VALIDATION_ERRORS attribute to be set on the metacard.
      Parameters:
      attributeStrings -
    • setWarnOnDuplicateAttributes

      public void setWarnOnDuplicateAttributes(String[] attributeStrings)
      Setter for the list of attributes to test for duplication in the local catalog. Resulting attributes will cause the Validation.VALIDATION_WARNINGS attribute to be set on the metacard.
      Parameters:
      attributeStrings -
    • validateMetacard

      public Optional<ddf.catalog.validation.report.MetacardValidationReport> validateMetacard(ddf.catalog.data.Metacard metacard)
      Specified by:
      validateMetacard in interface ddf.catalog.validation.ReportingMetacardValidator
    • validate

      public void validate(ddf.catalog.data.Metacard metacard) throws ddf.catalog.validation.ValidationException
      Specified by:
      validate in interface ddf.catalog.validation.MetacardValidator
      Throws:
      ddf.catalog.validation.ValidationException
    • getVersion

      public String getVersion()
      Specified by:
      getVersion in interface ddf.catalog.util.Describable
      Specified by:
      getVersion in interface org.codice.ddf.platform.services.common.Describable
    • getId

      public String getId()
      Specified by:
      getId in interface ddf.catalog.util.Describable
      Specified by:
      getId in interface org.codice.ddf.platform.services.common.Describable
    • getTitle

      public String getTitle()
      Specified by:
      getTitle in interface ddf.catalog.util.Describable
      Specified by:
      getTitle in interface org.codice.ddf.platform.services.common.Describable
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface ddf.catalog.util.Describable
      Specified by:
      getDescription in interface org.codice.ddf.platform.services.common.Describable
    • getOrganization

      public String getOrganization()
      Specified by:
      getOrganization in interface ddf.catalog.util.Describable
      Specified by:
      getOrganization in interface org.codice.ddf.platform.services.common.Describable