Strabon
changeset 1466:194886c8647e sqlite
local commit
author | Liza Sakellari <esakellari@di.uoa.gr> |
---|---|
date | Thu Jan 15 18:54:03 2015 +0200 (2015-01-15) |
parents | f7051f450747 |
children | 8d66204196ba |
files | pom.xml runtime/pom.xml runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java runtime/src/main/java/eu/earthobservatory/runtime/postgis/QueryOp.java runtime/src/main/java/eu/earthobservatory/runtime/postgis/StoreOp.java sqlite/pom.xml |
line diff
1.1 --- a/pom.xml Tue Jun 04 19:04:10 2013 +0300 1.2 +++ b/pom.xml Thu Jan 15 18:54:03 2015 +0200 1.3 @@ -96,14 +96,14 @@ 1.4 </developer> 1.5 <developer> 1.6 <id>psmeros</id> 1.7 - <name>Panagiotis Smeros</name> 1.8 + <name>Panayiotis Smeros</name> 1.9 <email>psmeros@di.uoa.gr</email> 1.10 <url>http://users.uoa.gr/~psmeros/</url> 1.11 <organization>Management of Data, Information and Knowledge Group, Dept. of Informatics and Telecommunications, School of Sciences, National and Kapodistrian University of Athens</organization> 1.12 <organizationUrl>http://www.madgik.di.uoa.gr/</organizationUrl> 1.13 <timezone>+2</timezone> 1.14 <properties> 1.15 - <picUrl>http://users.uoa.gr/~psmeros/images/me%20and%20plastic%20yiayia.JPG</picUrl> 1.16 + <picUrl>http://users.uoa.gr/~psmeros/images/psmeros.jpg</picUrl> 1.17 </properties> 1.18 </developer> 1.19 <developer> 1.20 @@ -129,8 +129,8 @@ 1.21 <module>evaluation</module> 1.22 <module>runtime</module> 1.23 <module>postgis</module> 1.24 + <module>monetdb</module> 1.25 <module>sqlite</module> 1.26 - <module>monetdb</module> 1.27 <module>generaldb</module> 1.28 <module>resultio-spatial</module> 1.29 <module>endpoint</module> 1.30 @@ -250,25 +250,37 @@ 1.31 <artifactId>strabon-endpoint</artifactId> 1.32 <version>${eu.earthobservatory.version}</version> 1.33 </dependency> 1.34 + 1.35 + <dependency> 1.36 + <groupId>org.openrdf.sesame</groupId> 1.37 + <artifactId>strabon-endpoint-client</artifactId> 1.38 + <version>${eu.earthobservatory.version}</version> 1.39 + </dependency> 1.40 1.41 <dependency> 1.42 <groupId>eu.earthobservatory</groupId> 1.43 <artifactId>strabon-vocabulary</artifactId> 1.44 <version>${eu.earthobservatory.version}</version> 1.45 </dependency> 1.46 + 1.47 + <dependency> 1.48 + <groupId>eu.earthobservatory</groupId> 1.49 + <artifactId>strabon-testsuite</artifactId> 1.50 + <version>${eu.earthobservatory.version}</version> 1.51 + </dependency> 1.52 1.53 <dependency> 1.54 <groupId>org.openrdf.sesame</groupId> 1.55 <artifactId>sesame-sail-postgis</artifactId> 1.56 <version>${eu.earthobservatory.version}</version> 1.57 </dependency> 1.58 + 1.59 <dependency> 1.60 <groupId>org.openrdf.sesame</groupId> 1.61 <artifactId>sesame-sail-sqlite</artifactId> 1.62 <version>${eu.earthobservatory.version}</version> 1.63 </dependency> 1.64 1.65 - 1.66 <!-- Sesame dependencies --> 1.67 <dependency> 1.68 <groupId>org.openrdf.sesame</groupId> 1.69 @@ -482,11 +494,14 @@ 1.70 <version>${geotools.version}</version> 1.71 </dependency> 1.72 1.73 + <!-- 1.74 + One epsg jar file suffices. Read this: http://docs.geotools.org/latest/userguide/faq.html#q-how-to-choose-an-epsg-authority 1.75 <dependency> 1.76 <groupId>org.geotools</groupId> 1.77 <artifactId>gt-epsg-wkt</artifactId> 1.78 <version>${geotools.version}</version> 1.79 </dependency> 1.80 + --> 1.81 1.82 <dependency> 1.83 <groupId>org.geotools</groupId> 1.84 @@ -752,6 +767,44 @@ 1.85 <skipTests>${skipTests}</skipTests> 1.86 </configuration> 1.87 </plugin> 1.88 + 1.89 +<!-- <plugin> 1.90 + <artifactId>jdeb</artifactId> 1.91 + <groupId>org.vafer</groupId> 1.92 + <version>1.3</version> 1.93 + <executions> 1.94 + <execution> 1.95 + <phase>package</phase> 1.96 + <goals> 1.97 + <goal>jdeb</goal> 1.98 + </goals> 1.99 + <configuration> 1.100 + <dataSet> 1.101 + <data> 1.102 + <src>${project.build.directory}/${project.build.finalName}.jar</src> 1.103 + <type>file</type> 1.104 + <mapper> 1.105 + <type>perm</type> 1.106 + <prefix>/usr/share/jdeb/lib</prefix> 1.107 + </mapper> 1.108 + </data> 1.109 + <data> 1.110 + <src>${project.build.directory}/strabon-endpoint</src> 1.111 + <type>file</type> 1.112 + <mapper> 1.113 + <type>perm</type> 1.114 + <prefix>/usr/local/bin</prefix> 1.115 + <user>root</user> 1.116 + <group>root</group> 1.117 + <filemode>755</filemode> 1.118 + </mapper> 1.119 + </data> 1.120 + </dataSet> 1.121 + </configuration> 1.122 + </execution> 1.123 + </executions> 1.124 + </plugin> 1.125 +--> 1.126 </plugins> 1.127 </build> 1.128 1.129 @@ -766,6 +819,7 @@ 1.130 <encoding>utf8</encoding> 1.131 </configuration> 1.132 </plugin> 1.133 + 1.134 <!-- 1.135 <plugin> 1.136 <groupId>org.apache.maven.plugins</groupId> 1.137 @@ -823,11 +877,13 @@ 1.138 <system>Trac</system> 1.139 <url>http://bug.strabon.di.uoa.gr/</url> 1.140 </issueManagement> 1.141 - 1.142 + 1.143 + <!-- TODO: update this 1.144 <ciManagement> 1.145 <system>Jekins - Continuous Integration System</system> 1.146 <url>http://test.strabon.di.uoa.gr/cis</url> 1.147 </ciManagement> 1.148 + --> 1.149 1.150 <mailingLists> 1.151 <mailingList> 1.152 @@ -882,21 +938,20 @@ 1.153 <name>Strabon - maven repository - snapshots</name> 1.154 <url>http://maven.strabon.di.uoa.gr/content/repositories/snapshots</url> 1.155 </repository> 1.156 - <repository> 1.157 - <releases> 1.158 - <enabled>true</enabled> 1.159 - </releases> 1.160 - <snapshots> 1.161 - <enabled>false</enabled> 1.162 - </snapshots> 1.163 - <id>strabon.sesame</id> 1.164 - <name>Strabon - maven repository - sesame artifacts (temporary)</name> 1.165 - <url>http://maven.strabon.di.uoa.gr/content/repositories/strabon.sesame/</url> 1.166 - </repository> 1.167 - <!-- 1.168 + <repository> 1.169 + <releases> 1.170 + <enabled>true</enabled> 1.171 + </releases> 1.172 + <snapshots> 1.173 + <enabled>false</enabled> 1.174 + </snapshots> 1.175 + <id>strabon.sesame</id> 1.176 + <name>Strabon - maven repository - sesame artifacts (temporary)</name> 1.177 + <url>http://maven.strabon.di.uoa.gr/content/repositories/strabon.sesame/</url> 1.178 + </repository> 1.179 <repository> 1.180 <releases> 1.181 - <enabled>true</enabled> 1.182 + <enabled>false</enabled> 1.183 </releases> 1.184 <snapshots> 1.185 <enabled>false</enabled> 1.186 @@ -910,13 +965,12 @@ 1.187 <enabled>false</enabled> 1.188 </releases> 1.189 <snapshots> 1.190 - <enabled>true</enabled> 1.191 + <enabled>false</enabled> 1.192 </snapshots> 1.193 <id>aduna-opensource.snapshots</id> 1.194 <name>Aduna Open Source - Maven snapshots</name> 1.195 <url>http://repo.aduna-software.org/maven2/snapshots</url> 1.196 </repository> 1.197 - --> 1.198 <repository> 1.199 <snapshots> 1.200 <enabled>true</enabled> 1.201 @@ -935,6 +989,17 @@ 1.202 <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url> 1.203 </repository> 1.204 --> 1.205 + <repository> 1.206 + <releases> 1.207 + <enabled>true</enabled> 1.208 + </releases> 1.209 + <snapshots> 1.210 + <enabled>false</enabled> 1.211 + </snapshots> 1.212 + <id>aduna-mirror-ontotext</id> 1.213 + <name>Aduna Maven Repository - Ontotext Mirror</name> 1.214 + <url>http://maven.ontotext.com/content/repositories/aduna/</url> 1.215 + </repository> 1.216 </repositories> 1.217 1.218 <distributionManagement>
2.1 --- a/runtime/pom.xml Tue Jun 04 19:04:10 2013 +0300 2.2 +++ b/runtime/pom.xml Thu Jan 15 18:54:03 2015 +0200 2.3 @@ -318,15 +318,9 @@ 2.4 <dependency> 2.5 <groupId>org.xerial</groupId> 2.6 <artifactId>sqlite-jdbc</artifactId> 2.7 - <version>3.7.17-SNAPSHOT</version> 2.8 + <version>3.7.2</version> 2.9 </dependency> 2.10 2.11 - <!-- Geotools --> 2.12 - <dependency> 2.13 - <groupId>org.geotools</groupId> 2.14 - <artifactId>gt-epsg-wkt</artifactId> 2.15 - </dependency> 2.16 - 2.17 <dependency> 2.18 <groupId>org.geotools</groupId> 2.19 <artifactId>gt-geometry</artifactId>
3.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java Tue Jun 04 19:04:10 2013 +0300 3.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java Thu Jan 15 18:54:03 2015 +0200 3.3 @@ -230,6 +230,8 @@ 3.4 throws MalformedQueryException, QueryEvaluationException, IOException, TupleQueryResultHandlerException { 3.5 boolean status = true; 3.6 3.7 + System.out.println(queryString); 3.8 + 3.9 logger.info("[Strabon.query] Executing query: {}", queryString); 3.10 3.11 // check for null stream 3.12 @@ -347,7 +349,7 @@ 3.13 } else { 3.14 throw new InvalidDatasetFormatFault(); 3.15 } 3.16 - 3.17 + 3.18 try{ 3.19 URL source = new URL(src); 3.20 storeURL(source, baseURI, uriContext, realFormat); 3.21 @@ -359,7 +361,10 @@ 3.22 storeURL(fromClasspath, baseURI, uriContext, realFormat); 3.23 3.24 } else { 3.25 + 3.26 File file = new File(src); 3.27 + System.out.println(file.getAbsolutePath()); 3.28 + System.out.println(src); 3.29 if (file.exists()) { 3.30 storeURL(new URL("file://" + src), baseURI, uriContext, realFormat); 3.31 3.32 @@ -384,6 +389,7 @@ 3.33 3.34 } else { 3.35 con.add(url, baseURI, format, context); 3.36 + 3.37 } 3.38 3.39 logger.info("[Strabon.storeURL] Storing was successful.");
4.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/postgis/QueryOp.java Tue Jun 04 19:04:10 2013 +0300 4.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/postgis/QueryOp.java Thu Jan 15 18:54:03 2015 +0200 4.3 @@ -34,7 +34,7 @@ 4.4 System.err.println(" <USERNAME> is the username to use when connecting to the database "); 4.5 System.err.println(" <PASSWORD> is the password to use when connecting to the database"); 4.6 System.err.println(" <QUERY> is the stSPARQL query to evaluate."); 4.7 - System.err.println(" <DELET_LOCK> is true when deletion of \"locked\" table should be enforced (e.g., when Strabon has been ungracefully shutdown)."); 4.8 + System.err.println(" <DELETE_LOCK> is true when deletion of \"locked\" table should be enforced (e.g., when Strabon has been ungracefully shutdown)."); 4.9 System.err.println(" [<FORMAT>] is the format of your results (default: XML)"); 4.10 System.exit(0); 4.11 } 4.12 @@ -54,6 +54,7 @@ 4.13 Strabon strabon = null; 4.14 try { 4.15 strabon = new Strabon(db, user, passwd, port, host, forceDelete); 4.16 + System.out.println(queryString); 4.17 strabon.query(queryString, Format.fromString(resultsFormat), strabon.getSailRepoConnection(), System.out); 4.18 4.19 } catch (UnsupportedExtensionFunctionException e) {
5.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/postgis/StoreOp.java Tue Jun 04 19:04:10 2013 +0300 5.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/postgis/StoreOp.java Thu Jan 15 18:54:03 2015 +0200 5.3 @@ -76,10 +76,10 @@ 5.4 Strabon strabon = null; 5.5 try { 5.6 strabon = new Strabon(db, user, passwd, port, host, false); 5.7 - if (graph == null) { 5.8 + if (graph == null) {//System.out.println("graph = null");System.out.println(src); 5.9 strabon.storeInRepo(src, format, inference); 5.10 5.11 - } else { 5.12 + } else {System.out.println("graph!=null"); 5.13 strabon.storeInRepo(src, null, graph, format, inference); 5.14 } 5.15
6.1 --- a/sqlite/pom.xml Tue Jun 04 19:04:10 2013 +0300 6.2 +++ b/sqlite/pom.xml Thu Jan 15 18:54:03 2015 +0200 6.3 @@ -1,44 +1,35 @@ 6.4 <?xml version="1.0"?> 6.5 -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" 6.6 - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 6.7 - <modelVersion>4.0.0</modelVersion> 6.8 +<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/xsd/maven-4.0.0.xsd"> 6.9 + 6.10 + <modelVersion>4.0.0</modelVersion> 6.11 + 6.12 + <parent> 6.13 + <groupId>eu.earthobservatory</groupId> 6.14 + <artifactId>strabon</artifactId> 6.15 + <version>3.2.9-SNAPSHOT</version> 6.16 + </parent> 6.17 6.18 - <parent> 6.19 - <groupId>eu.earthobservatory</groupId> 6.20 - <artifactId>strabon</artifactId> 6.21 - <version>3.2.9-SNAPSHOT</version> 6.22 - </parent> 6.23 - 6.24 - <groupId>org.openrdf.sesame</groupId> 6.25 + <groupId>org.openrdf.sesame</groupId> 6.26 <artifactId>sesame-sail-sqlite</artifactId> 6.27 <name>OpenRDF Sesame: SqliteDBStore </name> 6.28 <description>SqliteDBStore Store Support</description> 6.29 <packaging>jar</packaging> 6.30 6.31 <url>http://maven.apache.org</url> 6.32 - <dependencies> 6.33 -<dependency> 6.34 - <groupId>org.xerial</groupId> 6.35 - <artifactId>sqlite-jdbc</artifactId> 6.36 - <version>3.7.17-SNAPSHOT</version> 6.37 -</dependency> 6.38 - 6.39 - <dependency> 6.40 - <groupId>junit</groupId> 6.41 - <artifactId>junit</artifactId> 6.42 - <version>3.8.1</version> 6.43 - <scope>test</scope> 6.44 - </dependency> 6.45 - <dependency> 6.46 + 6.47 + <dependencies> 6.48 + <dependency> 6.49 <groupId>org.openrdf.sesame</groupId> 6.50 <artifactId>sesame-queryalgebra-evaluation-spatial</artifactId> 6.51 </dependency> 6.52 - 6.53 + <dependency> 6.54 + <groupId>org.openrdf.sesame</groupId> 6.55 + <artifactId>sesame-sail-generaldb</artifactId> 6.56 + </dependency> 6.57 <dependency> 6.58 <groupId>org.openrdf.sesame</groupId> 6.59 <artifactId>sesame-sail-rdbms</artifactId> 6.60 </dependency> 6.61 - 6.62 <dependency> 6.63 <groupId>org.openrdf.sesame</groupId> 6.64 <artifactId>sesame-sail-api</artifactId> 6.65 @@ -48,12 +39,10 @@ 6.66 <groupId>org.openrdf.sesame</groupId> 6.67 <artifactId>sesame-queryalgebra-evaluation</artifactId> 6.68 </dependency> 6.69 - 6.70 <dependency> 6.71 <groupId>org.openrdf.sesame</groupId> 6.72 <artifactId>sesame-queryalgebra-model</artifactId> 6.73 </dependency> 6.74 - 6.75 <dependency> 6.76 <groupId>org.openrdf.sesame</groupId> 6.77 <artifactId>sesame-query</artifactId> 6.78 @@ -68,33 +57,31 @@ 6.79 <groupId>info.aduna.commons</groupId> 6.80 <artifactId>aduna-commons-collections</artifactId> 6.81 </dependency> 6.82 - 6.83 <dependency> 6.84 <groupId>info.aduna.commons</groupId> 6.85 <artifactId>aduna-commons-iteration</artifactId> 6.86 </dependency> 6.87 - 6.88 <dependency> 6.89 <groupId>info.aduna.commons</groupId> 6.90 <artifactId>aduna-commons-concurrent</artifactId> 6.91 </dependency> 6.92 - <dependency> 6.93 - <groupId>org.openrdf.sesame</groupId> 6.94 - <artifactId>sesame-sail-generaldb</artifactId> 6.95 - </dependency> 6.96 + 6.97 <dependency> 6.98 <groupId>commons-dbcp</groupId> 6.99 <artifactId>commons-dbcp</artifactId> 6.100 </dependency> 6.101 6.102 -<dependency> 6.103 - <groupId>org.openrdf.sesame</groupId> 6.104 - <artifactId>sesame-repository-sail</artifactId> 6.105 + <dependency> 6.106 + <groupId>org.xerial</groupId> 6.107 + <artifactId>sqlite-jdbc</artifactId> 6.108 + <version>3.7.2</version> 6.109 </dependency> 6.110 - <dependency> 6.111 - <groupId>postgresql</groupId> 6.112 - <artifactId>postgresql</artifactId> 6.113 - <scope>provided</scope> 6.114 + 6.115 + <dependency> 6.116 + <groupId>junit</groupId> 6.117 + <artifactId>junit</artifactId> 6.118 + <scope>test</scope> 6.119 </dependency> 6.120 - </dependencies> 6.121 + 6.122 + </dependencies> 6.123 </project>