N-Triples 形式の LinkedMDB のローカル バージョンがあり、クエリを実行したいと考えています。ここで、後でクエリに使用できるデータを格納できる Jena TDB を使用したいと考えています。TDB Java APIのドキュメントを確認しましたが、N-Triples ファイルを読み込んでから SPARQL でクエリを実行できませんでした。次のコードを使用しました。
String directory = "E:\\Applications\\tdb-0.8.9\\TDB-0.8.9\\bin\\tdb";
Dataset dataset = TDBFactory.createDataset(directory);
// assume we want the default model, or we could get a named model here
Model tdb = dataset.getDefaultModel();
// read the input file - only needs to be done once
String source = "E:\\Applications\\linkedmdb-18-05-2009-dump.nt";
FileManager.get().readModel( tdb, source, "N-TRIPLES" );
次の例外を取得しました
Exception in thread "main" com.hp.hpl.jena.tdb.base.file.FileException: Not a directory: E:\Applications\tdb-0.8.9\TDB-0.8.9\bin\tdb
at com.hp.hpl.jena.tdb.base.file.Location.<init>(Location.java:83)
at com.hp.hpl.jena.tdb.TDBFactory.createDataset(TDBFactory.java:79)
at tutorial.Temp.main(Temp.java:14)