code: public static Set<String> getToplevelCorpusNames(SaltProject p)
    {
      Set<String> names = new HashSet<>();
  
      if (p != null && p.getCorpusGraphs() != null)
      {
        for (SCorpusGraph g : p.getCorpusGraphs())
        {
          if (g.getRoots() != null)
          {
            for (SNode c : g.getRoots())
            {
              names.add(c.getName());
            }
          }
        }
      }
  
      return names;
    }
docs: Gets all names of a corpus from a salt project.
  
  @param p
  @return returns an empty list if project is empty or null.