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

Public Member Functions

Value evaluate (ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
 
abstract String attribute (GridCoverage geom)
 

Member Function Documentation

◆ attribute()

abstract String attribute ( GridCoverage  geom)
abstract

Reimplemented in Summary.

Referenced by RasterAttributeStringFunction.evaluate().

◆ 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  System.out.println(((Literal)args[0]).getDatatype().toString());
21  System.out.println(LiteralRegistry.getLiteral(((Literal)args[0]).getDatatype().toString()));
22  LiteralType l=LiteralRegistry.getLiteral(((Literal)args[0]).getDatatype().toString());
23  System.out.println(l);
24  if(l instanceof RasterLiteral) {
25  GridCoverage geom=((RasterLiteral)l).read(args[0].stringValue());
26  //System.out.println("Extracted GridCoverage: "+geom);
27  String result = attribute(geom);
28  return valueFactory.createLiteral(result);
29  }
30  return null;
31  }

References RasterAttributeStringFunction.attribute(), and LiteralRegistry.getLiteral().

Referenced by SampleRasters.displayRasterSummary().