@Test public void executeSparqlQueryWithEngineWithConstructQuery() throws Exception { injectQueryEngine(queryEngine); Graph Graph = new SimpleGraph(); ConstructQuery query = Mockito.mock(ConstructQuery.class); graphAccess.executeSparqlQuery(query, Graph); Mockito.verify(queryEngine).execute(graphAccess, Graph, query.toString()); }
public Object executeSparqlQuery(String query, Graph defaultGraph) throws ParseException { TcProvider singleTargetTcProvider = null; final IRI defaultGraphName = new IRI("urn:x-temp:/kjsfadfhfasdffds"); final SparqlPreParser sparqlPreParser = new SparqlPreParser(this); final Set<IRI> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName); if ((referencedGraphs != null) && (!referencedGraphs.contains(defaultGraphName))) { singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs); } if ((singleTargetTcProvider != null) && (singleTargetTcProvider instanceof QueryableTcProvider)) { return ((QueryableTcProvider) singleTargetTcProvider).executeSparqlQuery(query, null); } final QueryEngine queryEngine = this.queryEngine; if (queryEngine != null) { return queryEngine.execute(this, defaultGraph, query); } else { throw new NoQueryEngineException(); } }
TcManager extends TcProviderMultiplexer implements GraphStore { public Object executeSparqlQuery(String query, Graph defaultGraph) throws ParseException { TcProvider singleTargetTcProvider = null; final IRI defaultGraphName = new IRI("urn:x-temp:/kjsfadfhfasdffds"); final SparqlPreParser sparqlPreParser = new SparqlPreParser(this); final Set<IRI> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName); if ((referencedGraphs != null) && (!referencedGraphs.contains(defaultGraphName))) { singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs); } if ((singleTargetTcProvider != null) && (singleTargetTcProvider instanceof QueryableTcProvider)) { return ((QueryableTcProvider) singleTargetTcProvider).executeSparqlQuery(query, null); } final QueryEngine queryEngine = this.queryEngine; if (queryEngine != null) { return queryEngine.execute(this, defaultGraph, query); } else { throw new NoQueryEngineException(); } } }
TcManager extends TcProviderMultiplexer implements GraphStore { public Object executeSparqlQuery(String query, Graph defaultGraph) throws ParseException { TcProvider singleTargetTcProvider = null; final IRI defaultGraphName = new IRI("urn:x-temp:/kjsfadfhfasdffds"); final SparqlPreParser sparqlPreParser = new SparqlPreParser(this); final Set<IRI> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName); if ((referencedGraphs != null) && (!referencedGraphs.contains(defaultGraphName))) { singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs); } if ((singleTargetTcProvider != null) && (singleTargetTcProvider instanceof QueryableTcProvider)) { return ((QueryableTcProvider) singleTargetTcProvider).executeSparqlQuery(query, null); } final QueryEngine queryEngine = this.queryEngine; if (queryEngine != null) { return queryEngine.execute(this, defaultGraph, query); } else { throw new NoQueryEngineException(); } } TcManager(); }
TcManager extends TcProviderMultiplexer implements GraphStore { public Object executeSparqlQuery(String query, Graph defaultGraph) throws ParseException { TcProvider singleTargetTcProvider = null; final IRI defaultGraphName = new IRI("urn:x-temp:/kjsfadfhfasdffds"); final SparqlPreParser sparqlPreParser = new SparqlPreParser(this); final Set<IRI> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName); if ((referencedGraphs != null) && (!referencedGraphs.contains(defaultGraphName))) { singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs); } if ((singleTargetTcProvider != null) && (singleTargetTcProvider instanceof QueryableTcProvider)) { return ((QueryableTcProvider) singleTargetTcProvider).executeSparqlQuery(query, null); } final QueryEngine queryEngine = this.queryEngine; if (queryEngine != null) { return queryEngine.execute(this, defaultGraph, query); } else { throw new NoQueryEngineException(); } } TcManager(); static TcManager getInstance(); @Override ImmutableGraph getImmutableGraph(IRI name); @Override Graph getMGraph(IRI name); @Override Graph getGraph(IRI name); @Override Graph createGraph(IRI name); @Override ImmutableGraph createImmutableGraph(IRI name, Graph triples); @Override void deleteGraph(IRI name); @Override Set<IRI> getNames(ImmutableGraph ImmutableGraph); @Override Set<IRI> listNamedGraphs(); @Override Set<IRI> listGraphs(); @Override Set<IRI> listMGraphs(); @Override Set<IRI> listImmutableGraphs(); Object executeSparqlQuery(String query, Graph defaultGraph); Object executeSparqlQuery(String query, boolean forceFastlane); Object executeSparqlQuery(String query, IRI defaultGraphName); Object executeSparqlQuery(String query, IRI defaultGraphName, boolean forceFastlane); @Deprecated Object executeSparqlQuery(Query query, Graph defaultGraph); @Deprecated ResultSet executeSparqlQuery(SelectQuery query,
                                        Graph defaultGraph); @Deprecated boolean executeSparqlQuery(AskQuery query,
            Graph defaultGraph); @Deprecated ImmutableGraph executeSparqlQuery(DescribeQuery query,
            Graph defaultGraph); @Deprecated ImmutableGraph executeSparqlQuery(ConstructQuery query,
            Graph defaultGraph); TcAccessController getTcAccessController(); boolean isTcServicesEnabled(); }
