Tag: jena linkedmdb

如何使用Jena TDB存储链接电影数据库的本地版本

我有一个本地版本的LinkedMDB,它是N-Triples格式,想要查询它。 现在,我想使用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” […]