Fixed toString()
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanElementAttributeQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanElementAttributeQuery.java
index d050682..83099ec 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanElementAttributeQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanElementAttributeQuery.java
@@ -62,6 +62,7 @@
@Override
public String toString(String field) {
+
StringBuilder sb = new StringBuilder();
sb.append("spanElementAttribute");
sb.append("(");
@@ -69,9 +70,16 @@
sb.append(", ");
if (isMultipleAttributes){
sb.append("[");
- for (SpanQuery sq : clauseList){
+
+ SpanQuery sq;
+ for (int i=0; i < clauseList.size(); i++){
+ sq = clauseList.get(i);
sb.append(sq.toString(field));
+
+ if (i < clauseList.size() -1)
+ sb.append(", ");
}
+
sb.append("]");
}
else {