*********** DEPRECATED! *********** Greenstone3 now works with Fuseki3 as a WAR file within its tomcat/webapps area *********** Installation of this extension follows the usual pattern: ./CASCADE-MAKE.sh For interative experiments with the Triplestore, you can then visit the home page: http://localhost:3030/ Go to the control panel: http://localhost:3030/control-panel.tpl The control panel lets you choose which dataset to work with through a drop-down menu. For the Greenstone extension installation there should only be one: /greenstone Pressing 'select' triggers a POST action to: http://localhost:3030/$/dataset which triggers a redirect (through setting 'Location:' in the respose header) to: http://localhost:3030/sparql.tpl A generic query to try out is: select * where { ?s ?p ?o } limit 100 #---- # ReverseProxying #---- If serving your Greenstone3 through a public facing web server, such as Apache2: ProxyPass /greenstone3-lod3 http://localhost:4040 ProxyPassReverse /greenstone3-lod3 http://localhost:4040 then the installed '.tpl' files and the Location redirects don't work. Introducing a base tag into the header such as: and changing the 'control-panel.tpl' form action to be:
helps a bit, but the Location redirect is still an issue. Bottom-line to run a SPARQL query directly, (for localhost) you would do: http://localhost:3030/greenstone/query?query=select+*+where+%7B+%3Fs+%3Fo+%3Fp+%7D+limit+100&output=text&stylesheet= For a proxied install you would (continuing the example) do: http://sowemustthink.space/greenstone3-lod/greenstone/query?query=select+*+where+%7B+%3Fs+%3Fo+%3Fp+%7D+limit+100&output=text&stylesheet= Factoring in these details, it is possible to setup a transform/page/sparql.xsl page in Greenstone3 this is fully operational, even in the ReverseProxying situation. One key step in sparql.xsl is to updated the form input argument for 'stylesheet' to specify the proxied prefix URL: stylesheet=/greenstone3-lod/xml-to-html-links.xsl stylesheet=%2Fgreenstone3-lod%2Fxml-to-html-links.xsl When asking for the SPARQL XML result to be transformed to html-links, the hyperlinks in the page generated also need some tweaking. The Greenstone3 sparql.xsl page helps plumb the static files used back to the /greenstone3-lod/ url, but inside 'xml-to-html-links.xsl' this sets another 'stylesheet=' argument that needs to be updated to the ReverseProxy setup -> You might need to reload the xml-to-html-links.xsl file in the browser if it has been cached before the change % fgrep -rl xml-to-html etc/ etc/pages/sparql.html etc/pages/sparql.tpl etc/pages/xml-to-html-links.xsl #---- # Note about Jena code: #---- Jena is a pure Java code base, and the relevant compiled jar files are bundled with this extension, so no actual compilation is needed. The main task CASCADE-MAKE.sh does is to untar the 'binary' files, and setup them up in appropriate top-level ' lib' folder (for jar files) etc so Greenstone can find them In case it is ever needed, the companion source code is in 'src' directory (taken from the Apache Jena website, matched to the binary version). For source code, there was only a zip version of the file to download. To run the command-line client programs, such as 's-put', this requires Ruby to be installed. The source code for this is provided in the 'packages' directory, and compiled up and installed as part of running ./CASCADE-MAKE.sh