I'm practicing on Protégé with a small Ontology detailing the House of Noldor from Lord of the Ring. (Really, it's just a fancy family tree.) You can find it Here
Note: The class names are in italian, due to me having to present this to my university.
I'm pretty sure the Ontology is decently written, not the best thing around due to me being at my first attempt, and the Reasoner (HermiT 1.3.8.3) is giving me no errors.
Now I have been required to produce some SPARQL queries.
I have added the lines:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX genealogia <http://www.semanticweb.org/kayurin/ontologies/2015/1/casata_di_finwe#>
at the top of the SPARQL compiler tab and proceeded with the first query:
SELECT ?Individuo
{
?Individuo genealogia:haGenitore genealogia:Finwe
}
According to my sources, this was supposed to return me all the members in the class "Individuo" who had the property 'heGenitore Finwe'.
No result...
I tried then with
SELECT ?Individuo
{
?Individuo genealogia:haLegameFraterno genealogia:Caranthir
}
Again, it should have returned me all the members in the Class Individuo who had the property 'haLegameFraterno Caranthir'.
This was an incomplete success... It returned me almost all the members of the Class 'Individuo' which had the property 'haLegameFraterno' with Feanor but one. (The member known as Amrod.)
If I use it for another set of siblings (That's the meaning of the property.) it doesn't return me anything at all.
Pretty sure that the query are well written and the Ontology itself it's correct, or at least cannot see where I'm doing it wrong.
Thanks in advance for any help you'll give me to solve this mess...
EDIT
I managed to make things work, literally had to turn all the properties into asserted ones (By manual input.) because Protégé SPARQL query executor was taking into account only the inferred ones otherwise.
I have no access to other versions of the program (The older versions won't start on my windows 8.1.) but I wonder if this an issue of version, of the Reasonator or just something I did wrong with my Ontology.