Strabon
changeset 1004:8fb408631e75
renamed module "constants" to "vocab" and the respective artifactId to "strabon-vocabulary". WARNING: DELETE AND IMPORT Strabon in Eclipse
author | Babis Nikolaou <charnik@di.uoa.gr> |
---|---|
date | Fri Apr 05 23:01:56 2013 +0300 (2013-04-05) |
parents | 53ff1f55fa01 |
children | f41269e98e09 |
files | ChangeLog constants/pom.xml constants/src/main/java/eu/earthobservatory/constants/GeoConstants.java constants/src/main/java/eu/earthobservatory/constants/OGCConstants.java constants/src/main/java/eu/earthobservatory/vocabulary/GeoSPARQL.java constants/src/main/java/eu/earthobservatory/vocabulary/SimpleFeatures.java endpoint/pom.xml evaluation/pom.xml pom.xml vocab/pom.xml vocab/src/main/java/eu/earthobservatory/constants/GeoConstants.java vocab/src/main/java/eu/earthobservatory/constants/OGCConstants.java vocab/src/main/java/eu/earthobservatory/vocabulary/GeoSPARQL.java vocab/src/main/java/eu/earthobservatory/vocabulary/SimpleFeatures.java |
line diff
1.1 --- a/ChangeLog Fri Apr 05 22:47:32 2013 +0300 1.2 +++ b/ChangeLog Fri Apr 05 23:01:56 2013 +0300 1.3 @@ -13,8 +13,10 @@ 1.4 http://www.opengis.net/def/uom/OGC/1.0/. Strabon endpoint publishes 1.5 the URIs at http://localhost:8080/endpoint/Capabilities. 1.6 1.7 - * Created new module with name 'constants` and artifactId 1.8 - 'spatial-temporal-constants` and moved GeoConstants.java there. 1.9 + * Created new module with name 'vocab` and artifactId 1.10 + 'strabon-vocabulary` and moved GeoConstants.java there. Other 1.11 + vocabularies have been added as well, such as Simple Features, and 1.12 + GeoSPARQL. 1.13 1.14 * Strabon endpoint now publishes the URIs of the supported extension 1.15 functions for stSPARQL and GeoSPARQL. One should access them by
2.1 --- a/constants/pom.xml Fri Apr 05 22:47:32 2013 +0300 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,97 +0,0 @@ 2.4 -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 2.5 - 2.6 - <modelVersion>4.0.0</modelVersion> 2.7 - 2.8 - <parent> 2.9 - <groupId>eu.earthobservatory</groupId> 2.10 - <artifactId>strabon</artifactId> 2.11 - <version>3.2.9-SNAPSHOT</version> 2.12 - </parent> 2.13 - 2.14 - <artifactId>spatial-temporal-constants</artifactId> 2.15 - 2.16 - <name>Strabon: Spatial and Temporal Constants</name> 2.17 - <description>Spatial and Temporal Constants for Strabon</description> 2.18 - <packaging>jar</packaging> 2.19 - 2.20 - <build> 2.21 - <pluginManagement> 2.22 - <plugins> 2.23 - <plugin> 2.24 - <groupId>org.eclipse.m2e</groupId> 2.25 - <artifactId>lifecycle-mapping</artifactId> 2.26 - <version>1.0.0</version> 2.27 - <configuration> 2.28 - <lifecycleMappingMetadata> 2.29 - <pluginExecutions> 2.30 - <pluginExecution> 2.31 - <pluginExecutionFilter> 2.32 - <groupId>org.apache.maven.plugins</groupId> 2.33 - <artifactId>maven-dependency-plugin</artifactId> 2.34 - <versionRange>[2.3,)</versionRange> 2.35 - <goals> 2.36 - <goal>copy-dependencies</goal> 2.37 - </goals> 2.38 - </pluginExecutionFilter> 2.39 - <action> 2.40 - <ignore /> 2.41 - </action> 2.42 - </pluginExecution> 2.43 - </pluginExecutions> 2.44 - </lifecycleMappingMetadata> 2.45 - </configuration> 2.46 - </plugin> 2.47 - </plugins> 2.48 - </pluginManagement> 2.49 - 2.50 - <plugins> 2.51 - <plugin> 2.52 - <groupId>org.apache.maven.plugins</groupId> 2.53 - <artifactId>maven-compiler-plugin</artifactId> 2.54 - <version>2.3.2</version> 2.55 - <configuration> 2.56 - <source>1.6</source> 2.57 - <target>1.6</target> 2.58 - <encoding>utf8</encoding> 2.59 - </configuration> 2.60 - </plugin> 2.61 - <plugin> 2.62 - <groupId>org.apache.maven.plugins</groupId> 2.63 - <artifactId>maven-dependency-plugin</artifactId> 2.64 - <version>2.4</version> 2.65 - <executions> 2.66 - <execution> 2.67 - <id>copy-dependencies</id> 2.68 - <phase>package</phase> 2.69 - <goals> 2.70 - <goal>copy-dependencies</goal> 2.71 - </goals> 2.72 - <configuration> 2.73 - <outputDirectory>${project.build.directory}</outputDirectory> 2.74 - <overWriteReleases>false</overWriteReleases> 2.75 - <overWriteSnapshots>false</overWriteSnapshots> 2.76 - <overWriteIfNewer>true</overWriteIfNewer> 2.77 - </configuration> 2.78 - </execution> 2.79 - </executions> 2.80 - </plugin> 2.81 - 2.82 - <plugin> 2.83 - <groupId>org.apache.maven.plugins</groupId> 2.84 - <artifactId>maven-jar-plugin</artifactId> 2.85 - <version>2.4</version> 2.86 - <configuration> 2.87 - <skipIfEmpty>true</skipIfEmpty> 2.88 - </configuration> 2.89 - <executions> 2.90 - <execution> 2.91 - <goals> 2.92 - <goal>test-jar</goal> 2.93 - </goals> 2.94 - </execution> 2.95 - </executions> 2.96 - </plugin> 2.97 - </plugins> 2.98 - </build> 2.99 -</project> 2.100 -
3.1 --- a/constants/src/main/java/eu/earthobservatory/constants/GeoConstants.java Fri Apr 05 22:47:32 2013 +0300 3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 3.3 @@ -1,309 +0,0 @@ 3.4 -/** 3.5 - * This Source Code Form is subject to the terms of the Mozilla Public 3.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this 3.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/. 3.8 - * 3.9 - * Copyright (C) 2010, 2011, 2012, Pyravlos Team 3.10 - * 3.11 - * http://www.strabon.di.uoa.gr/ 3.12 - */ 3.13 -package eu.earthobservatory.constants; 3.14 - 3.15 -import java.lang.reflect.Field; 3.16 -import java.util.ArrayList; 3.17 -import java.util.List; 3.18 - 3.19 -import eu.earthobservatory.vocabulary.GeoSPARQL; 3.20 -import eu.earthobservatory.vocabulary.SimpleFeatures; 3.21 - 3.22 -/** 3.23 - * This class is a placeholder for various constants around geometries. These 3.24 - * constants range from URIs of namespaces, functions, representations, etc., 3.25 - * to other constants, such as the default spatial reference system (SRID) that 3.26 - * is assumed in Strabon. 3.27 - * 3.28 - * @author Charalampos Nikolaou <charnik@di.uoa.gr> 3.29 - * @author Kostis Kyzirakos <kkyzir@di.uoa.gr> 3.30 - * @author Kallirroi Dogani <kallirroi@di.uoa.gr> 3.31 - */ 3.32 -public class GeoConstants { 3.33 - /** * 3.34 - * Namespaces * 3.35 - * */ 3.36 - 3.37 - /** 3.38 - * The namespace for stRDF data model 3.39 - */ 3.40 - public static final String stRDF = "http://strdf.di.uoa.gr/ontology#"; 3.41 - 3.42 - /** 3.43 - * The namespace for the RDFi framework 3.44 - */ 3.45 - public static final String rdfi = "http://rdfi.di.uoa.gr/ontology#"; 3.46 - 3.47 - 3.48 - /** * 3.49 - * GeoSPARQL Version 1.0.1 Document# 11-052r4 * 3.50 - * http://schemas.opengis.net/geosparql/geosparql-1_0_1.zip */ 3.51 - 3.52 - /** 3.53 - * The namespace for GeoSPARQL ontology 3.54 - */ 3.55 - public static final String GEO = GeoSPARQL.GEO; 3.56 - 3.57 - /** 3.58 - * The namespace for geometry functions declared by GeoSPARQL 3.59 - */ 3.60 - public static final String GEOF = GeoSPARQL.GEOF; 3.61 - 3.62 - /** 3.63 - * The namespace for the ontology of simple features 3.64 - */ 3.65 - public static final String SF = SimpleFeatures.NAMESPACE; 3.66 - 3.67 - /** 3.68 - * 3.69 - * The namespace of GML. 3.70 - * 3.71 - * Initially, it was set to "http://www.opengis.net/def/geometryType/OGC-GML/3.2/". 3.72 - * Afterwards, it was set to "http://www.opengis.net/gml/3.2/" in order to be compliant 3.73 - * with GML version 3.3, as defined by OGC in the document with title 3.74 - * <tt>"OGC® Geography Markup Language (GML) — Extended schemas and encoding rules"</tt> 3.75 - * ({@link https://portal.opengeospatial.org/files/?artifact_id=46568}). However, none 3.76 - * of these work with the parser provided by JTS, which assumes that the namespace for 3.77 - * GML should be only "http://www.opengis.net/gml" and nothing else. In every other case, 3.78 - * an exception is thrown by the GML parser. 3.79 - * 3.80 - * UPDATE: The most recent value for the GML namespace by OGC is 3.81 - * "http://www.opengis.net/ont/gml#". 3.82 - * 3.83 - * @see {@link org.openrdf.query.algebra.evaluation.util.JTSWrapper.GMLReader}, {@link GMLReader} 3.84 - */ 3.85 - public static final String GML_OGC = "http://www.opengis.net/gml"; 3.86 - 3.87 - 3.88 - /** 3.89 - * The URI for the datatype SemiLinearPointSet 3.90 - * (linear constraint-based representation of geometries) 3.91 - */ 3.92 - @Deprecated 3.93 - public static final String stRDFSemiLinearPointset = stRDF + "SemiLinearPointSet"; 3.94 - 3.95 - 3.96 - /** 3.97 - * The URI for the datatype Well-Known Text (WKT) 3.98 - */ 3.99 - public static final String WKT = stRDF + "WKT"; 3.100 - 3.101 - /** 3.102 - * The URI for the datatype Geography Markup Language (GML) as it defined 3.103 - * in the model stRDF and query language stSPARQL 3.104 - */ 3.105 - public static final String GML = stRDF + "GML"; 3.106 - 3.107 - /** 3.108 - * The URI for the datatype wktLiteral 3.109 - */ 3.110 - public static final String WKTLITERAL = GEO + "wktLiteral"; 3.111 - 3.112 - /** 3.113 - * The URI for the datatype gmlLiteral 3.114 - */ 3.115 - public static final String GMLLITERAL = GEO + "gmlLiteral"; 3.116 - 3.117 - /** * 3.118 - * Extended functions * 3.119 - * stSPARQL * 3.120 - * */ 3.121 - // Spatial Relationships 3.122 - public static final String stSPARQLequals = stRDF + "equals"; 3.123 - public static final String stSPARQLdisjoint = stRDF + "disjoint"; 3.124 - public static final String stSPARQLintersects = stRDF + "intersects"; 3.125 - public static final String stSPARQLtouches = stRDF + "touches"; 3.126 - public static final String stSPARQLwithin = stRDF + "within"; 3.127 - public static final String stSPARQLcontains = stRDF + "contains"; 3.128 - public static final String stSPARQLoverlaps = stRDF + "overlaps"; 3.129 - public static final String stSPARQLcrosses = stRDF + "crosses"; 3.130 - 3.131 - // The generic relate function 3.132 - public static final String stSPARQLrelate = stRDF + "relate"; 3.133 - 3.134 - // Topological Relationships utilizing mbb 3.135 - public static final String stSPARQLmbbIntersects = stRDF + "mbbIntersects"; 3.136 - public static final String stSPARQLmbbContains = stRDF + "mbbContains"; 3.137 - public static final String stSPARQLmbbEquals = stRDF + "mbbEquals"; 3.138 - public static final String stSPARQLmbbWithin = stRDF + "mbbWithin"; 3.139 - 3.140 - // Directional functions 3.141 - public static final String stSPARQLleft = stRDF + "left"; 3.142 - public static final String stSPARQLright = stRDF + "right"; 3.143 - public static final String stSPARQLabove = stRDF + "above"; 3.144 - public static final String stSPARQLbelow = stRDF + "below"; 3.145 - 3.146 - // Spatial Constructs 3.147 - public static final String stSPARQLunion = stRDF + "union"; 3.148 - public static final String stSPARQLbuffer = stRDF + "buffer"; 3.149 - public static final String stSPARQLenvelope = stRDF + "envelope"; 3.150 - public static final String stSPARQLconvexHull = stRDF + "convexHull"; 3.151 - public static final String stSPARQLboundary = stRDF + "boundary"; 3.152 - public static final String stSPARQLintersection = stRDF + "intersection"; 3.153 - public static final String stSPARQLdifference = stRDF + "difference"; 3.154 - public static final String stSPARQLsymDifference = stRDF + "symDifference"; 3.155 - public static final String stSPARQLtransform = stRDF + "transform"; 3.156 - 3.157 - // Spatial Metric Functions 3.158 - public static final String stSPARQLdistance = stRDF + "distance"; 3.159 - public static final String stSPARQLarea = stRDF + "area"; 3.160 - 3.161 - // Spatial Properties 3.162 - public static final String stSPARQLdimension = stRDF + "dimension"; 3.163 - public static final String stSPARQLgeometryType = stRDF + "geometryType"; 3.164 - public static final String stSPARQLasText = stRDF + "asText"; 3.165 - public static final String stSPARQLasGML = stRDF + "asGML"; 3.166 - public static final String stSPARQLsrid = stRDF + "srid"; 3.167 - public static final String stSPARQLisEmpty = stRDF + "isEmpty"; 3.168 - public static final String stSPARQLisSimple = stRDF + "isSimple"; 3.169 - 3.170 - // Spatial Aggregate Functions 3.171 - public static final String stSPARQLextent = stRDF + "extent"; 3.172 - 3.173 - /** 3.174 - * WGS 84 latitude-longitude (EPSG:4326) 3.175 - */ 3.176 - public static final String WGS84_LAT_LON = "http://www.opengis.net/def/crs/EPSG/0/4326"; 3.177 - 3.178 - /** 3.179 - * WGS 84 longitude-longitude 3.180 - * (used as the default CRS for GeoSPARQL geometries) 3.181 - */ 3.182 - public static final String WGS84_LON_LAT = "http://www.opengis.net/def/crs/OGC/1.3/CRS84"; 3.183 - 3.184 - /** 3.185 - * EPSG:4326 3.186 - */ 3.187 - public static final Integer WGS84_LAT_LON_SRID = 4326; 3.188 - 3.189 - /** 3.190 - * EPSG:3857 (not sure whether this is correct for WGS84_LON_LAT) 3.191 - * http://spatialreference.org/ref/sr-org/7483/ 3.192 - */ 3.193 - public static final Integer WGS84_LON_LAT_SRID = 3857; 3.194 - 3.195 - /** 3.196 - * Default SRID (WGS84 latitude-longitude) 3.197 - */ 3.198 - public static final Integer defaultSRID = WGS84_LAT_LON_SRID; 3.199 - 3.200 - /** * 3.201 - * Extended functions * 3.202 - * GeoSPARQL * 3.203 - * */ 3.204 - // Non-topological 3.205 - public static final String geoSparqlDistance = GEOF + "distance"; //3 arguments 3.206 - public static final String geoSparqlBuffer = GEOF + "buffer"; //3 arguments 3.207 - public static final String geoSparqlConvexHull = GEOF + "convexHull"; 3.208 - public static final String geoSparqlIntersection = GEOF + "intersection"; 3.209 - public static final String geoSparqlUnion = GEOF + "union"; 3.210 - public static final String geoSparqlDifference = GEOF + "difference"; 3.211 - public static final String geoSparqlSymmetricDifference = GEOF + "symDifference"; 3.212 - public static final String geoSparqlEnvelope = GEOF + "envelope"; 3.213 - public static final String geoSparqlBoundary = GEOF + "boundary"; 3.214 - public static final String geoSparqlGetSRID = GEOF + "getSRID"; 3.215 - 3.216 - // Simple Features - 8 functions - all with 2 arguments + boolean 3.217 - public static final String sfEquals = GEOF + "sfEquals"; 3.218 - public static final String sfDisjoint = GEOF + "sfDisjoint"; 3.219 - public static final String sfIntersects = GEOF + "sfIntersects"; 3.220 - public static final String sfTouches = GEOF + "sfTouches"; 3.221 - public static final String sfCrosses = GEOF + "sfCrosses"; 3.222 - public static final String sfWithin = GEOF + "sfWithin"; 3.223 - public static final String sfContains = GEOF + "sfContains"; 3.224 - public static final String sfOverlaps = GEOF + "sfOverlaps"; 3.225 - 3.226 - // Egenhofer - 8 functions - all with 2 arguments + boolean 3.227 - public static final String ehEquals = GEOF + "ehEquals"; 3.228 - public static final String ehDisjoint = GEOF + "ehDisjoint"; 3.229 - public static final String ehMeet = GEOF + "ehMeet"; 3.230 - public static final String ehOverlap = GEOF + "ehOverlap"; 3.231 - public static final String ehCovers = GEOF + "ehCovers"; 3.232 - public static final String ehCoveredBy = GEOF + "ehCoveredBy"; 3.233 - public static final String ehInside = GEOF + "ehInside"; 3.234 - public static final String ehContains = GEOF + "ehContains"; 3.235 - 3.236 - // RCC8 - 8 functions - all with 2 arguments + boolean 3.237 - public static final String rccEquals = GEOF + "rcc8eq"; 3.238 - public static final String rccDisconnected = GEOF + "rcc8dc"; 3.239 - public static final String rccExternallyConnected = GEOF + "rcc8ec"; 3.240 - public static final String rccPartiallyOverlapping = GEOF + "rcc8po"; 3.241 - public static final String rccTangentialProperPartInverse = GEOF + "rcc8tppi"; 3.242 - public static final String rccTangentialProperPart = GEOF + "rcc8tpp"; 3.243 - public static final String rccNonTangentialProperPart = GEOF + "rcc8ntpp"; 3.244 - public static final String rccNonTangentialProperPartInverse = GEOF + "rcc8ntppi"; 3.245 - 3.246 - // The generic relate function 3.247 - public static final String geoSparqlRelate = GEOF + "relate"; 3.248 - 3.249 - /** 3.250 - * Addition for datetime metric functions 3.251 - * 3.252 - * @author George Garbis <ggarbis@di.uoa.gr> 3.253 - * 3.254 - */ 3.255 - public static final String diffDateTime = "http://strdf.di.uoa.gr/extensions/ontology#diffDateTime"; 3.256 - /** End of addition **/ 3.257 - 3.258 - /** 3.259 - * RCC-8 relations for the RDFi framework 3.260 - */ 3.261 - public static final String rdfiDC = rdfi + "DC"; 3.262 - public static final String rdfiEC = rdfi + "EC"; 3.263 - public static final String rdfiPO = rdfi + "PO"; 3.264 - public static final String rdfiNTPP = rdfi + "NTPP"; 3.265 - public static final String rdfiNTPPi = rdfi + "NTPPi"; 3.266 - public static final String rdfiTPP = rdfi + "TPP"; 3.267 - public static final String rdfiTPPi = rdfi + "TPPi"; 3.268 - public static final String rdfiEQ = rdfi + "EQ"; 3.269 - 3.270 - /** 3.271 - * List of stSPARQL spatial extension functions 3.272 - */ 3.273 - public static final List<String> STSPARQLSpatialExtFunc = new ArrayList<String>(); 3.274 - 3.275 - /** 3.276 - * List of stSPARQL temporal extension functions 3.277 - */ 3.278 - //public static final List<String> stSPARQLTemporalExtFunc = new ArrayList<String>(); 3.279 - 3.280 - /** 3.281 - * List of GeoSPARQL extension functions 3.282 - */ 3.283 - public static final List<String> GEOSPARQLExtFunc = new ArrayList<String>(); 3.284 - 3.285 - // declare spatial and temporal extension functions 3.286 - static { 3.287 - Class<GeoConstants> geoConstants = GeoConstants.class; 3.288 - 3.289 - try { 3.290 - Field[] field = geoConstants.getDeclaredFields(); 3.291 - 3.292 - for (int i = 0; i < field.length; i++) { 3.293 - // stSPARQL 3.294 - if (field[i].getName().startsWith("stSPARQL")) { 3.295 - STSPARQLSpatialExtFunc.add((String) field[i].get(null)); 3.296 - 3.297 - } else if (field[i].getName().startsWith("geoSparql") || 3.298 - field[i].getName().startsWith("sf") || 3.299 - field[i].getName().startsWith("eh") || 3.300 - field[i].getName().startsWith("rcc")) { // GeoSPARQL 3.301 - GEOSPARQLExtFunc.add((String) field[i].get(null)); 3.302 - } 3.303 - } 3.304 - } catch (SecurityException e) { 3.305 - // suppress exception; it should not reach here 3.306 - } catch (IllegalArgumentException e) { 3.307 - // suppress exception; it should not reach here 3.308 - } catch (IllegalAccessException e) { 3.309 - // suppress exception; it should not reach here 3.310 - } 3.311 - } 3.312 -}
4.1 --- a/constants/src/main/java/eu/earthobservatory/constants/OGCConstants.java Fri Apr 05 22:47:32 2013 +0300 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,58 +0,0 @@ 4.4 -/** 4.5 - * This Source Code Form is subject to the terms of the Mozilla Public 4.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this 4.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/. 4.8 - * 4.9 - * Copyright (C) 2012, Pyravlos Team 4.10 - * 4.11 - * http://www.strabon.di.uoa.gr/ 4.12 - */ 4.13 -package eu.earthobservatory.constants; 4.14 - 4.15 -import java.lang.reflect.Field; 4.16 -import java.util.ArrayList; 4.17 -import java.util.List; 4.18 - 4.19 -/** 4.20 - * This class contains several OGC constants that are mainly URIs. 4.21 - * These can be found at the OGC Definition Service located at 4.22 - * <a>http://www.opengis.net/def/</a>. 4.23 - * 4.24 - * @author Charalampos Nikolaou <charnik@di.uoa.gr> 4.25 - */ 4.26 -public class OGCConstants { 4.27 - 4.28 - /** 4.29 - * Namespace for OGC Units of Measure 1.0 4.30 - */ 4.31 - public static final String UOM = "http://www.opengis.net/def/uom/OGC/1.0/"; 4.32 - 4.33 - public static final String OGCdegree = UOM + "degree"; 4.34 - public static final String OGCgridSpacing = UOM + "GridSpacing"; 4.35 - public static final String OGCmetre = UOM + "metre"; 4.36 - public static final String OGCradian = UOM + "radian"; 4.37 - public static final String OGCunity = UOM + "unity"; 4.38 - 4.39 - public static final List<String> supportedUnitsOfMeasure = new ArrayList<String>(); 4.40 - 4.41 - static { 4.42 - Class<OGCConstants> geoConstants = OGCConstants.class; 4.43 - 4.44 - try { 4.45 - Field[] field = geoConstants.getDeclaredFields(); 4.46 - 4.47 - for (int i = 0; i < field.length; i++) { 4.48 - if (field[i].getName().startsWith("OGC")) { 4.49 - supportedUnitsOfMeasure.add((String) field[i].get(null)); 4.50 - } 4.51 - } 4.52 - 4.53 - } catch (SecurityException e) { 4.54 - // suppress exception; it should not reach here 4.55 - } catch (IllegalArgumentException e) { 4.56 - // suppress exception; it should not reach here 4.57 - } catch (IllegalAccessException e) { 4.58 - // suppress exception; it should not reach here 4.59 - } 4.60 - } 4.61 -}
5.1 --- a/constants/src/main/java/eu/earthobservatory/vocabulary/GeoSPARQL.java Fri Apr 05 22:47:32 2013 +0300 5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 5.3 @@ -1,57 +0,0 @@ 5.4 -/** 5.5 - * This Source Code Form is subject to the terms of the Mozilla Public 5.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this 5.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/. 5.8 - * 5.9 - * Copyright (C) 2013, Pyravlos Team 5.10 - * 5.11 - * http://www.strabon.di.uoa.gr/ 5.12 - */ 5.13 -package eu.earthobservatory.vocabulary; 5.14 - 5.15 - 5.16 - 5.17 -/** 5.18 - * GeoSPARQL vocabulary, version 1.0.1, Document 11-052r4 5.19 - * <a>http://schemas.opengis.net/geosparql/geosparql-1_0_1.zip</a> 5.20 - * 5.21 - * @author Charalampos Nikolaou <charnik@di.uoa.gr> 5.22 - */ 5.23 -public class GeoSPARQL { 5.24 - 5.25 - /** 5.26 - * Namespaces 5.27 - */ 5.28 - public static final String ONTOLOGY_NAMESPACE = "http://www.opengis.net/ont/geosparql#"; 5.29 - public static final String FUNCTION_NAMESPACE = "http://www.opengis.net/def/function/geosparql/"; 5.30 - public static final String RULE_NAMESPACE = "http://www.opengis.net/def/rule/geosparql/"; 5.31 - 5.32 - /** 5.33 - * Prefixes 5.34 - */ 5.35 - public static final String GEO = ONTOLOGY_NAMESPACE; 5.36 - public static final String GEOF = FUNCTION_NAMESPACE; 5.37 - public static final String GEOR = RULE_NAMESPACE; 5.38 - 5.39 - /** 5.40 - * Geometry classes 5.41 - */ 5.42 - public static final String SpatialObject = GEO + "SpatialObject"; 5.43 - public static final String Feature = GEO + "Feature"; 5.44 - public static final String Geometry = GEO + "Geometry"; 5.45 - 5.46 - /** 5.47 - * Geometry properties 5.48 - */ 5.49 - public static final String hasGeometry = GEO + "hasGeometry"; 5.50 - public static final String hasDefaultGeometry = GEO + "hasDefaultGeometry"; 5.51 - public static final String dimension = GEO + "dimension"; 5.52 - public static final String coordinateDimension = GEO + "coordinateDimension"; 5.53 - public static final String spatialDimension = GEO + "spatialDimension"; 5.54 - public static final String isEmpty = GEO + "isEmpty"; 5.55 - public static final String isSimple = GEO + "isSimple"; 5.56 - public static final String hasSerialization = GEO + "hasSerialization"; 5.57 - public static final String asWKT = GEO + "asWKT"; 5.58 - public static final String asGML = GEO + "asGML"; 5.59 - 5.60 -}
6.1 --- a/constants/src/main/java/eu/earthobservatory/vocabulary/SimpleFeatures.java Fri Apr 05 22:47:32 2013 +0300 6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 6.3 @@ -1,39 +0,0 @@ 6.4 -/** 6.5 - * This Source Code Form is subject to the terms of the Mozilla Public 6.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this 6.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/. 6.8 - * 6.9 - * Copyright (C) 2013, Pyravlos Team 6.10 - * 6.11 - * http://www.strabon.di.uoa.gr/ 6.12 - */ 6.13 -package eu.earthobservatory.vocabulary; 6.14 - 6.15 -/** 6.16 - * The vocabulary corresponding to the Simple Features Access, mainly 6.17 - * the SF namespace and the URIs for the class hierarchy. 6.18 - * 6.19 - * @author Charalampos Nikolaou <charnik@di.uoa.gr> 6.20 - */ 6.21 -public class SimpleFeatures { 6.22 - 6.23 - public static final String NAMESPACE = "http://www.opengis.net/ont/sf#"; 6.24 - 6.25 - public static final String Geometry = NAMESPACE + "Geometry"; 6.26 - public static final String Point = NAMESPACE + "Point"; 6.27 - public static final String Curve = NAMESPACE + "Curve"; 6.28 - public static final String Surface = NAMESPACE + "Surface"; 6.29 - public static final String GeometryCollection = NAMESPACE + "GeometryCollection"; 6.30 - public static final String LineString = NAMESPACE + "LineString"; 6.31 - public static final String Polygon = NAMESPACE + "Polygon"; 6.32 - public static final String PolyhedralSurface = NAMESPACE + "PolyhedralSurface"; 6.33 - public static final String MultiSurface = NAMESPACE + "MultiSurface"; 6.34 - public static final String MultiCurve = NAMESPACE + "MultiCurve"; 6.35 - public static final String MultiPoint = NAMESPACE + "MultiPoint"; 6.36 - public static final String Line = NAMESPACE + "Line"; 6.37 - public static final String LinearRing = NAMESPACE + "LinearRing"; 6.38 - public static final String Triangle = NAMESPACE + "Triangle"; 6.39 - public static final String TIN = NAMESPACE + "Tin"; 6.40 - public static final String MultiPolygon = NAMESPACE + "MultiPolygon"; 6.41 - public static final String MultiLineString = NAMESPACE + "MultiLineString"; 6.42 -}
7.1 --- a/endpoint/pom.xml Fri Apr 05 22:47:32 2013 +0300 7.2 +++ b/endpoint/pom.xml Fri Apr 05 23:01:56 2013 +0300 7.3 @@ -26,7 +26,7 @@ 7.4 7.5 <dependency> 7.6 <groupId>eu.earthobservatory</groupId> 7.7 - <artifactId>spatial-temporal-constants</artifactId> 7.8 + <artifactId>strabon-vocabulary</artifactId> 7.9 </dependency> 7.10 7.11 <dependency>
8.1 --- a/evaluation/pom.xml Fri Apr 05 22:47:32 2013 +0300 8.2 +++ b/evaluation/pom.xml Fri Apr 05 23:01:56 2013 +0300 8.3 @@ -18,7 +18,7 @@ 8.4 8.5 <dependency> 8.6 <groupId>eu.earthobservatory</groupId> 8.7 - <artifactId>spatial-temporal-constants</artifactId> 8.8 + <artifactId>strabon-vocabulary</artifactId> 8.9 </dependency> 8.10 8.11 <dependency>
9.1 --- a/pom.xml Fri Apr 05 22:47:32 2013 +0300 9.2 +++ b/pom.xml Fri Apr 05 23:01:56 2013 +0300 9.3 @@ -136,7 +136,7 @@ 9.4 <module>endpoint-client</module> 9.5 <module>endpoint-exec</module> 9.6 <module>testsuite</module> 9.7 - <module>constants</module> 9.8 + <module>vocab</module> 9.9 </modules> 9.10 9.11 <properties> 9.12 @@ -242,7 +242,7 @@ 9.13 9.14 <dependency> 9.15 <groupId>eu.earthobservatory</groupId> 9.16 - <artifactId>spatial-temporal-constants</artifactId> 9.17 + <artifactId>strabon-vocabulary</artifactId> 9.18 <version>${eu.earthobservatory.version}</version> 9.19 </dependency> 9.20
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/vocab/pom.xml Fri Apr 05 23:01:56 2013 +0300 10.3 @@ -0,0 +1,97 @@ 10.4 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 10.5 + 10.6 + <modelVersion>4.0.0</modelVersion> 10.7 + 10.8 + <parent> 10.9 + <groupId>eu.earthobservatory</groupId> 10.10 + <artifactId>strabon</artifactId> 10.11 + <version>3.2.9-SNAPSHOT</version> 10.12 + </parent> 10.13 + 10.14 + <artifactId>strabon-vocabulary</artifactId> 10.15 + 10.16 + <name>Strabon: Spatial and Temporal Vocabulary</name> 10.17 + <description>Spatial and Temporal Vocabulary for Strabon</description> 10.18 + <packaging>jar</packaging> 10.19 + 10.20 + <build> 10.21 + <pluginManagement> 10.22 + <plugins> 10.23 + <plugin> 10.24 + <groupId>org.eclipse.m2e</groupId> 10.25 + <artifactId>lifecycle-mapping</artifactId> 10.26 + <version>1.0.0</version> 10.27 + <configuration> 10.28 + <lifecycleMappingMetadata> 10.29 + <pluginExecutions> 10.30 + <pluginExecution> 10.31 + <pluginExecutionFilter> 10.32 + <groupId>org.apache.maven.plugins</groupId> 10.33 + <artifactId>maven-dependency-plugin</artifactId> 10.34 + <versionRange>[2.3,)</versionRange> 10.35 + <goals> 10.36 + <goal>copy-dependencies</goal> 10.37 + </goals> 10.38 + </pluginExecutionFilter> 10.39 + <action> 10.40 + <ignore /> 10.41 + </action> 10.42 + </pluginExecution> 10.43 + </pluginExecutions> 10.44 + </lifecycleMappingMetadata> 10.45 + </configuration> 10.46 + </plugin> 10.47 + </plugins> 10.48 + </pluginManagement> 10.49 + 10.50 + <plugins> 10.51 + <plugin> 10.52 + <groupId>org.apache.maven.plugins</groupId> 10.53 + <artifactId>maven-compiler-plugin</artifactId> 10.54 + <version>2.3.2</version> 10.55 + <configuration> 10.56 + <source>1.6</source> 10.57 + <target>1.6</target> 10.58 + <encoding>utf8</encoding> 10.59 + </configuration> 10.60 + </plugin> 10.61 + <plugin> 10.62 + <groupId>org.apache.maven.plugins</groupId> 10.63 + <artifactId>maven-dependency-plugin</artifactId> 10.64 + <version>2.4</version> 10.65 + <executions> 10.66 + <execution> 10.67 + <id>copy-dependencies</id> 10.68 + <phase>package</phase> 10.69 + <goals> 10.70 + <goal>copy-dependencies</goal> 10.71 + </goals> 10.72 + <configuration> 10.73 + <outputDirectory>${project.build.directory}</outputDirectory> 10.74 + <overWriteReleases>false</overWriteReleases> 10.75 + <overWriteSnapshots>false</overWriteSnapshots> 10.76 + <overWriteIfNewer>true</overWriteIfNewer> 10.77 + </configuration> 10.78 + </execution> 10.79 + </executions> 10.80 + </plugin> 10.81 + 10.82 + <plugin> 10.83 + <groupId>org.apache.maven.plugins</groupId> 10.84 + <artifactId>maven-jar-plugin</artifactId> 10.85 + <version>2.4</version> 10.86 + <configuration> 10.87 + <skipIfEmpty>true</skipIfEmpty> 10.88 + </configuration> 10.89 + <executions> 10.90 + <execution> 10.91 + <goals> 10.92 + <goal>test-jar</goal> 10.93 + </goals> 10.94 + </execution> 10.95 + </executions> 10.96 + </plugin> 10.97 + </plugins> 10.98 + </build> 10.99 +</project> 10.100 +
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/vocab/src/main/java/eu/earthobservatory/constants/GeoConstants.java Fri Apr 05 23:01:56 2013 +0300 11.3 @@ -0,0 +1,309 @@ 11.4 +/** 11.5 + * This Source Code Form is subject to the terms of the Mozilla Public 11.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 11.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 11.8 + * 11.9 + * Copyright (C) 2010, 2011, 2012, Pyravlos Team 11.10 + * 11.11 + * http://www.strabon.di.uoa.gr/ 11.12 + */ 11.13 +package eu.earthobservatory.constants; 11.14 + 11.15 +import java.lang.reflect.Field; 11.16 +import java.util.ArrayList; 11.17 +import java.util.List; 11.18 + 11.19 +import eu.earthobservatory.vocabulary.GeoSPARQL; 11.20 +import eu.earthobservatory.vocabulary.SimpleFeatures; 11.21 + 11.22 +/** 11.23 + * This class is a placeholder for various constants around geometries. These 11.24 + * constants range from URIs of namespaces, functions, representations, etc., 11.25 + * to other constants, such as the default spatial reference system (SRID) that 11.26 + * is assumed in Strabon. 11.27 + * 11.28 + * @author Charalampos Nikolaou <charnik@di.uoa.gr> 11.29 + * @author Kostis Kyzirakos <kkyzir@di.uoa.gr> 11.30 + * @author Kallirroi Dogani <kallirroi@di.uoa.gr> 11.31 + */ 11.32 +public class GeoConstants { 11.33 + /** * 11.34 + * Namespaces * 11.35 + * */ 11.36 + 11.37 + /** 11.38 + * The namespace for stRDF data model 11.39 + */ 11.40 + public static final String stRDF = "http://strdf.di.uoa.gr/ontology#"; 11.41 + 11.42 + /** 11.43 + * The namespace for the RDFi framework 11.44 + */ 11.45 + public static final String rdfi = "http://rdfi.di.uoa.gr/ontology#"; 11.46 + 11.47 + 11.48 + /** * 11.49 + * GeoSPARQL Version 1.0.1 Document# 11-052r4 * 11.50 + * http://schemas.opengis.net/geosparql/geosparql-1_0_1.zip */ 11.51 + 11.52 + /** 11.53 + * The namespace for GeoSPARQL ontology 11.54 + */ 11.55 + public static final String GEO = GeoSPARQL.GEO; 11.56 + 11.57 + /** 11.58 + * The namespace for geometry functions declared by GeoSPARQL 11.59 + */ 11.60 + public static final String GEOF = GeoSPARQL.GEOF; 11.61 + 11.62 + /** 11.63 + * The namespace for the ontology of simple features 11.64 + */ 11.65 + public static final String SF = SimpleFeatures.NAMESPACE; 11.66 + 11.67 + /** 11.68 + * 11.69 + * The namespace of GML. 11.70 + * 11.71 + * Initially, it was set to "http://www.opengis.net/def/geometryType/OGC-GML/3.2/". 11.72 + * Afterwards, it was set to "http://www.opengis.net/gml/3.2/" in order to be compliant 11.73 + * with GML version 3.3, as defined by OGC in the document with title 11.74 + * <tt>"OGC® Geography Markup Language (GML) — Extended schemas and encoding rules"</tt> 11.75 + * ({@link https://portal.opengeospatial.org/files/?artifact_id=46568}). However, none 11.76 + * of these work with the parser provided by JTS, which assumes that the namespace for 11.77 + * GML should be only "http://www.opengis.net/gml" and nothing else. In every other case, 11.78 + * an exception is thrown by the GML parser. 11.79 + * 11.80 + * UPDATE: The most recent value for the GML namespace by OGC is 11.81 + * "http://www.opengis.net/ont/gml#". 11.82 + * 11.83 + * @see {@link org.openrdf.query.algebra.evaluation.util.JTSWrapper.GMLReader}, {@link GMLReader} 11.84 + */ 11.85 + public static final String GML_OGC = "http://www.opengis.net/gml"; 11.86 + 11.87 + 11.88 + /** 11.89 + * The URI for the datatype SemiLinearPointSet 11.90 + * (linear constraint-based representation of geometries) 11.91 + */ 11.92 + @Deprecated 11.93 + public static final String stRDFSemiLinearPointset = stRDF + "SemiLinearPointSet"; 11.94 + 11.95 + 11.96 + /** 11.97 + * The URI for the datatype Well-Known Text (WKT) 11.98 + */ 11.99 + public static final String WKT = stRDF + "WKT"; 11.100 + 11.101 + /** 11.102 + * The URI for the datatype Geography Markup Language (GML) as it defined 11.103 + * in the model stRDF and query language stSPARQL 11.104 + */ 11.105 + public static final String GML = stRDF + "GML"; 11.106 + 11.107 + /** 11.108 + * The URI for the datatype wktLiteral 11.109 + */ 11.110 + public static final String WKTLITERAL = GEO + "wktLiteral"; 11.111 + 11.112 + /** 11.113 + * The URI for the datatype gmlLiteral 11.114 + */ 11.115 + public static final String GMLLITERAL = GEO + "gmlLiteral"; 11.116 + 11.117 + /** * 11.118 + * Extended functions * 11.119 + * stSPARQL * 11.120 + * */ 11.121 + // Spatial Relationships 11.122 + public static final String stSPARQLequals = stRDF + "equals"; 11.123 + public static final String stSPARQLdisjoint = stRDF + "disjoint"; 11.124 + public static final String stSPARQLintersects = stRDF + "intersects"; 11.125 + public static final String stSPARQLtouches = stRDF + "touches"; 11.126 + public static final String stSPARQLwithin = stRDF + "within"; 11.127 + public static final String stSPARQLcontains = stRDF + "contains"; 11.128 + public static final String stSPARQLoverlaps = stRDF + "overlaps"; 11.129 + public static final String stSPARQLcrosses = stRDF + "crosses"; 11.130 + 11.131 + // The generic relate function 11.132 + public static final String stSPARQLrelate = stRDF + "relate"; 11.133 + 11.134 + // Topological Relationships utilizing mbb 11.135 + public static final String stSPARQLmbbIntersects = stRDF + "mbbIntersects"; 11.136 + public static final String stSPARQLmbbContains = stRDF + "mbbContains"; 11.137 + public static final String stSPARQLmbbEquals = stRDF + "mbbEquals"; 11.138 + public static final String stSPARQLmbbWithin = stRDF + "mbbWithin"; 11.139 + 11.140 + // Directional functions 11.141 + public static final String stSPARQLleft = stRDF + "left"; 11.142 + public static final String stSPARQLright = stRDF + "right"; 11.143 + public static final String stSPARQLabove = stRDF + "above"; 11.144 + public static final String stSPARQLbelow = stRDF + "below"; 11.145 + 11.146 + // Spatial Constructs 11.147 + public static final String stSPARQLunion = stRDF + "union"; 11.148 + public static final String stSPARQLbuffer = stRDF + "buffer"; 11.149 + public static final String stSPARQLenvelope = stRDF + "envelope"; 11.150 + public static final String stSPARQLconvexHull = stRDF + "convexHull"; 11.151 + public static final String stSPARQLboundary = stRDF + "boundary"; 11.152 + public static final String stSPARQLintersection = stRDF + "intersection"; 11.153 + public static final String stSPARQLdifference = stRDF + "difference"; 11.154 + public static final String stSPARQLsymDifference = stRDF + "symDifference"; 11.155 + public static final String stSPARQLtransform = stRDF + "transform"; 11.156 + 11.157 + // Spatial Metric Functions 11.158 + public static final String stSPARQLdistance = stRDF + "distance"; 11.159 + public static final String stSPARQLarea = stRDF + "area"; 11.160 + 11.161 + // Spatial Properties 11.162 + public static final String stSPARQLdimension = stRDF + "dimension"; 11.163 + public static final String stSPARQLgeometryType = stRDF + "geometryType"; 11.164 + public static final String stSPARQLasText = stRDF + "asText"; 11.165 + public static final String stSPARQLasGML = stRDF + "asGML"; 11.166 + public static final String stSPARQLsrid = stRDF + "srid"; 11.167 + public static final String stSPARQLisEmpty = stRDF + "isEmpty"; 11.168 + public static final String stSPARQLisSimple = stRDF + "isSimple"; 11.169 + 11.170 + // Spatial Aggregate Functions 11.171 + public static final String stSPARQLextent = stRDF + "extent"; 11.172 + 11.173 + /** 11.174 + * WGS 84 latitude-longitude (EPSG:4326) 11.175 + */ 11.176 + public static final String WGS84_LAT_LON = "http://www.opengis.net/def/crs/EPSG/0/4326"; 11.177 + 11.178 + /** 11.179 + * WGS 84 longitude-longitude 11.180 + * (used as the default CRS for GeoSPARQL geometries) 11.181 + */ 11.182 + public static final String WGS84_LON_LAT = "http://www.opengis.net/def/crs/OGC/1.3/CRS84"; 11.183 + 11.184 + /** 11.185 + * EPSG:4326 11.186 + */ 11.187 + public static final Integer WGS84_LAT_LON_SRID = 4326; 11.188 + 11.189 + /** 11.190 + * EPSG:3857 (not sure whether this is correct for WGS84_LON_LAT) 11.191 + * http://spatialreference.org/ref/sr-org/7483/ 11.192 + */ 11.193 + public static final Integer WGS84_LON_LAT_SRID = 3857; 11.194 + 11.195 + /** 11.196 + * Default SRID (WGS84 latitude-longitude) 11.197 + */ 11.198 + public static final Integer defaultSRID = WGS84_LAT_LON_SRID; 11.199 + 11.200 + /** * 11.201 + * Extended functions * 11.202 + * GeoSPARQL * 11.203 + * */ 11.204 + // Non-topological 11.205 + public static final String geoSparqlDistance = GEOF + "distance"; //3 arguments 11.206 + public static final String geoSparqlBuffer = GEOF + "buffer"; //3 arguments 11.207 + public static final String geoSparqlConvexHull = GEOF + "convexHull"; 11.208 + public static final String geoSparqlIntersection = GEOF + "intersection"; 11.209 + public static final String geoSparqlUnion = GEOF + "union"; 11.210 + public static final String geoSparqlDifference = GEOF + "difference"; 11.211 + public static final String geoSparqlSymmetricDifference = GEOF + "symDifference"; 11.212 + public static final String geoSparqlEnvelope = GEOF + "envelope"; 11.213 + public static final String geoSparqlBoundary = GEOF + "boundary"; 11.214 + public static final String geoSparqlGetSRID = GEOF + "getSRID"; 11.215 + 11.216 + // Simple Features - 8 functions - all with 2 arguments + boolean 11.217 + public static final String sfEquals = GEOF + "sfEquals"; 11.218 + public static final String sfDisjoint = GEOF + "sfDisjoint"; 11.219 + public static final String sfIntersects = GEOF + "sfIntersects"; 11.220 + public static final String sfTouches = GEOF + "sfTouches"; 11.221 + public static final String sfCrosses = GEOF + "sfCrosses"; 11.222 + public static final String sfWithin = GEOF + "sfWithin"; 11.223 + public static final String sfContains = GEOF + "sfContains"; 11.224 + public static final String sfOverlaps = GEOF + "sfOverlaps"; 11.225 + 11.226 + // Egenhofer - 8 functions - all with 2 arguments + boolean 11.227 + public static final String ehEquals = GEOF + "ehEquals"; 11.228 + public static final String ehDisjoint = GEOF + "ehDisjoint"; 11.229 + public static final String ehMeet = GEOF + "ehMeet"; 11.230 + public static final String ehOverlap = GEOF + "ehOverlap"; 11.231 + public static final String ehCovers = GEOF + "ehCovers"; 11.232 + public static final String ehCoveredBy = GEOF + "ehCoveredBy"; 11.233 + public static final String ehInside = GEOF + "ehInside"; 11.234 + public static final String ehContains = GEOF + "ehContains"; 11.235 + 11.236 + // RCC8 - 8 functions - all with 2 arguments + boolean 11.237 + public static final String rccEquals = GEOF + "rcc8eq"; 11.238 + public static final String rccDisconnected = GEOF + "rcc8dc"; 11.239 + public static final String rccExternallyConnected = GEOF + "rcc8ec"; 11.240 + public static final String rccPartiallyOverlapping = GEOF + "rcc8po"; 11.241 + public static final String rccTangentialProperPartInverse = GEOF + "rcc8tppi"; 11.242 + public static final String rccTangentialProperPart = GEOF + "rcc8tpp"; 11.243 + public static final String rccNonTangentialProperPart = GEOF + "rcc8ntpp"; 11.244 + public static final String rccNonTangentialProperPartInverse = GEOF + "rcc8ntppi"; 11.245 + 11.246 + // The generic relate function 11.247 + public static final String geoSparqlRelate = GEOF + "relate"; 11.248 + 11.249 + /** 11.250 + * Addition for datetime metric functions 11.251 + * 11.252 + * @author George Garbis <ggarbis@di.uoa.gr> 11.253 + * 11.254 + */ 11.255 + public static final String diffDateTime = "http://strdf.di.uoa.gr/extensions/ontology#diffDateTime"; 11.256 + /** End of addition **/ 11.257 + 11.258 + /** 11.259 + * RCC-8 relations for the RDFi framework 11.260 + */ 11.261 + public static final String rdfiDC = rdfi + "DC"; 11.262 + public static final String rdfiEC = rdfi + "EC"; 11.263 + public static final String rdfiPO = rdfi + "PO"; 11.264 + public static final String rdfiNTPP = rdfi + "NTPP"; 11.265 + public static final String rdfiNTPPi = rdfi + "NTPPi"; 11.266 + public static final String rdfiTPP = rdfi + "TPP"; 11.267 + public static final String rdfiTPPi = rdfi + "TPPi"; 11.268 + public static final String rdfiEQ = rdfi + "EQ"; 11.269 + 11.270 + /** 11.271 + * List of stSPARQL spatial extension functions 11.272 + */ 11.273 + public static final List<String> STSPARQLSpatialExtFunc = new ArrayList<String>(); 11.274 + 11.275 + /** 11.276 + * List of stSPARQL temporal extension functions 11.277 + */ 11.278 + //public static final List<String> stSPARQLTemporalExtFunc = new ArrayList<String>(); 11.279 + 11.280 + /** 11.281 + * List of GeoSPARQL extension functions 11.282 + */ 11.283 + public static final List<String> GEOSPARQLExtFunc = new ArrayList<String>(); 11.284 + 11.285 + // declare spatial and temporal extension functions 11.286 + static { 11.287 + Class<GeoConstants> geoConstants = GeoConstants.class; 11.288 + 11.289 + try { 11.290 + Field[] field = geoConstants.getDeclaredFields(); 11.291 + 11.292 + for (int i = 0; i < field.length; i++) { 11.293 + // stSPARQL 11.294 + if (field[i].getName().startsWith("stSPARQL")) { 11.295 + STSPARQLSpatialExtFunc.add((String) field[i].get(null)); 11.296 + 11.297 + } else if (field[i].getName().startsWith("geoSparql") || 11.298 + field[i].getName().startsWith("sf") || 11.299 + field[i].getName().startsWith("eh") || 11.300 + field[i].getName().startsWith("rcc")) { // GeoSPARQL 11.301 + GEOSPARQLExtFunc.add((String) field[i].get(null)); 11.302 + } 11.303 + } 11.304 + } catch (SecurityException e) { 11.305 + // suppress exception; it should not reach here 11.306 + } catch (IllegalArgumentException e) { 11.307 + // suppress exception; it should not reach here 11.308 + } catch (IllegalAccessException e) { 11.309 + // suppress exception; it should not reach here 11.310 + } 11.311 + } 11.312 +}
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/vocab/src/main/java/eu/earthobservatory/constants/OGCConstants.java Fri Apr 05 23:01:56 2013 +0300 12.3 @@ -0,0 +1,58 @@ 12.4 +/** 12.5 + * This Source Code Form is subject to the terms of the Mozilla Public 12.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 12.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 12.8 + * 12.9 + * Copyright (C) 2012, Pyravlos Team 12.10 + * 12.11 + * http://www.strabon.di.uoa.gr/ 12.12 + */ 12.13 +package eu.earthobservatory.constants; 12.14 + 12.15 +import java.lang.reflect.Field; 12.16 +import java.util.ArrayList; 12.17 +import java.util.List; 12.18 + 12.19 +/** 12.20 + * This class contains several OGC constants that are mainly URIs. 12.21 + * These can be found at the OGC Definition Service located at 12.22 + * <a>http://www.opengis.net/def/</a>. 12.23 + * 12.24 + * @author Charalampos Nikolaou <charnik@di.uoa.gr> 12.25 + */ 12.26 +public class OGCConstants { 12.27 + 12.28 + /** 12.29 + * Namespace for OGC Units of Measure 1.0 12.30 + */ 12.31 + public static final String UOM = "http://www.opengis.net/def/uom/OGC/1.0/"; 12.32 + 12.33 + public static final String OGCdegree = UOM + "degree"; 12.34 + public static final String OGCgridSpacing = UOM + "GridSpacing"; 12.35 + public static final String OGCmetre = UOM + "metre"; 12.36 + public static final String OGCradian = UOM + "radian"; 12.37 + public static final String OGCunity = UOM + "unity"; 12.38 + 12.39 + public static final List<String> supportedUnitsOfMeasure = new ArrayList<String>(); 12.40 + 12.41 + static { 12.42 + Class<OGCConstants> geoConstants = OGCConstants.class; 12.43 + 12.44 + try { 12.45 + Field[] field = geoConstants.getDeclaredFields(); 12.46 + 12.47 + for (int i = 0; i < field.length; i++) { 12.48 + if (field[i].getName().startsWith("OGC")) { 12.49 + supportedUnitsOfMeasure.add((String) field[i].get(null)); 12.50 + } 12.51 + } 12.52 + 12.53 + } catch (SecurityException e) { 12.54 + // suppress exception; it should not reach here 12.55 + } catch (IllegalArgumentException e) { 12.56 + // suppress exception; it should not reach here 12.57 + } catch (IllegalAccessException e) { 12.58 + // suppress exception; it should not reach here 12.59 + } 12.60 + } 12.61 +}
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/vocab/src/main/java/eu/earthobservatory/vocabulary/GeoSPARQL.java Fri Apr 05 23:01:56 2013 +0300 13.3 @@ -0,0 +1,57 @@ 13.4 +/** 13.5 + * This Source Code Form is subject to the terms of the Mozilla Public 13.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 13.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 13.8 + * 13.9 + * Copyright (C) 2013, Pyravlos Team 13.10 + * 13.11 + * http://www.strabon.di.uoa.gr/ 13.12 + */ 13.13 +package eu.earthobservatory.vocabulary; 13.14 + 13.15 + 13.16 + 13.17 +/** 13.18 + * GeoSPARQL vocabulary, version 1.0.1, Document 11-052r4 13.19 + * <a>http://schemas.opengis.net/geosparql/geosparql-1_0_1.zip</a> 13.20 + * 13.21 + * @author Charalampos Nikolaou <charnik@di.uoa.gr> 13.22 + */ 13.23 +public class GeoSPARQL { 13.24 + 13.25 + /** 13.26 + * Namespaces 13.27 + */ 13.28 + public static final String ONTOLOGY_NAMESPACE = "http://www.opengis.net/ont/geosparql#"; 13.29 + public static final String FUNCTION_NAMESPACE = "http://www.opengis.net/def/function/geosparql/"; 13.30 + public static final String RULE_NAMESPACE = "http://www.opengis.net/def/rule/geosparql/"; 13.31 + 13.32 + /** 13.33 + * Prefixes 13.34 + */ 13.35 + public static final String GEO = ONTOLOGY_NAMESPACE; 13.36 + public static final String GEOF = FUNCTION_NAMESPACE; 13.37 + public static final String GEOR = RULE_NAMESPACE; 13.38 + 13.39 + /** 13.40 + * Geometry classes 13.41 + */ 13.42 + public static final String SpatialObject = GEO + "SpatialObject"; 13.43 + public static final String Feature = GEO + "Feature"; 13.44 + public static final String Geometry = GEO + "Geometry"; 13.45 + 13.46 + /** 13.47 + * Geometry properties 13.48 + */ 13.49 + public static final String hasGeometry = GEO + "hasGeometry"; 13.50 + public static final String hasDefaultGeometry = GEO + "hasDefaultGeometry"; 13.51 + public static final String dimension = GEO + "dimension"; 13.52 + public static final String coordinateDimension = GEO + "coordinateDimension"; 13.53 + public static final String spatialDimension = GEO + "spatialDimension"; 13.54 + public static final String isEmpty = GEO + "isEmpty"; 13.55 + public static final String isSimple = GEO + "isSimple"; 13.56 + public static final String hasSerialization = GEO + "hasSerialization"; 13.57 + public static final String asWKT = GEO + "asWKT"; 13.58 + public static final String asGML = GEO + "asGML"; 13.59 + 13.60 +}
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/vocab/src/main/java/eu/earthobservatory/vocabulary/SimpleFeatures.java Fri Apr 05 23:01:56 2013 +0300 14.3 @@ -0,0 +1,39 @@ 14.4 +/** 14.5 + * This Source Code Form is subject to the terms of the Mozilla Public 14.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 14.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 14.8 + * 14.9 + * Copyright (C) 2013, Pyravlos Team 14.10 + * 14.11 + * http://www.strabon.di.uoa.gr/ 14.12 + */ 14.13 +package eu.earthobservatory.vocabulary; 14.14 + 14.15 +/** 14.16 + * The vocabulary corresponding to the Simple Features Access, mainly 14.17 + * the SF namespace and the URIs for the class hierarchy. 14.18 + * 14.19 + * @author Charalampos Nikolaou <charnik@di.uoa.gr> 14.20 + */ 14.21 +public class SimpleFeatures { 14.22 + 14.23 + public static final String NAMESPACE = "http://www.opengis.net/ont/sf#"; 14.24 + 14.25 + public static final String Geometry = NAMESPACE + "Geometry"; 14.26 + public static final String Point = NAMESPACE + "Point"; 14.27 + public static final String Curve = NAMESPACE + "Curve"; 14.28 + public static final String Surface = NAMESPACE + "Surface"; 14.29 + public static final String GeometryCollection = NAMESPACE + "GeometryCollection"; 14.30 + public static final String LineString = NAMESPACE + "LineString"; 14.31 + public static final String Polygon = NAMESPACE + "Polygon"; 14.32 + public static final String PolyhedralSurface = NAMESPACE + "PolyhedralSurface"; 14.33 + public static final String MultiSurface = NAMESPACE + "MultiSurface"; 14.34 + public static final String MultiCurve = NAMESPACE + "MultiCurve"; 14.35 + public static final String MultiPoint = NAMESPACE + "MultiPoint"; 14.36 + public static final String Line = NAMESPACE + "Line"; 14.37 + public static final String LinearRing = NAMESPACE + "LinearRing"; 14.38 + public static final String Triangle = NAMESPACE + "Triangle"; 14.39 + public static final String TIN = NAMESPACE + "Tin"; 14.40 + public static final String MultiPolygon = NAMESPACE + "MultiPolygon"; 14.41 + public static final String MultiLineString = NAMESPACE + "MultiLineString"; 14.42 +}