Skip to content

How to execute query over data source using Csparql2 in RSP4J #20

@rahuldh2006

Description

@rahuldh2006

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions