public class DuplicationValidator extends Object implements MetacardValidator, ReportingMetacardValidator, Describable, Describable
| Constructor and Description |
|---|
DuplicationValidator(CatalogFramework catalogFramework,
FilterBuilder filterBuilder) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Returns a description of the describable item.
|
String |
getId()
Returns the name, aka ID, of the describable item.
|
String |
getOrganization()
Returns the organization associated with the describable item.
|
String |
getTitle()
Returns the title of the describable item.
|
String |
getVersion()
Retrieve the version.
|
void |
setErrorOnDuplicateAttributes(String[] attributeStrings)
Setter for the list of attributes to test for duplication in the local catalog.
|
void |
setWarnOnDuplicateAttributes(String[] attributeStrings)
Setter for the list of attributes to test for duplication in the local catalog.
|
void |
validate(Metacard metacard)
Validates a
Metacard |
Optional<MetacardValidationReport> |
validateMetacard(Metacard metacard)
Validates a
Metacard. |
public DuplicationValidator(CatalogFramework catalogFramework, FilterBuilder filterBuilder)
public void setErrorOnDuplicateAttributes(String[] attributeStrings)
Validation.VALIDATION_ERRORS attribute
to be set on the metacard.attributeStrings - public void setWarnOnDuplicateAttributes(String[] attributeStrings)
Validation.VALIDATION_WARNINGS
attribute to be set on the metacard.attributeStrings - public Optional<MetacardValidationReport> validateMetacard(Metacard metacard)
ReportingMetacardValidatorMetacard.validateMetacard in interface ReportingMetacardValidatormetacard - the Metacard to validate, cannot be nullOptional containing a MetacardValidationReport if there are
violations, or an empty Optional if there are no violationspublic void validate(Metacard metacard) throws ValidationException
MetacardValidatorMetacardvalidate in interface MetacardValidatormetacard - Metacard to validateValidationException - if any validation error occurspublic String getVersion()
DescribablegetVersion in interface Describablepublic String getId()
Describablehtml for a MetacardTransformer that transforms Metacards to HTMLgetId in interface Describablepublic String getTitle()
DescribablegetTitle in interface Describablepublic String getDescription()
DescribablegetDescription in interface Describablepublic String getOrganization()
DescribablegetOrganization in interface DescribableThis work is licensed under a Creative Commons Attribution 4.0 International License.