Beispiel #1
0
  private void getCGEMSData(String url, String fileName, String clientConfig) throws Exception {
    CGEMSClient client = new CGEMSClient(url);
    CQLQueryResults results = client.query(getCQLQuery(fileName));

    CQLQueryResultsIterator iter =
        new CQLQueryResultsIterator(results, new FileInputStream(new File(clientConfig)));

    if (WRITE_TO_FILE) {
      writeToFile("cgems_out.xml", fileName, results);
    }

    if (DISPLAY_DATA) {
      System.out.println("Results for " + fileName);
      while (iter.hasNext()) {
        gov.nih.nci.caintegrator.domain.study.bean.StudyParticipant de =
            (gov.nih.nci.caintegrator.domain.study.bean.StudyParticipant) iter.next();
        System.out.println(de.getStudySubjectIdentifier() + "     " + de.getInstitutionName());
      }
      System.out.println("---------------------");
    }
  }
Beispiel #2
0
  private void getcaTissueData(String url, String fileName, String clientConfig) throws Exception {
    gov.nih.nci.cagrid.catissuecore.client.CaTissueCoreClient client =
        new gov.nih.nci.cagrid.catissuecore.client.CaTissueCoreClient(url);
    CQLQueryResults results = client.query(getCQLQuery(fileName));

    CQLQueryResultsIterator iter =
        new CQLQueryResultsIterator(results, new FileInputStream(new File(clientConfig)));

    if (WRITE_TO_FILE) {
      writeToFile("catissue_out.xml", fileName, results);
    }

    if (DISPLAY_DATA) {
      System.out.println("Results for " + fileName);
      while (iter.hasNext()) {
        edu.wustl.catissuecore.domainobject.impl.ParticipantImpl de =
            (edu.wustl.catissuecore.domainobject.impl.ParticipantImpl) iter.next();
        System.out.println(de.getId() + "     " + de.getGender());
      }
      System.out.println("---------------------");
    }
  }
Beispiel #3
0
  private void getTumorData(String url, String fileName, String clientConfig) throws Exception {
    gov.nih.nci.cagrid.catriptumorregistry.client.CaTRIPTumorRegistryClient client =
        new gov.nih.nci.cagrid.catriptumorregistry.client.CaTRIPTumorRegistryClient(url);
    CQLQueryResults results = client.query(getCQLQuery(fileName));

    CQLQueryResultsIterator iter =
        new CQLQueryResultsIterator(results, new FileInputStream(new File(clientConfig)));

    if (WRITE_TO_FILE) {
      writeToFile("tumor_registry_out.xml", fileName, results);
    }

    if (DISPLAY_DATA) {
      System.out.println("Results for " + fileName);
      while (iter.hasNext()) {
        edu.duke.cabig.tumorregistry.domain.Patient de =
            (edu.duke.cabig.tumorregistry.domain.Patient) iter.next();
        System.out.println(de.getId() + "     " + de.getSex());
      }
      System.out.println("---------------------");
    }
  }