/**
  * Used to void some problems where the logical condition appeared before the first term
  *
  * @param firstOne
  * @return
  */
 private String toString(boolean firstOne) {
   StringBuilder sb = new StringBuilder();
   if (this.searchTerms.size() > 0) {
     // in this case, the field will be used as a logical operator because the term is complex
     boolean first = true;
     Iterator<EuropeanaSearchTerm> searchTermsIt = this.searchTerms.iterator();
     while (searchTermsIt.hasNext()) {
       EuropeanaSearchTerm searchTerm = searchTermsIt.next();
       String searchTermStr;
       if (first == true) {
         searchTermStr = searchTerm.toString(first);
         first = false;
       } else {
         searchTermStr = searchTerm.toString();
       }
       sb.append(searchTermStr);
       if (searchTermsIt.hasNext()) {
         sb.append(" ");
       }
     }
     return sb.toString();
   } else {
     if ((this.operator != null) && (firstOne == false)) {
       sb.append(this.operator).append(" ");
     }
     String operandStr = super.toString();
     sb.append(this.field).append(": ").append(operandStr);
     return sb.toString();
   }
 }