Exemplo n.º 1
0
  public void run() {
    FederatedQueryEngine engine = new FederatedQueryEngine();

    try {
      this.resource.setStatusMessage("Processing");
      this.resource.setComplete(false);
      DCQLQueryResultsCollection collection = engine.execute(query);
      this.resource.setResults(collection);
      this.resource.setStatusMessage("Completed");
      this.resource.setComplete(true);
    } catch (Exception e) {
      this.resource.setResults(null);
      this.resource.setComplete(true);
      this.resource.setProcessingException(e);
    }
  }
Exemplo n.º 2
0
 public gov.nih.nci.cagrid.dcqlresult.DCQLQueryResultsCollection execute(
     gov.nih.nci.cagrid.dcql.DCQLQuery query)
     throws RemoteException, gov.nih.nci.cagrid.fqp.stubs.types.FederatedQueryProcessingFault {
   FederatedQueryEngine engine = new FederatedQueryEngine();
   DCQLQueryResultsCollection results = null;
   try {
     results = engine.execute(query);
   } catch (FederatedQueryProcessingException e) {
     LOG.error("Problem executing query: " + e.getMessage());
     FederatedQueryProcessingFault fault = new FederatedQueryProcessingFault();
     fault.setFaultString("Problem executing query: " + e.getMessage());
     FaultHelper helper = new FaultHelper(fault);
     helper.addFaultCause(e);
     throw helper.getFault();
   }
   return results;
 }