importing instances from a turtle file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

importing instances from a turtle file

Olivier Dameron
Dear protegeans,
   I have an ontology with two classes (od:ClassA and od:ClassB) and an
object property od:rel (domain=od:ClassA; range=od:ClassB)
   I have a separate turtle file like this:
a1 rdf:type od:ClassA .
b1 rdf:type od:ClassB .
a1 od:rel b1 .

   When I import the turtle file from my ontology, a1 and b1 correctly
appear as instances of od:ClassA and od:ClassB respectively, but the
"a1 od:rel b1" appears as an annotation property of a1, whereas I was
expecting an object property assertion.

Am I missing something and how should I modify my turtle file in order
to have an object property assertion?

thank you
kind regards
olivier
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: importing instances from a turtle file

Matthew Horridge-2
Administrator
Hi Olivier,

Is od:rel explicitly typed as an object property?  It sounds like it is, but I want to check.  

Your turtle file should import the ontology (that provides the type for the property).  Please can you confirm that this is the case?

Cheers,

Matthew


> On 10 Jan 2018, at 14:51, Olivier Dameron <[hidden email]> wrote:
>
> Dear protegeans,
>   I have an ontology with two classes (od:ClassA and od:ClassB) and an
> object property od:rel (domain=od:ClassA; range=od:ClassB)
>   I have a separate turtle file like this:
> a1 rdf:type od:ClassA .
> b1 rdf:type od:ClassB .
> a1 od:rel b1 .
>
>   When I import the turtle file from my ontology, a1 and b1 correctly
> appear as instances of od:ClassA and od:ClassB respectively, but the
> "a1 od:rel b1" appears as an annotation property of a1, whereas I was
> expecting an object property assertion.
>
> Am I missing something and how should I modify my turtle file in order
> to have an object property assertion?
>
> thank you
> kind regards
> olivier
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: importing instances from a turtle file

Olivier Dameron
Hello Matthew

On 01/10/2018 04:09 PM, Matthew Horridge wrote:
> Is od:rel explicitly typed as an object property?  It sounds like it is, but I want to check.

yes, in the ontology


>
> Your turtle file should import the ontology (that provides the type for the property).  Please can you confirm that this is the case?

ah ok.
When I start from the instance ttl file and then import the ontology
from it, rel is by default an annotation property (because before
loading the ontology there is no way to guess that it should be an
object property).

Then I saved the result ttl file, close Protege, edited the ttl file and
deleted the line making rel an annotation property. Then I opened the
instance file with Protege and all was fine.

My original mail was the other way around: import the instance file from
the ontology. In this case I expected Protege to know that rel is an
object property; I realise that if Protege processes the imported data
*before* the information from the ontology then all makes sense.

Thanks for the hint
olivier
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user