blob: e820f2812da851c7898c5b99e4bc82b87bab687c [file] [log] [blame]
margaretha398f4722019-01-09 19:07:20 +01001package de.ids_mannheim.korap.rewrite;
Michael Hanldaf86602016-05-12 14:31:52 +02002
margarethaf68daa62017-09-21 02:11:24 +02003import static org.junit.Assert.assertEquals;
4import static org.junit.Assert.assertNotNull;
5
margarethaf68daa62017-09-21 02:11:24 +02006import org.junit.Test;
margaretha5c67dd52018-12-18 17:27:05 +01007import org.springframework.beans.factory.annotation.Autowired;
margarethaf68daa62017-09-21 02:11:24 +02008
Michael Hanl66ca71c2015-09-14 23:11:30 +02009import com.fasterxml.jackson.databind.JsonNode;
margarethaf68daa62017-09-21 02:11:24 +020010
margaretha5c67dd52018-12-18 17:27:05 +010011import de.ids_mannheim.korap.config.KustvaktConfiguration;
12import de.ids_mannheim.korap.config.SpringJerseyTest;
Michael Hanlcb2d3f92016-06-02 17:34:06 +020013import de.ids_mannheim.korap.config.TestVariables;
Michael Hanldaf86602016-05-12 14:31:52 +020014import de.ids_mannheim.korap.exceptions.KustvaktException;
Michael Hanl66ca71c2015-09-14 23:11:30 +020015import de.ids_mannheim.korap.query.serialize.QuerySerializer;
Michael Hanlf0785322015-11-13 16:14:45 +010016import de.ids_mannheim.korap.user.User;
Michael Hanl66ca71c2015-09-14 23:11:30 +020017import de.ids_mannheim.korap.utils.JsonUtils;
Michael Hanldaf86602016-05-12 14:31:52 +020018
Michael Hanlfbd6fbb2015-09-14 16:10:12 +020019/**
20 * @author hanl
21 * @date 03/09/2015
22 */
margaretha5c67dd52018-12-18 17:27:05 +010023public class CollectionRewriteTest extends SpringJerseyTest {
Michael Hanl66ca71c2015-09-14 23:11:30 +020024
margaretha5c67dd52018-12-18 17:27:05 +010025 @Autowired
26 public KustvaktConfiguration config;
27
Michael Hanlf0785322015-11-13 16:14:45 +010028 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +020029 public void testCollectionNodeRemoveCorpusIdNoErrors ()
30 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +010031 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl59bff812015-10-27 23:10:32 +010032 handler.add(CollectionConstraint.class);
Michael Hanl66ca71c2015-09-14 23:11:30 +020033 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +020034 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanle56bb892016-05-25 17:34:41 +020035 s.setCollection("textClass=politik & corpusSigle=WPD");
Michael Hanl66ca71c2015-09-14 23:11:30 +020036 String result = s.toJSON();
Michael Hanl33829ec2016-05-28 17:03:38 +020037 JsonNode node = JsonUtils.readTree(handler.processQuery(result,
Michael Hanl022543e2015-11-17 21:25:25 +010038 User.UserFactory.getUser("test_user")));
Michael Hanldaf86602016-05-12 14:31:52 +020039 assertNotNull(node);
40 assertEquals(1, node.at("/collection/operands").size());
Michael Hanl66ca71c2015-09-14 23:11:30 +020041 }
42
Michael Hanl33829ec2016-05-28 17:03:38 +020043
Michael Hanle56bb892016-05-25 17:34:41 +020044 @Test
Michael Hanl33829ec2016-05-28 17:03:38 +020045 public void testCollectionNodeDeletionNotification () {
Michael Hanle56bb892016-05-25 17:34:41 +020046
47 }
48
Michael Hanl8abaf9e2016-05-23 16:46:35 +020049
Michael Hanlf0785322015-11-13 16:14:45 +010050 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +020051 public void testCollectionNodeRemoveAllCorpusIdNoErrors ()
52 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +010053 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl59bff812015-10-27 23:10:32 +010054 handler.add(CollectionConstraint.class);
Michael Hanl66ca71c2015-09-14 23:11:30 +020055 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +020056 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanle56bb892016-05-25 17:34:41 +020057 s.setCollection("corpusSigle=BRZ13 & corpusSigle=WPD");
Michael Hanl66ca71c2015-09-14 23:11:30 +020058 String result = s.toJSON();
Michael Hanlcb2d3f92016-06-02 17:34:06 +020059
60 JsonNode node = JsonUtils.readTree(handler.processQuery(result,
61 User.UserFactory.getUser("test_user")));
Michael Hanl45636922016-06-03 14:00:56 +020062
Michael Hanlcb2d3f92016-06-02 17:34:06 +020063 assertNotNull(node);
64 assertEquals(0, node.at("/collection/operands").size());
65 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
66 .asText());
Michael Hanl66ca71c2015-09-14 23:11:30 +020067 }
68
Michael Hanl8abaf9e2016-05-23 16:46:35 +020069
Michael Hanlf0785322015-11-13 16:14:45 +010070 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +020071 public void testCollectionNodeRemoveGroupedCorpusIdNoErrors ()
72 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +010073 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl59bff812015-10-27 23:10:32 +010074 handler.add(CollectionConstraint.class);
Michael Hanl66ca71c2015-09-14 23:11:30 +020075 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +020076 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanle56bb892016-05-25 17:34:41 +020077 s.setCollection("(corpusSigle=BRZ13 & textClass=Wissenschaft) & corpusSigle=WPD");
Michael Hanl66ca71c2015-09-14 23:11:30 +020078 String result = s.toJSON();
Michael Hanl33829ec2016-05-28 17:03:38 +020079 JsonNode node = JsonUtils.readTree(handler.processQuery(result,
Michael Hanl022543e2015-11-17 21:25:25 +010080 User.UserFactory.getUser("test_user")));
Michael Hanl66ca71c2015-09-14 23:11:30 +020081
Michael Hanldaf86602016-05-12 14:31:52 +020082 assertNotNull(node);
Michael Hanl8abaf9e2016-05-23 16:46:35 +020083 assertEquals("koral:docGroup", node.at("/collection/operands/0/@type")
84 .asText());
85 assertEquals("textClass",
86 node.at("/collection/operands/0/operands/0/key").asText());
Michael Hanl33829ec2016-05-28 17:03:38 +020087 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
88 .asText());
Michael Hanl66ca71c2015-09-14 23:11:30 +020089 }
90
Michael Hanl8abaf9e2016-05-23 16:46:35 +020091
Michael Hanl66ca71c2015-09-14 23:11:30 +020092 //fixme: will probably fail when one doc groups are being refactored
Michael Hanlf0785322015-11-13 16:14:45 +010093 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +020094 public void testCollectionCleanEmptyDocGroupNoErrors ()
95 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +010096 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl59bff812015-10-27 23:10:32 +010097 handler.add(CollectionConstraint.class);
Michael Hanl33829ec2016-05-28 17:03:38 +020098 handler.add(CollectionCleanRewrite.class);
Michael Hanl66ca71c2015-09-14 23:11:30 +020099 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +0200100 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanle56bb892016-05-25 17:34:41 +0200101 s.setCollection("(corpusSigle=BRZ13 & corpusSigle=WPD) & textClass=Wissenschaft & textClass=Sport");
Michael Hanl66ca71c2015-09-14 23:11:30 +0200102 String result = s.toJSON();
Michael Hanle56bb892016-05-25 17:34:41 +0200103
Michael Hanl33829ec2016-05-28 17:03:38 +0200104 JsonNode node = JsonUtils.readTree(handler.processQuery(result,
Michael Hanl022543e2015-11-17 21:25:25 +0100105 User.UserFactory.getUser("test_user")));
106
Michael Hanldaf86602016-05-12 14:31:52 +0200107 assertNotNull(node);
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200108 assertEquals("koral:docGroup", node.at("/collection/@type").asText());
109 assertEquals(2, node.at("/collection/operands").size());
Michael Hanldaf86602016-05-12 14:31:52 +0200110
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200111 assertEquals("textClass", node.at("/collection/operands/0/key")
112 .asText());
113 assertEquals("textClass", node.at("/collection/operands/1/key")
114 .asText());
Michael Hanl33829ec2016-05-28 17:03:38 +0200115 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
116 .asText());
Michael Hanl66ca71c2015-09-14 23:11:30 +0200117 }
118
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200119
Michael Hanlf0785322015-11-13 16:14:45 +0100120 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +0200121 public void testCollectionCleanMoveOneDocFromGroupUpNoErrors ()
122 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +0100123 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl59bff812015-10-27 23:10:32 +0100124 handler.add(CollectionConstraint.class);
Michael Hanl33829ec2016-05-28 17:03:38 +0200125 handler.add(CollectionCleanRewrite.class);
Michael Hanl66ca71c2015-09-14 23:11:30 +0200126 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +0200127 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanl86d598e2016-05-26 15:13:00 +0200128 s.setCollection("(corpusSigle=BRZ13 & textClass=wissenschaft)");
Michael Hanl66ca71c2015-09-14 23:11:30 +0200129 String result = s.toJSON();
Michael Hanl33829ec2016-05-28 17:03:38 +0200130 JsonNode node = JsonUtils.readTree(handler.processQuery(result,
Michael Hanl022543e2015-11-17 21:25:25 +0100131 User.UserFactory.getUser("test_user")));
Michael Hanldaf86602016-05-12 14:31:52 +0200132 assertNotNull(node);
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200133 assertEquals("koral:doc", node.at("/collection/@type").asText());
Michael Hanl86d598e2016-05-26 15:13:00 +0200134 assertEquals("textClass", node.at("/collection/key").asText());
135 assertEquals("wissenschaft", node.at("/collection/value").asText());
Michael Hanl33829ec2016-05-28 17:03:38 +0200136 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
137 .asText());
Michael Hanl66ca71c2015-09-14 23:11:30 +0200138 }
139
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200140
Michael Hanlf0785322015-11-13 16:14:45 +0100141 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +0200142 public void testCollectionCleanEmptyGroupAndMoveOneFromGroupUpNoErrors ()
143 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +0100144 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl59bff812015-10-27 23:10:32 +0100145 handler.add(CollectionConstraint.class);
Michael Hanl33829ec2016-05-28 17:03:38 +0200146 handler.add(CollectionCleanRewrite.class);
Michael Hanl66ca71c2015-09-14 23:11:30 +0200147 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +0200148 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanle56bb892016-05-25 17:34:41 +0200149 s.setCollection("(corpusSigle=BRZ13 & corpusSigle=WPD) & textClass=Wissenschaft");
Michael Hanl66ca71c2015-09-14 23:11:30 +0200150 String result = s.toJSON();
Michael Hanl33829ec2016-05-28 17:03:38 +0200151 JsonNode node = JsonUtils.readTree(handler.processQuery(result,
Michael Hanl022543e2015-11-17 21:25:25 +0100152 User.UserFactory.getUser("test_user")));
Michael Hanlf0785322015-11-13 16:14:45 +0100153
Michael Hanldaf86602016-05-12 14:31:52 +0200154 assertNotNull(node);
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200155 assertEquals("koral:doc", node.at("/collection/@type").asText());
156 assertEquals("textClass", node.at("/collection/key").asText());
Michael Hanl33829ec2016-05-28 17:03:38 +0200157 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
158 .asText());
Michael Hanl66ca71c2015-09-14 23:11:30 +0200159 }
160
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200161
Michael Hanlf0785322015-11-13 16:14:45 +0100162 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +0200163 public void testCollectionRemoveAndMoveOneFromGroupUpNoErrors ()
164 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +0100165 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl59bff812015-10-27 23:10:32 +0100166 handler.add(CollectionConstraint.class);
Michael Hanl33829ec2016-05-28 17:03:38 +0200167 handler.add(CollectionCleanRewrite.class);
Michael Hanl66ca71c2015-09-14 23:11:30 +0200168 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +0200169 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanle56bb892016-05-25 17:34:41 +0200170 s.setCollection("(docID=random & textClass=Wissenschaft) & corpusSigle=WPD");
Michael Hanldaf86602016-05-12 14:31:52 +0200171 String org = s.toJSON();
Michael Hanl33829ec2016-05-28 17:03:38 +0200172 JsonNode node = JsonUtils.readTree(handler.processQuery(org,
Michael Hanl022543e2015-11-17 21:25:25 +0100173 User.UserFactory.getUser("test_user")));
Michael Hanldaf86602016-05-12 14:31:52 +0200174 assertNotNull(node);
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200175 assertEquals("koral:docGroup", node.at("/collection/@type").asText());
Michael Hanldaf86602016-05-12 14:31:52 +0200176 assertEquals(2, node.at("/collection/operands").size());
Michael Hanl8abaf9e2016-05-23 16:46:35 +0200177 assertEquals("koral:doc", node.at("/collection/operands/0/@type")
178 .asText());
Michael Hanl86d598e2016-05-26 15:13:00 +0200179 assertEquals("koral:doc", node.at("/collection/operands/1/@type")
180 .asText());
Michael Hanl33829ec2016-05-28 17:03:38 +0200181 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
182 .asText());
Michael Hanl66ca71c2015-09-14 23:11:30 +0200183 }
184
Michael Hanldaf86602016-05-12 14:31:52 +0200185
Michael Hanl00b64e02016-05-24 20:24:27 +0200186 @Test
187 public void testPublicCollectionRewriteEmptyAdd () throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +0100188 RewriteHandler handler = new RewriteHandler(config);
margarethae7badb32017-06-22 15:16:00 +0200189 handler.add(CollectionRewrite.class);
Michael Hanl00b64e02016-05-24 20:24:27 +0200190
191 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +0200192 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanl00b64e02016-05-24 20:24:27 +0200193 String org = s.toJSON();
Michael Hanl33829ec2016-05-28 17:03:38 +0200194 JsonNode node = JsonUtils.readTree(handler.processQuery(org,
Michael Hanl00b64e02016-05-24 20:24:27 +0200195 User.UserFactory.getUser("test_user")));
196 assertNotNull(node);
margarethae7badb32017-06-22 15:16:00 +0200197 assertEquals("availability", node.at("/collection/key")
Michael Hanl33829ec2016-05-28 17:03:38 +0200198 .asText());
margarethae7badb32017-06-22 15:16:00 +0200199 assertEquals("CC-BY.*", node.at("/collection/value")
Michael Hanl33829ec2016-05-28 17:03:38 +0200200 .asText());
201 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
202 .asText());
margarethae7badb32017-06-22 15:16:00 +0200203 assertEquals("availability(FREE)", node.at("/collection/rewrites/0/scope")
204 .asText());
Michael Hanld8aa6212016-06-03 12:48:43 +0200205 //todo:
Michael Hanl00b64e02016-05-24 20:24:27 +0200206 }
207
208
209 @Test
210 public void testPublicCollectionRewriteNonEmptyAdd ()
211 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +0100212 RewriteHandler handler = new RewriteHandler(config);
margarethae7badb32017-06-22 15:16:00 +0200213 handler.add(CollectionRewrite.class);
Michael Hanl00b64e02016-05-24 20:24:27 +0200214
Michael Hanl33829ec2016-05-28 17:03:38 +0200215 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +0200216 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanl33829ec2016-05-28 17:03:38 +0200217 s.setCollection("(docSigle=WPD_AAA & textClass=wissenschaft)");
218 String org = s.toJSON();
219 JsonNode node = JsonUtils.readTree(handler.processQuery(org,
220 User.UserFactory.getUser("test_user")));
221 assertNotNull(node);
222 assertEquals(2, node.at("/collection/operands").size());
margarethae7badb32017-06-22 15:16:00 +0200223 assertEquals("availability",
224 node.at("/collection/operands/0/key").asText());
225 assertEquals("CC-BY.*",
226 node.at("/collection/operands/0/value").asText());
227 assertEquals("docSigle",
Michael Hanl33829ec2016-05-28 17:03:38 +0200228 node.at("/collection/operands/1/operands/0/key").asText());
margarethae7badb32017-06-22 15:16:00 +0200229 assertEquals("textClass",
Michael Hanl33829ec2016-05-28 17:03:38 +0200230 node.at("/collection/operands/1/operands/1/key").asText());
231 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
232 .asText());
margarethae7badb32017-06-22 15:16:00 +0200233 assertEquals("availability(FREE)", node.at("/collection/rewrites/0/scope")
234 .asText());
Michael Hanl86d598e2016-05-26 15:13:00 +0200235 }
Michael Hanle56bb892016-05-25 17:34:41 +0200236
Michael Hanl86d598e2016-05-26 15:13:00 +0200237
238 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +0200239 public void testRemoveCorpusFromDifferentGroups () throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +0100240 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl86d598e2016-05-26 15:13:00 +0200241 handler.add(CollectionConstraint.class);
242 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +0200243 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanl86d598e2016-05-26 15:13:00 +0200244 s.setCollection("(corpusSigle=BRZ14 & textClass=wissenschaft) | (corpusSigle=AZPR | textClass=freizeit)");
245 String org = s.toJSON();
Michael Hanl33829ec2016-05-28 17:03:38 +0200246 JsonNode node = JsonUtils.readTree(handler.processQuery(org,
Michael Hanl86d598e2016-05-26 15:13:00 +0200247 User.UserFactory.getUser("test_user")));
248 assertNotNull(node);
249 assertEquals("koral:docGroup", node.at("/collection/@type").asText());
250 assertEquals(2, node.at("/collection/operands").size());
251 assertEquals("koral:docGroup", node.at("/collection/operands/0/@type")
252 .asText());
253 assertEquals("koral:docGroup", node.at("/collection/operands/1/@type")
254 .asText());
255 assertEquals(1, node.at("/collection/operands/0/operands").size());
256 assertEquals(1, node.at("/collection/operands/1/operands").size());
Michael Hanl33829ec2016-05-28 17:03:38 +0200257 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
258 .asText());
Michael Hanl86d598e2016-05-26 15:13:00 +0200259 }
260
Michael Hanl33829ec2016-05-28 17:03:38 +0200261
Michael Hanl86d598e2016-05-26 15:13:00 +0200262 @Test
Michael Hanlf8fcc7a2016-06-03 17:41:07 +0200263 public void testRemoveOneCorpusAndMoveDocFromTwoGroups ()
264 throws KustvaktException {
margaretha5c67dd52018-12-18 17:27:05 +0100265 RewriteHandler handler = new RewriteHandler(config);
Michael Hanl86d598e2016-05-26 15:13:00 +0200266 handler.add(CollectionConstraint.class);
267 // todo: use this collection query also to test clean up filter! after reduction of corpusSigle (wiss | freizeit)!
Michael Hanl33829ec2016-05-28 17:03:38 +0200268 handler.add(CollectionCleanRewrite.class);
Michael Hanl86d598e2016-05-26 15:13:00 +0200269 QuerySerializer s = new QuerySerializer();
Michael Hanlcb2d3f92016-06-02 17:34:06 +0200270 s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
Michael Hanl86d598e2016-05-26 15:13:00 +0200271 s.setCollection("(corpusSigle=BRZ14 & textClass=wissenschaft) | (corpusSigle=AZPR | textClass=freizeit)");
272 String org = s.toJSON();
Michael Hanl33829ec2016-05-28 17:03:38 +0200273 JsonNode node = JsonUtils.readTree(handler.processQuery(org,
Michael Hanl86d598e2016-05-26 15:13:00 +0200274 User.UserFactory.getUser("test_user")));
275 assertNotNull(node);
276 assertEquals("koral:docGroup", node.at("/collection/@type").asText());
277 assertEquals(2, node.at("/collection/operands").size());
278 assertEquals("koral:doc", node.at("/collection/operands/0/@type")
279 .asText());
Michael Hanl33829ec2016-05-28 17:03:38 +0200280 assertEquals("koral:doc", node.at("/collection/operands/0/@type")
281 .asText());
282 assertEquals("textClass", node.at("/collection/operands/0/key")
283 .asText());
284 assertEquals("wissenschaft", node.at("/collection/operands/0/value")
285 .asText());
286 assertEquals("koral:doc", node.at("/collection/operands/1/@type")
287 .asText());
288 assertEquals("textClass", node.at("/collection/operands/1/key")
289 .asText());
290 assertEquals("freizeit", node.at("/collection/operands/1/value")
291 .asText());
292 assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
293 .asText());
Michael Hanl00b64e02016-05-24 20:24:27 +0200294 }
295
296
Michael Hanldaf86602016-05-12 14:31:52 +0200297
Michael Hanlfbd6fbb2015-09-14 16:10:12 +0200298}