| 64 | | " [" + |
|---|
| 65 | | " [word FIRST lexeme = '"+m_Query+"' " + getFeatures + "] " + |
|---|
| 66 | | " [word " + getFeatures + "]* " + |
|---|
| 67 | | " [word LAST " + getFeatures + "] " + |
|---|
| 68 | | " ]" + |
|---|
| 69 | | " OR" + |
|---|
| 70 | | " [" + |
|---|
| 71 | | " [word FIRST " + getFeatures + "] " + |
|---|
| 72 | | " [word " + getFeatures + "]* " + |
|---|
| 73 | | " [word lexeme = '"+m_Query+"' " + getFeatures + "] " + |
|---|
| 74 | | " [word " + getFeatures + "]* " + |
|---|
| 75 | | " [word LAST " + getFeatures + "] " + |
|---|
| 76 | | " ]" + |
|---|
| 77 | | " OR" + |
|---|
| 78 | | " [" + |
|---|
| 79 | | " [word FIRST " + getFeatures + "] " + |
|---|
| 80 | | " [word " + getFeatures + "]* " + |
|---|
| 81 | | " [word LAST lexeme = '"+m_Query+"' " + getFeatures + "] " + |
|---|
| 82 | | " ]" + |
|---|
| 83 | | " ]"+ |
|---|
| 84 | | " ]"); |
|---|
| 85 | | |
|---|
| 86 | | List<SearchResult> results = new ArrayList<SearchResult>(); |
|---|
| | 57 | " [word NORETRIEVE lexeme = '"+m_Query+"']" + |
|---|
| | 58 | " ]" + |
|---|
| | 59 | " ]" |
|---|
| | 60 | ); |
|---|
| | 61 | |
|---|
| | 62 | List<ResultBase> resultBases = new ArrayList<ResultBase>(); |
|---|
| | 63 | SetOfMonads powerSet = new SetOfMonads(); |
|---|
| 101 | | |
|---|
| 102 | | String lexemes = ""; |
|---|
| 103 | | |
|---|
| 104 | | StrawConstIterator word_iter = |
|---|
| 105 | | clause.getSheaf().const_iterator().next().const_iterator(); |
|---|
| 106 | | |
|---|
| 107 | | while (word_iter.hasNext()) |
|---|
| 108 | | { |
|---|
| 109 | | MatchedObject word = word_iter.next(); |
|---|
| 110 | | |
|---|
| 111 | | if (word.getEMdFValue("lexeme").toString().equals(m_Query)) |
|---|
| 112 | | { |
|---|
| 113 | | lexemes += "<strong>"; |
|---|
| 114 | | } |
|---|
| 115 | | |
|---|
| 116 | | lexemes += HebrewConverter.wordToHtml(word, generator); |
|---|
| 117 | | |
|---|
| 118 | | if (word.getEMdFValue("lexeme").toString().equals(m_Query)) |
|---|
| 119 | | { |
|---|
| 120 | | lexemes += "</strong>"; |
|---|
| 121 | | } |
|---|
| 122 | | |
|---|
| 123 | | lexemes += " "; |
|---|
| 124 | | } |
|---|
| 125 | | |
|---|
| 126 | | SearchResult result = new SearchResult( |
|---|
| 127 | | verse.getFeatureAsString( |
|---|
| 128 | | verse.getEMdFValueIndex("verse_label")), |
|---|
| 129 | | lexemes, |
|---|
| 130 | | "clause.jsp?book=" + |
|---|
| | 78 | ResultBase base = new ResultBase(); |
|---|
| | 79 | base.monads = clause.getMonads(); |
|---|
| | 80 | base.location = verse.getFeatureAsString( |
|---|
| | 81 | verse.getEMdFValueIndex("verse_label")); |
|---|
| | 82 | base.url = "clause.jsp?book=" + |
|---|
| 135 | | "&clause=" + clause.getID_D() |
|---|
| 136 | | ); |
|---|
| | 87 | "&clause=" + clause.getID_D(); |
|---|
| | 88 | resultBases.add(base); |
|---|
| | 89 | powerSet.unionWith(base.monads); |
|---|
| | 90 | } |
|---|
| | 91 | } |
|---|
| | 92 | |
|---|
| | 93 | List<SearchResult> results = new ArrayList<SearchResult>(); |
|---|
| | 94 | |
|---|
| | 95 | if (powerSet.isEmpty()) |
|---|
| | 96 | { |
|---|
| | 97 | return results; |
|---|
| | 98 | } |
|---|
| | 99 | |
|---|
| | 100 | FlatSheaf flat = m_Emdros.getFlatSheaf( |
|---|
| | 101 | "GET OBJECTS HAVING MONADS IN " + |
|---|
| | 102 | powerSet.toString() + |
|---|
| | 103 | "[word GET " + |
|---|
| | 104 | " lexeme, " + |
|---|
| | 105 | " phrase_dependent_part_of_speech, " + |
|---|
| | 106 | " graphical_preformative, " + |
|---|
| | 107 | " graphical_root_formation, " + |
|---|
| | 108 | " graphical_lexeme, " + |
|---|
| | 109 | " graphical_verbal_ending, " + |
|---|
| | 110 | " graphical_nominal_ending, " + |
|---|
| | 111 | " graphical_pron_suffix" + |
|---|
| | 112 | "]"); |
|---|
| | 113 | |
|---|
| | 114 | FlatSheafConstIterator fsci = flat.const_iterator(); |
|---|
| | 115 | FlatStraw fs = fsci.next(); |
|---|
| | 116 | FlatStrawConstIterator fwci = fs.const_iterator(); |
|---|
| | 117 | |
|---|
| | 118 | while (fwci.hasNext()) |
|---|
| | 119 | { |
|---|
| | 120 | MatchedObject word = fwci.next(); |
|---|
| | 121 | for (Iterator<ResultBase> i = resultBases.iterator(); i.hasNext();) |
|---|
| | 122 | { |
|---|
| | 123 | ResultBase base = i.next(); |
|---|
| | 124 | if (SetOfMonads.overlap(base.monads, word.getMonads())) |
|---|
| | 125 | { |
|---|
| | 126 | base.words.add(word); |
|---|
| | 127 | } |
|---|
| | 128 | } |
|---|
| | 129 | } |
|---|
| | 130 | |
|---|
| | 131 | for (Iterator<ResultBase> i = resultBases.iterator(); i.hasNext();) |
|---|
| | 132 | { |
|---|
| | 133 | ResultBase base = i.next(); |
|---|
| | 134 | String lexemes = ""; |
|---|
| | 135 | |
|---|
| | 136 | for (Iterator<MatchedObject> j = base.words.iterator(); j.hasNext();) |
|---|
| | 137 | { |
|---|
| | 138 | MatchedObject word = j.next(); |
|---|