import java.util.List;
import java.util.Properties;
+import static org.z3950.zing.cql.Utils.*;
+
/**
* Represents a terminal node in a CQL parse-tree.
return null;
}
+ @Override
public String toXCQL(int level, List<CQLPrefix> prefixes,
List<ModifierSet> sortkeys) {
return (indent(level) + "<searchClause>\n" +
indent(level) + "</searchClause>\n");
}
+ @Override
public String toCQL() {
String quotedIndex = maybeQuote(index);
String quotedTerm = maybeQuote(term);
return attrs;
}
+ @Override
public String toPQF(Properties config) throws PQFTranslationException {
if (isResultSetIndex(index)) {
// Special case: ignore relation, modifiers, wildcards, etc.
String attr, s = "";
for (int i = 0; i < attrs.size(); i++) {
attr = (String) attrs.get(i);
- s += "@attr " + Utils.replaceString(attr, " ", " @attr ") + " ";
+ s += "@attr " + attr.replace(" ", " @attr ") + " ";
}
String text = term;
str.indexOf('/') != -1 ||
str.indexOf('(') != -1 ||
str.indexOf(')') != -1) {
- str = '"' + Utils.replaceString(str, "\"", "\\\"") + '"';
+ str = '"' + str.replace("\"", "\\\"") + '"';
}
return str;
}
+ @Override
public byte[] toType1BER(Properties config) throws PQFTranslationException {
if (isResultSetIndex(index)) {
// Special case: ignore relation, modifiers, wildcards, etc.