public abstract class CastFunction extends Object implements Function
Functions that cast an argument to an XML Schema datatype.XMLSchema| Constructor and Description |
|---|
CastFunction() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.eclipse.rdf4j.model.Literal |
convert(org.eclipse.rdf4j.model.ValueFactory vf,
org.eclipse.rdf4j.model.Value v)
Convert the supplied value to a literal of the function output datatype.
|
org.eclipse.rdf4j.model.Literal |
evaluate(org.eclipse.rdf4j.model.ValueFactory valueFactory,
org.eclipse.rdf4j.model.Value... args) |
String |
getURI() |
protected abstract org.eclipse.rdf4j.model.IRI |
getXsdDatatype()
Get the specific XML Schema datatype which this function returns.
|
protected String |
getXsdName()
Returns a prefixed name representation of the specific datatype that this function returns
|
protected abstract boolean |
isValidForDatatype(String lexicalValue)
Verifies that the supplied lexical value is valid for the datatype.
|
protected ValueExprEvaluationException |
typeError(org.eclipse.rdf4j.model.Value arg,
Throwable cause)
Creates a
ValueExprEvaluationException that signals a type error. |
public org.eclipse.rdf4j.model.Literal evaluate(org.eclipse.rdf4j.model.ValueFactory valueFactory,
org.eclipse.rdf4j.model.Value... args)
throws ValueExprEvaluationException
evaluate in interface FunctionValueExprEvaluationExceptionprotected abstract org.eclipse.rdf4j.model.Literal convert(org.eclipse.rdf4j.model.ValueFactory vf,
org.eclipse.rdf4j.model.Value v)
throws ValueExprEvaluationException
vf - the valueFactory to usev - a value that is not a string-typed literal, and not a literal of the same datatype as the function output
datatype.ValueExprEvaluationException - if an error occurs in conversion.protected abstract org.eclipse.rdf4j.model.IRI getXsdDatatype()
protected String getXsdName()
protected abstract boolean isValidForDatatype(String lexicalValue)
lexicalValue - a lexical valueprotected final ValueExprEvaluationException typeError(org.eclipse.rdf4j.model.Value arg, Throwable cause)
ValueExprEvaluationException that signals a type error.arg - the function argument value.cause - root cause throwable. May be null.ValueExprEvaluationException with a standardized message and wrapped cause.Copyright © 2015-2019 Eclipse Foundation. All Rights Reserved.