GetSRIDFF extends FunctionBase1 { @Override public NodeValue exec(NodeValue v) { try { GeometryWrapper geometry = GeometryWrapper.extract(v); String srid = geometry.getSRID(); return NodeValue.makeNodeString(srid); } catch (DatatypeFormatException ex) { throw new ExprEvalException(ex.getMessage(), ex); } }  @Override NodeValue exec(NodeValue v);  }
@Test public void testExec_asserted() { NodeValue v = NodeValue.makeNode("<http: GetSRIDFF instance = new GetSRIDFF(); NodeValue expResult = NodeValue.makeString("http: NodeValue result = instance.exec(v); assertEquals(expResult, result); }
@Test public void testExec_implied() { NodeValue v = NodeValue.makeNode("POINT(10 10)", WKTDatatype.INSTANCE); GetSRIDFF instance = new GetSRIDFF(); NodeValue expResult = NodeValue.makeString(SRS_URI.DEFAULT_WKT_CRS84); NodeValue result = instance.exec(v); assertEquals(expResult, result); }