@Override public ResultSet execSelect() { ResultSet result = wrapException(new Supplier<ResultSet>() { @Override public ResultSet get() { ResultSet r = decoratee.execSelect(); return r; } }); return result; } @Override
final QueryExecutionFactory qef = FluentQueryExecutionFactory .http("http://dbpedia.org/sparql", Lists.newArrayList("http://dbpedia.org")) .config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .withCache(cacheFrontend)
public QueryExecution postProcesss(QueryEngineHTTP qe) { qe.setDefaultGraphURIs(datasetDescription.getDefaultGraphURIs()); qe.setNamedGraphURIs(datasetDescription.getNamedGraphURIs()); QueryExecution result = new QueryExecutionHttpWrapper(qe); return result; }
public static void main(final String[] args) throws IOException { .withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()).setModelContentType(WebContent.contentTypeRDFXML)).end().create();
/** * @deprecated Will be removed in next release as it is redundant. Please use {@link ConciseBoundedDescriptionGeneratorImpl#ConciseBoundedDescriptionGeneratorImpl(QueryExecutionFactory)} * @param endpoint * @param cacheDir */ @Deprecated() public ConciseBoundedDescriptionGeneratorImpl(SparqlEndpoint endpoint, String cacheDir) { this(FluentQueryExecutionFactory .http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()) .config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .end() .create()); if(cacheDir != null){ long timeToLive = TimeUnit.DAYS.toMillis(30); CacheFrontend cacheFrontend = CacheUtilsH2.createCacheFrontend(cacheDir, true, timeToLive); qef = new QueryExecutionFactoryCacheEx(qef, cacheFrontend); } qef = new QueryExecutionFactoryPaginated(qef, 10000); }
@Override public Iterator<Triple> execConstructTriples() { Iterator<Triple> result = wrapException(new Supplier<Iterator<Triple>>() { @Override public Iterator<Triple> get() { Iterator<Triple> r = decoratee.execConstructTriples(); return r; } }); return result; }
public SymmetricConciseBoundedDescriptionGeneratorImpl(SparqlEndpoint endpoint, CacheFrontend cache) { qef = FluentQueryExecutionFactory .http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()) .config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .end() .create(); if(cache != null){ qef = new QueryExecutionFactoryCacheEx(qef, cache); } qef = new QueryExecutionFactoryPaginated(qef, 10000); }
.config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .end()
QueryExecutionFactory qef = FluentQueryExecutionFactory .http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()) .config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .end()
QueryExecutionFactory qef = FluentQueryExecutionFactory .http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()).config() .withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .withCache(CacheUtilsH2.createCacheFrontend("/tmp/cache", false, TimeUnit.DAYS.toMillis(60)))
.config() .withPostProcessor(qe -> ((QueryEngineHTTP)((QueryExecutionHttpWrapper)qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .withPostProcessor(aoeu -> System.out.println("a" + aoeu))
QueryExecutionFactory qef = FluentQueryExecutionFactory .http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()) .config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .end()
qef = FluentQueryExecutionFactory .http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()) .config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .end()
qef = FluentQueryExecutionFactory .http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()) .config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .end()
QueryExecutionFactory qef = FluentQueryExecutionFactory .http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()) .config().withPostProcessor(qe -> ((QueryEngineHTTP) ((QueryExecutionHttpWrapper) qe).getDecoratee()) .setModelContentType(WebContent.contentTypeRDFXML)) .end()