kiwi-postgis  Version 0.1.0.0
AsGeoRSS Class Reference
Inheritance diagram for AsGeoRSS:
Collaboration diagram for AsGeoRSS:

Public Member Functions

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

Package Attributes

String out
 
String out2 ="</item></channel></rss>"
 

Member Function Documentation

◆ evaluate()

Value evaluate ( ValueFactory  valueFactory,
Value...  args 
) throws ValueExprEvaluationException
inherited

References LiteralRegistry.getLiteral(), and GeometricStringExportFunction.operation().

16  {
17  if (args.length != 1) {
18  throw new ValueExprEvaluationException(getURI() + " requires exactly 1 arguments, got " + args.length);
19  }
20 
21  LiteralType l=LiteralRegistry.getLiteral(((Literal)args[0]).getDatatype().toString());
22  if(l instanceof VectorLiteral) {
23  Geometry geom=((VectorLiteral)l).read(args[0].stringValue());
24  String result = operation(geom);
25  return valueFactory.createLiteral(result);
26  }
27  throw new ValueExprEvaluationException("Argument given is not a geometry literal");
28 
29  }

◆ getURI()

String getURI ( )

References POSTGIS.ST_ASGEORSS.

30  {
31  return POSTGIS.ST_ASGEORSS.stringValue();
32  }

◆ operation()

String operation ( Geometry  geom)

References AsGML.operation(), AsGeoRSS.out, and AsGeoRSS.out2.

11  {
12  AsGML asgml=new AsGML();
13  String gml=asgml.operation(geom);
14  return out+gml+out2;
15  }
String out
Definition: openrdf/query/algebra/evaluation/function/postgis/geometry/exporter/AsGeoRSS.java:17
String out2
Definition: openrdf/query/algebra/evaluation/function/postgis/geometry/exporter/AsGeoRSS.java:28

Member Data Documentation

◆ out

String out
package
Initial value:
="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
"<rss version=\"2.0\""+
"xmlns:georss=\"http://www.georss.org/georss\""+
"xmlns:gml=\"http://www.opengis.net/gml\">"+
"<channel>"+
"<link>http://www.i3mainz.de/postgis-jena</link>"+
"<title>Cambridge Neighborhoods</title>"+
"<description>One guy's view of Cambridge, MA</description>"+
"<item>"+
"<guid isPermaLink=\"false\">00000111c36421c1321d3</guid>"+
"<pubDate>"+System.currentTimeMillis()+"</pubDate>"

Referenced by AsGeoRSS.operation().

◆ out2

String out2 ="</item></channel></rss>"
package

Referenced by AsGeoRSS.operation().