code: public static QueryData createQueryData(MatchGroup matchGroup, QueryDao annisDao)
    {
      QueryData queryData = new QueryData();
  
      Set<String> corpusNames = new TreeSet<>();
  
      for(Match m : matchGroup.getMatches())
      {
        // collect list of used corpora and created pseudo QueryNodes for each URI
        List<QueryNode> pseudoNodes = new ArrayList<>(m.getSaltIDs().size());
        for (java.net.URI u : m.getSaltIDs())
        {
          pseudoNodes.add(new QueryNode());
          corpusNames.add(CommonHelper.getCorpusPath(u).get(0));
        }
        queryData.addAlternative(pseudoNodes);
      }
      List<Long> corpusIDs = annisDao.mapCorpusNamesToIds(new LinkedList<>(
        corpusNames));
  
      queryData.setCorpusList(corpusIDs);
  
      queryData.addExtension(matchGroup);
      return queryData;
    }
docs: This is a helper function to make it easier to create a correct query data object
  from a {@link MatchGroup} for a {@link AnnisDao#graph(annis.ql.parser.QueryData)  } query.
  
  @param matchGroup
  @return