Last change
on this file since 3385 was 3363, checked in by kjdon, 22 years ago |
modified
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.1 KB
|
Line | |
---|
1 | package org.greenstone.gsdl3.action;
|
---|
2 |
|
---|
3 | import org.greenstone.gsdl3.core.ModuleInterface;
|
---|
4 | import org.greenstone.gsdl3.util.*;
|
---|
5 | // XML classes
|
---|
6 | import org.w3c.dom.Node;
|
---|
7 | import org.w3c.dom.Document;
|
---|
8 | import org.w3c.dom.Element;
|
---|
9 |
|
---|
10 | public class BrowseAction extends Action {
|
---|
11 |
|
---|
12 |
|
---|
13 | public String process (Element message) {
|
---|
14 |
|
---|
15 | Element request = (Element)message.getElementsByTagName("request").item(0);
|
---|
16 |
|
---|
17 | String info = request.getAttribute("info");
|
---|
18 | // remove the q/ bit
|
---|
19 | info = GSPath.removeFirstLink(info);
|
---|
20 | String query_type = GSPath.getFirstLink(info);
|
---|
21 |
|
---|
22 | if (query_type.equals("")) {
|
---|
23 | query_type = "text";
|
---|
24 | }
|
---|
25 |
|
---|
26 | if (query_type.equals("text")) {
|
---|
27 | return textQuery(request);
|
---|
28 | }
|
---|
29 | if (query_type.equals("field")) {
|
---|
30 | return fieldQuery(request);
|
---|
31 | }
|
---|
32 | return unknownQuery(request);
|
---|
33 |
|
---|
34 |
|
---|
35 | }
|
---|
36 |
|
---|
37 | protected String textQuery(Element request) {
|
---|
38 | return GSHTML.errorPage("text query");
|
---|
39 |
|
---|
40 | }
|
---|
41 |
|
---|
42 | protected String fieldQuery(Element request) {
|
---|
43 | return GSHTML.errorPage("field query");
|
---|
44 |
|
---|
45 |
|
---|
46 | }
|
---|
47 | protected String unknownQuery(Element request) {
|
---|
48 |
|
---|
49 | return GSHTML.errorPage("unknown query subtype");
|
---|
50 | }
|
---|
51 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.