Class AttributeValidatorReport
java.lang.Object
org.gcube.informationsystem.types.impl.validator.AttributeValidatorReport
A report containing the results of an attribute validation.
- Author:
- Luca Frosini (ISTI - CNR)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(String message) Adds a validation message to the report.Returns the name of the validated field.Returns the list of validation messages.booleanisValid()Checks if the validation was successful.voidsetFieldName(String fieldName) Sets the name of the validated field.voidsetValid(boolean valid) Sets the validity status of the validation.
-
Constructor Details
-
AttributeValidatorReport
public AttributeValidatorReport()
-
-
Method Details
-
getFieldName
Returns the name of the validated field.- Returns:
- The field name.
-
setFieldName
Sets the name of the validated field.- Parameters:
fieldName- The field name.
-
isValid
public boolean isValid()Checks if the validation was successful.- Returns:
trueif the attribute is valid,falseotherwise.
-
setValid
public void setValid(boolean valid) Sets the validity status of the validation.- Parameters:
valid- The validity status.
-
getMessages
Returns the list of validation messages.- Returns:
- A list of messages.
-
addMessage
Adds a validation message to the report.- Parameters:
message- The message to add.
-