source: trunk/gsdl3/RUNNING@ 3591

Last change on this file since 3591 was 3561, checked in by kjdon, 22 years ago

installation now carried out by a script

  • Property svn:keywords set to Author Date Id Revision
File size: 5.2 KB
Line 
1Note: when running the localhost:8080/gsdl3/library, only the mgppdemo and
2chinese demo collections can do anything useful.
3
4*******************************************************
5There are 3 main parts to the system: sites, interfaces, library executables.
6
7Sites contain collections. Interfaces contain images and xslts.
8
9There are 2 sites in this prototype example.
10
11sites/localsite is a standalone site, like used by a local library. It has
12no connections to any other sites.
13
14sites/site1 is a site that specifies a SOAP connection to another site: localsite
15
16to run site1, and talk to localsite via SOAP, you need to have apache tomcat installed, running, and serving site2. (see INSTALL)
17
18You can add other sites by putting a directory in the sites directory, and
19configuring it appropriately. TODO MakeSite program
20
21
22There is one interface - default. you can add other interfaces if you like, in
23the interfaces directory.
24
25The interface and site to use for a particular servlet is determined by the
26init-params in the web.xml file
27
28XSL Files: when an xslt file is to be used, eg home.xsl, it is looked for in
29several places: in sites/current site/transform, interfaces/current interface/transform, and finally interfaces/default/transform
30
31so you can change the interface by adding new xslt files to these three places.
32
33******************************************************
34Servlet:
35
36need to run setup.bash to set CLASSPATH etc
37
38Can run the web interface by starting tomcat (see INSTALL) and going to
39localhost:8080/gsdl3/library
40
41only mgpp collections can be searched - use mgppdemo, not demo.
42Currently, only Text search works.
43
44to change the interface language, you can add &l=fr to the url. However, there are no alternative langs at the moment.
45
46*******************************************************
47Command line libraries
48
49need to run setup.bash to set CLASSPATH etc
50
51there is a sample executable class: Library1
52
53it can be run by "java org.greenstone.gsdl3.Library1 <sitehome>"
54
55sitehome is the base dir for the site you are running:
56 for the local library example site, its .../gsdl3/sites/localsite
57 for the distributed soap example site, its .../gsdl3/sites/site1
58
59Library1 - just takes straight XML queries and returns the results. It talks
60directly to the message router
61
62basically messages are like:
63
64<message><request type="describe|query" to="demo/TextQuery" info=""/></message>
65with type="describe", to="", can use serviceList, collectionList and siteList
66for the info field.
67
68this program is not very useful - except for debugging - when using the servlet
69or Library2, can print out the messages - then cut and paste these for teh
70input to Library1
71
72sample messages: (to cut and paste)
73
74describe request to message router:
75<message><request type="describe" to=""/></message>
76
77describe request to collection:
78<message><request type="describe" to="mgppdemo"/></message>
79
80query:
81<message><request type="query" to="mgppdemo/TextQuery"><paramList/><content>the</content></request></message>
82
83get Titles for a list of docs:
84<message><request type="query" to="mgppdemo/MetadataRetrieve"><paramList/><content><resourceList><resource name="HASH30aa188f4d8ddaef558fc9" /><resource name="HASH0102361bccb095d60673448c.3" /><resource name="HASH4632a8a51d33c47a75c559.4.1.5" /></resourceList><metadataList><element name="Title"/></metadataList></content></request></message>
85
86get a document:
87<message><request type="query" to="mgppdemo/ResourceRetrieve"><paramList/><content><resourceList><resource name="HASH30aa188f4d8ddaef558fc9" /></resourceList></content></request></message>
88
89
90Library2:
91
92java org.greenstone.gsdl3.Library2 <sites home> <site name> <interfaces home> <interface name>
93
94takes xml request of 'cgi' params, and returns html (input must be all on one line)
95
96<message lang="en">
97<request type="action" action="q" subaction="text">
98<paramList>
99<param name="q" value="the"/>
100</paramList>
101</request>
102</message>
103
104the info field is action/subaction, eg a=p&sa=home, or a=q&sa=text
105
106Some sample queries: (to cut and paste)
107
108home page:
109<message lang="en"><request type="action" action="p" subaction="home" /></message>
110
111about page for mgppdemo:
112<message lang="en"><request type="action" action="p" subaction="about""><paramList><param name="c" value="mgppdemo"/></paramList></request></message>
113
114search for frog in mgppdemo: (no docs returned)
115<message lang="en"><request type="action" action="q" subaction="text"><paramList><param name="c" value="mgppdemo"/><param name="q" value="frog"/><param name="md" value="10"/></paramList></request></message>
116
117search for frog in mgppdemo, with stemming on: (some docs returned)
118<message lang="en"><request type="action" action="q" subaction="text""><paramList><param name="c" value="mgppdemo"/><param name="q" value="frog"/><param name="md" value="10"/><param name="s" value="1"/></paramList></request></message>
119
120
121Collections:
122
123Can use the new java Queryer to test mgpp collections:
124
125java org.greenstone.mgpp.Queryer <basedir> <indexdir> <textdir>
126
127eg
128java org.greenstone.mgpp.Queryer sites/localsite/collect/mgppdemo/index tt/mgppdemo text/mgppdemo
129
130you can use any mgpp collection built with gsdl2 - you need to add a
131buildcfg.xml file to the index directory - look at the one for mgppdemo to see
132what it should look like.
133
134
135
136
137
138
139
Note: See TracBrowser for help on using the repository browser.