Examples of test_CheckIfQueryLaunched()


Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      qtEntVal.entityType = "TestEntityIn";
      query.qt.add(qtEntVal);
      query.qt.add(qtDate);
      query.logic = null;
      queryEngine.preQueryActivities(new ObjectId(), query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("1.6c", true);
      queryEngine.test_queryClear(true);
     
      // 2.1] Query ignored because no related entity types
      query.qt = new ArrayList<AdvancedQueryPojo.QueryTermPojo>(1);
      qtEntIndex = new AdvancedQueryPojo.QueryTermPojo();
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      qtEntIndex = new AdvancedQueryPojo.QueryTermPojo();
      qtEntIndex.entity = "test2_1a/NOT_testentityin";
      query.qt.add(qtEntIndex);
      query.logic = null;
      queryEngine.preQueryActivities(new ObjectId(), query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("2.1a", false);
      queryEngine.test_queryClear(true);
     
      // 3.1] Test non-cached query (and that query result is added to the cache)
      query.qt = new ArrayList<AdvancedQueryPojo.QueryTermPojo>(1);
      qtEntVal = new AdvancedQueryPojo.QueryTermPojo();
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

     
      // 4.1] Test cached query
      docs.remove(0);
      queryId = new ObjectId();
      queryEngine.preQueryActivities(queryId, query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("4.1", false); // (ie check no query added - because it was in the cache)
      queryEngine.postQueryActivities(queryId, docs, rp);
      queryEngine.test_CheckIfDocAdded("4.1", docs);
      // (don't clear from cache, next doc should check cache but remove expired value)
     
      // 4.2] Test expired then cached query
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      queryEngine.test_cacheClear(false, true, fakeEndpoint.parentSource.getKey());
      queryEngine.test_cacheExpire();
      docs.remove(0);
      queryId = new ObjectId();
      queryEngine.preQueryActivities(queryId, query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("4.2", true); // (ie check no query added - because it was in the cache)
      queryEngine.postQueryActivities(queryId, docs, rp);
      queryEngine.test_CheckIfDocAdded("4.2", docs);
      // (don't clear from cache, next doc should return without making a request)
     
      // 4.3] Test cached query - bulk remove
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      queryEngine.test_cacheClear(false, true, fakeEndpoint.parentSource.getKey());
      docs.remove(0);
      queryId = new ObjectId();
      queryEngine.test_cacheFill("4.3a", true, true);
      queryEngine.preQueryActivities(queryId, query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("4.3", false); // (ie check no query added - because it was in the cache)
      queryEngine.postQueryActivities(queryId, docs, rp);
      queryEngine.test_CheckIfDocAdded("4.3", docs);
      queryEngine.test_cacheFill("4.3b", false, false);
      queryEngine.test_queryClear(true);   
    }
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      qtText = new AdvancedQueryPojo.QueryTermPojo();
      qtText.etext="fail";
      query.qt.add(qtText);
      query.logic = null;
      queryEngine.preQueryActivities(new ObjectId(), query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("1.1a", false);
      queryEngine.test_queryClear(true);
      //(proper Test-Driven code would require all the types, but we know we're actually checking for anything except entity/date)
     
      // 1.2] Query ignored because date only
      query.qt = new ArrayList<AdvancedQueryPojo.QueryTermPojo>(1);
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      qtDate.time.max="now";
      qtDate.time.min="now-3d";
      query.qt.add(qtDate);
      query.logic = null;
      queryEngine.preQueryActivities(new ObjectId(), query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("1.2a", false);
      queryEngine.test_queryClear(true);   
     
      // 1.3] Query ignored because logic too complex
      // 1.3a) OR
      query.qt = new ArrayList<AdvancedQueryPojo.QueryTermPojo>(2);
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      qtEntVal.entityType = "TestEntityIn";
      query.qt.add(qtEntVal);
      query.qt.add(qtDate);
      query.logic = "1 OR 2";
      queryEngine.preQueryActivities(new ObjectId(), query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("1.3a", false);
      queryEngine.test_queryClear(true);
      // 1.3b) NOT
      query.qt = new ArrayList<AdvancedQueryPojo.QueryTermPojo>(2);
      qtEntVal = new AdvancedQueryPojo.QueryTermPojo();
      qtEntVal.entityValue = "test1_3b";
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      qtEntVal.entityType = "TestEntityIn";
      query.qt.add(qtEntVal);
      query.qt.add(qtDate);
      query.logic = "NOT (1 AND 2)";
      queryEngine.preQueryActivities(new ObjectId(), query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("1.3b", false);
      queryEngine.test_queryClear(true);
     
      // 1.4] Query ignored because multiple entities
      query.qt = new ArrayList<AdvancedQueryPojo.QueryTermPojo>(2);
      qtEntVal = new AdvancedQueryPojo.QueryTermPojo();
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfQueryLaunched()

      qtEntIndex.entity = "test1_4_1/testentityin";
      query.qt.add(qtEntVal);
      query.qt.add(qtEntIndex);
      query.logic = null;
      queryEngine.preQueryActivities(new ObjectId(), query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("1.4a", false);
      queryEngine.test_queryClear(true);
     
      // 1.5] Single entity - not ignored (entity type and value)   
      query.qt = new ArrayList<AdvancedQueryPojo.QueryTermPojo>(1);
      qtEntVal = new AdvancedQueryPojo.QueryTermPojo();
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.