code: private static QueryComponent getQueryComponent(Queue filterClauseQueue)
      {
          QueryComponent subQuery = new QueryComponent();
          QueryComponent currentSubQuery = subQuery;
  
          for (Object object : filterClauseQueue)
          {
              if (object instanceof FilterClause)
              {
                  currentSubQuery.clauses.add(object);
              }
              else if (object instanceof String)
              {
                  String interClauseConstruct = (String) object;
                  if (interClauseConstruct.equals("("))
                  {
                      QueryComponent temp = new QueryComponent();
                      currentSubQuery.children.add(temp);
                      temp.parent = currentSubQuery;
                      currentSubQuery = temp;
                  }
                  else if (interClauseConstruct.equals(")"))
                  {
                      currentSubQuery = currentSubQuery.parent;
                  }
                  else if (interClauseConstruct.equalsIgnoreCase("AND"))
                  {
                      currentSubQuery.isAnd = true;
                  }
                  else if (interClauseConstruct.equalsIgnoreCase("OR"))
                  {
                      currentSubQuery.isAnd = false;
                  }
              }
          }
  
          return subQuery;
      }
docs: Gets the query component.
  
  @param filterClauseQueue
  the filter clause queue
  @return the query component