-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to execute query over data source using Csparql2 in RSP4J #20
Comments
Hi @rahuldh2006, Just to understand the question correctly, this is only for static data? KR |
Hi Pieter, The query above was just example. My use case with RSP4J is : To achieve the above use case in CSparql2 inside RSP4J, I want to add a static named model like done below in CSparql1.0 : How can i do this in CSparql2 / RSP4J ? Please correct me if wrong. Thanks. Regards, |
Hi Rahul, Yes, you can definetly use static data with RSP4J!
In the query above the FROM clause loads the static data which then can be queried inside the default graph. You can see the example here for CSPARQL2.0. YASPER is our own from scratch implementation on top of RSP4j, you can register the same query there as well. Let me know if this solves your problem! Kr, |
In Csparql 1.0, we execute query over data source (static knowledge) as below:
String generalQuery = "SELECT ?val FROM http://localhost:8080/csparql_web_server/demo.rdf "
+ "WHERE {" + rdf.createIRI("http://test#Person") + " " + rdf.createIRI("http://test#hasBrother") + " ?val }";
String updateQuery = "PREFIX : http://www.streamreasoning.org/ontologies/sr4ld2014-onto# "
+ "INSERT DATA "
+ "{ GRAPH http://streamreasoning.org/roomConnection { :room :isConnectedTo :room2 } }";
RDFTable queryResult = engine.evaluateGeneralQueryOverDatasource(generalQuery);
engine.execUpdateQueryOverDatasource(updateQuery);
How do we do similar to above using CSparql 2.0 in RSP4J?
The text was updated successfully, but these errors were encountered: