rdf4j-postgis  Version 0.1.0.0
Pow Class Reference
Inheritance diagram for Pow:
Collaboration diagram for Pow:

Public Member Functions

String getURI ()
 
Value evaluate (ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
 

Member Function Documentation

◆ evaluate()

Value evaluate ( ValueFactory  valueFactory,
Value...  args 
) throws ValueExprEvaluationException
18  {
19  if (args.length != 2) {
20  throw new ValueExprEvaluationException(getURI() + " requires exactly 1 arguments, got " + args.length);
21  }
22  Double value=Double.valueOf(args[0].stringValue());
23  Double value2=Double.valueOf(args[1].stringValue());
24  return valueFactory.createLiteral(Math.pow(value,value2));
25  }

References Pow.getURI().

◆ getURI()

String getURI ( )
12  {
13  // TODO Auto-generated method stub
14  return POSTGIS.Pow.stringValue();
15  }

References POSTGIS.Pow.

Referenced by Pow.evaluate().