public class ValidatorChain extends ArrayList<Validator>
Validator instances which inject value space
validation code into Java methods.modCount| Constructor and Description |
|---|
ValidatorChain() |
| Modifier and Type | Method and Description |
|---|---|
void |
addValueSpaceChecks(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
for every Validator in this chain. |
static ValidatorChain |
getRDFSDefault()
Creates the default validator chain for RDFS.
|
String[] |
getValueSpaceDefinitions(RDFSClazz range)
Returns the human readable value space definitions of the given datatype, i.e.
|
boolean |
isValueSpaceConstrained(RDFSClazz range)
Checks whether this validator chain constrains the value of a datatype.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodepublic void addValueSpaceChecks(com.squareup.javapoet.MethodSpec.Builder methodBuilder,
com.squareup.javapoet.ParameterSpec symbol,
RDFSClazz range)
symbol being in range
for every Validator in this chain.
If a validation fails the generated code throws a IllegalArgumentException
with a meaningful message.
The validation code is inserted in the sequence of validators in this chain.methodBuilder - The method to add code to.symbol - The variable or parameter to validate.range - The datatype of the symbol.public String[] getValueSpaceDefinitions(RDFSClazz range)
range - The datatype to get the definitions for.public boolean isValueSpaceConstrained(RDFSClazz range)
range - The datatype to check for.public static ValidatorChain getRDFSDefault()
Copyright © 2017 Chair of Distributed Information Systems - University of Passau. All rights reserved.