TcManager extends TcProviderMultiplexer implements GraphStore { public Object executeSparqlQuery(String query, Graph defaultGraph) throws ParseException { TcProvider singleTargetTcProvider = null; final IRI defaultGraphName = new IRI("urn:x-temp:/kjsfadfhfasdffds"); final SparqlPreParser sparqlPreParser = new SparqlPreParser(this); final Set<IRI> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName); if ((referencedGraphs != null) && (!referencedGraphs.contains(defaultGraphName))) { singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs); } if ((singleTargetTcProvider != null) && (singleTargetTcProvider instanceof QueryableTcProvider)) { return ((QueryableTcProvider) singleTargetTcProvider).executeSparqlQuery(query, null); } final QueryEngine queryEngine = this.queryEngine; if (queryEngine != null) { return queryEngine.execute(this, defaultGraph, query); } else { throw new NoQueryEngineException(); } } TcManager(); static TcManager getInstance(); @Override ImmutableGraph getImmutableGraph(IRI name); @Override Graph getMGraph(IRI name); @Override Graph getGraph(IRI name); @Override Graph createGraph(IRI name); @Override ImmutableGraph createImmutableGraph(IRI name, Graph triples); @Override void deleteGraph(IRI name); @Override Set<IRI> getNames(ImmutableGraph ImmutableGraph); @Override Set<IRI> listNamedGraphs(); @Override Set<IRI> listGraphs(); @Override Set<IRI> listMGraphs(); @Override Set<IRI> listImmutableGraphs(); Object executeSparqlQuery(String query, Graph defaultGraph); Object executeSparqlQuery(String query, boolean forceFastlane); Object executeSparqlQuery(String query, IRI defaultGraphName); Object executeSparqlQuery(String query, IRI defaultGraphName, boolean forceFastlane); @Deprecated Object executeSparqlQuery(Query query, Graph defaultGraph); @Deprecated ResultSet executeSparqlQuery(SelectQuery query,
                                        Graph defaultGraph); @Deprecated boolean executeSparqlQuery(AskQuery query,
            Graph defaultGraph); @Deprecated ImmutableGraph executeSparqlQuery(DescribeQuery query,
            Graph defaultGraph); @Deprecated ImmutableGraph executeSparqlQuery(ConstructQuery query,
            Graph defaultGraph); TcAccessController getTcAccessController(); boolean isTcServicesEnabled(); final static String GENERAL_PURPOSE_TC; final static String Graph_SERVICES_ENABLED; final static String MGRAPH_CACHE_ENABLED; }