semantic web - How can I model a complex relation between two resources? -
consider having relation/predicate between 2 resources: <#a> <#isrelatedto> <#b>.
i want add properties <#isrelatedto> relation: relation strength, description, etc.
so model this:
- define instances of predicate , add properties instances similar described here
- use quad store have unique id triple , add properties triple (problem have use triple store because of database restriction)
- define class of relations (isrelatedtoclass) have <#from>, <#to>, <#relstrength>, <#description> properties. create instances of class represent relation , connect , b.
e.g.:
<#isrelatedtoinstance1> <rdf:type> <#isrelatedtoclass> <#isrelatedtoinstance1> <#isrelated/from> <#a> <#isrelatedtoinstance1> <#isrelated/to> <#b> <#isrelatedtoinstance1> <#isrelated/relstrength> "2" <#isrelatedtoinstance1> <#isrelated/description> "some desc"
4 . other implementations?
practical examples be:
- connecting cities/countries transportation system each transport property has it's own properties
- connecting people want "x knows(since 1955) y" or "x rated(5 stars) zproduct"
apart rdf reification has been mentioned in comments, following: each pairs (a,b)
in relationship wrt isrelatedto
, create subproperty isrelatedto_a_b
specify strength, description, etc.
<#a> <#isrelatedto_a_b> <#b> . <#isrelatedto_a_b> rdfs:subpropertyof <#isrelatedto>; <#relstrength> 2; <#description> "a in relation b"@en .
you restrict isrelatedto_a_b
hold pair (a,b)
, owl:
<#isrelatedto_a_b> rdfs:domain [ owl:class; owl:oneof ( <#a> ) ]; rdfs:range [ owl:class; owl:oneof ( <#b> ) ] .
with care, make valid owl dl ontology.
Comments
Post a Comment