Examples of FederatedQueryInMemoryCache


Examples of com.ikanow.infinit.e.api.knowledge.federated.FederatedQueryInMemoryCache

        continue;
      }
     
      fedQuery.parentSource = fedQuerySrc;
     
      FederatedQueryInMemoryCache newCacheEl = new FederatedQueryInMemoryCache();
      newCacheEl.sourceKey = fedQuerySrc.getKey();
      newCacheEl.source = fedQuery;
      newCacheEl.lastUpdated = fedQuerySrc.getModified();
      thisCache.put(newCacheEl.sourceKey, newCacheEl);
     
      // Also cache under the community
      ObjectId commId = fedQuerySrc.getCommunityIds().iterator().next();
      String commIdStr = commId.toString();
      FederatedQueryInMemoryCache newCommCacheEl = thisCache.get(commIdStr);
      if (null == newCommCacheEl) {
        newCommCacheEl = new FederatedQueryInMemoryCache();
        newCommCacheEl.communityId = commId;
        newCommCacheEl.sources = new HashMap<String, SourceFederatedQueryConfigPojo>();
        newCommCacheEl.lastUpdated = fedQuerySrc.getModified();
        thisCache.put(commIdStr, newCommCacheEl);
       
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.FederatedQueryInMemoryCache

     
      // 1:
      if ((null != query.input) && (null != query.input.sources) && ((null == query.input.srcInclude) || query.input.srcInclude))
      {
        for (String srcKey: query.input.sources) {
          FederatedQueryInMemoryCache fedQueryCacheEl = _federatedQueryCache.get(srcKey);
          if (null != fedQueryCacheEl) {
            if (null == this._builtInFederatedQueryEngine) {
              _builtInFederatedQueryEngine = new SimpleFederatedQueryEngine();
            }
            _builtInFederatedQueryEngine.addEndpoint(fedQueryCacheEl.source);
          }
        }
      }//TESTED (//TESTED (http://localhost:8184/knowledge/document/query/53ab42a2e4b04bcfe2de4387?qt[0].entity=%22garyhart.com/externaldomain%22&output.docs.numReturn=10&input.sources=inf...federated.externaldomain.&input.srcInclude=true))
     
      // 2:
      else { //Get federated queries from communities
        HashSet<String> excludeSrcs = null;
        for (String commIdStr: communityIdStrs) {
          FederatedQueryInMemoryCache fedQueryCacheEl = _federatedQueryCache.get(commIdStr);
          if (null != fedQueryCacheEl) {
           
            if ((null != query.input) && (null != query.input.sources)) { // (there are exclude sources)
              if (null == excludeSrcs) {
                excludeSrcs = new HashSet<String>(query.input.sources);
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.