X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLTermNode.java;h=924b6baa8de28820290612d44b06aa96be666a5e;hb=54f3ed06b35c7f352909cf159432e961ca38c264;hp=f9b17acac99dbb24d42db16caad98fbd94003f75;hpb=d58739419882639439b40b18fcefeb9e51488fb9;p=cql-java-moved-to-github.git diff --git a/src/main/java/org/z3950/zing/cql/CQLTermNode.java b/src/main/java/org/z3950/zing/cql/CQLTermNode.java index f9b17ac..924b6ba 100644 --- a/src/main/java/org/z3950/zing/cql/CQLTermNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLTermNode.java @@ -43,6 +43,7 @@ public class CQLTermNode extends CQLNode { qual.equals("cql.resultSetName")); } + @Override public String getResultSetName() { if (isResultSetIndex(index)) return term; @@ -96,6 +97,8 @@ public class CQLTermNode extends CQLNode { attr = config.getProperty("index." + index); if (attr == null) + attr = config.getProperty("qualifier." + index); + if (attr == null) throw new UnknownIndexException(index); attrs.add(attr); @@ -227,7 +230,7 @@ public class CQLTermNode extends CQLNode { if (len > 0 && text.substring(len-1, len).equals("^")) text = text.substring(0, len-1); - String attr, attrList, term = text; + String attr, attrList; byte[] operand = new byte[text.length()+100]; int i, j, offset, type, value; offset = putTag(CONTEXT, 0, CONSTRUCTED, operand, 0); // op @@ -264,7 +267,7 @@ public class CQLTermNode extends CQLNode { operand[offset++] = 0x00; offset = putTag(CONTEXT, 45, PRIMITIVE, operand, offset); // general Term - byte[] t = term.getBytes(); + byte[] t = text.getBytes(); offset = putLen(t.length, operand, offset); System.arraycopy(t, 0, operand, offset, t.length); offset += t.length;