Permalink
Browse files

changed directory layout

  • Loading branch information...
0 parents commit 77e9ff1e78da4ffd4f8deaa43618b8db87f6b78c @tomatophantastico committed Apr 22, 2015
Showing with 34,730 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +55 −0 src/assembly/distwithjetty.xml
  3. 0 src/assembly/distwithtomcat.xml
  4. +5 −0 src/main/conf/db.properties
  5. +154 −0 src/main/conf/mapping.ttl
  6. +6 −0 src/main/conf/sparqlmap.properties
  7. +26 −0 src/main/java/org/aksw/sparqlmap/web/SparqlMapContextManager.java
  8. +231 −0 src/main/java/org/aksw/sparqlmap/web/SparqlMapWeb.java
  9. +47 −0 src/main/java/org/aksw/sparqlmap/web/negotiation/SparqlRdfXmlResponse.java
  10. +22 −0 src/main/java/org/aksw/sparqlmap/web/spring/SparqlmapWebApplication.java
  11. +61 −0 src/main/java/org/aksw/sparqlmap/web/spring/WebAppConfig.java
  12. +24 −0 src/main/java/org/aksw/sparqlmap/web/spring/WebAppLoader.java
  13. +402 −0 src/main/java/sparqlmap.java
  14. +6 −0 src/main/resources/log4j.properties
  15. +6 −0 src/main/resources/log4j.properties.quiet
  16. +551 −0 src/main/resources/mappings/bsbm-r2rml.ttl
  17. +408 −0 src/main/resources/mappings/ckan-r2rml.ttl
  18. +33 −0 src/main/resources/mappings/omegawiki-r2rml.ttl
  19. +32 −0 src/main/resources/mappings/sp2-r2rml.ttl
  20. +1,938 −0 src/main/resources/sample-data/WEOOct2013alla.csv
  21. +95 −0 src/main/resources/sample-data/bsbm2-data-100k.sql
  22. +443 −0 src/main/resources/sample-data/bsbm2-schema-hsql.sql
  23. +249 −0 src/main/resources/sample-data/bsbm2-schema_constraints.sql
  24. +199 −0 src/main/resources/sample-data/bsbm2-schema_noconstraints.sql
  25. +4 −0 src/main/resources/sample-data/db/bsbm.properties
  26. +18,085 −0 src/main/resources/sample-data/db/bsbm.script
  27. +3 −0 src/main/resources/samples/csv/Person.csv
  28. +1 −0 src/main/resources/samples/csv/README.txt
  29. +20 −0 src/main/resources/samples/csv/csv-person-mapping.ttl
  30. +13 −0 src/main/resources/samples/csv/translate
  31. 0 src/main/resources/samples/war-jndi/README.txt
  32. 0 src/main/resources/samples/war-jndi/context.xml
  33. +3 −0 src/main/resources/samples/war/README.txt
  34. +6 −0 src/main/resources/samples/war/db.properties
  35. +551 −0 src/main/resources/samples/war/mapping.ttl
  36. +10 −0 src/main/resources/samples/war/sparqlmap.properties
  37. +12 −0 src/main/resources/scripts/sparqlmap
  38. +26 −0 src/main/resources/scripts/sparqlmap-web
  39. +7 −0 src/main/webapp/WEB-INF/web.xml
  40. +6 −0 src/main/webapp/index.jsp
  41. +77 −0 src/main/webapp/snorql/index.html
  42. BIN src/main/webapp/snorql/link.png
  43. +13 −0 src/main/webapp/snorql/namespaces.js
  44. +4,221 −0 src/main/webapp/snorql/prototype.js
  45. BIN src/main/webapp/snorql/rdf_flyer.24.gif
  46. +136 −0 src/main/webapp/snorql/scriptaculous/builder.js
  47. +965 −0 src/main/webapp/snorql/scriptaculous/controls.js
  48. +974 −0 src/main/webapp/snorql/scriptaculous/dragdrop.js
  49. +1,122 −0 src/main/webapp/snorql/scriptaculous/effects.js
  50. +58 −0 src/main/webapp/snorql/scriptaculous/scriptaculous.js
  51. +275 −0 src/main/webapp/snorql/scriptaculous/slider.js
  52. +55 −0 src/main/webapp/snorql/scriptaculous/sound.js
  53. +568 −0 src/main/webapp/snorql/scriptaculous/unittest.js
  54. +535 −0 src/main/webapp/snorql/snorql.js
  55. +490 −0 src/main/webapp/snorql/sparql-lib.js
  56. +39 −0 src/main/webapp/snorql/style.css
  57. +183 −0 src/main/webapp/snorql/xml-to-html.xsl
  58. +95 −0 src/sample-data/bsbm2-data-100k.sql
  59. +249 −0 src/sample-data/bsbm2-schema_constraints.sql
  60. +199 −0 src/sample-data/bsbm2-schema_noconstraints.sql
  61. +165 −0 src/test/java/dumpTest.java
  62. +6 −0 src/test/resources/map-conf/db.properties
  63. +551 −0 src/test/resources/map-conf/mapping.ttl
  64. +9 −0 src/test/resources/map-conf/sparqlmap.properties
