}else {
String[] asparams = new String[7];
BrowseSimilarService similarService = new BrowseSimilarService();
ServiceChain newchain = null;
LocalRepository simrepo;
GraphStatistics graphstats;
ValueStats aisize;
try {
newchain = (ServiceChain)this.callBean.getChain().clone();
newchain.getServices().add(similarService);
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
similarService.setCallBean(this.getCallBean());
similarService.setRequestParams(null);
similarService.setUser(this.user);
asparams[1] = "";//"!");
asparams[2]= "";//"-");
asparams[6]= "*";
if(newchain != null)
for(String property : results.keySet()) {
String prop = property;
String ns = null;
String name = property;
if(property.startsWith("-")) {
asparams[2] = MBBService.INVERSE;
prop = property.substring(1);
name = prop;
}
if(prop.indexOf(':')>0) {
ns = prop.substring(0, prop.indexOf(':'));
name = prop.substring(prop.indexOf(':')+1);
}
asparams[0]= this.params.get(0)+"/browse/"+property+"/*";
asparams[3]= prop;
asparams[4]= ns;
asparams[5]= name;
similarService.setUri(asparams[0]);
similarService.setParams(Arrays.asList(asparams));
simrepo = similarService.execute(repo);
graphstats = GraphStatistics.get(simrepo.getGraph());
graphstats.process(asparams[0], true, true, true);
aisize = results.get(property);
aisize.setCountWithResults(graphstats.getResults().size());
aisize.setCountWithResources(graphstats.getResources().size());
aisize.setCountWithBnodes(graphstats.getBnodes().size());
}
String _uri = this.getCallBean().getCall();
_uri = _uri.substring(0, _uri.indexOf("/stats"));
Repository.logger.info("Put stats to cache: "+_uri);