Package ca.carleton.gcrc.couch.client

Examples of ca.carleton.gcrc.couch.client.CouchQuery


    logger.info("Upload worker thread exiting");
  }
 
  private void activity() {
    CouchQuery query = new CouchQuery();
    query.setViewName("server_work");
   
    CouchQueryResults results;
    try {
      results = dd.performQuery(query);
    } catch (Exception e) {
View Full Code Here


    logger.info("Upload worker thread exiting");
  }
 
  private void activity() {
    CouchQuery query = new CouchQuery();
    query.setViewName("server_work");
   
    CouchQueryResults results;
    Work work = null;
    try {
      results = dd.performQuery(query);
View Full Code Here

    logger.info("Upload worker thread exiting");
  }
 
  private void activity() {
    CouchQuery query = new CouchQuery();
    query.setViewName("server_work");
   
    CouchQueryResults results;
    try {
      results = dd.performQuery(query);
    } catch (Exception e) {
View Full Code Here

 
  @Override
  public SearchResults getAllDateIntervals() throws Exception {
    SearchResults results = new SearchResults();
   
    CouchQuery query = new CouchQuery();
    query.setViewName("date-index");
    query.setIncludeDocs(false);
    query.setReduce(false);
    CouchQueryResults queryResults = atlasDesignDocument.performQuery(query);
   
    results.documentWithIntervals = new ArrayList<DocumentWithInterval>(queryResults.getRows().size());
    for(JSONObject row : queryResults.getRows()){
      String docId = row.optString("id");
View Full Code Here

  @Override
  public SearchResults getDateIntervalsIntersectingWith(Interval range) throws Exception {
    SearchResults results = new SearchResults();

    CouchQuery query = new CouchQuery();
    query.setViewName("date-index");
    query.setIncludeDocs(false);
    query.setReduce(false);
    CouchQueryResults queryResults = atlasDesignDocument.performQuery(query);
   
    results.documentWithIntervals = new ArrayList<DocumentWithInterval>(queryResults.getRows().size());
    for(JSONObject row : queryResults.getRows()){
      String docId = row.optString("id");
View Full Code Here

  @Override
  public List<TreeElement> getAllElements() throws Exception {
    List<TreeElement> elements = new Vector<TreeElement>();

    CouchQuery query = new CouchQuery();
    query.setViewName("date-index");
    query.setReduce(false);
    CouchQueryResults result = atlasDesign.performQuery(query);
    for(JSONObject row : result.getRows()){
      String docId = row.getString("id");
      Integer clusterId = null;
      {
View Full Code Here

    List<TreeElement> elements = new Vector<TreeElement>();
   
    JSONArray keys = new JSONArray();
    keys.put(clusterId);
   
    CouchQuery query = new CouchQuery();
    query.setViewName("date-index");
    query.setReduce(false);
    query.setKeys(keys);
    CouchQueryResults result = atlasDesign.performQuery(query);
    for(JSONObject row : result.getRows()){
      String docId = row.getString("id");
      Integer elemClusterId = null;
      {
View Full Code Here

  @Override
  public List<ClusterInfo> getAllClusterInfo() throws Exception {
    List<ClusterInfo> infoObjs = new Vector<ClusterInfo>();

    CouchQuery query = new CouchQuery();
    query.setViewName("date-index");
    query.setReduce(true);
    query.setGrouping(true);
    CouchQueryResults result = atlasDesign.performQuery(query);
    for(JSONObject row : result.getRows()){
      Integer clusterId = null;
      {
        Object indexObj = row.get("key");
View Full Code Here

 
  @Override
  public SearchResults getAllDateIntervals() throws Exception {
    SearchResults results = new SearchResults();
   
    CouchQuery query = new CouchQuery();
    query.setViewName("date-index");
    query.setIncludeDocs(false);
    query.setReduce(false);
    CouchQueryResults queryResults = atlasDesignDocument.performQuery(query);
   
    results.documentWithIntervals = new ArrayList<DocumentWithInterval>(queryResults.getRows().size());
    for(JSONObject row : queryResults.getRows()){
      String docId = row.optString("id");
View Full Code Here

    keys.put(JSONObject.NULL); // always include un-indexed intervals
    for(Integer clusterId : clusterIds){
      keys.put(clusterId.intValue());
    }
   
    CouchQuery query = new CouchQuery();
    query.setViewName("date-index");
    query.setIncludeDocs(false);
    query.setReduce(false);
    query.setKeys(keys);
    CouchQueryResults queryResults = atlasDesignDocument.performQuery(query);
   
    results.documentWithIntervals = new ArrayList<DocumentWithInterval>(queryResults.getRows().size());
    for(JSONObject row : queryResults.getRows()){
      String docId = row.optString("id");
View Full Code Here

TOP

Related Classes of ca.carleton.gcrc.couch.client.CouchQuery

Copyright © 2018 www.massapicom. 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.