use of org.apache.xerces.impl.validation.ValidationState in project jena by apache.
the class XSDDatatype method parse.
/**
* Parse a lexical form of this datatype to a value
* @throws DatatypeFormatException if the lexical form is not legal
*/
@Override
public Object parse(String lexicalForm) throws DatatypeFormatException {
try {
ValidationContext context = new ValidationState();
ValidatedInfo resultInfo = new ValidatedInfo();
typeDeclaration.validate(lexicalForm, context, resultInfo);
return convertValidatedDataValue(resultInfo);
} catch (InvalidDatatypeValueException e) {
throw new DatatypeFormatException(lexicalForm, this, "during parse -" + e);
}
}
Aggregations