some simplifications
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
index 3592cdf..6a90a8e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
@@ -290,15 +290,14 @@
if (nodeCat.equals("OPELEM")) {
// Step I: create element
- LinkedHashMap<String, Object> elem = new LinkedHashMap<String, Object>();
- elem.put("@type", "korap:span");
+ LinkedHashMap<String, Object> span = makeSpan();
if (node.getChild(0).toStringTree().equals("EMPTY")) {
} else {
int elname = 0;
Tree elnameNode = getFirstChildWithCat(node, "ELNAME");
if (elnameNode != null) {
- elem.put("key", elnameNode.getChild(0).toStringTree().toLowerCase());
+ span.put("key", elnameNode.getChild(0).toStringTree().toLowerCase());
elname = 1;
}
if (node.getChildCount() > elname) {
@@ -360,12 +359,12 @@
}
if (getNodeCat(attrNode).equals("NOTEQ")) negate = true;
}
- elem.put("attr", termGroup);
+ span.put("attr", termGroup);
}
}
//Step II: decide where to put
- putIntoSuperObject(elem);
+ putIntoSuperObject(span);
}
if (nodeCat.equals("OPLABEL")) {
@@ -722,7 +721,7 @@
// else
// return layer;
if (layer.equals("ANA"))
- return ResourceMapper.descriptor2policy(layer);
+ return ResourceMapper.descriptor2policy("ANA");
else
return layer;