Examples of HUDXML3BlobService


Examples of org.pathways.openciss.shared.HUDXML3BlobService

        // look at the last/most recent record (either in file or in datastore/cloud sql)
   
    // if file1 already started and not finished, resume file 1
      // get last marker processed from file or db?  what is the key?
      // continue, writing out each time
    HUDXML3BlobService hxbs = new HUDXML3BlobService();
    log.info("trying to get HUDXML3Blob object from Key String: " + hudXMLURL.getKeyString());
    HUDXML3Blob blob = hxbs.getHUDXML3BlobFromXMLKey(hudXMLURL.getKeyString());
    if (blob != null) {
      String id = blob.getId().toString();
      if (!recordExists(id)) {
        log.info("for HUD XML blob record: " + id + " nothing has been done, not even file 1 indexing, so start up first time.");
        startUpFirstTime(id);
      }
      else {
        log.info("HUD XML blob record: " + id + " already exists, so continuing from past session.");
        //everything keys of the household index
        if (!finishedConverting(id)) {
          convertHUDXMLToRosieCSV2(id);
          // set as finished in database
          blob = hxbs.getHUDXML3BlobFromXMLKey(hudXMLURL.getKeyString());
          blob.setCsvUrl2Completed(1);
          hxbs.updateHUDXML3Blob(blob);
        }
      }
      log.info("finished storing in db, now writing to a GCS file");
      writeToGoogleCloudStorage();
    }
View Full Code Here

Examples of org.pathways.openciss.shared.HUDXML3BlobService

    RosieIndexesService ris = new RosieIndexesService();
    ris.deleteAllRosieIndexes();
    startRecordsCreation();
    indexHouseholds(id);
    // set as finished in database
    HUDXML3BlobService hxbs = new HUDXML3BlobService();
    HUDXML3Blob blob = hxbs.getHUDXML3BlobFromXMLKey(hudXMLURL.getKeyString());
    //blob.setCsvUrl1Completed(1);
    //hxbs.updateHUDXML3Blob(blob);
    //blob = null;
    convertHUDXMLToRosieCSV2(id);
    blob = hxbs.getHUDXML3BlobFromXMLKey(hudXMLURL.getKeyString());
    blob.setCsvUrl2Completed(1);
    hxbs.updateHUDXML3Blob(blob);
    blob = null;
    log.info("finished processing in one pass!");
  }
View Full Code Here

Examples of org.pathways.openciss.shared.HUDXML3BlobService

        csvRecords[i][j] = "";   
  }

  boolean recordExists(String id) {
    boolean result = false;
    HUDXML3BlobService hxbs = new HUDXML3BlobService();
    HUDXML3Blob blob = hxbs.getHUDXML3Blob(id);
    if (blob != null) {
      if (blob.getCsvUrl2Indexed() == 1) {
        result = true;
      }
    }
View Full Code Here

Examples of org.pathways.openciss.shared.HUDXML3BlobService

              }
            }  
          }
        }
        //mark this file as indexed
        HUDXML3BlobService hxbs = new HUDXML3BlobService();
        log.info("hudXMLURL.getKeyString() for blob being searched for" + hudXMLURL.getKeyString());
        HUDXML3Blob blob = hxbs.getHUDXML3BlobFromXMLKey(hudXMLURL.getKeyString());
        blob.setCsvUrl2Indexed(1);
        hxbs.updateHUDXML3Blob(blob)
      } catch (Exception e) {
        log.info("XML Stream exception caught: " + e.toString());
      }
      xmlr0.close();
      zis.close();
View Full Code Here

Examples of org.pathways.openciss.shared.HUDXML3BlobService

//      b.setCSVUrl2(ob.get(1).asText());
//      b.setCSVUrl3(ob.get(2).asText());
//      b.setCSVUrl4(ob.get(3).asText());
//      b.setCSVUrl6(ob.get(4).asText());
//
    HUDXML3BlobService hxbs = new HUDXML3BlobService();
    String blobRecordId = hxbs.createHUDXML3Blob(b);
    System.out.println("generated hud xml blob key is: " + blobRecordId);
//    //Map the HUDXML3BlobURL to the HUDXML3BlobService servlet, which will serve the HUDXML3Blob
//    //b.setXMLUrl("/blobstoreexample/blobservice?blob-key=" + blobKeys.get(0).getKeyString());//.getKeyString());
//    System.out.println("b blobRecordId is: " + b.getHUDXML3BlobRecordId());
//    System.out.println("CSV1 URL is:" + b.csvUrl1);
View Full Code Here

Examples of org.pathways.openciss.shared.HUDXML3BlobService

    return url;
  }
 
  //Retrieve the Blob's meta-data from Cloud SQL using JPA
  public HUDXML3Blob getHUDXML3BlobMetadata(String id) {
    HUDXML3BlobService hxbs = new HUDXML3BlobService();
    System.out.println("client wants to get HUDXML3Blob with ID: " + id);
    HUDXML3Blob b = hxbs.getHUDXML3Blob(id);
    return b;
  }
View Full Code Here

Examples of org.pathways.openciss.shared.HUDXML3BlobService

  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
      System.out.println("Received a request to serve a blob with the id: " + req.getParameter("id")
          + ", and file: " + req.getParameter("file"));
      HUDXML3BlobService hxbs = new HUDXML3BlobService();
      HUDXML3Blob b = hxbs.getHUDXML3Blob(req.getParameter("id"));
      int requestedfileNumber = Integer.valueOf(req.getParameter("file"));
      BlobKey blobKey;
      switch (requestedfileNumber) {
          case 1: blobKey = new BlobKey(b.getCsvUrl1());
          break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.