rdf - What is the difference between DatatypeProperty, ObjectProperty, & FunctionalProperty, and when should I use them? -


when writing ontology, there several commonly used types, including:

  • datatypeproperty
  • objectproperty
  • functionalproperty
  • inversefunctionalproperty

the first 3 kinda they'd used in particular set of ways, find idea of them being challenged how i've seen them used in foaf.

when should each of them used or not used?

the first 2 of these, datatypeproperty , objectproperty, describe kind of values triple property should have. datatype properties relate individuals literal data (e.g., strings, numbers, datetypes, etc.) whereas object properties relate individuals other individuals. hasage typically datatype property, since age number, hasmother object property, since mother individual.

the last 2 of these, functionalproperty , inversefunctionalproperty, used put constraints on values of properties individuals. functional property means given individual can have @ 1 value it. logically, means if p functional property,

∀ x, y, z.( [p(x,y) ∧ p(x,z)] → y = z )

since owl not make unique name assumption, different iri can refer same individual, if hasmother functional property, can infer

:john :hasmother :margaret . :john :hasmother :peggy . 

that

:margaret owl:sameas :peggy 

of course, can used provide "negative inference," too. if know susan different person peggy, can infer susan not john's mother. i.e.,

:john :hasmother :peggy . :susan owl:differentfrom :peggy . 

that it's false that

:john :hasmother :susan . 

for datatype properties, works same way, there's more built in information literals different. e.g., reasoner should know "1"^^xsd:int different "2"^^xsd:int.

inverse functional properties similar, in reverse direction. if property p inverse functional property, given individual y, there should @ 1 x such p(x,y).

however, there slight caveat here. owl 2 dl supports inverse functional object properties, not inverse functional datatype properties. while can describe semantics inverse functional datatype property have ∀x,y,z ( [p(x,z) ∧ p(y,z)] → x = y), cannot have equivalence between conditions that

p inverse functional property

and

p-1 functional property

because datatype properties cannot have inverses. arises fact rdf (at least in current versions; i've heard there's talk of changing this, though don't know how whether change ripple out owl) not allow literal values subjects of triples. if datatype properties had inverses, have situation:

:hasname owl:inverseof :nameof . :john :hasname "john"@en . 

and we'd infer

"john"@en :nameof :john . # not legal. 

this means inverse functional property must object property.

(in owl full, reasoner use logical assertion , make appropriate inferences there, guess, based on logical representation. alternatively, reasoners, e.g., 's rule-based reasoners) remove "no literals allowed subjects" restriction internal representations, , filter results on way out make sure illegal-rdf doesn't escape.)

now, let's @ cases mentioned:

gender (functional , datatype)

this functional, because expect each individual have @ 1 value gender property. it's datatype property because designers of foaf expected values "male" or "female". if had defined symbolic constants, e.g., <http://.../male> , <http://.../female>, have been object property.

mbox (inverse functional , object)

mbox object property, presumably because values iris of form <mailto:someone@example.com>. it's inverse functional property because given mailbox, we'd expect @ 1 person have mailbox. (of course, people might share mailbox, isn't quite right time, oh well.) it's not functional property, though, because person can have multiple mailboxes.

mbox_sha1sum (inverse functional , datatype)

as recall, property relates indvidual sha1sum of mailbox. use of property means people don't have share real email address. it's inverse functional property same reason mbox is; expect each mbox_sha1sum belong @ 1 individual. similarly, it's not functional property, because person can have more 1 mailbox, , more 1 sha1sum.

this problematic case, because datatype property , inverse functional property, , shouldn't happen (as described above). however, owl full reasoner still might let infer if x , y both have same mbox1_shasum, x = y.

references

you can read formal definitions in owl 2 web ontology language direct semantics (second edition). you'd interested in 2.3.2 object property expression axioms , 2.3.3 data property expression axioms.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -