tdb

tbloader vs SPARQL INSERT - Why different behaviour with named graphs?

心不动则不痛 提交于 2019-12-01 17:14:49
问题 There is a strange behaviour in the connection of the commandline tools of ARQ, TDB and Named Graphs. If importing data via tdbloader in a named graph it can not be queried via GRAPH clause in a SPARQL SELECT query. However, this query is possible when inserting the data in the same graph with SPARQL INSERT. I have following assembler description file tdb.ttl : @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ja:

How I can load a model in TDB TripleStore

独自空忆成欢 提交于 2019-12-01 11:33:55
问题 I have a question for you: I would like to load a file on my Jena TDB TripleStore. My file is very big, about 80Mb and about 700000 triples RDF. When I try to load it, the execution stops working or takes a very long time. I'm using this code that I do run on a Web Service: String file = "C:\\file.nt"; String directory; directory = "C:\\tdb"; Dataset dataset = TDBFactory.createDataset(directory); Model model = ModelFactory.createDefaultModel(); TDBLoader.loadModel(model, file ); dataset

How to write SPARQL query that efficiently matches string literals while ignoring case

我们两清 提交于 2019-11-30 07:25:43
问题 I am using Jena ARQ to write a SPARQL query against a large ontology being read from Jena TDB in order to find the types associated with concepts based on rdfs label: SELECT DISTINCT ?type WHERE { ?x <http://www.w3.org/2000/01/rdf-schema#label> "aspirin" . ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type . } This works pretty well and is actually quite speedy (<1 second). Unfortunately, for some terms, I need to perform this query in a case-insensitive way. For instance, because the

How to write SPARQL query that efficiently matches string literals while ignoring case

回眸只為那壹抹淺笑 提交于 2019-11-29 03:33:28
I am using Jena ARQ to write a SPARQL query against a large ontology being read from Jena TDB in order to find the types associated with concepts based on rdfs label: SELECT DISTINCT ?type WHERE { ?x <http://www.w3.org/2000/01/rdf-schema#label> "aspirin" . ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type . } This works pretty well and is actually quite speedy (<1 second). Unfortunately, for some terms, I need to perform this query in a case-insensitive way. For instance, because the label "Tylenol" is in the ontology, but not "tylenol" , the following query comes up empty: SELECT

Jena TDB java.lang.ExceptionInInitializerError

守給你的承諾、 提交于 2019-11-28 11:32:28
I'm using Jena TDB for loading an RDF dataset and making SPARQL queries against it. I'm using the following maven dependency: <dependency> <groupId>org.apache.jena</groupId> <artifactId>apache-jena-libs</artifactId> <type>pom</type> <version>3.0.1</version> </dependency> And here's the java code where I'm trying to create a TDB dataset: public void loadDirectory(String outputFile){ Dataset dataset = TDBFactory.createDataset(directoryPath); Model tdb = dataset.getDefaultModel(); FileManager.get().readModel(tdb, outputFile); tdb.close(); dataset.close(); LOG.info("RDF dataset loaded to memory");

Jena TDB java.lang.ExceptionInInitializerError

橙三吉。 提交于 2019-11-27 06:16:02
问题 I'm using Jena TDB for loading an RDF dataset and making SPARQL queries against it. I'm using the following maven dependency: <dependency> <groupId>org.apache.jena</groupId> <artifactId>apache-jena-libs</artifactId> <type>pom</type> <version>3.0.1</version> </dependency> And here's the java code where I'm trying to create a TDB dataset: public void loadDirectory(String outputFile){ Dataset dataset = TDBFactory.createDataset(directoryPath); Model tdb = dataset.getDefaultModel(); FileManager