@Override public QueryResultList<Representation> find(FieldQuery query) throws SiteException { if (siteConfiguration.getCacheStrategy() == CacheStrategy.all) { try { return cache.find(query); } catch (YardException e) { if (entitySearcher == null) { throw new SiteException("Unable to execute query on Cache " + siteConfiguration.getCacheId(), e); } else { log.warn( String.format( "Error while performing query on Cache %s! Try to use remote site %s as fallback!", siteConfiguration.getCacheId(), siteConfiguration.getQueryUri()), e); } } } if (entitySearcher == null) { throw new SiteException(String.format("ReferencedSite %s does not support queries!", getId())); } try { return entitySearcher.find(query); } catch (IOException e) { throw new SiteException("Unable execute Query on remote site " + siteConfiguration.getQueryUri(), e); } }
@Override public QueryResultList<String> findReferences(FieldQuery query) throws SiteException { if (siteConfiguration.getCacheStrategy() == CacheStrategy.all) { try { return cache.findReferences(query); } catch (YardException e) { if (entitySearcher == null) { throw new SiteException("Unable to execute query on Cache " + siteConfiguration.getCacheId(), e); } else { log.warn( String.format( "Error while performing query on Cache %s! Try to use remote site %s as fallback!", siteConfiguration.getCacheId(), siteConfiguration.getQueryUri()), e); } } } if (entitySearcher == null) { throw new SiteException(String.format("The referencedSite %s dose not support queries!", getId())); } try { return entitySearcher.findEntities(query); } catch (IOException e) { throw new SiteException("Unable execute Query on remote site " + siteConfiguration.getQueryUri(), e); } }
@Override public QueryResultList<String> findReferences(FieldQuery query) throws SiteException { if (siteConfiguration.getCacheStrategy() == CacheStrategy.all) { try { return cache.findReferences(query); } catch (YardException e) { if (entitySearcher == null) { throw new SiteException("Unable to execute query on Cache " + siteConfiguration.getCacheId(), e); } else { log.warn( String.format( "Error while performing query on Cache %s! Try to use remote site %s as fallback!", siteConfiguration.getCacheId(), siteConfiguration.getQueryUri()), e); } } } if (entitySearcher == null) { throw new SiteException(String.format("The referencedSite %s dose not support queries!", getId())); } try { return entitySearcher.findEntities(query); } catch (IOException e) { throw new SiteException("Unable execute Query on remote site " + siteConfiguration.getQueryUri(), e); } }
@Override public QueryResultList<Representation> find(FieldQuery query) throws SiteException { if (siteConfiguration.getCacheStrategy() == CacheStrategy.all) { try { return cache.find(query); } catch (YardException e) { if (entitySearcher == null) { throw new SiteException("Unable to execute query on Cache " + siteConfiguration.getCacheId(), e); } else { log.warn( String.format( "Error while performing query on Cache %s! Try to use remote site %s as fallback!", siteConfiguration.getCacheId(), siteConfiguration.getQueryUri()), e); } } } if (entitySearcher == null) { throw new SiteException(String.format("ReferencedSite %s does not support queries!", getId())); } try { return entitySearcher.find(query); } catch (IOException e) { throw new SiteException("Unable execute Query on remote site " + siteConfiguration.getQueryUri(), e); } }
entityIds = entitySearcher.findEntities(query); } catch (IOException e) { throw new SiteException(String.format(
entityIds = entitySearcher.findEntities(query); } catch (IOException e) { throw new SiteException(String.format(