All Questions
21
questions
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 = "...
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 ...
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....
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....
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/...
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 ...
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 ...
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 ...
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 ...
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....
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
...
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....
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 ...
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:...
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">
...