@@ -0,0 +1,5 @@
+/bin/
+.classpath
+.project
+*.iml
+build
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <dependencySets>
+ <dependencySet>
+ <!-- unpack the webapp as root application -->
+ <scope>runtime</scope>
+ <unpack>true</unpack>
+ <outputDirectory>webapps/root/</outputDirectory>
+ <includes>
+ <include>org.aksw.sparqlmap:servlet:war</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <unpack>false</unpack>
+ <outputDirectory>lib</outputDirectory>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>org.mortbay.jetty:jetty</include>
+ <include>org.mortbay.jetty:jetty-util</include>
+ <include>org.mortbay.jetty:start</include>
+ <include>org.mortbay.jetty:jsp-2.1-jetty</include>
+ <include>commons-logging:commons-logging</include>
+ <include>log4j:log4j</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/jetty/bin</directory>
+ <outputDirectory>bin/</outputDirectory>
+ <filtered>false</filtered>
+ </fileSet>
+ <fileSet>
+ <directory>src/jetty/etc</directory>
+ <outputDirectory>etc/</outputDirectory>
+ <filtered>false</filtered>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/conf</directory>
+ <outputDirectory>map-conf/</outputDirectory>
+ <filtered>false</filtered>
+ </fileSet>
+ </fileSets>
+
+</assembly>
No changes.
@@ -0,0 +1,5 @@
+jdbc.url=jdbc:postgresql://localhost/ckan
+jdbc.username=ckanuser
+jdbc.password=ckanuser
+jdbc.poolminconnections=5
+jdbc.poolmaxconnections=20
@@ -0,0 +1,154 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix data: <http://ckan.org/data/> .
+@prefix mapping: <http://ckan.org/mapping/> .
+@prefix vocab: <http://ckan.org/vocab/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
+@prefix dc: <http://purl.org/dc/elements/1.1/>.
+
+<http://ckan.org/mapping/Package>
+ rr:logicalTable
+ [ rr:tableName "\"package\""
+ ] ;
+ rr:subjectMap
+ [ rr:class <http://ckan.org/vocab/Package> ;
+ rr:template "http://ckan.org/dataset/{\"name\"}"
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"state\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/hasstate>
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"maintainer_email\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/maintainermail>
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"name\""
+ ] ;
+ rr:predicate rdfs:label
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"author\""
+ ] ;
+ rr:predicate dc:creator
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"author_email\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/authormail>
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"maintainer\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/maintainer>
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"version\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/version>
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"id\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/id>
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"title\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/title>
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"title\""
+ ] ;
+ rr:predicate rdfs:label
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"notes\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/package#notes>
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"notes\""
+ ] ;
+ rr:predicate rdfs:comment
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"license_id\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/license>
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"revision_id\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/revision_id>
+ ] ;
+
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"url\"";
+ rr:termType rr:IRI
+ ] ;
+ rr:predicate <http://ckan.org/vocab/package#url>
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"type\""
+ ] ;
+ rr:predicate <http://ckan.org/vocab/package#type>
+ ] .
+<http://ckan.org/mapping/Package_Extra>
+ rr:logicalTable
+ [ rr:sqlQuery """ select * from package p join package_extra pe on (pe.package_id = p.id)"""
+ ] ;
+ rr:subjectMap
+ [
+ rr:template "http://ckan.org/dataset/{\"name\"}"
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"value\""
+ ] ;
+ rr:predicateMap [
+ rr:template "http://ckan.org/vocab/package#{key}"
+ ]
+ ] .
+<http://ckan.org/mapping/Package_Tag>
+ rr:logicalTable
+ [ rr:sqlQuery """ select p.name as p_name, t.name as t_name from package_tag pt join tag t on (pt.tag_id = t.id) join package p on (p.id = pt.package_id)"""
+ ] ;
+ rr:subjectMap
+ [
+ rr:template "http://ckan.org/dataset/{\"p_name\"}"
+ ] ;
+ rr:predicateObjectMap
+ [ rr:objectMap
+ [ rr:column "\"t_name\""
+ ] ;
+ rr:predicate <http://ns.inria.fr/nicetag/2009/09/25/voc.html#isAbout>
+ ].
+
+
@@ -0,0 +1,6 @@
+sm.baseuri=http://localhost/sparqlmap
+sm.r2rmlvocablocation=classpath:/vocabularies/r2rml.ttl
+sm.mappingfile=mapping.ttl
+sm.continuewithinvaliduris=true
+#####
+sm.opt.shortcutfilter=true
@@ -0,0 +1,26 @@
+package org.aksw.sparqlmap.web;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.aksw.sparqlmap.core.SparqlMap;
+import org.springframework.context.ApplicationContext;
+
+
+public class SparqlMapContextManager {
+
+ public static String ROOT = "ROOT";
+
+ private Map<String, ApplicationContext> resourceString2sparqlmapContext = new HashMap<String, ApplicationContext>();
+
+ public SparqlMap getSparqlMap(String resource){
+ return resourceString2sparqlmapContext.get(resource).getBean(SparqlMap.class);
+ }
+
+ public void putContext(String resource, ApplicationContext context){
+ resourceString2sparqlmapContext.put(resource, context);
+ }
+
+
+
+}
Oops, something went wrong.

0 comments on commit 77e9ff1

Please sign in to comment.