- From: Thomas Schneider <schneidt@cs.man.ac.uk>
- Date: Sun, 17 May 2009 10:44:15 +0200
- To: public-owl-dev@w3.org
Hi Ningfeng, On 17 May 2009, at 06:53, nfxu@yahoo.com wrote: > > I have read through the OWL 2 Primer, however, didn't get much out > of it. But I did make some progress. > > Frist of all, I tried using rdf:type to let my business multi- > classified, so the business FlowerBayResort can be Business, Resort, > WaterPark and Playground simultaneously. And this satisfies my > needs. But I doubt this is a good design practice. Here is how it > works in Protege 4: > > 1 Load the OWL document in Appendix 1 into Protege 4; At this time > the reasoner is off. > > 2 Under tab Classes, in the "Asserted class hierarchy", click > classes Thing/Site/SportsField, there is no members listed under any > of them. But FlowerBayResort is the member of Business/Resort/ > WaterPark/Playground. > > 3 Now click menu Reasoner then "Pellet 1.5" to enable the reasoner. > > 4 Under tab Classes, in the "Asserted class hierarchy", click > classes Thing/Site/SportsField, now the FlowerBayResort is listed as > a member under any of them. Same in "Inferred class hierarchy". First, the "Members" entry in the "Class Description" pane of Protégé 4 is independent of the asserted and inferred class hierarchy. If you click on a class in either hierarchy, the class description pane gives you all asserted and inferred axioms. Asserted axioms are statements that are made explicitly in your ontology, and inferred axioms are statements the reasoner has concluded. Please note the difference in their presentation: asserted axioms have a grey background and a solid border; inferred axioms have a greenish(?) background and a dashed border. The reason why FlowerBayResort is a member of almost all classes in your ontology is the following: it is an asserted member of Playground, which is a subclass of all classes except Stadium and WaterPark. Since it is also asserted to be a member of WaterPark, the only class it can't be inferred to be a member of is Stadium. Note that for this reason, the membership of FlowerBayResort for Business and Resort already follows from the class hierarchy and the other to membership assertions, and doesn't need to be asserted explicitly. > Back to my work on "ClassAssertion((Business and (hasSite some > Resort) and (hasSite some WaterPark)) myBusiness)", the closest I > can get is the OWL document in Appendix 2. I have declared the > Business as a subclass of <hasSite some Site>, but when I was > connecting the FlowerBayResort to Resort/WaterPark/Playground via > object property hasSite, I couldn't make it, since in the UI(Object > property assertions) only instances are listed as available options > for hasSite, classes Resort/WaterPark are not available at all. So I > am still stuck here. I'm not sure why you want to declare Business as a subclass of "hasSite some Site" because this is not what your class assertion axiom says.(?) Cheers Thomas > > > Anything wrong please correct me. Thanks for your help. > > = > = > = > = > = > = > ====================================================================== > Appendix 1 Start: OWL document using rdf:type > = > = > = > = > = > = > ====================================================================== > <?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 owl2xml "http://www.w3.org/2006/12/owl2-xml#" > > <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > > <!ENTITY p1 "http://www.owl-ontologies.com/assert.owl#" > > <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > > <!ENTITY Ontology1237653461 "http://www.owl-ontologies.com/Ontology1237653461.owl# > " > > ]> > > > <rdf:RDF xmlns="http://www.owl-ontologies.com/Ontology1237653461.owl#" > xml:base="http://www.owl-ontologies.com/Ontology1237653461.owl" > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" > xmlns:p1="http://www.owl-ontologies.com/assert.owl#" > xmlns:Ontology1237653461="http://www.owl-ontologies.com/Ontology1237653461.owl# > " > 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#"> > <owl:Ontology rdf:about=""/> > > > > <!-- > /////////////////////////////////////////////////////////////////////////////////////// > // > // Classes > // > /////////////////////////////////////////////////////////////////////////////////////// > --> > > > > > <!-- http://www.owl-ontologies.com/ > Ontology1237653461.owl#Business --> > > <owl:Class rdf:about="#Business"/> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#Playground > --> > > <owl:Class rdf:about="#Playground"> > <rdfs:subClassOf rdf:resource="#SportsField"/> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#Resort > --> > > <owl:Class rdf:about="#Resort"> > <rdfs:subClassOf rdf:resource="#Site"/> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#Site --> > > <owl:Class rdf:about="#Site"/> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#SportsField > --> > > <owl:Class rdf:about="#SportsField"> > <rdfs:subClassOf rdf:resource="#Site"/> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#Stadium > --> > > <owl:Class rdf:about="#Stadium"> > <rdfs:subClassOf rdf:resource="#SportsField"/> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/ > Ontology1237653461.owl#WaterPark --> > > <owl:Class rdf:about="#WaterPark"> > <rdfs:subClassOf rdf:resource="#Site"/> > </owl:Class> > > > > <!-- > /////////////////////////////////////////////////////////////////////////////////////// > // > // Individuals > // > /////////////////////////////////////////////////////////////////////////////////////// > --> > > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#FlowerBayResort > --> > > <Resort rdf:about="#FlowerBayResort"> > <rdf:type rdf:resource="#Business"/> > <rdf:type rdf:resource="#Playground"/> > <rdf:type rdf:resource="#WaterPark"/> > </Resort> > </rdf:RDF> > > > > <!-- Generated by the OWL API (version 2.2.1.1101) http://owlapi.sourceforge.net > --> > > > = > = > = > = > = > = > ====================================================================== > Appendix 1 End > = > = > = > = > = > = > ====================================================================== > > > > = > = > = > = > = > = > ====================================================================== > Appendix 2 Start: OWL document using existential quantification > = > = > = > = > = > = > ====================================================================== > <?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 owl2xml "http://www.w3.org/2006/12/owl2-xml#" > > <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > > <!ENTITY p1 "http://www.owl-ontologies.com/assert.owl#" > > <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > > <!ENTITY Ontology1237653461 "http://www.owl-ontologies.com/Ontology1237653461.owl# > " > > ]> > > > <rdf:RDF xmlns="http://www.owl-ontologies.com/Ontology1237653461.owl#" > xml:base="http://www.owl-ontologies.com/Ontology1237653461.owl" > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" > xmlns:p1="http://www.owl-ontologies.com/assert.owl#" > xmlns:Ontology1237653461="http://www.owl-ontologies.com/Ontology1237653461.owl# > " > 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#"> > <owl:Ontology rdf:about=""/> > > > > <!-- > /////////////////////////////////////////////////////////////////////////////////////// > // > // Object Properties > // > /////////////////////////////////////////////////////////////////////////////////////// > --> > > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#hasSite > --> > > <owl:ObjectProperty rdf:about="#hasSite"/> > > > > <!-- > /////////////////////////////////////////////////////////////////////////////////////// > // > // Classes > // > /////////////////////////////////////////////////////////////////////////////////////// > --> > > > > > <!-- http://www.owl-ontologies.com/ > Ontology1237653461.owl#Business --> > > <owl:Class rdf:about="#Business"> > <rdfs:subClassOf> > <owl:Restriction> > <owl:onProperty rdf:resource="#hasSite"/> > <owl:someValuesFrom rdf:resource="#Site"/> > </owl:Restriction> > </rdfs:subClassOf> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#Playground > --> > > <owl:Class rdf:about="#Playground"> > <rdfs:subClassOf rdf:resource="#SportsField"/> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#Resort > --> > > <owl:Class rdf:about="#Resort"> > <rdfs:subClassOf rdf:resource="#Site"/> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#Site --> > > <owl:Class rdf:about="#Site"/> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#SportsField > --> > > <owl:Class rdf:about="#SportsField"> > <rdfs:subClassOf rdf:resource="#Site"/> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#Stadium > --> > > <owl:Class rdf:about="#Stadium"> > <rdfs:subClassOf rdf:resource="#SportsField"/> > </owl:Class> > > > > <!-- http://www.owl-ontologies.com/ > Ontology1237653461.owl#WaterPark --> > > <owl:Class rdf:about="#WaterPark"> > <rdfs:subClassOf rdf:resource="#Site"/> > </owl:Class> > > > > <!-- > /////////////////////////////////////////////////////////////////////////////////////// > // > // Individuals > // > /////////////////////////////////////////////////////////////////////////////////////// > --> > > > > > <!-- http://www.owl-ontologies.com/Ontology1237653461.owl#FlowerBayResort > --> > > <Business rdf:about="#FlowerBayResort"/> > </rdf:RDF> > > > > <!-- Generated by the OWL API (version 2.2.1.1101) http://owlapi.sourceforge.net > --> > > > = > = > = > = > = > = > ====================================================================== > Appendix 2 End > = > = > = > = > = > = > ====================================================================== > > > > --- On Fri, 5/15/09, Xu, Ningfeng <nfxu@yahoo.com> wrote: > >> From: Xu, Ningfeng <nfxu@yahoo.com> >> Subject: Re: How to connect one individual to multiple classes >> To: "Uli Sattler" <sattler@cs.man.ac.uk> >> Cc: public-owl-dev@w3.org >> Date: Friday, May 15, 2009, 5:56 PM >> >> Ok, I will read the OWL 2 Primer, will see what I can get. >> >> Currently I am using Protege 3(thus OWL 1). >> >> Thanks a lot. >> >> Ningfeng >> >> >> --- On Fri, 5/15/09, Uli Sattler <sattler@cs.man.ac.uk> >> wrote: >> >>> From: Uli Sattler <sattler@cs.man.ac.uk> >>> Subject: Re: How to connect one individual to multiple >> classes >>> To: nfxu@yahoo.com >>> Date: Friday, May 15, 2009, 5:45 PM >>> >>> On 14 May 2009, at 21:12, nfxu@yahoo.com >>> wrote: >>> >>>> >>>> I haven't looked into OWL 2(Primer). So here I am >> with >>> OWL 1. >>>> >>> >>> ...don't bother whether it's "2" or "1" just read >> through >>> the primer: >>> it should clarify a lot of things. Also, what editor >> do you >>> use? I'd >>> recommend Protege 4. >>> >>> Cheers, Uli >>> >>>> Regarding "ClassAssertion((Business and (hasSite >> some >>> Resort) and >>>> (hasSite some Waterpark)) yourBusiness)", how can >> I >>> declare an >>>> individual business(waterParkResort)? I am trying >> to >>> do this: >>>> >>>> <owl:Class >>> rdf:about="#Business"> >>>> <rdfs:subClassOf> >>>> >>> <owl:Restriction> >>>> >>> <owl:someValuesFrom >>> rdf:resource="#Site"/> >>>> >>> <owl:onProperty> >>>> >>> <owl:ObjectProperty >>> rdf:ID="hasSite"/> >>>> >>> </owl:onProperty> >>>> >>> </owl:Restriction> >>>> </rdfs:subClassOf> >>>> ... >>>> </owl:Class> >>>> >>>> <Business >>> rdf:ID="waterParkResort"> >>>> ...hasSite Waterpark... >>> >>> ==> how to declare this? >>>> ...hasSite Resort... >>> >>> ==> how to declare this? >>>> </Business> >>>> >>>> I couldn't find appropriate OWL contructs to >> declare >>> that >>>> waterParkResort has both Resort and Waterpark >> when >>> declaring >>>> waterParkResort as an instance of class Business. >> I >>> think this is my >>>> problem. >>>> >>>> Thanks for your help. >>>> >>>> Ningfeng >>>> >>>> >>>> --- On Thu, 5/14/09, Uli Sattler <sattler@cs.man.ac.uk> >>> wrote: >>>> >>>>> From: Uli Sattler <sattler@cs.man.ac.uk> >>>>> Subject: Re: How to connect one individual >> to >>> multiple classes >>>>> To: "Xu, Ningfeng" <nfxu@yahoo.com> >>>>> Date: Thursday, May 14, 2009, 3:00 AM >>>>> >>>>> On 13 May 2009, at 19:33, Xu, Ningfeng >> wrote: >>>>> >>>>>> >>>>>> Uli, thanks for your reply. >>>>>> >>>>>> Originally, carrying the Object Oriented >>> Analysis >>>>> spirit, and being new to semantic world, I >> started >>> with: >>>>>> >>>>>> 1 Let the business >>>>> >>>>> so, this is 'yourBusiness', I guess. >>>>> >>>>>> be instance of an owl:Class Business; >>>>>> 2 The categories >>>>> >>>>> like restaurant, waterpark? Do they have a >> common >>>>> superclass, say, "Attraction"? >>>>> >>>>>> are classes, so it is easy to make a >> hierarchy >>> and all >>>>> siblings disjointed with each other; >>>>> >>>>> ok >>>>> >>>>>> >>>>>> 3 Class Business has one object >> property, >>> hasSite, >>>>> which has the category as the value. >>>>> >>>>> hm, how does this look like in OWL? >>>>> >>>>> SubClassOf(Business (hasSite some >> Attraction)) >>>>> >>>>> or >>>>> >>>>> SubClassOf(Business (hasSite only >> Attraction)) >>>>> >>>>> >>>>>> In case of multiple categories, one >> business >>> instance >>>>> has multiple hasSite properties. >>>>>> >>>>> >>>>> fine - as long as you don't declare hasSite >> to be >>>>> functional and as long as you don't use >> atmost >>> cardinality >>>>> restriction on hasSite, this is possible. >>>>> >>>>>> While, obviously, this ontology is OWL >> Full, >>> since >>>>> hasSite has owl:Class as its value. >>>>>> >>>>> >>>>> now you lost me...you can say that >>>>> >>>>> ClassAssertion((Business and (hasSite some >>> Restaurant) and >>>>> (hasSite some Waterpark) yourBusiness) >>>>> >>>>> without leaving OWL DL... >>>>> >>>>> >>>>> >>>>>> I haven't tried to convert categories >> from >>> owl:Class >>>>> to instance so hasSite is good for OWL DL. >> But how >>> much can >>>>> reasoner get out from property value? For >>> example: >>>>>> >>>>>> business1 hasSite Orchard >>>>>> business2 hasSite AgriculturalField >>>>>> >>>>>> If we want to list all businesses which >> is >>> under >>>>> AgriculturalField, can business1 and >> business2 >>> both be >>>>> returned? I don't know... >>>>>> >>>>> >>>>> yes, it would, if you would rephrase it in >> the >>> above style >>>>> using 'some'... >>>>> >>>>> Did you have a look at the OWL primer (http://www.w3.org/2007/OWL/wiki/Primer)? >>>>> Cheers, Uli >>>>>> >>>>>> Ningfeng >>>>>> >>>>>> >>>>>> --- On Wed, 5/13/09, Uli Sattler <sattler@cs.man.ac.uk> >>>>> wrote: >>>>>> >>>>>>> From: Uli Sattler <sattler@cs.man.ac.uk> >>>>>>> Subject: Re: How to connect one >> individual >>> to >>>>> multiple classes >>>>>>> To: "Xu, Ningfeng" <nfxu@yahoo.com> >>>>>>> Date: Wednesday, May 13, 2009, 11:01 >> PM >>>>>>> Hi Xu, I can't see where the problem >>>>>>> is: you can say that an individual is >> a >>> member of >>>>> more than >>>>>>> one class... >>>>>>> >>>>>>> Conceptually, you might want to >> *relate* >>> them: >>>>> instead of >>>>>>> saying "this business *is a* >> restaurant >>> and a >>>>> water park, >>>>>>> you might want to say that, among >> the >>>>> things/services it >>>>>>> *offers*, there is a restaurant and >> a >>> water park. >>>>>>> >>>>>>> >>>>>>> Cheers, Uli >>>>>>> >>>>>>> On 13 May 2009, at 13:09, Xu, >> Ningfeng >>> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> Recently I am trying to build an >> OWL >>> model >>>>> for >>>>>>> touring/entertainment related >> businesses. >>> I have >>>>> categorized >>>>>>> these businesses into one category >>> hierarchy like >>>>> the >>>>>>> following: >>>>>>>> >>>>>>>> Site(Root) >>>>>>>> +---WaterPark >>>>>>>> +---Resort >>>>>>>> ....... >>>>>>>> +---AgriculturalField >>>>>>>> +---Orchard >>>>>>>> +---CollectionExhibition >>>>>>>> >>> +---ExhibitionHall >>>>>>>> +---Memorial >>>>>>>> +---Museum >>>>>>>> +---SportsField >>>>>>>> +---Playground >>>>>>>> +---Stadium >>>>>>>> ....... >>>>>>>> >>>>>>>> The goal is, given any category >> in >>> the >>>>> hierarchy, we >>>>>>> can return all related businesses >> back. >>> For >>>>> example, given >>>>>>> "Museum" as the category, we are >> supposed >>> to >>>>> return all >>>>>>> museums; given >> "CollectionExhibition", >>> all >>>>> museums, >>>>>>> memorials and exbitionHalls are >> returned. >>>>>>>> >>>>>>>> One thing is one business might >> have >>> more than >>>>> one >>>>>>> services to offer. Here is an >> example: a >>> resort >>>>> has hotels, >>>>>>> bars and some other regular >> facilities, it >>> also >>>>> has one >>>>>>> indoor water park because of its hot >>> spring water >>>>> resource.. >>>>>>> So this resort should be categorized >> into >>> 2 >>>>> different >>>>>>> categories: "Resort" and >> "WaterPark". >>> Given either >>>>> "Resort" >>>>>>> or "WaterPark" is chosen as the >> category, >>> this >>>>> resort should >>>>>>> be returned as a match. >>>>>>>> >>>>>>>> The another one is that one >> business >>> may fall >>>>> into >>>>>>> non-leaf categories, like >>> "AgriculturalField" >>>>> instead of >>>>>>> "Orchard". >>>>>>>> >>>>>>>> Technically I would prefer: >>>>>>>> >>>>>>>> 1 Businesses are individuals of >> an >>> owl:Class. >>>>>>> Categories could be antything, if it >>> supports >>>>> reasoning. >>>>>>> This is different from the Protege >> Pizza >>> sample, >>>>> while pizza >>>>>>> are classes. >>>>>>>> >>>>>>>> 2 When adding new businesses, we >> only >>> need to >>>>> add new >>>>>>> business individual(maybe we need to >> add >>> more >>>>> categories), >>>>>>> and connect the new individuals to >> the >>>>> categories. >>>>>>>> >>>>>>>> I have been trying different >> ways, but >>> still >>>>> no >>>>>>> success. >>>>>>>> >>>>>>>> Any help would be highly >> appreciated. >>>>>>>> >>>>>>>> Ningfeng >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> >> >> >> > > > > > +----------------------------------------------------------------------+ | Dr Thomas Schneider schneider@cs.man.ac.uk | | School of Computer Science http://www.cs.man.ac.uk/~schneidt | | Kilburn Building, Room 2.114 phone +44 161 2756136 | | University of Manchester | | Oxford Road _///_ | | Manchester M13 9PL (o~o) | +-----------------------------------------------------oOOO--(_)--OOOo--+ Lampung (n.) The daze which follows turning on the light in the middle of the night. Douglas Adams, John Lloyd: The Deeper Meaning of Liff
Received on Sunday, 17 May 2009 08:44:55 UTC