public class StringCast extends CastFunction
Function
that tries to cast its argument to an
xsd:string.Constructor and Description |
---|
StringCast() |
Modifier and Type | Method and Description |
---|---|
protected Literal |
convert(ValueFactory valueFactory,
Value value)
Convert the supplied value to a literal of the function output datatype.
|
Literal |
evaluate(ValueFactory valueFactory,
Value... args)
Evaluate the function over the supplied input arguments, using the supplied
ValueFactory to produce the
result. |
protected IRI |
getXsdDatatype()
Get the specific XML Schema datatype which this function returns.
|
protected boolean |
isValidForDatatype(String lexicalValue)
Verifies that the supplied lexical value is valid for the datatype.
|
getURI, getXsdName, typeError
public Literal evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
Function
ValueFactory
to produce the
result.evaluate
in interface Function
evaluate
in class CastFunction
valueFactory
- a ValueFactory
to use for producing the function result.args
- the function input arguments.ValueExprEvaluationException
protected Literal convert(ValueFactory valueFactory, Value value) throws ValueExprEvaluationException
CastFunction
convert
in class CastFunction
valueFactory
- the valueFactory to usevalue
- 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 IRI getXsdDatatype()
CastFunction
getXsdDatatype
in class CastFunction
protected boolean isValidForDatatype(String lexicalValue)
CastFunction
isValidForDatatype
in class CastFunction
lexicalValue
- a lexical valueCopyright © 2015-2022 Eclipse Foundation. All Rights Reserved.