Questions tagged [apache-jena]

Apache Jena is a free and open source Java framework for building Semantic Web and Linked Data applications.

This is a synonym for the Jena tag.

Apache Jena Homepage

Links

185 questions
2
votes
2 answers

apache jena fuseki is not able to import .nt file

This is my config.ttl # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 @prefix : <#> . @prefix fuseki: . @prefix rdf: . @prefix…
Ania David
  • 1,168
  • 1
  • 15
  • 36
2
votes
1 answer

Jena Fuseki Sparql No query= error

I am trying to inset data in a jena fuseki graph using this simple query: PREFIX test: INSERT {?subject test:hasName "Bob"} WHERE{ ?subject test:hasEmail "email@test.com" . } However, i get the error: Error 400: SPARQL Query:…
Daniel Valland
  • 1,057
  • 4
  • 21
  • 45
2
votes
2 answers

Trying to understand Jena class hierarchy

I'm trying to reproduce the class hierarchy displayed to me in Protege for the OWL ontology (owl.ttl) which you can find at the standard URI location http://www.w3.org/2002/07/owl# for download. I'm trying to do this using Jena's API, by loading…
SPARQLGuy
  • 63
  • 8
2
votes
1 answer

How can I programmatically determine if a Jena parser is registered that can handle a format?

I'm writing a DCAT query component and ideally I'd be able to load a Jena model with as many distributions are available in the catalog (assuming they're not different representations of the same data, which according to my experience they usually…
Joey Carson
  • 2,973
  • 7
  • 36
  • 60
2
votes
2 answers

Reading RDF in apache spark

I'm trying to read RDF\XML file into Apache spark (scala 2.11, apache spark 1.4.1) using Apache Jena. I wrote this scala snippet: val factory = new RdfXmlReaderFactory() HadoopRdfIORegistry.addReaderFactory(factory) val conf = new…
Nikita
  • 4,435
  • 3
  • 24
  • 44
2
votes
1 answer

Create multiple skolems with Jena rules

What is an easy way to create multiple skolems without copying the rule multiple times? [ AddingMother: makeSkolem(?mother, "a mother") -> (?mother rdf:title "mother") (?mother rdf:type _:Mother) ] [ AddingChild: (?mother rdf:type…
user1091344
  • 612
  • 6
  • 27
2
votes
2 answers

How to read all object properties from Ontology in Java using Jena library?

I want to read all the Object Properties present in the OWL file. I have created that OWL file using Protege tool. I have loaded the model also but I am not able to fetch the object properties. For Example: if I have a class in Ontology named as…
2
votes
1 answer

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/jena/fuseki/cmd/FusekiCmd : Unsupported major.minor version 51.0

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/jena/fuseki/cmd/FusekiCmd : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at…
Techie
  • 44,706
  • 42
  • 157
  • 243
2
votes
2 answers

jena how to change the default prefix name to my prefix name

I have generated this RDF/XML data Departamento de Engenharia…
Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253
2
votes
1 answer

Reading N-Quads in Jena

I'm trying to read an N-Quads file with Jena, but all I get is an empty model. The file I'm trying to read is taken from the example in N-Quads documentation:
user40171
  • 155
  • 5
1
vote
1 answer

SPARQL insert with Fuseki not working

I am using fuseki embeded from a Java application : Dataset ds = DatasetFactory.createTxnMem() ; FusekiEmbeddedServer server = FusekiEmbeddedServer.create() .setPort(3333) .add("/ds", ds, true) .build() ; server.start()…
Yotm
  • 45
  • 4
1
vote
0 answers

Using prefixes with Fuseki embedded

I just started working with Fuseki and Jena. I have an ontology and I want to allow HTTP clients to send SPARQL requests and get the result. Here is the code I have in order to achieve that: // testing Fuseki Dataset dataset =…
Yotm
  • 45
  • 4
1
vote
0 answers

Apache Jena - which reasoner to choose to get instances and properties?

I want to use jena api to manipulate the ontology that I have. I want to get subclasses of a class, instances of a class and properties of instance. Data would look like below: gv:AInstance rdf:type ex:AClass; core:containsProperty…
xxxxx
  • 1,918
  • 2
  • 17
  • 22
1
vote
1 answer

Apache Jena RIOT Exception when loading external RDF or Turtle File

I am trying to load an external vocabulary (http://purl.org/eis/vocab/daq#) - this vocabulary has valid syntax and can be dereferenced and has both an RDF/XML and TURTLE serialisation - using the RDFDataMgr, however, I am getting a…
jerdeb
  • 115
  • 1
  • 6
1
vote
1 answer

Migrating code from Jena 2 to 3

Which class has replaced com.hp.hpl.jena.db.IDBConnection in Jena 3.x.x? I have tried to use org.apache.jena.db but it seems not to be there.
1 2
3
12 13