source: gs2-extensions/apache-jena/trunk/src/README-FUSEKI2.txt@ 37273

Last change on this file since 37273 was 37273, checked in by davidb, 16 months ago

Updated notes

File size: 3.7 KB
Line 
1
2***********
3DEPRECATED!
4***********
5
6Greenstone3 now works with Fuseki3 as a WAR file within its
7tomcat/webapps area
8
9***********
10
11
12
13Installation of this extension follows the usual pattern:
14
15 ./CASCADE-MAKE.sh
16
17
18For interative experiments with the Triplestore, you can then visit
19the home page:
20
21 http://localhost:3030/
22
23Go to the control panel:
24
25 http://localhost:3030/control-panel.tpl
26
27The control panel lets you choose which dataset to work with through a
28drop-down menu. For the Greenstone extension installation there
29should only be one:
30
31 /greenstone
32
33Pressing 'select' triggers a POST action to:
34
35 http://localhost:3030/$/dataset
36
37which triggers a redirect (through setting 'Location:' in the respose header) to:
38
39
40 http://localhost:3030/sparql.tpl
41
42
43A generic query to try out is:
44
45 select * where { ?s ?p ?o } limit 100
46
47
48#----
49# ReverseProxying
50#----
51
52If serving your Greenstone3 through a public facing web server, such as Apache2:
53
54 ProxyPass /greenstone3-lod3 http://localhost:4040
55 ProxyPassReverse /greenstone3-lod3 http://localhost:4040
56
57then the installed '.tpl' files and the Location redirects don't work. Introducing
58a base tag into the header such as:
59
60<base href="/greenstone3-lod/" />
61
62and changing the 'control-panel.tpl' form action to be:
63
64 <form action="/greenstone3-lod/${action}" method="post">
65
66helps a bit, but the Location redirect is still an issue.
67
68Bottom-line to run a SPARQL query directly, (for localhost) you would do:
69
70 http://localhost:3030/greenstone/query?query=select+*+where+%7B+%3Fs+%3Fo+%3Fp+%7D+limit+100&output=text&stylesheet=
71
72For a proxied install you would (continuing the example) do:
73
74 http://sowemustthink.space/greenstone3-lod/greenstone/query?query=select+*+where+%7B+%3Fs+%3Fo+%3Fp+%7D+limit+100&output=text&stylesheet=
75
76
77Factoring in these details, it is possible to setup a transform/page/sparql.xsl page in Greenstone3 this is fully operational,
78even in the ReverseProxying situation.
79
80One key step in sparql.xsl is to updated the form input argument for 'stylesheet' to specify the proxied prefix URL:
81
82 stylesheet=/greenstone3-lod/xml-to-html-links.xsl
83 stylesheet=%2Fgreenstone3-lod%2Fxml-to-html-links.xsl
84
85
86When asking for the SPARQL XML result to be transformed to html-links, the hyperlinks in the page generated
87also need some tweaking. The Greenstone3 sparql.xsl page helps plumb the static files used back to the
88/greenstone3-lod/ url, but inside 'xml-to-html-links.xsl' this sets another 'stylesheet=' argument that
89needs to be updated to the ReverseProxy setup
90
91
92 <a href="?query={$query}&amp;output=xml&amp;stylesheet=%2Fxml-to-html-links.xsl">
93->
94 <a href="?query={$query}&amp;output=xml&amp;stylesheet=%2Fgreenstone3-lod%2Fxml-to-html-links.xsl">
95
96You might need to reload the xml-to-html-links.xsl file in the browser if it has been cached before the change
97
98
99% fgrep -rl xml-to-html etc/
100 etc/pages/sparql.html
101 etc/pages/sparql.tpl
102 etc/pages/xml-to-html-links.xsl
103
104
105
106
107#----
108# Note about Jena code:
109#----
110
111 Jena is a pure Java code base, and the relevant compiled jar files
112 are bundled with this extension, so no actual compilation is needed.
113 The main task CASCADE-MAKE.sh does is to untar the 'binary' files,
114 and setup them up in appropriate top-level ' lib' folder (for jar
115 files) etc so Greenstone can find them
116
117 In case it is ever needed, the companion source code is in 'src'
118 directory (taken from the Apache Jena website, matched to the binary
119 version). For source code, there was only a zip version of the file
120 to download.
121
122 To run the command-line client programs, such as 's-put', this
123 requires Ruby to be installed. The source code for this is
124 provided in the 'packages' directory, and compiled up and installed
125 as part of running ./CASCADE-MAKE.sh
126
127
128
129
130
Note: See TracBrowser for help on using the repository browser.