On 21/01/14 19:13, Adeeb Noor wrote:
I have a NQuads file that I want to store it inside the tdb. Here is the
code:
String directory =
"/Users/adeebnoor/Documents/uploadDatasets/dataSetsTDB/new";
Dataset dataset = TDBFactory.createDataset(directory);
Model tdb = dataset.getDefaultModel();
which is a model, a container of triples, not quads
String source =
"/Users/adeebnoor/Documents/uploadDatasets/dataSource/drugbank_target_ids.nq"
;
FileManager.get().readModel(tdb, source);
System.out.println("Done");
when I run the code above , I got this warning:
12:05:58 WARN riot :: Only triples or default graph
data expected : named graph data ignored
and when I tried to query the tdb, the result is empty.
Your NQ files has no triples in it only quads ...
Am I doing something wrong here ? or is there another way to handle
the NQuads format.
thanks
Try:
RDFDataMgr.read(dataset, source) ;
or other
RDFDataMgr.read(Dataset, ...) operation
Andy