Example #1
0
  public boolean load() throws IOException {

    progs = new Vector<Program>();

    YamlReader reader = null;
    try {
      URL url2 = new URL(url + "/apps.yaml");
      HttpURLConnection conn = (HttpURLConnection) url2.openConnection();
      reader = new YamlReader(new InputStreamReader(conn.getInputStream()));
    } catch (IOException e) {
      e.printStackTrace();
    }

    appList = reader.read(AppList.class);

    for (String pckg : appList.getApps()) {
      System.out.println(pckg);
      Program prog = YamlLoader.loadAppFromUrl(url + "/" + pckg + "/cloudgene.yaml");
      // update url
      prog.setSource(url + "/" + pckg);
      progs.add(prog);
    }

    return true;
  }
 public static YamlReader getReader(String fullFilename) throws IOException {
   YamlReader reader =
       new YamlReader(new InputStreamReader(new FileInputStream(fullFilename), "UTF8"));
   reader.getConfig().setPrivateFields(true);
   return reader;
 }