Package ca.carleton.gcrc.couch.client

Examples of ca.carleton.gcrc.couch.client.CouchDesignDocument.performQuery()


    {
      logger.debug("Obtain list of all schemas");
      CouchDesignDocument designDoc = couchDb.getDesignDocument("atlas");
      CouchQuery query = new CouchQuery();
      query.setViewName("schemas");
      CouchQueryResults results = designDoc.performQuery(query);
      List<JSONObject> rows = results.getRows();
      for(JSONObject row : rows){
        String docId = row.getString("id");
        docIds.add(docId);
      }
View Full Code Here


    {
      logger.debug("Obtain list of all modules");
      CouchDesignDocument designDoc = couchDb.getDesignDocument("atlas");
      CouchQuery query = new CouchQuery();
      query.setViewName("modules");
      CouchQueryResults results = designDoc.performQuery(query);
      List<JSONObject> rows = results.getRows();
      for(JSONObject row : rows){
        String docId = row.getString("id");
        docIds.add(docId);
      }
View Full Code Here

    {
      logger.debug("Obtain list of documents from skeleton-docs view");
      CouchDesignDocument designDoc = couchDb.getDesignDocument("atlas");
      CouchQuery query = new CouchQuery();
      query.setViewName("skeleton-docs");
      CouchQueryResults results = designDoc.performQuery(query);
      List<JSONObject> rows = results.getRows();
      for(JSONObject row : rows){
        String docId = row.getString("id");
        docIds.add(docId);
      }
View Full Code Here

    // Roles from layer definitions
    {
      CouchQuery query = new CouchQuery();
      query.setViewName("layer-definitions");
      CouchQueryResults queryResults = atlasDesign.performQuery(query);
      for(JSONObject row : queryResults.getRows()){
        String layerId = row.getString("key");
        if( false == "public".equals(layerId) ) {
          String layerRole = atlasInfo.getAtlasName() + "_layer_" + layerId;
          roles.add(layerRole);
View Full Code Here

    {
      CouchQuery query = new CouchQuery();
      query.setViewName("layers");
      query.setReduce(true);
      query.setGrouping(true);
      CouchQueryResults queryResults = atlasDesign.performQuery(query);
      for(JSONObject row : queryResults.getRows()){
        String layerId = row.getString("key");
        if( false == "public".equals(layerId) ) {
          String layerRole = atlasInfo.getAtlasName() + "_layer_" + layerId;
          roles.add(layerRole);
View Full Code Here

    query.setViewName("nunaliit-schema");
    query.setStartKey(schemaName);
    query.setEndKey(schemaName);
    query.setIncludeDocs(false);
   
    CouchQueryResults results = dd.performQuery(query);
   
    Set<String> ids = new HashSet<String>();
    for(JSONObject row : results.getRows()){
      String docId = row.optString("id");
      if( null != docId ) {
View Full Code Here

    query.setViewName("geom-layer");
    query.setStartKey(layerName);
    query.setEndKey(layerName);
    query.setIncludeDocs(false);
   
    CouchQueryResults results = dd.performQuery(query);
   
    Set<String> ids = new HashSet<String>();
    for(JSONObject row : results.getRows()){
      String docId = row.optString("id");
      if( null != docId ) {
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.