Changeset 3875
- Timestamp:
- 2003-03-13T12:21:47+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGSearch.java
r3868 r3875 55 55 { 56 56 mg_src_ = new MGWrapper(); 57 }58 59 60 /** configure this service */61 /* public boolean configure(Element info)62 {63 // Do generic configuration64 if (super.configure(info) == false)65 return false;66 67 // Do specific configuration68 System.out.println("Configuring GS2MGSearch...");69 70 return true;71 }*/72 73 74 /** creates a new param element and adds it to the param list */75 protected void createParameter(String name, Element param_list,76 boolean display, String lang)77 {78 Element param = null;79 80 if (name.equals(INDEX_PARAM)) {81 // the index info - read from config file82 Element index_list = (Element)GSXML.getChildByTagName(config_info_, INDEX_ELEM+GSXML.LIST_MODIFIER);83 NodeList indexes = index_list.getElementsByTagName(INDEX_ELEM);84 int len = indexes.getLength();85 if (len > 1) { // add index param to list only if more than one index specified86 String[] inds = new String[len];87 for (int i=0; i<len; i++) {88 inds[i] = ((Element)indexes.item(i)).getAttribute(GSXML.NAME_ATT);89 }90 if (display) {91 // use the same index names for now - should get these out of the config info92 param = GSXML.createParameterDisplay(doc_, INDEX_PARAM, getTextString("param."+INDEX_PARAM, lang), inds, inds);93 } else {94 param = GSXML.createParameter(doc_, INDEX_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, default_index_, inds);95 }96 }97 }98 99 // add the param to the list100 if (param != null) {101 param_list.appendChild(param);102 }103 else {104 super.createParameter(name, param_list, display, lang);105 }106 57 } 107 58
Note:
See TracChangeset
for help on using the changeset viewer.