Discussion:
Reusing FOAF Confusion
Patricia Foster
2012-07-03 18:25:51 UTC
Permalink
Hi,

I'm a beginner ontology builder & would like to re-use parts of FOAF for the small ontology that I am building (I am using Protege 3.48). For example, I wish to create sub-categories for Person, Organization, and Project but I do not want Document or many of the properties that come with it. However, I'm confused about the approach.

In the archives I found advice that says that unless you're creating an enterprise hierachy that it's best to reference the parts you want from the ontology you're interested in (http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/Ontology-integration-approaches-td14550.html) OK this sounds like what I want.

BUT, another item in the archive says that you must import FOAF so that the referencing will work (https://mailman.stanford.edu/pipermail/protege-owl/2009-April/010660.html ), importing works splendidly but I cannot delete the parts that I'm not interested in.

Referencing seems to be the way to go unless I want to use all of FOAF (which I don't).

Basically I want to be entering the xmlns:foaf into the header, and making sure that when I declare my new subclass that I ref back to the FOAF class?

xmlns:foaf="http://xmlns.com/foaf/0.1"

<owl:Class rdf:ID="VisualArtist">
<rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
</owl:Class>

Now for my rank amateur question (and because I don't see this feature in the pizza tutorial. I'm okay with handcoding, but I just am using the protege editor for the first time). How do I insert the reference xmlns:foaf="http://xmlns.com/foaf/0.1 into the header, and how do I create a subclass so that it appears in my asserted hierarchy, as per the code above in protege?

Thank you,
P.
Joshua TAYLOR
2012-07-03 19:21:35 UTC
Permalink
Post by Patricia Foster
In the archives I found advice that says that unless you're creating an
enterprise hierachy that it's best to reference the parts you want from the
ontology you're interested in
(http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/Ontology-integration-approaches-td14550.html)
OK this sounds like what I want.
BUT, another item in the archive says that you must import FOAF so that the
referencing will work
(https://mailman.stanford.edu/pipermail/protege-owl/2009-April/010660.html
), importing works splendidly but I cannot delete the parts that I'm not
interested in.
I think this is just making the point that if you don't do an import,
your reasoner won't know anything about the relationships between FOAF
classes and relations except for what you deliberately tell it.
You'll also probably need to re-declare some of the FOAF classes and
relations in your ontology as classes and relations which, again, is
fine.
Post by Patricia Foster
Basically I want to be entering the xmlns:foaf into the header, and making
sure that when I declare my new subclass that I ref back to the FOAF class?
xmlns:foaf="http://xmlns.com/foaf/0.1"
<owl:Class rdf:ID="VisualArtist">
<rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
</owl:Class>
You don't really need to be concerned about the header, just about the
IRIs of things in your ontology. But you can add prefixes under the
"Active Ontology" tab, then under the "Ontology Prefixes" tab.
Post by Patricia Foster
Now for my rank amateur question (and because I don't see this feature in
the pizza tutorial. I'm okay with handcoding, but I just am using the
protege editor for the first time). How do I insert the reference
xmlns:foaf="http://xmlns.com/foaf/0.1 into the header, and how do I create a
subclass so that it appears in my asserted hierarchy, as per the code above
in protege?
I mentioned above how to get it into the header. What you'd need to
do next is declare a class in your ontology with the IRI
"http://xmlns.com/foaf/0.1/Person". When you create the class, check
the "Ignore Entity Creation Preferences" checkbox and you can use
arbitrary IRIs. Now you can define equivalent classes, subclasses,
etc., as you see fit.

//JT
--
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
_______________________________________________
protege-owl mailing list
protege-***@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Patricia Foster
2012-07-15 07:35:16 UTC
Permalink
Hi Joshua

Thank you,
Your reply is in the direction I'm going although I'm a little confused as I am using Protege 3.48 and (I believe) you're using a 4.0 version so some of the terminologies (active tab/ontology prefixes tab), also the "Ignore Entity Creation Preferences" doesn't seem to be available in the version I am using. I was able to enter the foaf referral into the header as per below without an issue. I then added the person class using http://xmlns.com/foaf/0.1/Person as a subclass for owl:Thing and then used "refactor" to name it, but I end up with "="&foaf;Person" in the code and thereafter instead of the URI. (code snippet below). Is this an issue (somehow this just doesn't seem right? or is there something further I could be doing in Protege 3.48 or a work around? (p.s. this is for a self-guided
student project, we currently do not have anyone at my grad school who has used Protege before so I really thank you for your help)


<rdf:RDF xmlns="http://www.owl-ontologies.com/Ontology1342336482.owl#"
xml:base="http://www.owl-ontologies.com/Ontology1342336482.owl"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:swrl="http://www.w3.org/2003/11/swrl#"
xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<owl:Ontology rdf:about=""/>
<owl:Class rdf:about="&foaf;Person"/>
<owl:Class rdf:ID="Associate">
<rdfs:subClassOf rdf:resource="&foaf;Person"/>
</owl:Class>

Thank you,
Patricia

----- Original Message -----
From: Joshua TAYLOR <***@gmail.com>
Date: Tuesday, July 3, 2012 12:22 pm
Subject: Re: [protege-owl] Reusing FOAF Confusion
On Tue, Jul 3, 2012 at 2:25 PM, Patricia Foster
Post by Patricia Foster
In the archives I found advice that says that unless you're
creating an
Post by Patricia Foster
enterprise hierachy that it's best to reference the parts you
want from the
Post by Patricia Foster
ontology you're interested in
(http://protege-ontology-editor-knowledge-acquisition-
system.136.n4.nabble.com/Ontology-integration-approaches-td14550.html)
Post by Patricia Foster
OK this sounds like what I want.
BUT, another item in the archive says that you must import
FOAF so that the
Post by Patricia Foster
referencing will work
(https://mailman.stanford.edu/pipermail/protege-owl/2009-
April/010660.html> ), importing works splendidly but I cannot
delete the parts that I'm not
Post by Patricia Foster
interested in.
I think this is just making the point that if you don't do an import,
your reasoner won't know anything about the relationships
between FOAF
classes and relations except for what you deliberately tell it.
You'll also probably need to re-declare some of the FOAF classes and
relations in your ontology as classes and relations which,
again, is
fine.
Post by Patricia Foster
Basically I want to be entering the xmlns:foaf into the
header, and making
Post by Patricia Foster
sure that when I declare my new subclass that I ref back to
the FOAF class?
Post by Patricia Foster
xmlns:foaf="http://xmlns.com/foaf/0.1"
<owl:Class rdf:ID="VisualArtist">
<rdfs:subClassOf
rdf:resource="http://xmlns.com/foaf/0.1/Person"/>> </owl:Class>
You don't really need to be concerned about the header, just
about the
IRIs of things in your ontology. But you can add prefixes
under the
"Active Ontology" tab, then under the "Ontology Prefixes" tab.
Post by Patricia Foster
Now for my rank amateur question (and because I don't see this
feature in
Post by Patricia Foster
the pizza tutorial. I'm okay with handcoding, but I just am
using the
Post by Patricia Foster
protege editor for the first time). How do I insert the reference
xmlns:foaf="http://xmlns.com/foaf/0.1 into the header, and how
do I create a
Post by Patricia Foster
subclass so that it appears in my asserted hierarchy, as per
the code above
Post by Patricia Foster
in protege?
I mentioned above how to get it into the header. What
you'd need to
do next is declare a class in your ontology with the IRI
"http://xmlns.com/foaf/0.1/Person". When you create the
class, check
the "Ignore Entity Creation Preferences" checkbox and you can use
arbitrary IRIs. Now you can define equivalent classes,
subclasses,etc., as you see fit.
//JT
--
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
_______________________________________________
protege-owl mailing list
https://mailman.stanford.edu/mailman/listinfo/protege-owl
http://protege.stanford.edu/doc/faq.html#01a.03
Joshua TAYLOR
2012-07-16 00:49:01 UTC
Permalink
Post by Patricia Foster
Your reply is in the direction I'm going although I'm a little confused as I
am using Protege 3.48 and (I believe) you're using a 4.0 version so some of
the terminologies (active tab/ontology prefixes tab), also the "Ignore
Entity Creation Preferences" doesn't seem to be available in the version I
am using. I was able to enter the foaf referral into the header as per below
without an issue. I then added the person class using
http://xmlns.com/foaf/0.1/Person as a subclass for owl:Thing and then used
"refactor" to name it, but I end up with "="&foaf;Person" in the code and
thereafter instead of the URI. (code snippet below). Is this an issue
(somehow this just doesn't seem right? or is there something further I could
be doing in Protege 3.48 or a work around? (p.s. this is for a self-guided
student project, we currently do not have anyone at my grad school who has
used Protege before so I really thank you for your help)
<rdf:RDF xmlns="http://www.owl-ontologies.com/Ontology1342336482.owl#"
xml:base="http://www.owl-ontologies.com/Ontology1342336482.owl"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:swrl="http://www.w3.org/2003/11/swrl#"
xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<owl:Ontology rdf:about=""/>
<owl:Class rdf:about="&foaf;Person"/>
<owl:Class rdf:ID="Associate">
<rdfs:subClassOf rdf:resource="&foaf;Person"/>
</owl:Class>
Well, I don't have any official association with Protege, I'm just a
satisfied user who gets plenty of help on the list, so I try to help
when it's possible for me to do so. The "&foaf;Person" you see is
fine; it's just an XML entity that, I bet, is defined in the XML
header of the document. For instance, an ontology I just pulled up
from my local disk has this at the beginning of the RDF/XML file:

<?xml version="1.0"?>


<!DOCTYPE rdf:RDF [
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<rdf:RDF xmlns="<stuff specific to my ontology>"
xml:base="<stuff specific to my ontology>"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

The namespaces are useful when you're writing XML elements, e.g.,
<rdf:RDF ...> and <owl:Ontology ...>, but the entity declarations make
it easier to refer to certain strings within the document. It's just
like entities in (X)HTML where we can write &ndash; and &amp; for an
en-dash and an ampersand. foaf should be declared as an entity such
that "&foaf;Person" is the same as "http://xmlns.com/foaf/0.1/Person",
so it sounds like things are working correctly, at least as far as I
can see.

//JT
--
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
_______________________________________________
protege-owl mailing list
protege-***@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Thomas Schneider
2012-07-04 07:16:38 UTC
Permalink
Hi Patricia,

if you can give a criterion that distinguishes between the classes you want to borrow from FOAF and those you don't want, then you might want to consider extracting a module for the classes you need. Using a module notion with logical guarantees, such as locality-based modules, would ensure that all knowledge from FOAF about the imported classes is perserved in the module. Module extraction is implemented in the OWL API, a web-based module extractor, and a standalone GUI. More details can be found here: http://owl.cs.manchester.ac.uk/research/topics/modularity/

Cheers

Thomas
Post by Patricia Foster
Hi,
I'm a beginner ontology builder & would like to re-use parts of FOAF for the small ontology that I am building (I am using Protege 3.48). For example, I wish to create sub-categories for Person, Organization, and Project but I do not want Document or many of the properties that come with it. However, I'm confused about the approach.
In the archives I found advice that says that unless you're creating an enterprise hierachy that it's best to reference the parts you want from the ontology you're interested in (http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/Ontology-integration-approaches-td14550.html) OK this sounds like what I want.
BUT, another item in the archive says that you must import FOAF so that the referencing will work (https://mailman.stanford.edu/pipermail/protege-owl/2009-April/010660.html ), importing works splendidly but I cannot delete the parts that I'm not interested in.
Referencing seems to be the way to go unless I want to use all of FOAF (which I don't).
Basically I want to be entering the xmlns:foaf into the header, and making sure that when I declare my new subclass that I ref back to the FOAF class?
xmlns:foaf="http://xmlns.com/foaf/0.1"
<owl:Class rdf:ID="VisualArtist">
<rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
</owl:Class>
Now for my rank amateur question (and because I don't see this feature in the pizza tutorial. I'm okay with handcoding, but I just am using the protege editor for the first time). How do I insert the reference xmlns:foaf="http://xmlns.com/foaf/0.1 into the header, and how do I create a subclass so that it appears in my asserted hierarchy, as per the code above in protege?
Thank you,
P.
_______________________________________________
protege-owl mailing list
https://mailman.stanford.edu/mailman/listinfo/protege-owl
Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
----------------------------------------------------------------------
Dr. Thomas Schneider
Universität Bremen, FB 03
Postfach 330440
28334 Bremen
Germany
+49 421 218-64432
http://www.informatik.uni-bremen.de/~ts/
For visits: Cartesium, Room 2.56
----------------------------------------------------------------------

Falster (n.)
A long-winded, dishonest and completely incredible excuse used when the truth would have been completely acceptable.

Douglas Adams, John Lloyd: The Deeper Meaning of Liff

_______________________________________________
protege-owl mailing list
protege-***@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Loading...