Changeset 245
- Timestamp:
- 01/02/08 20:53:22 (1 year ago)
- Files:
-
- lex/trunk/jsp/navclause.jsp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lex/trunk/jsp/navclause.jsp
r236 r245 82 82 if (min_m < new_min_m) min_m = new_min_m; 83 83 if (max_m > new_max_m) max_m = new_max_m; 84 // System.out.println("book restricts to " + min_m + "-" + max_m); 84 85 } 85 86 … … 119 120 try 120 121 { 121 int newChapNum = Integer.parseInt(request.getParameter("chapter")); 122 selChapNum = newChapNum; 122 selChapNum = Integer.parseInt(request.getParameter("chapter")); 123 123 } 124 124 catch (Exception e) { /* ignore it and use default chapter */ } … … 172 172 if (min_m < new_min_m) min_m = new_min_m; 173 173 if (max_m > new_max_m) max_m = new_max_m; 174 // System.out.println("chapter restricts to " + min_m + "-" + max_m); 174 175 } 175 176 … … 205 206 try 206 207 { 207 int newVerseNum = Integer.parseInt(request.getParameter("verse")); 208 selVerseNum = newVerseNum; 208 selVerseNum = Integer.parseInt(request.getParameter("verse")); 209 209 } 210 210 catch (Exception e) { /* ignore it and use default chapter */ } … … 213 213 boolean foundVerse = false; 214 214 215 Sheaf sheaf = emdros.getSheaf216 ( 217 " SELECT ALL OBJECTS IN " +215 FlatSheaf sheaf = emdros.getFlatSheaf 216 ( 217 "GET OBJECTS HAVING MONADS IN " + 218 218 emdros.intersect(userTextAccessSet, min_m, max_m) + 219 " WHERE [verse "+ 220 " book = "+selBook+" AND "+ 221 " chapter = "+selChapNum+ 222 " GET verse, verse_label]" 223 ); 224 225 SheafConstIterator sci = sheaf.const_iterator(); 226 while (sci.hasNext()) { 227 Straw straw = sci.next(); 228 MatchedObject verse = straw.const_iterator().next(); 219 "[verse GET verse, verse_label]" 220 ); 221 222 FlatStrawConstIterator sci = 223 sheaf.const_iterator().next().const_iterator(); 224 225 while (sci.hasNext()) 226 { 227 MatchedObject verse = sci.next(); 229 228 230 229 int thisVerseNum = verse.getEMdFValue("verse").getInt(); … … 236 235 min_m = som.first(); 237 236 max_m = som.last(); 237 // System.out.println("verse restricts to " + min_m + "-" + max_m); 238 238 } 239 239 240 240 %> 241 <option value= <%=241 <option value="<%= 242 242 thisVerseNum 243 %> <%=244 thisVerseNum == selVerseNum ? " SELECTED" : ""243 %>"<%= 244 thisVerseNum == selVerseNum ? " selected=\"selected\"" : "" 245 245 %>><%= 246 246 verse.getEMdFValue("verse_label").getString() 247 %>< %247 %></option><% 248 248 } 249 249 … … 269 269 } 270 270 271 try { 272 int newClauseId = Integer.parseInt(request.getParameter("clause")); 273 selClauseId = newClauseId; 274 } catch (Exception e) { /* ignore it and use default chapter */ } 271 try 272 { 273 selClauseId = Integer.parseInt(request.getParameter("clause")); 274 } 275 catch (Exception e) { /* ignore it and use default chapter */ } 275 276 276 277 MatchedObject verse = null; … … 285 286 "SELECT ALL OBJECTS IN " + 286 287 emdros.intersect(userTextAccessSet, min_m, max_m) + 287 " WHERE [verse "+ 288 " book = "+selBook+" AND "+ 289 " chapter = "+selChapNum+" AND "+ 290 " verse = "+selVerseNum+ 291 " GET bart_gloss "+ 292 " [clause "+ 293 " [word GET phrase_dependent_part_of_speech, " + 294 " graphical_preformative, " + 295 " graphical_root_formation, " + 296 " graphical_lexeme, " + 297 " graphical_verbal_ending, " + 298 " graphical_nominal_ending, " + 299 " graphical_pron_suffix]" + 300 " ]"+ 301 " ]"); 288 " WHERE " + 289 "[clause "+ 290 " [word GET phrase_dependent_part_of_speech, " + 291 " graphical_preformative, " + 292 " graphical_root_formation, " + 293 " graphical_lexeme, " + 294 " graphical_verbal_ending, " + 295 " graphical_nominal_ending, " + 296 " graphical_pron_suffix" + 297 " ]"+ 298 "]"); 302 299 303 SheafConstIterator sci = sheaf.const_iterator(); 304 while (sci.hasNext()) { 305 Straw straw = sci.next(); 306 verse = straw.const_iterator().next(); 307 308 SheafConstIterator clause_iter = 309 verse.getSheaf().const_iterator(); 300 SheafConstIterator clause_iter = 301 sheaf.const_iterator(); 310 302 311 while (clause_iter.hasNext()) { 312 MatchedObject clause = 313 clause_iter.next().const_iterator().next(); 314 315 String lexemes = ""; 303 while (clause_iter.hasNext()) 304 { 305 MatchedObject clause = 306 clause_iter.next().const_iterator().next(); 307 308 String lexemes = ""; 316 309 317 SheafConstIterator word_iter =318 clause.getSheaf().const_iterator();310 SheafConstIterator word_iter = 311 clause.getSheaf().const_iterator(); 319 312 320 while (word_iter.hasNext()) {321 MatchedObject word =322 word_iter.next().const_iterator().next();313 while (word_iter.hasNext()) 314 { 315 MatchedObject word = word_iter.next().const_iterator().next(); 323 316 324 lexemes += HebrewConverter.wordTranslitToHtml(word, generator);317 lexemes += HebrewConverter.wordTranslitToHtml(word, generator); 325 318 326 if (word_iter.hasNext()) 327 { 328 lexemes += " "; 329 } 319 if (word_iter.hasNext()) 320 { 321 lexemes += " "; 330 322 } 323 } 331 324 332 int thisClauseId = clause.getID_D(); 333 if (thisClauseId == selClauseId) 334 foundSelectedClause = true; 325 int thisClauseId = clause.getID_D(); 326 if (thisClauseId == selClauseId) 327 { 328 foundSelectedClause = true; 329 } 335 330 336 if (defaultClauseId == 0) 337 defaultClauseId = thisClauseId; 331 if (defaultClauseId == 0) 332 { 333 defaultClauseId = thisClauseId; 334 } 338 335 339 %> 340 <option value=<%= 341 thisClauseId 342 %><%= 343 thisClauseId == selClauseId ? " SELECTED" : "" 344 %>><%= 345 lexemes 346 %><% 347 } 336 %> 337 <option value=<%= 338 thisClauseId 339 %><%= 340 thisClauseId == selClauseId ? " SELECTED" : "" 341 %>><%= 342 lexemes 343 %><% 348 344 } 349 345 350 346 if (!foundSelectedClause) 347 { 351 348 selClauseId = defaultClauseId; 349 } 352 350 353 351 session.setAttribute("clauseId", new Integer(selClauseId));
