Changeset 3487 for trunk/gsdl3
- Timestamp:
- 2002-10-25T16:27:24+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/CGIArgConverter.java
r3386 r3487 8 8 protected HashMap long_map_=null; 9 9 protected HashMap short_map_=null; 10 10 11 11 public CGIArgConverter() { 12 12 long_map_ = new HashMap(); … … 19 19 long_map_.put("stem", "s"); 20 20 short_map_.put("s", "stem"); 21 21 22 22 long_map_.put("queryLevel", "ql"); 23 23 short_map_.put("ql", "queryLevel"); 24 24 25 25 long_map_.put("index", "i"); 26 26 short_map_.put("i", "index"); 27 27 28 28 long_map_.put("matchMode", "mm"); 29 29 short_map_.put("mm", "matchMode"); … … 31 31 long_map_.put("sortBy", "sb"); 32 32 short_map_.put("sb", "sortBy"); 33 33 34 34 long_map_.put("maxDocs", "md"); 35 35 short_map_.put("md", "maxDocs"); 36 // add in short names for the ones that are used, but dont need logn names37 short_map_.put("a", "a"); // action38 short_map_.put("sa", "sa"); // subaction39 short_map_.put("sn", "sn"); // service name40 short_map_.put("c", "c"); // collection41 short_map_.put("l", "l"); // lang42 36 37 short_map_.put("c", "collection"); 38 long_map_.put("collection", "c"); 39 40 short_map_.put("a", "action"); 41 long_map_.put("action", "a"); 42 43 short_map_.put("sa", "subaction"); 44 long_map_.put("subaction", "sa"); 45 46 short_map_.put("sn", "serviceName"); 47 long_map_.put("serviceName", "sn"); 48 49 short_map_.put("sc", "serviceCluster"); 50 long_map_.put("serviceCluster", "sc"); 51 52 short_map_.put("l", "lang"); 53 long_map_.put("lang", "l"); 54 55 long_map_.put("query", "q"); 56 short_map_.put("q", "query"); 57 58 long_map_.put("resource", "r"); 59 short_map_.put("r", "resource"); 60 61 short_map_.put("cl", "classifier"); 62 long_map_.put("classifier", "cl"); 43 63 } 44 64 … … 49 69 return false; 50 70 } 51 71 52 72 Element param = (Element)param_list.getFirstChild(); 53 73 while (param!=null) { … … 59 79 60 80 } 81 61 82 public boolean addShortNames(Element param_list) { 62 83 if (!param_list.getNodeName().equals("paramList")) { … … 64 85 return false; 65 86 } 66 87 67 88 Element param = (Element)param_list.getFirstChild(); 68 89 while (param!=null) { … … 74 95 75 96 } 76 97 77 98 78 99 public String toLong(String short_name) { 79 80 100 101 81 102 if (short_map_.containsKey(short_name)) { 82 103 return (String)short_map_.get(short_name); … … 114 135 } 115 136 } 137 138
Note:
See TracChangeset
for help on using the changeset viewer.