List of usage examples for org.apache.lucene.queryparser.flexible.core.nodes QueryNode toString
@Override
public String toString();
From source file:com.sindicetech.siren.qparser.keyword.nodes.DatatypeQueryNode.java
License:Open Source License
@Override public CharSequence toQueryString(final EscapeQuerySyntax escapeSyntaxParser) { String s = this.getDatatype() + "("; for (final QueryNode child : this.getChildren()) { s += child.toString() + " "; }// www . j a v a 2s . c o m return s + ")"; }
From source file:com.sindicetech.siren.qparser.keyword.nodes.DatatypeQueryNode.java
License:Open Source License
@Override public String toString() { String s = "<datatype name=\"" + datatype + "\">\n"; for (final QueryNode child : this.getChildren()) { s += child.toString() + "\n"; }//w w w .jav a 2 s . c o m return s + "</datatype>"; }
From source file:com.sindicetech.siren.qparser.keyword.nodes.NodeBooleanQueryNode.java
License:Open Source License
@Override public String toString() { if (this.getChildren() == null || this.getChildren().size() == 0) return "<nodeBoolean operation='default'/>"; final StringBuilder sb = new StringBuilder(); sb.append("<nodeBoolean operation='default'>"); for (final QueryNode child : this.getChildren()) { sb.append("\n"); sb.append(child.toString()); }/*from ww w .j a v a 2 s .c o m*/ sb.append("\n</nodeBoolean>"); return sb.toString(); }
From source file:com.sindicetech.siren.qparser.keyword.nodes.SpanBooleanQueryNode.java
License:Open Source License
@Override public String toString() { if (this.getChildren() == null || this.getChildren().size() == 0) return "<spanBoolean operation='default'/>"; final StringBuilder sb = new StringBuilder(); sb.append("<spanBoolean operation='default'>"); for (final QueryNode child : this.getChildren()) { sb.append("\n"); sb.append(child.toString()); }//from ww w.ja v a 2s. c o m sb.append("\n</spanBoolean>"); return sb.toString(); }
From source file:com.sindicetech.siren.qparser.tree.nodes.ArrayQueryNode.java
License:Open Source License
@Override public String toString() { if (this.getChildren().size() == 0) { return "<array/>"; }/*from w w w .j a va 2 s. c o m*/ final StringBuilder sb = new StringBuilder(); sb.append("<array>\n"); for (final QueryNode v : this.getChildren()) { sb.append(v.toString()); sb.append("\n"); } sb.append("</array>"); return sb.toString(); }
From source file:com.sindicetech.siren.qparser.tree.nodes.BooleanQueryNode.java
License:Open Source License
@Override public String toString() { if (this.getChildren().size() == 0) { return "<boolean/>"; }/*from w w w .j a v a 2 s .c o m*/ final StringBuilder sb = new StringBuilder(); sb.append("<boolean>\n"); for (final QueryNode child : this.getChildren()) { sb.append(child.toString()); sb.append("\n"); } sb.append("</boolean>"); return sb.toString(); }
From source file:com.sindicetech.siren.qparser.tree.nodes.TwigQueryNode.java
License:Open Source License
@Override public String toString() { if (this.getRoot() == null && this.getChildren().size() == 0) { return "<twig/>"; }//from w w w.j a v a 2 s .c o m final StringBuilder sb = new StringBuilder(); sb.append("<twig field='" + this.field + "' root='" + this.root + "' level='" + this.getTag(LevelPropertyParser.LEVEL_PROPERTY) + "' range='" + this.getTag(RangePropertyParser.RANGE_PROPERTY) + "'>"); for (final QueryNode child : this.getChildren()) { sb.append("\n"); sb.append(child.toString()); } sb.append("\n</twig>"); return sb.toString(); }