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