Changeset 13573


Ignore:
Timestamp:
2007-01-11T14:44:06+13:00 (15 years ago)
Author:
kjdon
Message:

made HTIS_PER_PAGE_PARAM an int rather than an enum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractSearch.java

    r13270 r13573  
    225225        param = GSXML.createParameterDescription2(this.doc, INDEX_PARAM, getTextString("param."+INDEX_PARAM, lang), param_type, this.default_index, index_ids, index_names);
    226226        param_list.appendChild(param);
    227     } else if (name.equals(MAXDOCS_PARAM)) {
    228             param = GSXML.createParameterDescription(this.doc, MAXDOCS_PARAM, getTextString("param."+MAXDOCS_PARAM, lang), GSXML.PARAM_TYPE_INTEGER, "10", null, null);
    229     param_list.appendChild(param);
     227    } else if (name.equals(MAXDOCS_PARAM) || name.equals(HITS_PER_PAGE_PARAM)) {
     228        String default_val = "100";
     229        if (name.equals(HITS_PER_PAGE_PARAM)) {
     230        default_val = "10";
     231        }
     232        param = GSXML.createParameterDescription(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_INTEGER, default_val, null, null);
     233        param_list.appendChild(param);
    230234    } else if (name.equals(CASE_PARAM) || name.equals(STEM_PARAM) || name.equals(ACCENT_PARAM)) {
    231235        String[] bool_ops = {"0", "1"};
     
    237241        String[] val_texts = {getTextString("param."+MATCH_PARAM+"."+MATCH_PARAM_SOME, lang), getTextString("param."+MATCH_PARAM+"."+MATCH_PARAM_ALL, lang)};
    238242        param = GSXML.createParameterDescription(this.doc, MATCH_PARAM, getTextString("param."+MATCH_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, MATCH_PARAM_SOME, vals, val_texts);
    239         param_list.appendChild(param);
    240     } else if (name.equals(HITS_PER_PAGE_PARAM)) {
    241         // hits per page
    242         String [] hits_options = {"10", "30", "50"};
    243         param = GSXML.createParameterDescription(this.doc, HITS_PER_PAGE_PARAM, getTextString("param."+HITS_PER_PAGE_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, "10", hits_options, hits_options);
    244243        param_list.appendChild(param);
    245244    } else if (name.equals(START_PAGE_PARAM)) {
Note: See TracChangeset for help on using the changeset viewer.