Hello.
I have a setup where I have imported the foaf ontology in Protege, and I want to use concepts from foaf when creating mappings between my MySQL database and the foaf:Person concept. I'm pretty sure foaf is imported correctly, and I have defined the foaf prefix, but I'm not able to use it when creating mappings manually.
The mapping I try to make looks like this, but it is not accepted by Ontop.
<Person-{p_id}> a foaf:Person .
In particular, it does not recognize foaf:Person.
I have also tried the following mapping templates with no luck:
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<Person-{p_id}> a foaf:Person .and
However Ontop accepted my custom made class called Myperson, so the problem is indeed with the foaf Person class:
<Person-{p_id}> a :Myperson .
So is it something wrong with the mapping templates I have tried, or have I not been able to import the foaf ontology correctly? For more details, I have added screenshots, and more details below.
Best regards, Vidar Klungre
Detailed workflow:
0. Set up a MySQL database.
1. After importing the ontology into Protege (using Ontology imports), I got an error: "URI Scheme not file". This is obviously not good, but after pressing ok, everything looked fine. I also added an ontology prefix in the Active ontology tab.
Prefix: foaf
2. Checking the Class tab, and yes, all the foaf concepts are there, including the Person concept I want to use.
3. Go to the ontop mappings tab, and set up a data source.
4. ontop mappings tab -> mapping manager -> create new mapping. Setting SQL query to "select * from ex1", which returns my data. Good. I try to the following mapping templates:
<Person-{p_id}> a foaf:Person .
Result: Not accepted
Error message: "ERROR: The below list of predicates is unknown to the ontoogy: - nullPerson"
Comment: I expected this to work, given the fact that I have defined the foaf prefix in Protege.
Result: Not accepted
Comment: Testing if I added the prefix also inside the mapping template.
Result: Not accepted
Comment: Testing if it worked when writing the full path.
<Person-{p_id}> a :Myperson .
Result: Accepted.
Comment: This was to confirm that the object is the problem.