docs: public MtasSpanQuery getQuery() throws ParseException {
      simplify();
      if (isBasic()) {
        MtasSpanQuery query;
        if (basicSentence == null) {
          throw new ParseException("no condition");
        } else if (basicSentence.isOptional()) {
          List<MtasSpanSequenceItem> clauses = new ArrayList<MtasSpanSequenceItem>();
          clauses.add(new MtasSpanSequenceItem(basicSentence.getQuery(),
              basicSentence.isOptional()));
          query = new MtasSpanSequenceQuery(clauses, ignore, maximumIgnoreLength);
          if (maximumOccurence > 1) {
            query = new MtasSpanRecurrenceQuery(query, minimumOccurence,
                maximumOccurence, ignore, maximumIgnoreLength);
          }
        } else {
          query = basicSentence.getQuery();
          if (maximumOccurence > 1) {
            query = new MtasSpanRecurrenceQuery(query, minimumOccurence,
                maximumOccurence, ignore, maximumIgnoreLength);
          }
        }
        return query;
      } else if (sequenceList.isEmpty()) {
        throw new ParseException("no condition");
      } else if (isSingle()) {
        return createQuery(sequenceList.get(0));
      } else {
        List<MtasSpanQuery> clauses = new ArrayList<MtasSpanQuery>();
        for (List<MtasCQLParserSentenceCondition> sentenceSequence : sequenceList) {
          clauses.add(createQuery(sentenceSequence));
        }
        return new MtasSpanOrQuery(
            clauses.toArray(new MtasSpanQuery[clauses.size()]));
      }
    }