Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
1 answer
292 views

Jena Model converts my RDF type explicit declaration to implicit and messes with the format

I have the following code that creates an RDF resource with some set properties and prints it on console. String uri = "http://krweb/"; String name = "Giorgos Georgiou"; String phone = "...
JimS's user avatar
  • 349
0 votes
1 answer
482 views

Printing Superclasses of Pizza ontology using OWL-API and Hermit

I try to print the Superclasses of standard Pizza ontology downloaded from here . I am using OWL API 3.4.3 and Hermit 1.3.8.1 (reasoner). The following code snippet is used to print the required ...
R_Bro's user avatar
  • 21
1 vote
1 answer
458 views

Develop a web application based on triplestore database

I've recently developed a "classic" 3-tier web applications using Java EE. I've used GlassFish as application server, MS SQL Server as DBMS and xhtml pages with primefaces components for the front end....
ronnie's user avatar
  • 81
0 votes
0 answers
303 views

Check class of a resource in Jena

To check if a resource is a class etc I can do like this: OntModel onto = onto.getOntology(); if (onto.getOntResource(s).isClass()) OntClass c = onto.getOntResource(s).asClass(); if (onto....
ruben's user avatar
  • 1,740
0 votes
0 answers
214 views

How to get an uri from a rdf file when inserting data with jena query?

I'm using jena to execute a sparql query for inserting data in a rdf file: String queryString = "PREFIX kb:<http://protege.stanford.edu/kb#> \n" + "PREFIX rdf: <http://www.w3.org/...
user1281678's user avatar
3 votes
1 answer
79 views

Reasoning doesn't give same results with *

I am enabling Forward chaining like this: static final String inputData = "http://cgi.di.uoa.gr/~pms509/past_projects/2014-2015/hw1/kallikratis.n3"; MemoryStore store = new MemoryStore(); Repository ...
gsamaras's user avatar
  • 73k
2 votes
1 answer
92 views

Find all classes, without reasoning

When I have Forward Chaining enabled, I would do: "...WHERE { ?class rdf:type rdfs:Class }" now, I want to do it without the reasoner, so I tried: "...WHERE { ?class rdf:type* rdfs:Class }" but ...
gsamaras's user avatar
  • 73k
2 votes
1 answer
102 views

How to get country of a municipality?

The ontology lies in XML here. I also tried to ask which are the classes of my world and then tried to check if my resource (the municipality) really belongs to that class, but still Country slips ...
gsamaras's user avatar
  • 73k
0 votes
2 answers
208 views

multiple users accessing RDF file for read and write

I am using an RDF file to store links (URLs) of online resources that are added by different users about various topics. I am using Jena API to read and write the RDF file, on Apache server. My ...
SotonJ's user avatar
  • 327
0 votes
1 answer
178 views

Jena RDFS reasoning not returning expected results

I have the following two triples: <http://example.com/a> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://example.com/b> . <http://example.com/b> <http://www.w3....
Valentino's user avatar
  • 162
7 votes
1 answer
4k views

How to exclude resources with a specific rdf:type from SPARQL results?

I have this query SPARQL that I ran on it.dbpedia.org/sparql: select ?resource where { ?resource rdfs:label "Piemonte"@it } I get this result: http://it.dbpedia.org/resource/Categoria:Piemonte ...
Musich87's user avatar
  • 572
1 vote
1 answer
2k views

Writing nested rdf:Description elements in RDF/XML with Jena

I would like to have a file like this: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://stackoverflow.com/q/24084473/1281433/" xmlns:rdfs="http://www.w3....
Musich87's user avatar
  • 572
0 votes
1 answer
489 views

Issues with xpath that contained namespaces in Java (Dom parser)

I'm trying to parse an rdfs xml file in order to find all the Classes in an rdfs file. The xpath: "/rdf:RDF/rdfs:Class" is working in my XML editor. When i insert the xpath in my Java program (i have ...
programmer's user avatar
  • 4,721
1 vote
1 answer
5k views

RDF/XML how to define RDFS classes,subclasses and link them as a type

How can we define classes and sub classes in Jena and add them as type of other resources after? I use Java,Jena and RDF/XML notation. I want to create something like: <rdfs:Class rdf:about="http:...
user2692669's user avatar
1 vote
1 answer
2k views

JENA RDF/XML format rdfs example

Can someone give me a working example (in Java code) of how to create a RDFS related statement like the following using Jena? <rdf:Property rdf:about="http://www.help.me/confused/PropertyName"> ...
user2692669's user avatar

15 30 50 per page