| Constructor and Description |
|---|
NotNullValidator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addValueSpaceCheck(com.squareup.javapoet.MethodSpec.Builder methodBuilder,
com.squareup.javapoet.ParameterSpec symbol,
RDFSClazz range)
Adds code to the given method, checking for the Java variable or parameter
symbol being in range. |
String |
getValueSpaceDefinition(RDFSClazz clazz)
Returns a human readable description of the value space of the datatype represented by
the given RDFS class.
|
boolean |
isValueSpaceConstrained(RDFSClazz clazz)
Whether this validator constrains the value space of
clazz. |
public void addValueSpaceCheck(com.squareup.javapoet.MethodSpec.Builder methodBuilder,
com.squareup.javapoet.ParameterSpec symbol,
RDFSClazz range)
symbol being in range.
If a validation fails the generated code throws a IllegalArgumentException
with a meaningful message.
Does not modify the method if range does not represent a datatype for which
checks are introduced by this validator.addValueSpaceCheck in interface ValidatormethodBuilder - The method builder which receives the validation code.symbol - The Java symbol to be checked in the validation code.range - The RDFS class representing the datatype against which value space must be checked.public String getValueSpaceDefinition(RDFSClazz clazz)
getValueSpaceDefinition in interface Validatorclazz - The datatype.public boolean isValueSpaceConstrained(RDFSClazz clazz)
clazz.isValueSpaceConstrained in interface Validatorclazz - The clazz to check for.Validator.addValueSpaceCheck(MethodSpec.Builder, ParameterSpec, RDFSClazz)
would generate code for range.Copyright © 2017 Chair of Distributed Information Systems - University of Passau. All rights reserved.