[TASK] Generic commit.

This commit is contained in:
Jan Philipp Timme 2016-10-05 19:56:19 +02:00
parent ca702cd79d
commit e093469fa9
1 changed files with 5 additions and 5 deletions

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import eu.larkc.csparql.cep.api.RdfStream;
import eu.larkc.csparql.common.utils.CsparqlUtils;
import eu.larkc.csparql.core.engine.CsparqlEngine;
import eu.larkc.csparql.core.engine.CsparqlEngineImpl;
import eu.larkc.csparql.core.engine.CsparqlQueryResultProxy;
@ -22,7 +23,7 @@ import lu.jpt.csparqlproject.util.CsparqlQueryHelper.CsparqlQueryInfo;
* which provides the needed event streams is being initialized, and its event streams
* are being registered with the engine.
*
* Also, the neccessary C-SPARQL queries are fetched from the RentACarSimulation and
* Also, the necessary C-SPARQL queries are fetched from the RentACarSimulation and
* also getting registered with the engine. This way, everything you may need to know
* about how to use the engine itself lies within here.
*
@ -104,7 +105,7 @@ public class SimulationContext {
for(CsparqlQueryResultProxy resultProxy : this.queryResultProxies) {
this.engine.unregisterQuery(resultProxy.getId());
}
// Unregister all rdf streams from the engine
// Unregister all streams from the engine
for(RdfStream eventStream : this.registeredStreams) {
this.engine.unregisterStream(eventStream.getIRI());
}
@ -129,14 +130,13 @@ public class SimulationContext {
SimulationContext.logger.debug("CWD: " + System.getProperty("user.dir"));
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"));
} catch (Exception e) {
SimulationContext.logger.error(e.toString());
SimulationContext.logger.error(e.getStackTrace().toString());
}
*/
// From the C-SPARQL-ReadyToGoPack:
// Note: This is how local domain knowledge can be updated during runtime:
/* Use a SPARQL Query to update the local knowledge from code instead of using CONSTRUCT within the engine.
String updateQuery = "PREFIX : <http://www.streamreasoning.org/ontologies/sr4ld2014-onto#> "
@ -195,7 +195,7 @@ public class SimulationContext {
/**
* Builds a query result observer depending on the given queryName.
* This is useful if a querys result set is larger than usual.
* This is useful if a queries result set is larger than usual.
* @param queryName
* @return Observer for query result
*/