code: public StreamingOutput getResource(final String resourceName,
          final Map<QueryParameter, String> queryParams) throws JaxRxException {
          final StreamingOutput streamingOutput = new StreamingOutput() {
              @Override
              public void write(final OutputStream output) throws IOException, JaxRxException {
                  final String revision = queryParams.get(QueryParameter.REVISION);
                  final String wrap = queryParams.get(QueryParameter.WRAP);
                  final String nodeId = queryParams.get(QueryParameter.OUTPUT);
                  final boolean wrapResult = (wrap == null) ? false : wrap.equalsIgnoreCase(YESSTRING);
                  final boolean nodeid = (nodeId == null) ? false : nodeId.equalsIgnoreCase(YESSTRING);
                  try {
                      if (revision == null) {
                          serialize(resourceName, null, nodeid, output, wrapResult);
                      } else {
                          // pattern which have to match against the input
                          final Pattern pattern = Pattern.compile("[0-9]+[-]{1}[1-9]+");
  
                          final Matcher matcher = pattern.matcher(revision);
  
                          if (matcher.matches()) {
                              getModificHistory(resourceName, revision, nodeid, output, wrapResult);
                          } else {
                              serialize(resourceName, Long.valueOf(revision), nodeid, output, wrapResult);
                          }
                      }
                  } catch (final NumberFormatException exce) {
                      throw new JaxRxException(400, exce.getMessage());
                  } catch (final TTException exce) {
                      throw new JaxRxException(exce);
                  }
              }
          };
          return streamingOutput;
      }
docs: This method is responsible to deliver the whole database. Additional
  parameters can be set (wrap, revision, output) which change the response
  view.
  
  @param resourceName
  The name of the requested database.
  @param queryParams
  The optional query parameters.
  @return The XML database resource, depending on the query parameters.
  @throws JaxRxException
  The exception occurred.