Individuals and properties created by OWL API 3 look different from the ones created in Protege 4.2

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

Individuals and properties created by OWL API 3 look different from the ones created in Protege 4.2

Andrew Ton

Hello,

I have used Protege to create individuals and properties and the output looks nice. For example

<owl:NamedIndividual rdf:about="&customer;John_Smith">
        <rdf:type rdf:resource="&customer;VIP"/>
        <rdfs:label xml:lang="en">John_Smith</rdfs:label>
        <first_name rdf:datatype="&xsd;string">John</first_name>
        <last_name rdf:datatype="&xsd;string">Ton</last_name>
        <dob rdf:datatype="&xsd;string">1980-09-12</dob>
        <has_phone rdf:datatype="&xsd;string">408-223-3434</has_phone>
        <has_email rdf:datatype="&xsd;string">[hidden email]</has_email>
</owl:NamedIndividual>


In my application, I have used OWL API 3.x.x to create individuals in the run-time with live data and the output looks different. For
example:

    <ClassAssertion>
        <Class IRI="VIP"/>
        <NamedIndividual IRI="John_Smith"/>
    </ClassAssertion>
    <DataPropertyAssertion>
        <DataProperty IRI="first_name"/>
        <NamedIndividual IRI="John_Smith"/>
        <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">John</Literal>
    </DataPropertyAssertion>
    <DataPropertyAssertion>
        <DataProperty IRI="last_name"/>
        <NamedIndividual IRI="John_Smith"/>
        <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">Smith</Literal>
    </DataPropertyAssertion>
    <DataPropertyAssertion>
        <DataProperty IRI="dob"/>
        <NamedIndividual IRI="John_Smith"/>
        <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">1980-09-12</Literal>
    </DataPropertyAssertion>
    <DataPropertyAssertion>
        <DataProperty IRI="has_phone"/>
        <NamedIndividual IRI="John_Smith"/>
        <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">408-223-3434</Literal>
    </DataPropertyAssertion>
    <DataPropertyAssertion>
        <DataProperty IRI="has_email"/>
        <NamedIndividual IRI="John_Smith"/>
        <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">[hidden email]</Literal>
    </DataPropertyAssertion>

I'm aware that Protege uses its own APIs but Is there any way to make OWL APIs generate ontology and individuals (with properties) that have the same structure as the ones in
Protege? 

With the structure of the individual above, can the individual be stored in the graph DB? if it can then its graph would be different from the graph of the individual created in Protege?

Thanks,


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

Re: Individuals and properties created by OWL API 3 look different from the ones created in Protege 4.2

Matthew Horridge-2
Administrator
Hi Andrew,

Protege 4 uses the OWL API under the hood.

In your application, it looks like you're saving the ontology as OWL/XML - you need to use RDF/XML instead.

Cheers,

Matthew


On 18 Sep 2012, at 15:11, Andrew Ton wrote:

>
> Hello,
>
> I have used Protege to create individuals and properties and the output looks nice. For example
>
> <owl:NamedIndividual rdf:about="&customer;John_Smith">
>         <rdf:type rdf:resource="&customer;VIP"/>
>         <rdfs:label xml:lang="en">John_Smith</rdfs:label>
>         <first_name rdf:datatype="&xsd;string">John</first_name>
>         <last_name rdf:datatype="&xsd;string">Ton</last_name>
>         <dob rdf:datatype="&xsd;string">1980-09-12</dob>
>         <has_phone rdf:datatype="&xsd;string">408-223-3434</has_phone>
>         <has_email rdf:datatype="&xsd;string">[hidden email]</has_email>
> </owl:NamedIndividual>
>
>
> In my application, I have used OWL API 3.x.x to create individuals in the run-time with live data and the output looks different. For
> example:
>
>     <ClassAssertion>
>         <Class IRI="VIP"/>
>         <NamedIndividual IRI="John_Smith"/>
>     </ClassAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="first_name"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">John</Literal>
>     </DataPropertyAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="last_name"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">Smith</Literal>
>     </DataPropertyAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="dob"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">1980-09-12</Literal>
>     </DataPropertyAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="has_phone"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">408-223-3434</Literal>
>     </DataPropertyAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="has_email"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">[hidden email]</Literal>
>     </DataPropertyAssertion>
>
> I'm aware that Protege uses its own APIs but Is there any way to make OWL APIs generate ontology and individuals (with properties) that have the same structure as the ones in
> Protege?
>
> With the structure of the individual above, can the individual be stored in the graph DB? if it can then its graph would be different from the graph of the individual created in Protege?
>
> Thanks,
>
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback

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

Re: Individuals and properties created by OWL API 3 look different from the ones created in Protege 4.2

Andrew Ton
Hi Matthew,

Thank you very much for the hint! After switching to RDF/XML everything looks consistent with
the ontology in Protege.

Cheers,
Andrew



On Tue, Sep 18, 2012 at 3:52 PM, Matthew Horridge <[hidden email]> wrote:
Hi Andrew,

Protege 4 uses the OWL API under the hood.

In your application, it looks like you're saving the ontology as OWL/XML - you need to use RDF/XML instead.

Cheers,

Matthew


On 18 Sep 2012, at 15:11, Andrew Ton wrote:

>
> Hello,
>
> I have used Protege to create individuals and properties and the output looks nice. For example
>
> <owl:NamedIndividual rdf:about="&customer;John_Smith">
>         <rdf:type rdf:resource="&customer;VIP"/>
>         <rdfs:label xml:lang="en">John_Smith</rdfs:label>
>         <first_name rdf:datatype="&xsd;string">John</first_name>
>         <last_name rdf:datatype="&xsd;string">Ton</last_name>
>         <dob rdf:datatype="&xsd;string">1980-09-12</dob>
>         <has_phone rdf:datatype="&xsd;string"><a href="tel:408-223-3434" value="+14082233434">408-223-3434</has_phone>
>         <has_email rdf:datatype="&xsd;string">[hidden email]</has_email>
> </owl:NamedIndividual>
>
>
> In my application, I have used OWL API 3.x.x to create individuals in the run-time with live data and the output looks different. For
> example:
>
>     <ClassAssertion>
>         <Class IRI="VIP"/>
>         <NamedIndividual IRI="John_Smith"/>
>     </ClassAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="first_name"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">John</Literal>
>     </DataPropertyAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="last_name"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">Smith</Literal>
>     </DataPropertyAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="dob"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">1980-09-12</Literal>
>     </DataPropertyAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="has_phone"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string"><a href="tel:408-223-3434" value="+14082233434">408-223-3434</Literal>
>     </DataPropertyAssertion>
>     <DataPropertyAssertion>
>         <DataProperty IRI="has_email"/>
>         <NamedIndividual IRI="John_Smith"/>
>         <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">[hidden email]</Literal>
>     </DataPropertyAssertion>
>
> I'm aware that Protege uses its own APIs but Is there any way to make OWL APIs generate ontology and individuals (with properties) that have the same structure as the ones in
> Protege?
>
> With the structure of the individual above, can the individual be stored in the graph DB? if it can then its graph would be different from the graph of the individual created in Protege?
>
> Thanks,
>
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback