Strabon

changeset 908:d9deaa69b14c

added some GeoSPARQL classes and properties in GeoConstants (as comments)
author Kallirroi Dogani <kallirroi@di.uoa.gr>
date Fri Mar 22 19:23:41 2013 +0200 (2013-03-22)
parents 57fbbcd34c25
children d80ebf85ff2a
files evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/GeoConstants.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/GeosparqlRDFHandlerBase.java
line diff
     1.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/GeoConstants.java	Fri Mar 22 18:31:32 2013 +0200
     1.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/GeoConstants.java	Fri Mar 22 19:23:41 2013 +0200
     1.3 @@ -72,22 +72,50 @@
     1.4  	/**
     1.5  	 * The namespace for GeoSPARQL ontology
     1.6  	 */
     1.7 -	public static final String geo						= "http://www.opengis.net/ont/geosparql#";
     1.8 +	public static final String GEO						= "http://www.opengis.net/ont/geosparql#";
     1.9  	
    1.10  	/**
    1.11  	 * The namespace for geometry functions declared by GeoSPARQL
    1.12  	 */
    1.13 -	public static final String geof						= "http://www.opengis.net/def/function/geosparql/";
    1.14 +	public static final String GEOF						= "http://www.opengis.net/def/function/geosparql/";
    1.15  	
    1.16  	/**
    1.17  	 * The URI for the datatype wktLiteral
    1.18  	 */
    1.19 -	public static final String WKTLITERAL				=  geo + "wktLiteral";
    1.20 +	public static final String WKTLITERAL				=  GEO + "wktLiteral";
    1.21  	
    1.22  	/**
    1.23  	 * The URI for the datatype gmlLiteral
    1.24  	 */
    1.25 -	public static final String GMLLITERAL				=  geo + "gmlLiteral";
    1.26 +	public static final String GMLLITERAL				=  GEO + "gmlLiteral";
    1.27 +	
    1.28 +	/**
    1.29 +	 * The URIs for GeoSPARQL classes
    1.30 +	 */
    1.31 +/*	public static final String SpatialObject			=  geo + "SpatialObject";
    1.32 +	public static final String Geometry				    =  geo + "Geometry";
    1.33 +	public static final String Feauture					=  geo + "Feature";
    1.34 +*/	
    1.35 +		
    1.36 +	/**
    1.37 +	 * The URIs for GeoSPARQL properties
    1.38 +	 */
    1.39 +/*	public static final String hasGeometry_OGC				=  geo + "hasGeometry";
    1.40 +	public static final String defaultGeometry_OGC			=  geo + "defaultGeometry";
    1.41 +	public static final String dimension_OGC				=  geo + "dimension";
    1.42 +	public static final String coordinateDimension_OGC		=  geo + "coordinateDimension";
    1.43 +	public static final String spatialDimension_OGC		    =  geo + "spatialDimension";
    1.44 +	public static final String isEmpty_OGC					=  geo + "isEmpty";
    1.45 +	public static final String isSimple_OGC					=  geo + "isSimple";
    1.46 +	public static final String asWKT_OGC					=  geo + "asWKT";
    1.47 +	public static final String asGML_OGC					=  geo + "asGML";
    1.48 +*/
    1.49 +	
    1.50 +	/**
    1.51 +	 * The namespace for the ontology of simple features
    1.52 +	 */
    1.53 +//	public static final String SF							= "http://www.opengis.net/ont/sf#";
    1.54 +	
    1.55  	
    1.56  	/**																		*
    1.57  	 *  						Extended functions 							*
    1.58 @@ -155,48 +183,48 @@
    1.59  	 *  							GeoSPARQL								*
    1.60  	 * 																		*/	
    1.61  	// Non-topological
    1.62 -	public static final String geoSparqlDistance 				= geof + "distance"; //3 arguments
    1.63 -	public static final String geoSparqlBuffer 					= geof + "buffer"; //3 arguments
    1.64 -	public static final String geoSparqlConvexHull 				= geof + "convexHull";
    1.65 -	public static final String geoSparqlIntersection 			= geof + "intersection";
    1.66 -	public static final String geoSparqlUnion 					= geof + "union";
    1.67 -	public static final String geoSparqlDifference 				= geof + "difference";
    1.68 -	public static final String geoSparqlSymmetricDifference 	= geof + "symmetricDifference";
    1.69 -	public static final String geoSparqlEnvelope 				= geof + "envelope";
    1.70 -	public static final String geoSparqlBoundary 				= geof + "boundary";
    1.71 +	public static final String geoSparqlDistance 				= GEOF + "distance"; //3 arguments
    1.72 +	public static final String geoSparqlBuffer 					= GEOF + "buffer"; //3 arguments
    1.73 +	public static final String geoSparqlConvexHull 				= GEOF + "convexHull";
    1.74 +	public static final String geoSparqlIntersection 			= GEOF + "intersection";
    1.75 +	public static final String geoSparqlUnion 					= GEOF + "union";
    1.76 +	public static final String geoSparqlDifference 				= GEOF + "difference";
    1.77 +	public static final String geoSparqlSymmetricDifference 	= GEOF + "symmetricDifference";
    1.78 +	public static final String geoSparqlEnvelope 				= GEOF + "envelope";
    1.79 +	public static final String geoSparqlBoundary 				= GEOF + "boundary";
    1.80  
    1.81  	// Simple Features - 8 functions - all with 2 arguments + boolean
    1.82 -	public static final String sfEquals 						= geof + "sfEquals";
    1.83 -	public static final String sfDisjoint 						= geof + "sfDisjoint";
    1.84 -	public static final String sfIntersects 					= geof + "sfIntersects";
    1.85 -	public static final String sfTouches 						= geof + "sfTouches";
    1.86 -	public static final String sfCrosses 						= geof + "sfCrosses";
    1.87 -	public static final String sfWithin 						= geof + "sfWithin";
    1.88 -	public static final String sfContains 						= geof + "sfContains";
    1.89 -	public static final String sfOverlaps 						= geof + "sfOverlaps";
    1.90 +	public static final String sfEquals 						= GEOF + "sfEquals";
    1.91 +	public static final String sfDisjoint 						= GEOF + "sfDisjoint";
    1.92 +	public static final String sfIntersects 					= GEOF + "sfIntersects";
    1.93 +	public static final String sfTouches 						= GEOF + "sfTouches";
    1.94 +	public static final String sfCrosses 						= GEOF + "sfCrosses";
    1.95 +	public static final String sfWithin 						= GEOF + "sfWithin";
    1.96 +	public static final String sfContains 						= GEOF + "sfContains";
    1.97 +	public static final String sfOverlaps 						= GEOF + "sfOverlaps";
    1.98  
    1.99  	// Egenhofer - 8 functions - all with 2 arguments + boolean
   1.100 -	public static final String ehEquals 						= geof + "ehEquals";
   1.101 -	public static final String ehDisjoint 						= geof + "ehDisjoint";
   1.102 -	public static final String ehMeet 							= geof + "ehMeet";
   1.103 -	public static final String ehOverlap 						= geof + "ehOverlap";
   1.104 -	public static final String ehCovers 						= geof + "ehCovers";
   1.105 -	public static final String ehCoveredBy 						= geof + "ehCoveredBy";
   1.106 -	public static final String ehInside 						= geof + "ehInside";
   1.107 -	public static final String ehContains 						= geof + "ehContains";
   1.108 +	public static final String ehEquals 						= GEOF + "ehEquals";
   1.109 +	public static final String ehDisjoint 						= GEOF + "ehDisjoint";
   1.110 +	public static final String ehMeet 							= GEOF + "ehMeet";
   1.111 +	public static final String ehOverlap 						= GEOF + "ehOverlap";
   1.112 +	public static final String ehCovers 						= GEOF + "ehCovers";
   1.113 +	public static final String ehCoveredBy 						= GEOF + "ehCoveredBy";
   1.114 +	public static final String ehInside 						= GEOF + "ehInside";
   1.115 +	public static final String ehContains 						= GEOF + "ehContains";
   1.116  
   1.117  	// RCC8 - 8 functions - all with 2 arguments + boolean
   1.118 -	public static final String rccEquals 						 = geof + "rcc8eq";
   1.119 -	public static final String rccDisconnected 					 = geof + "rcc8dc";
   1.120 -	public static final String rccExternallyConnected 			 = geof + "rcc8ec";
   1.121 -	public static final String rccPartiallyOverlapping 			 = geof + "rcc8po";
   1.122 -	public static final String rccTangentialProperPartInverse 	 = geof + "rcc8tppi";
   1.123 -	public static final String rccTangentialProperPart 			 = geof + "rcc8tpp";
   1.124 -	public static final String rccNonTangentialProperPart 		 = geof + "rcc8ntpp";
   1.125 -	public static final String rccNonTangentialProperPartInverse = geof + "rcc8ntppi";
   1.126 +	public static final String rccEquals 						 = GEOF + "rcc8eq";
   1.127 +	public static final String rccDisconnected 					 = GEOF + "rcc8dc";
   1.128 +	public static final String rccExternallyConnected 			 = GEOF + "rcc8ec";
   1.129 +	public static final String rccPartiallyOverlapping 			 = GEOF + "rcc8po";
   1.130 +	public static final String rccTangentialProperPartInverse 	 = GEOF + "rcc8tppi";
   1.131 +	public static final String rccTangentialProperPart 			 = GEOF + "rcc8tpp";
   1.132 +	public static final String rccNonTangentialProperPart 		 = GEOF + "rcc8ntpp";
   1.133 +	public static final String rccNonTangentialProperPartInverse = GEOF + "rcc8ntppi";
   1.134  	
   1.135  	// The generic relate function
   1.136 -	public static final String geoSparqlRelate 					 = geof + "relate";
   1.137 +	public static final String geoSparqlRelate 					 = GEOF + "relate";
   1.138  
   1.139  	/**
   1.140  	 * Addition for datetime metric functions
     2.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/GeosparqlRDFHandlerBase.java	Fri Mar 22 18:31:32 2013 +0200
     2.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/GeosparqlRDFHandlerBase.java	Fri Mar 22 19:23:41 2013 +0200
     2.3 @@ -19,7 +19,7 @@
     2.4  
     2.5  public class GeosparqlRDFHandlerBase extends RDFHandlerBase {
     2.6  	
     2.7 -	public static String geonamespace = "http://www.opengis.net/def/function/geosparql/";
     2.8 +	public static String geonamespace = "http://www.opengis.net/ont/geosparql#";
     2.9  	public static String gml="http://www.opengis.net/def/geometryType/OGC-GML/3.2/";
    2.10  	public static String sf="http://www.opengis.net/def/geometryType/OGC-SF/1.0/";
    2.11  	public static String type = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
    2.12 @@ -85,7 +85,7 @@
    2.13  		String predicate = st.getPredicate().toString();
    2.14  		String object = st.getObject().toString();
    2.15  		
    2.16 -		if(predicate.startsWith("http://www.opengis.net/def/function/geosparql/sf")||predicate.startsWith(geonamespace+"eh")|| 
    2.17 +		if(predicate.startsWith("http://www.opengis.net/ont/geosparql#sf")||predicate.startsWith(geonamespace+"eh")|| 
    2.18  				rcc8.contains(predicate))
    2.19  		{
    2.20  			String triple = "<"+subject+ "> <"+ type +"> <"+ SpatialObject+ "> .\n" +
    2.21 @@ -315,10 +315,10 @@
    2.22  		parser.setVerifyData(true);
    2.23  
    2.24  		String text = 
    2.25 -				"<http://example.org/rcc8Obj1> <http://www.opengis.net/def/function/geosparql/rcc8eq> <http://example.org/rcc8Obj2> . " +
    2.26 -				"<http://example.org/simpleGeometry1> <http://www.opengis.net/def/function/geosparql/isEmpty> _:nai . \n"+
    2.27 -		"<http://example.org/ForestArea1> <http://www.opengis.net/def/function/geosparql/defaultGeometry> _:b2 . \n"+
    2.28 -		"<http://example.org/SpatialObject1> <http://www.opengis.net/def/function/geosparql/ehIntersects> <http://example.org/SpatialObject2> . \n";
    2.29 +				"<http://example.org/rcc8Obj1> <http://www.opengis.net/ont/geosparql#rcc8eq> <http://example.org/rcc8Obj2> . " +
    2.30 +				"<http://example.org/simpleGeometry1> <http://www.opengis.net/ont/geosparql#isEmpty> _:nai . \n"+
    2.31 +		"<http://example.org/ForestArea1> <http://www.opengis.net/ont/geosparql#defaultGeometry> _:b2 . \n"+
    2.32 +		"<http://example.org/SpatialObject1> <http://www.opengis.net/ont/geosparql#ehIntersects> <http://example.org/SpatialObject2> . \n";
    2.33          
    2.34  		String gmltext= "<http://example.org/GM_MultiSolid> <"+type+"> <"+gml+"GM_Object> .\n"; 
    2.35  		String sftext= "<http://example.org/Line> <"+type+"> <"+sf+"Geometry> .\n";