Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 1 | import static org.junit.Assert.*; |
| 2 | |
| 3 | import org.junit.Test; |
| 4 | |
| 5 | import de.ids_mannheim.korap.query.serialize.CosmasTree; |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 6 | import de.ids_mannheim.korap.util.QueryException; |
| 7 | |
| 8 | public class CosmasTreeTest { |
| 9 | |
| 10 | CosmasTree ppt; |
| 11 | String map; |
| 12 | String query; |
| 13 | |
| 14 | private boolean equalsContent(String str, Object map) { |
| 15 | str = str.replaceAll(" ", ""); |
| 16 | String mapStr = map.toString().replaceAll(" ", ""); |
| 17 | return str.equals(mapStr); |
| 18 | } |
| 19 | |
| 20 | private boolean equalsQueryContent(String res, String query) throws QueryException { |
| 21 | res = res.replaceAll(" ", ""); |
| 22 | ppt = new CosmasTree(query); |
| 23 | String queryMap = ppt.getRequestMap().get("query").toString().replaceAll(" ", ""); |
| 24 | return res.equals(queryMap); |
| 25 | } |
| 26 | |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 27 | // @Test |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 28 | public void testContext() throws QueryException { |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 29 | String contextString = "{korap = http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/, " + |
| 30 | "boundary = korap:boundary/,"+ |
| 31 | "group = korap:group/,"+ |
| 32 | "operation = {@id = group:operation/, @type = @id},"+ |
| 33 | "class = {@id = group:class, @type = xsd:integer},"+ |
| 34 | "operands = {@id = group:operands, @container = @list},"+ |
| 35 | "frame = {@id = group:frame/, @type = xsd:integer},"+ |
| 36 | "classRef = {@id = group:classRef, @type = xsd:integer},"+ |
| 37 | "spanRef = {@id = group:spanRef, @type = xsd:integer},"+ |
| 38 | "classRefOp = {@id = group:classRefOp, @type = @id},"+ |
| 39 | "min = {@id = boundary:min, @type = xsd:integer},"+ |
| 40 | "max = {@id = boundary:max, @type = xsd:integer},"+ |
| 41 | "exclude = {@id = group:exclude, @type = xsd:boolean},"+ |
| 42 | "distances = {@id = group:distances, @container = @list},"+ |
| 43 | "inOrder = {@id = group:inOrder, @type = xsd:boolean},"+ |
| 44 | "}"; |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 45 | ppt = new CosmasTree("Test"); |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 46 | // assertTrue(equalsContent(contextString, ppt.getRequestMap().get("@context"))); |
| 47 | assertEquals(contextString.replaceAll(" ", ""), ppt.getRequestMap().get("@context")); |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | |
| 51 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 52 | public void testSingleToken() throws QueryException { |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 53 | query="der"; |
| 54 | String single1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 55 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}"; |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 56 | ppt = new CosmasTree(query); |
| 57 | map = ppt.getRequestMap().get("query").toString(); |
| 58 | assertEquals(single1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 59 | |
| 60 | query="Mann"; |
| 61 | String single2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 62 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}"; |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 63 | ppt = new CosmasTree(query); |
| 64 | map = ppt.getRequestMap().get("query").toString(); |
| 65 | assertEquals(single2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 66 | |
| 67 | query="&Mann"; |
| 68 | String single3 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 69 | "{type=token, key={type=term, key=Mann, layer=lemma, match=eq}}"; |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 70 | ppt = new CosmasTree(query); |
| 71 | map = ppt.getRequestMap().get("query").toString(); |
| 72 | assertEquals(single3.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 73 | } |
| 74 | |
Joachim Bingel | ba9a0ab | 2014-01-29 10:12:25 +0000 | [diff] [blame] | 75 | @Test |
Joachim Bingel | 8c640e4 | 2014-02-07 16:20:47 +0000 | [diff] [blame] | 76 | public void testCaseSensitivityFlag() throws QueryException { |
| 77 | //TODO ignorieroperator $ http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/ignorierung.html |
| 78 | } |
| 79 | |
| 80 | @Test |
Joachim Bingel | ffd65e3 | 2014-01-22 14:22:57 +0000 | [diff] [blame] | 81 | public void testMORPH() throws QueryException { |
| 82 | query="#MORPH(V)"; |
| 83 | String morph1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 84 | "{type=token, key={type=term, key=V, match=eq}}"; |
Joachim Bingel | ffd65e3 | 2014-01-22 14:22:57 +0000 | [diff] [blame] | 85 | ppt = new CosmasTree(query); |
| 86 | map = ppt.getRequestMap().get("query").toString(); |
| 87 | assertEquals(morph1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 88 | } |
| 89 | |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 90 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 91 | public void testSequence() throws QueryException { |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 92 | query="der Mann"; |
| 93 | String seq1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 94 | "{type=group, operation=sequence, operands=[" + |
| 95 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 96 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}" + |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 97 | "]}"; |
| 98 | ppt = new CosmasTree(query); |
| 99 | map = ppt.getRequestMap().get("query").toString(); |
| 100 | assertEquals(seq1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 101 | |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 102 | query="der Mann schläft"; |
| 103 | String seq2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 104 | "{type=group, operation=sequence, operands=[" + |
| 105 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 106 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}," + |
| 107 | "{type=token, key={type=term, key=schläft, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 108 | "]}"; |
| 109 | ppt = new CosmasTree(query); |
| 110 | map = ppt.getRequestMap().get("query").toString(); |
| 111 | assertEquals(seq2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 112 | |
| 113 | query="der Mann schläft lang"; |
| 114 | String seq3 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 115 | "{type=group, operation=sequence, operands=[" + |
| 116 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 117 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}," + |
| 118 | "{type=token, key={type=term, key=schläft, layer=orth, match=eq}}," + |
| 119 | "{type=token, key={type=term, key=lang, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 120 | "]}"; |
| 121 | ppt = new CosmasTree(query); |
| 122 | map = ppt.getRequestMap().get("query").toString(); |
| 123 | assertEquals(seq3.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | @Test |
| 127 | public void testOPOR() throws QueryException { |
| 128 | query="Sonne oder Mond"; |
| 129 | String disj1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 130 | "{type=group, operation=or, operands=[" + |
| 131 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 132 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 133 | "]}"; |
| 134 | ppt = new CosmasTree(query); |
| 135 | map = ppt.getRequestMap().get("query").toString(); |
| 136 | assertEquals(disj1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 137 | |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 138 | query="(Sonne scheint) oder Mond"; |
| 139 | String disj2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 140 | "{type=group, operation=or, operands=[" + |
| 141 | "{type=group, operation=sequence, operands=[" + |
| 142 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 143 | "{type=token, key={type=term, key=scheint, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 144 | "]}," + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 145 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 146 | "]}"; |
| 147 | ppt = new CosmasTree(query); |
| 148 | map = ppt.getRequestMap().get("query").toString(); |
| 149 | assertEquals(disj2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 150 | |
| 151 | query="(Sonne scheint) oder (Mond scheint)"; |
| 152 | String disj3 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 153 | "{type=group, operation=or, operands=[" + |
| 154 | "{type=group, operation=sequence, operands=[" + |
| 155 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 156 | "{type=token, key={type=term, key=scheint, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 157 | "]}," + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 158 | "{type=group, operation=sequence, operands=[" + |
| 159 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}," + |
| 160 | "{type=token, key={type=term, key=scheint, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 161 | "]}" + |
| 162 | "]}"; |
| 163 | ppt = new CosmasTree(query); |
| 164 | map = ppt.getRequestMap().get("query").toString(); |
| 165 | assertEquals(disj3.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 166 | |
| 167 | } |
| 168 | |
| 169 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 170 | public void testOPORAND() throws QueryException { |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 171 | query="(Sonne oder Mond) und scheint"; |
| 172 | String orand1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 173 | "{type=group, operation=and, operands=[" + |
| 174 | "{type=group, operation=or, operands=[" + |
| 175 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 176 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 177 | "]}," + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 178 | "{type=token, key={type=term, key=scheint, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 179 | "]}"; |
| 180 | ppt = new CosmasTree(query); |
| 181 | map = ppt.getRequestMap().get("query").toString(); |
| 182 | assertEquals(orand1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 183 | |
| 184 | query="scheint und (Sonne oder Mond)"; |
| 185 | String orand2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 186 | "{type=group, operation=and, operands=[" + |
| 187 | "{type=token, key={type=term, key=scheint, layer=orth, match=eq}}," + |
| 188 | "{type=group, operation=or, operands=[" + |
| 189 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 190 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 191 | "]}" + |
| 192 | "]}"; |
| 193 | ppt = new CosmasTree(query); |
| 194 | map = ppt.getRequestMap().get("query").toString(); |
| 195 | assertEquals(orand2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 196 | } |
| 197 | |
| 198 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 199 | public void testOPPROX() throws QueryException { |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 200 | query="Sonne /+w1:4 Mond"; |
| 201 | String prox1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 202 | "{type=group, operation=sequence, inOrder=true, " + |
| 203 | "distances=[" + |
| 204 | "{type=distance, measure=w, min=1, max=4}" + |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 205 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 206 | "operands=[" + |
| 207 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 208 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 209 | "]" + |
| 210 | "}"; |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 211 | ppt = new CosmasTree(query); |
| 212 | map = ppt.getRequestMap().get("query").toString(); |
| 213 | assertEquals(prox1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 214 | |
| 215 | query="Sonne /+w1:4,s0,p1:3 Mond"; |
| 216 | String prox2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 217 | "{type=group, operation=sequence, inOrder=true, " + |
| 218 | "distances=[" + |
| 219 | "{type=group, operation=and, operands=[" + |
| 220 | "{type=distance, measure=w, min=1, max=4}," + |
| 221 | "{type=distance, measure=s, min=0, max=0}," + |
| 222 | "{type=distance, measure=p, min=1, max=3}" + |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 223 | "]}" + |
| 224 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 225 | "operands=[" + |
| 226 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 227 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 228 | "]" + |
| 229 | "}"; |
| 230 | ppt = new CosmasTree(query); |
| 231 | map = ppt.getRequestMap().get("query").toString(); |
| 232 | assertEquals(prox2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 233 | |
| 234 | query="Sonne %+w1:4,s0,p1:3 Mond"; |
| 235 | String prox3 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 236 | "{type=group, operation=sequence, inOrder=true, " + |
| 237 | "distances=[" + |
| 238 | "{type=group, operation=and, operands=[" + |
| 239 | "{type=distance, measure=w, min=1, max=4, exclude=true}," + |
| 240 | "{type=distance, measure=s, min=0, max=0, exclude=true}," + |
| 241 | "{type=distance, measure=p, min=1, max=3, exclude=true}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 242 | "]}" + |
| 243 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 244 | "operands=[" + |
| 245 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 246 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 247 | "]" + |
| 248 | "}"; |
| 249 | ppt = new CosmasTree(query); |
| 250 | map = ppt.getRequestMap().get("query").toString(); |
| 251 | assertEquals(prox3.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 252 | |
| 253 | query="Sonne /+w4 Mond"; |
| 254 | String prox4 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 255 | "{type=group, operation=sequence, inOrder=true, " + |
| 256 | "distances=[" + |
| 257 | "{type=distance, measure=w, min=0, max=4}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 258 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 259 | "operands=[" + |
| 260 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 261 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 262 | "]" + |
| 263 | "}"; |
| 264 | ppt = new CosmasTree(query); |
| 265 | map = ppt.getRequestMap().get("query").toString(); |
| 266 | assertEquals(prox4.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 267 | |
| 268 | query="Sonne /-w4 Mond"; |
| 269 | String prox5 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 270 | "{type=group, operation=sequence, inOrder=true, " + |
| 271 | "distances=[" + |
| 272 | "{type=distance, measure=w, min=0, max=4}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 273 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 274 | "operands=[" + |
| 275 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}," + |
| 276 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 277 | "]" + |
| 278 | "}"; |
| 279 | ppt = new CosmasTree(query); |
| 280 | map = ppt.getRequestMap().get("query").toString(); |
| 281 | assertEquals(prox5.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 282 | } |
| 283 | |
| 284 | @Test |
Joachim Bingel | ba9a0ab | 2014-01-29 10:12:25 +0000 | [diff] [blame] | 285 | public void testOPPROXNested() throws QueryException { |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 286 | query="Sonne /-w4 Mond /+w2 Sterne"; |
| 287 | String prox6 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 288 | "{type=group, operation=sequence, inOrder=true, " + |
| 289 | "distances=[" + |
| 290 | "{type=distance, measure=w, min=0, max=4}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 291 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 292 | "operands=[" + |
| 293 | "{type=group, operation=sequence, inOrder=true, " + |
| 294 | "distances=[" + |
| 295 | "{type=distance, measure=w, min=0, max=2}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 296 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 297 | "operands=[" + |
| 298 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}," + |
| 299 | "{type=token, key={type=term, key=Sterne, layer=orth, match=eq}}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 300 | "]}," + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 301 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 302 | "]" + |
| 303 | "}"; |
| 304 | ppt = new CosmasTree(query); |
| 305 | map = ppt.getRequestMap().get("query").toString(); |
| 306 | assertEquals(prox6.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 307 | } |
| 308 | |
| 309 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 310 | public void testOPIN() throws QueryException { |
Joachim Bingel | cc1dc24 | 2014-01-15 09:32:38 +0000 | [diff] [blame] | 311 | query="wegen #IN <s>"; |
Joachim Bingel | 3a9f793 | 2014-01-07 17:11:31 +0000 | [diff] [blame] | 312 | String opin1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 313 | "{type=group, operation=submatch, classRef=1, operands=[" + |
| 314 | "{type=group, operation=position, frame=contains, operands=[" + |
| 315 | "{type=span, key=s}," + |
| 316 | "{type=group, operation=class, class=1, operands=[" + |
| 317 | "{type=token, key={type=term, key=wegen, layer=orth, match=eq}}" + |
Joachim Bingel | eecc765 | 2014-01-11 17:21:07 +0000 | [diff] [blame] | 318 | "]}" + |
| 319 | "]}" + |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 320 | "]}"; |
| 321 | ppt = new CosmasTree(query); |
| 322 | map = ppt.getRequestMap().get("query").toString(); |
| 323 | assertEquals(opin1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 324 | |
Joachim Bingel | cc1dc24 | 2014-01-15 09:32:38 +0000 | [diff] [blame] | 325 | query="wegen #IN(L) <s>"; |
| 326 | String opin2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 327 | "{type=group, operation=submatch, classRef=1, operands=[" + |
| 328 | "{type=group, operation=position, frame=startswith, operands=[" + |
| 329 | "{type=span, key=s}," + |
| 330 | "{type=group, operation=class, class=1, operands=[" + |
| 331 | "{type=token, key={type=term, key=wegen, layer=orth, match=eq}}" + |
Joachim Bingel | cc1dc24 | 2014-01-15 09:32:38 +0000 | [diff] [blame] | 332 | "]}" + |
| 333 | "]}" + |
| 334 | "]}"; |
| 335 | ppt = new CosmasTree(query); |
| 336 | map = ppt.getRequestMap().get("query").toString(); |
| 337 | assertEquals(opin2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 338 | |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 339 | query="wegen #IN(%, L) <s>"; |
| 340 | String opin3 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 341 | "{type=group, operation=submatch, classRef=1, operands=[" + |
| 342 | "{type=group, operation=position, frame=startswith, exclude=true, operands=[" + |
| 343 | "{type=span, key=s}," + |
| 344 | "{type=group, operation=class, class=1, operands=[" + |
| 345 | "{type=token, key={type=term, key=wegen, layer=orth, match=eq}}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 346 | "]}" + |
| 347 | "]}" + |
| 348 | "]}"; |
| 349 | ppt = new CosmasTree(query); |
| 350 | map = ppt.getRequestMap().get("query").toString(); |
| 351 | assertEquals(opin3.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 352 | |
| 353 | query="wegen #IN('FE,ALL,%,MIN') <s>"; |
| 354 | String opin4 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 355 | "{type=group, operation=submatch, classRef=1, operands=[" + |
| 356 | "{type=group, operation=position, frame=matches, range=all, exclude=true, grouping=false, operands=[" + |
| 357 | "{type=span, key=s}," + |
| 358 | "{type=group, operation=class, class=1, operands=[" + |
| 359 | "{type=token, key={type=term, key=wegen, layer=orth, match=eq}}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 360 | "]}" + |
| 361 | "]}" + |
| 362 | "]}"; |
| 363 | ppt = new CosmasTree(query); |
| 364 | map = ppt.getRequestMap().get("query").toString(); |
| 365 | assertEquals(opin4.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 366 | } |
| 367 | |
| 368 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 369 | public void testOPOV() throws QueryException { |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 370 | query="wegen #OV <s>"; |
Joachim Bingel | cc1dc24 | 2014-01-15 09:32:38 +0000 | [diff] [blame] | 371 | String opov1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 372 | "{type=group, operation=submatch, classRef=1, operands=[" + |
| 373 | "{type=group, operation=position, frame=overlaps, operands=[" + |
| 374 | "{type=span, key=s}," + |
| 375 | "{type=group, operation=class, class=1, operands=[" + |
| 376 | "{type=token, key={type=term, key=wegen, layer=orth, match=eq}}" + |
Joachim Bingel | cc1dc24 | 2014-01-15 09:32:38 +0000 | [diff] [blame] | 377 | "]}" + |
| 378 | "]}" + |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 379 | "]}"; |
| 380 | ppt = new CosmasTree(query); |
| 381 | map = ppt.getRequestMap().get("query").toString(); |
Joachim Bingel | cc1dc24 | 2014-01-15 09:32:38 +0000 | [diff] [blame] | 382 | assertEquals(opov1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 383 | |
| 384 | query="wegen #OV(L) <s>"; |
| 385 | String opov2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 386 | "{type=group, operation=submatch, classRef=1, operands=[" + |
| 387 | "{type=group, operation=position, frame=overlaps-left, operands=[" + |
| 388 | "{type=span, key=s}," + |
| 389 | "{type=group, operation=class, class=1, operands=[" + |
| 390 | "{type=token, key={type=term, key=wegen, layer=orth, match=eq}}" + |
Joachim Bingel | cc1dc24 | 2014-01-15 09:32:38 +0000 | [diff] [blame] | 391 | "]}" + |
| 392 | "]}" + |
| 393 | "]}"; |
| 394 | ppt = new CosmasTree(query); |
| 395 | map = ppt.getRequestMap().get("query").toString(); |
| 396 | assertEquals(opov2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 397 | } |
| 398 | |
| 399 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 400 | public void testOPNOT() throws QueryException { |
Joachim Bingel | 3a9f793 | 2014-01-07 17:11:31 +0000 | [diff] [blame] | 401 | query="Sonne nicht Mond"; |
| 402 | String opnot1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 403 | "{type=group, operation=not, operands=[" + |
| 404 | "{type=token, key={type=term, key=Sonne, layer=orth, match=eq}}," + |
| 405 | "{type=token, key={type=term, key=Mond, layer=orth, match=eq}}" + |
Joachim Bingel | 3a9f793 | 2014-01-07 17:11:31 +0000 | [diff] [blame] | 406 | "]}"; |
| 407 | ppt = new CosmasTree(query); |
| 408 | map = ppt.getRequestMap().get("query").toString(); |
| 409 | assertEquals(opnot1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 410 | } |
| 411 | |
| 412 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 413 | public void testBEG_END() throws QueryException { |
Joachim Bingel | 3a9f793 | 2014-01-07 17:11:31 +0000 | [diff] [blame] | 414 | // BEG and END operators |
| 415 | // http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/links.html |
| 416 | // http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/rechts.html |
| 417 | // http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/thematische-bsp/bsp-satzlaenge.html |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 418 | query="#BEG(der /w3:5 Mann)"; |
| 419 | String beg1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 420 | "{type=group, operation=submatch, @spanRef=[0,1], operands=[" + |
| 421 | "{type=group, operation=sequence, inOrder=false, distances=[" + |
| 422 | "{type=distance, measure=w, min=3, max=5}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 423 | "]," + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 424 | "operands = [" + |
| 425 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 426 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 427 | "]}" + |
| 428 | "]}"; |
| 429 | ppt = new CosmasTree(query); |
| 430 | map = ppt.getRequestMap().get("query").toString(); |
| 431 | assertEquals(beg1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 432 | |
| 433 | query="#BEG(der /w3:5 Mann) /+w10 kommt"; // nesting #BEG() in a distance group |
| 434 | String beg2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 435 | "{type=group, operation=sequence, inOrder=true, distances=[" + |
| 436 | "{type=distance, measure=w, min=0, max=10}" + |
| 437 | "], operands=[" + |
| 438 | "{type=group, operation=submatch, @spanRef=[0,1], operands=[" + |
| 439 | "{type=group, operation=sequence, inOrder=false, distances=[" + |
| 440 | "{type=distance, measure=w, min=3, max=5}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 441 | "]," + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 442 | "operands = [" + |
| 443 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 444 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 445 | "]}" + |
| 446 | "]}," + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 447 | "{type=token, key={type=term, key=kommt, layer=orth, match=eq}}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 448 | "]}"; |
| 449 | ppt = new CosmasTree(query); |
| 450 | map = ppt.getRequestMap().get("query").toString(); |
| 451 | assertEquals(beg2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 452 | |
| 453 | query="#END(der /w3:5 Mann)"; |
| 454 | String end1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 455 | "{type=group, operation=submatch, @spanRef=[-1,1], operands=[" + |
| 456 | "{type=group, operation=sequence, inOrder=false, distances=[" + |
| 457 | "{type=distance, measure=w, min=3, max=5}" + |
Joachim Bingel | ba9a0ab | 2014-01-29 10:12:25 +0000 | [diff] [blame] | 458 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 459 | "operands = [" + |
| 460 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 461 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}" + |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 462 | "]}" + |
| 463 | "]}"; |
| 464 | ppt = new CosmasTree(query); |
| 465 | map = ppt.getRequestMap().get("query").toString(); |
| 466 | assertEquals(end1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 467 | } |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 468 | |
| 469 | |
| 470 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 471 | public void testELEM() throws QueryException { |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 472 | // http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/elem.html |
Joachim Bingel | eecc765 | 2014-01-11 17:21:07 +0000 | [diff] [blame] | 473 | query="#ELEM(S)"; |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 474 | String elem1 = "{type=span, key=s}"; |
Joachim Bingel | eecc765 | 2014-01-11 17:21:07 +0000 | [diff] [blame] | 475 | ppt = new CosmasTree(query); |
| 476 | map = ppt.getRequestMap().get("query").toString(); |
| 477 | assertEquals(elem1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 478 | } |
| 479 | |
| 480 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 481 | public void testOPALL() throws QueryException { |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 482 | query="#ALL(gehen /w1:10 voran)"; |
Joachim Bingel | e98d088 | 2014-01-21 12:58:54 +0000 | [diff] [blame] | 483 | String all1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 484 | "{type=group, operation=sequence, inOrder=false, " + |
| 485 | "distances=[" + |
| 486 | "{type=distance, measure=w, min=1, max=10}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 487 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 488 | "operands=[" + |
| 489 | "{type=token, key={type=term, key=gehen, layer=orth, match=eq}}," + |
| 490 | "{type=token, key={type=term, key=voran, layer=orth, match=eq}}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 491 | "]" + |
| 492 | "}"; |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 493 | ppt = new CosmasTree(query); |
| 494 | map = ppt.getRequestMap().get("query").toString(); |
| 495 | assertEquals(all1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 496 | } |
| 497 | |
Joachim Bingel | 8c640e4 | 2014-02-07 16:20:47 +0000 | [diff] [blame] | 498 | // @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 499 | public void testOPNHIT() throws QueryException { |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 500 | query="#NHIT(gehen /w1:10 voran)"; |
| 501 | String nhit1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 502 | "{type=group, operation=sequence, inOrder=false, " + |
| 503 | "distances=[" + |
| 504 | "{type=distance, measure=w, min=1, max=10}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 505 | "], " + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 506 | "operands=[" + |
| 507 | "{type=token, key={type=term, key=gehen, layer=orth, match=eq}}," + |
| 508 | "{type=token, key={type=term, key=voran, layer=orth, match=eq}}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 509 | "]" + |
| 510 | "}"; |
Joachim Bingel | 89cceac | 2014-01-08 15:51:08 +0000 | [diff] [blame] | 511 | ppt = new CosmasTree(query); |
| 512 | map = ppt.getRequestMap().get("query").toString(); |
| 513 | assertEquals(nhit1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 514 | } |
| 515 | |
| 516 | @Test |
Joachim Bingel | 87480d0 | 2014-01-17 14:07:46 +0000 | [diff] [blame] | 517 | public void testOPBED() throws QueryException { |
Joachim Bingel | eecc765 | 2014-01-11 17:21:07 +0000 | [diff] [blame] | 518 | query = "#BED(der , sa)"; |
| 519 | String bed1 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 520 | "{type=group, operation=position, frame=startswith, operands=[" + |
| 521 | "{type=span, key=s}," + |
| 522 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}" + |
Joachim Bingel | eecc765 | 2014-01-11 17:21:07 +0000 | [diff] [blame] | 523 | "]}"; |
| 524 | ppt = new CosmasTree(query); |
| 525 | map = ppt.getRequestMap().get("query").toString(); |
| 526 | assertEquals(bed1.replaceAll(" ", ""), map.replaceAll(" ", "")); |
| 527 | |
| 528 | query = "#BED(der Mann , +pe)"; |
| 529 | String bed2 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 530 | "{type=group, operation=position, frame=endswith, operands=[" + |
| 531 | "{type=span, key=p}," + |
| 532 | "{type=group, operation=sequence, operands=[" + |
| 533 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 534 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 535 | "]}" + |
Joachim Bingel | eecc765 | 2014-01-11 17:21:07 +0000 | [diff] [blame] | 536 | "]}"; |
| 537 | ppt = new CosmasTree(query); |
| 538 | map = ppt.getRequestMap().get("query").toString(); |
| 539 | assertEquals(bed2.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 540 | |
| 541 | query = "#BED(der Mann , sa,-pa)"; |
| 542 | String bed3 = |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 543 | "{type=group, operation=and, operands=[" + |
| 544 | "{type=group, operation=position, frame=startswith, operands=[" + |
| 545 | "{type=span, key=s}," + |
| 546 | "{type=group, operation=sequence, operands=[" + |
| 547 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 548 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 549 | "]}" + |
| 550 | "]}," + |
Joachim Bingel | 11d5b15 | 2014-02-11 21:33:47 +0000 | [diff] [blame^] | 551 | "{type=group, operation=position, frame=startswith, exclude=true, operands=[" + |
| 552 | "{type=span, key=p}," + |
| 553 | "{type=group, operation=sequence, operands=[" + |
| 554 | "{type=token, key={type=term, key=der, layer=orth, match=eq}}," + |
| 555 | "{type=token, key={type=term, key=Mann, layer=orth, match=eq}}" + |
Joachim Bingel | 3f0850c | 2014-01-17 16:50:10 +0000 | [diff] [blame] | 556 | "]}" + |
| 557 | "]}" + |
| 558 | "]}"; |
| 559 | ppt = new CosmasTree(query); |
| 560 | map = ppt.getRequestMap().get("query").toString(); |
| 561 | assertEquals(bed3.replaceAll(" ", ""), map.replaceAll(" ", "")); |
Joachim Bingel | d5161a1 | 2014-01-08 11:15:49 +0000 | [diff] [blame] | 562 | } |
| 563 | |
Joachim Bingel | b5f7bf0 | 2014-01-07 16:36:54 +0000 | [diff] [blame] | 564 | } |
| 565 | |