code: public Set<Parameter> getAllParameters() {
          final Set<Parameter> ret = new HashSet<Parameter>();
          for (final Term term : getAllTerms()) {
              List<Parameter> params = term.getParameters();
              if (params == null) {
                  continue;
              }
              ret.addAll(params);
          }
          return ret;
      }
docs: Returns the set of all parameters contained within the document.
  
  @return Set of parameters, which may be empty