Class ValidationState
- java.lang.Object
-
- org.openrefine.wikibase.schema.validation.ValidationState
-
-
Constructor Summary
Constructors Constructor Description ValidationState(ColumnModel columnModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidationState
addError(String message)
Logs an error at the current position in the schemaValidationState
enter()
Called when entering a schema element which should not be recorded in the path displayed to the user.ValidationState
enter(PathElement element)
Called when entering a schema element which should be recorded in the path displayed to the user.ColumnModel
getColumnModel()
Returns the column model in the context of which this schema is validated.List<ValidationError>
getValidationErrors()
Retrieves the validation errors emitted so far.ValidationState
leave()
Called when leaving a schema element and returning to its parent.
-
-
-
Constructor Detail
-
ValidationState
public ValidationState(ColumnModel columnModel)
-
-
Method Detail
-
enter
public ValidationState enter()
Called when entering a schema element which should not be recorded in the path displayed to the user. Useful for classes like StatementGroup or SnakGroup which do not really have a user-facing counterpart.
-
enter
public ValidationState enter(PathElement element)
Called when entering a schema element which should be recorded in the path displayed to the user.
-
leave
public ValidationState leave()
Called when leaving a schema element and returning to its parent.
-
addError
public ValidationState addError(String message)
Logs an error at the current position in the schema- Parameters:
message
- the error message
-
getColumnModel
public ColumnModel getColumnModel()
Returns the column model in the context of which this schema is validated.
-
getValidationErrors
public List<ValidationError> getValidationErrors()
Retrieves the validation errors emitted so far.
-
-