Hello Kenny

I'll try to show that your question can have different levels of answer
depending on interpretation, all of them based on SPARQL queries altogether.

As others have suggested, you can query the ontology level for properties of
which Company class is the domain, by submitting the following at
http://dbpedia.org/sparql

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?p
WHERE {?p  rdfs:domain <http://dbpedia.org/ontology/Company>}

This gets the following list of properties.

http://dbpedia.org/ontology/locationcity
http://dbpedia.org/ontology/assets
http://dbpedia.org/ontology/equity
http://dbpedia.org/ontology/industry
http://dbpedia.org/ontology/products
http://dbpedia.org/ontology/services
http://dbpedia.org/ontology/subsid
http://dbpedia.org/ontology/areaServed
http://dbpedia.org/ontology/divisions
http://dbpedia.org/ontology/footnotes
http://dbpedia.org/ontology/locationcountry
http://dbpedia.org/ontology/marketcap
http://dbpedia.org/ontology/netincome
http://dbpedia.org/ontology/operatingincome

This is pretty straightforward, but you get only properties directly and
exclusively attached to Company class through the rdfs:domain declaration.
Other properties might be inherited from Company superclasses, named or
constructed (such as unionOf classes) or locally attached to this class
using OWL restrictions. Not sure the latter happens in the dbpedia ontology,
but you can e.g. query for properties of which domain is a Company
superclass.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?p
WHERE { ?p  rdfs:domain ?x.
               <http://dbpedia.org/ontology/Company>  rdfs:subClassOf   ?x }

And you get a few more properties

http://dbpedia.org/ontology/foundationplace
http://dbpedia.org/ontology/keyPersonPosition
http://dbpedia.org/ontology/product
http://dbpedia.org/ontology/foundationdate
http://dbpedia.org/ontology/foundationorganisation
http://dbpedia.org/ontology/keyPerson
http://dbpedia.org/ontology/foundationperson
http://dbpedia.org/ontology/numberOfEmployees

But this is only the ontology level and one might wonder which of the above
are actually used in DBpedia *instances*.
To figure it out, just try the following ...

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?p
WHERE { ?x  a <http://dbpedia.org/ontology/Company>.
               ?x ?p ?y }

... and get the surprise to find out more than 1000 different properties
actually used to describe companies, meaning that, to paraphrase Hamlet,
there is more in heaven and earth instances than is dreamt of in the model
philosophy.
Why so? Some properties in this list such as "length" are indeed weird for a
company, so you might want to look for Companies having a length ...

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?x ?y
WHERE { ?x  a <http://dbpedia.org/ontology/Company>.
               ?x <http://dbpedia.org/ontology/length> ?y }

Among the list you find e.g., <
http://dbpedia.org/resource/Orion_International>.
And if you look at the description of that one, you find indeed that it has
a length, but also a width and a height.
Well, strange indeed, but looking further down the description you find the
following values for rdf:type

dbpedia-owl:MeanOfTransportation
dbpedia-owl:Company
dbpedia-owl:Resource
dbpedia-owl:Automobile
dbpedia-owl:Organisation

It figures. If you are both Company and Automobile, strange things are bound
to happen to you.

Hoping this little excursion will help you understand better, on one hand
the power of SPARQL, and on the other hand that DBpedia is far from being a
consistent set of data. In an open world, the question "What properties can
a Company have?" has no unique answer.

Bernard


2009/10/22 Jona Christopher Sahnwaldt <[email protected]>

> On Thu, Oct 22, 2009 at 16:23, Kenny Guan <[email protected]> wrote:
> > is there an already way to retrieve properties associated with an
> ontology
> > class in OWL file?
>
> None that I'm aware of. It's should be quite simple though with
> some XML parsing or XSLT code. First find the class and all its
> base classes, then find all DatatypeProperty and ObjectProperty
> elements that declare one of these classes as their domain.
>
> The current ontology file can be found here:
>
>
> https://dbpedia.svn.sourceforge.net/svnroot/dbpedia/ontology/dbpedia_3.3.owl
>
> Be aware that a new version is coming up:
>
>
> https://dbpedia.svn.sourceforge.net/svnroot/dbpedia/ontology/dbpedia_3.4.owl
>
>
> Christopher
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Dbpedia-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
>



-- 
Bernard Vatant
Senior Consultant
Vocabulary & Data Engineering
Tel:       +33 (0) 971 488 459
Mail:     [email protected]
----------------------------------------------------
Mondeca
3, cité Nollez 75018 Paris France
Web:    http://www.mondeca.com
Blog:    http://mondeca.wordpress.com
----------------------------------------------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to