Strabon

changeset 1008:ebe2d9469882

when inferring rdf:type for Simple Features, infer also the rdf:type between the GeoSPARQL geo:Geometry and geo:SpatialObject classes
author Babis Nikolaou <charnik@di.uoa.gr>
date Sat Apr 06 15:29:33 2013 +0300 (2013-04-06)
parents ac74b430e20f
children 20ead981bfef
files runtime/src/main/java/eu/earthobservatory/runtime/generaldb/GeosparqlRDFHandlerBase.java
line diff
     1.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/GeosparqlRDFHandlerBase.java	Sat Apr 06 15:24:13 2013 +0300
     1.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/GeosparqlRDFHandlerBase.java	Sat Apr 06 15:29:33 2013 +0300
     1.3 @@ -241,47 +241,74 @@
     1.4  				SimpleFeatures.GeometryCollection.equals(obj)) {// first level
     1.5  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
     1.6  				
     1.7 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
     1.8 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
     1.9 +				
    1.10  			} else if (SimpleFeatures.LineString.equals(obj)) { // second level
    1.11  				writeTriple(subj, TYPE, SimpleFeatures.Curve);
    1.12  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
    1.13  				
    1.14 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
    1.15 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
    1.16 +				
    1.17  			} else if (SimpleFeatures.Polygon.equals(obj) || 
    1.18  					   SimpleFeatures.PolyhedralSurface.equals(obj)) { // second level
    1.19  				writeTriple(subj, TYPE, SimpleFeatures.Surface);
    1.20  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
    1.21  				
    1.22 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
    1.23 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
    1.24 +				
    1.25  			} else if (SimpleFeatures.MultiSurface.equals(obj) ||
    1.26  					SimpleFeatures.MultiCurve.equals(obj) ||
    1.27  					SimpleFeatures.MultiPoint.equals(obj)) { // second level
    1.28  				writeTriple(subj, TYPE, SimpleFeatures.GeometryCollection);
    1.29  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
    1.30  				
    1.31 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
    1.32 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
    1.33 +				
    1.34  			} else if ( SimpleFeatures.Line.equals(obj) || 
    1.35  						SimpleFeatures.LinearRing.equals(obj)) { // third level
    1.36  				writeTriple(subj, TYPE, SimpleFeatures.LineString);
    1.37  				writeTriple(subj, TYPE, SimpleFeatures.Curve);
    1.38  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
    1.39  				
    1.40 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
    1.41 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
    1.42 +				
    1.43  			} else if (SimpleFeatures.Triangle.equals(obj)) { // third level
    1.44  				writeTriple(subj, TYPE, SimpleFeatures.Polygon);
    1.45  				writeTriple(subj, TYPE, SimpleFeatures.Surface);
    1.46  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
    1.47  				
    1.48 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
    1.49 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
    1.50 +				
    1.51  			} else if (SimpleFeatures.TIN.equals(obj)) { // third level
    1.52  				writeTriple(subj, TYPE, SimpleFeatures.PolyhedralSurface);
    1.53  				writeTriple(subj, TYPE, SimpleFeatures.Surface);
    1.54  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
    1.55  				
    1.56 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
    1.57 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
    1.58 +				
    1.59  			} else if (SimpleFeatures.MultiPolygon.equals(obj)) { // third level
    1.60  				writeTriple(subj, TYPE, SimpleFeatures.MultiSurface);
    1.61  				writeTriple(subj, TYPE, SimpleFeatures.GeometryCollection);
    1.62  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
    1.63  				
    1.64 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
    1.65 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
    1.66 +				
    1.67  			} else if (SimpleFeatures.MultiLineString.equals(obj)) {// third level
    1.68  				writeTriple(subj, TYPE, SimpleFeatures.MultiCurve);
    1.69  				writeTriple(subj, TYPE, SimpleFeatures.GeometryCollection);
    1.70  				writeTriple(subj, TYPE, SimpleFeatures.Geometry);
    1.71  				
    1.72 +				writeTriple(subj, TYPE, GeoSPARQL.Geometry);
    1.73 +				writeTriple(subj, TYPE, GeoSPARQL.SpatialObject);
    1.74 +				
    1.75  			}
    1.76  		/* Spatial properties
    1.77  		 * ~~~~~~~~~~~~~~~~~~~~