Changeset 4808
- Timestamp:
- 2003-06-25T15:37:48+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/mgppqueryfilter.cpp
r4752 r4808 43 43 44 44 // -- onePerTerm Level enumerated 45 // Document, Section, Paragraph45 // likely to be Doc, Sec, Para, but we dont assume anything now 46 46 filtopt.clear(); 47 47 filtopt.name = "Level"; 48 48 filtopt.type = FilterOption_t::enumeratedt; 49 49 filtopt.repeatable = FilterOption_t::onePerTerm; 50 filtopt.validValues.push_back("Document");51 filtopt.defaultValue = "Document";52 50 filterOptions["Level"] = filtopt; 53 51 … … 94 92 here++; 95 93 } 96 } 97 98 if (key == "levels") { 99 // if levels has been specified, we remove the default Document from valid values - currently, it is the only one - not yet 100 //filterOptions["Level"].validValues.erase(0); 94 } else if (key == "indexlevels") { 101 95 text_tarray::const_iterator here = cfgline.begin(); 102 96 text_tarray::const_iterator end = cfgline.end(); 103 97 bool first=true; 104 98 while (here != end) { 105 99 if (!(*here).empty()) { 106 if ((*here) == "section" || (*here) == "Section") { 107 filterOptions["Level"].validValues.push_back("Section"); 108 filterOptions["Level"].defaultValue = "Section"; 109 text_t sect = "Section"; 110 ((mgppsearchclass *)mgsearchptr)->set_gdbm_level(sect); 111 } else if ((*here) == "document" || (*here) == "Document") { 112 //filterOptions["Level"].validValues.push_back("Document"); 113 } else if ((*here) == "paragraph" || (*here) == "Paragraph") { 114 filterOptions["Level"].validValues.push_back("Paragraph"); 115 } 116 } 117 here++; 118 } 119 // just check to make sure that there have been some levels specified 120 // if (filterOptions["Level"].validValues.empty()) { 121 // add back in document 122 // filterOptions["Level"].validValues.push_back("Document"); 123 // } 124 125 } 100 if (first) { 101 first = false; 102 // the default is the first value 103 filterOptions["Level"].defaultValue = *here; 104 } 105 filterOptions["Level"].validValues.push_back(*here); 106 } 107 here ++; 108 } 109 } else if (key == "textlevel") { 110 ((mgppsearchclass *)mgsearchptr)->set_gdbm_level( cfgline[0]); 111 } 112 126 113 } 127 114
Note:
See TracChangeset
for help on using the changeset viewer.