rdf4j-postgis  Version 0.1.0.0
RasterConstructorFunction Class Referenceabstract
Inheritance diagram for RasterConstructorFunction:
Collaboration diagram for RasterConstructorFunction:

Public Member Functions

Value evaluate (ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
 
abstract GridCoverage construct (String input)
 

Member Function Documentation

◆ construct()

abstract GridCoverage construct ( String  input)
abstract

◆ evaluate()

Value evaluate ( ValueFactory  valueFactory,
Value...  args 
) throws ValueExprEvaluationException
16  {
17  if (args.length != 1) {
18  throw new ValueExprEvaluationException(getURI() + " requires exactly 1 arguments, got " + args.length);
19  }
20  LiteralType l=LiteralRegistry.getLiteral(((Literal)args[0]).getDatatype().toString());
21  String geomString = args[0].stringValue();
22  GridCoverage result = construct(geomString);
23  return valueFactory.createLiteral(((RasterLiteral) l).unparse(result),((Literal)args[0]).getDatatype());
24  }

References RasterConstructorFunction.construct(), and LiteralRegistry.getLiteral().

Referenced by RastFromCoverageJSONTest.testRastFromCoverageJSON(), and RastFromWKBTest.testRastFromWKB().