Class AttributeValidatorReport
- java.lang.Object
-
- org.gcube.informationsystem.types.impl.validator.AttributeValidatorReport
-
public class AttributeValidatorReport extends Object
A report containing the results of an attribute validation.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Constructor Summary
Constructors Constructor Description AttributeValidatorReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMessage(String message)Adds a validation message to the report.StringgetFieldName()Returns the name of the validated field.List<String>getMessages()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.
-
-
-
Method Detail
-
getFieldName
public String getFieldName()
Returns the name of the validated field.- Returns:
- The field name.
-
setFieldName
public void setFieldName(String fieldName)
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
public List<String> getMessages()
Returns the list of validation messages.- Returns:
- A list of messages.
-
addMessage
public void addMessage(String message)
Adds a validation message to the report.- Parameters:
message- The message to add.
-
-