TDB2Factory connecting dataset

85 Views Asked by At

I try to use TDB2Factory to connect dataset (in turtle syntax) at URL address. But this command:

Dataset ds = TDB2Factory.connectDataset(loc1);

doesnt load any data. There is a problem with syntax or exists another way how to connect dataset from jena apache?

1

There are 1 best solutions below

0
AndyS On

TDB2Factory.connectDataset connects to the local filesystem. It does not read Turtle file but you can load data from a file using RDFDataMgr. This data is written to the database in the local filesystem.

Alternatively, uou can load the database first with the tdb2.tdbloader tool.