Examples of documentExists()


Examples of ca.carleton.gcrc.couch.client.CouchDb.documentExists()

  public boolean treeExists() throws Exception {
    CouchDb db = atlasDesign.getDatabase();
    boolean exists = false;
   
    try {
      exists = db.documentExists(DATE_CLUSTER_DOC_ID);
     
    } catch (Exception e) {
      // Ignore for now
      throw new Exception("Unable to verify cluster document existence", e);
    }
View Full Code Here

Examples of ca.carleton.gcrc.couch.client.CouchDb.documentExists()

  @Override
  public void saveTree(Tree tree) throws Exception {
   
    CouchDb db = atlasDesign.getDatabase();

    boolean exists = db.documentExists(DATE_CLUSTER_DOC_ID);
   
    JSONObject jsonDoc = null;
    if( exists ) {
      jsonDoc = db.getDocument(DATE_CLUSTER_DOC_ID);
    } else {
View Full Code Here

Examples of ca.carleton.gcrc.couch.client.CouchDb.documentExists()

 
  private void activity() {
    JSONObject agreementDoc = null;
    try {
      CouchDb db = documentDbDesignDocument.getDatabase();
      boolean exist = db.documentExists("org.nunaliit.user_agreement");
      if( exist ) {
        agreementDoc = db.getDocument("org.nunaliit.user_agreement");
      } else {
        logger.error("User agreement document not found in database");
        waitMillis(60 * 1000); // wait a minute
View Full Code Here

Examples of ca.carleton.gcrc.couch.client.CouchDb.documentExists()

    CouchDb couchDb = CommandSupport.createCouchDb(gs, atlasProperties);
   
    if( selectSkeletonDocuments ){
      SkeletonDocumentsDetector docFinder = new SkeletonDocumentsDetector(couchDb,gs);
      for(String docId : docFinder.getSkeletonDocIds()){
        if( couchDb.documentExists(docId) ){
          docIds.add(docId);
        } else {
          gs.getOutStream().println("Skeleton document "+docId+" has been removed from the database");
        }
      }
View Full Code Here

Examples of ca.carleton.gcrc.couch.client.CouchDb.documentExists()

 
  private void activity() {
    JSONObject agreementDoc = null;
    try {
      CouchDb db = documentDbDesignDocument.getDatabase();
      boolean exist = db.documentExists(DOC_ID_NUNALIIT_USER_AGREEMENT);
      if( exist ) {
        agreementDoc = db.getDocument(DOC_ID_NUNALIIT_USER_AGREEMENT);
      } else {
        logger.error("User agreement document not found in database");
        waitMillis(DELAY_ERROR); // wait a minute
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.