code: public static VisualizerInput createInput(String corpus, String docName,
      Visualizer config, boolean isUsingRawText, List<String> nodeAnnoFilter)
    {
      VisualizerInput input = new VisualizerInput();
  
      // set mappings and namespaces. some visualizer do not survive without   
      input.setMappings(parseMappings(config));
      input.setNamespace(config.getNamespace());
      
      String encodedToplevelCorpus = urlPathEscape.escape(corpus);
      String encodedDocument = urlPathEscape.escape(docName);
      if (isUsingRawText)
      {
        WebResource w = Helper.getAnnisWebResource();
        w = w.path("query").path("rawtext")
          .path(encodedToplevelCorpus).path(encodedDocument);
        RawTextWrapper rawTextWrapper = w.get(RawTextWrapper.class);
        input.setRawText(rawTextWrapper);
      }
      else 
      {
        // get the whole document wrapped in a salt project
        SaltProject txt = null;
  
        WebResource res = Helper.getAnnisWebResource()
          .path("query").path("graph").
          path(encodedToplevelCorpus).
          path(encodedDocument);
  
        if(nodeAnnoFilter != null)
        {
          res = res.queryParam("filternodeanno", Joiner.on(",").join(nodeAnnoFilter));
        }
  
        txt = res.get(SaltProject.class);
  
        if (txt != null)
        {
          SDocument sDoc = txt.getCorpusGraphs().get(0).getDocuments().get(0);
          input.setResult(sDoc);
        }
      }
  
  
      return input;
    }
docs: Creates the input. It only takes the salt project or the raw text from the
  text table, never both, since the increase the performance for large texts.
  
  @param corpus the name of the toplevel corpus
  @param docName the name of the document
  @param config the visualizer configuration
  @param isUsingRawText indicates, whether the text from text table is taken,
  or if the salt project is traversed.
  @param nodeAnnoFilter A list of node annotation names for filtering the nodes or null if no filtering should be applied.
  @return a {@link VisualizerInput} input, which is usable for rendering the
  whole document.