On 26/08/15 10:24, Kim A. Jakobsen wrote:
Hi

I have created a property table and I would like to query it using SPARQL.
My code looks as follows:

PropertyTable propertytable = new PropertyTableArrayImpl(1, 1);
Column something = propertytable.createColumn(NodeFactory.createURI("
http://example.org/"; + "something"));
Row row = propertytable.createRow(NodeFactory.createURI("http://example.org/";
+ "apple"));
row.setValue(something, NodeFactory.createLiteral("JOHN"));

How do I query the property table?

Hi there,

You can make the property table appear as an RDF graph with

GraphPropertyTable

and make that a model

ModelFactory.createModelForGraph
if you want to.

You can query it with SPARQL or the RDF API.

        Andy


Additionally then I would also like to make my property table persistent,
i.e. save it to the disk.
As fare as I know then it is only possible to save it as a CSV file, is
there any other options?

You can write the RDF graph.

In fact, what might work for you is to convert the CSV file with riotcmdx.csv2rdf and work in RDF from there on.

        Andy


Regards
Kim A. Jakobsen


Reply via email to