[TASK] Generic commit.
This commit is contained in:
@@ -130,7 +130,7 @@ public class SimulationContext {
|
||||
SimulationContext.logger.debug("Engine from: " + this.engine.getClass().getProtectionDomain().getCodeSource());
|
||||
// Load local domain knowledge into its target graph
|
||||
try {
|
||||
engine.putStaticNamedModel("http://example.org/carSimKnowledgeGraph", CsparqlUtils.serializeRDFFile("data/carSimulationABox.rdf"));
|
||||
engine.putStaticNamedModel(RentACarSimulation.DOMAIN_KNOWLEDGE_GRAPH_IRI, CsparqlUtils.serializeRDFFile("data/carSimulationABox.rdf"));
|
||||
} catch (Exception e) {
|
||||
SimulationContext.logger.error(e.toString());
|
||||
SimulationContext.logger.error(e.getStackTrace().toString());
|
||||
@@ -168,6 +168,7 @@ public class SimulationContext {
|
||||
queriesToRegister.add(simulation.getTireWearStream());
|
||||
queriesToRegister.add(simulation.getCarTakenEventsQuery());
|
||||
queriesToRegister.add(simulation.getCarReturnedEventsQuery());
|
||||
queriesToRegister.add(simulation.getWearEvents());
|
||||
// Now register each query appropriately!
|
||||
for(QueryContainer queryContainer : queriesToRegister) {
|
||||
CsparqlQueryResultProxy resultProxy = null;
|
||||
@@ -179,7 +180,7 @@ public class SimulationContext {
|
||||
// Take care of streams and queries differently.
|
||||
if(queryContainer.isStream) {
|
||||
// If the query is a stream, we need additional components to feed it back into the engine.
|
||||
String streamUri = "http://example.org/stream/"+queryContainer.name;
|
||||
String streamUri = RentACarSimulation.BASE_STREAM_IRI+"/"+queryContainer.name;
|
||||
RDFStreamFormatter rdfStreamFormatter = new RDFStreamFormatter(streamUri);
|
||||
engine.registerStream(rdfStreamFormatter);
|
||||
resultProxy.addObserver(rdfStreamFormatter);
|
||||
|
||||
Reference in New Issue
Block a user