
Index
IntroductionIn this topic a contribution is given to the discussion about how to represent ISO 15926-2 binary relationships in OWL and RDF. NOTE - In ISO 15926-2 a relationship is meant to be binary, and relations unary. The latter are called 'properties' in RDF. In ISO 15926-7 all subtypes of Relationship and of ClassOfRelationship are represented as members of owl:Class. This is necessary in order to allow for the full use of the ISO 15926-2 data model. That data model has:
This means that they cover 50% of the data model, and that a solution that limits their expressivity would have a devastating effect. What can you say about a relationship?Let us take an example of a relationship that everybody can relate to: a marriage relationship. There is information about a particular marriage that we may want to represent, such as:
It appears that not only the persons involved in the marriage are, in OWL terms, "individuals", but that there is also a pressing need to treat the marriage relationship as such an "individual", i.e. as a member of the Relationship class 'Marriage'. Representation in OWL and RDFThere is a difference between representing predefined subtypes of Relationship and "other relationships". Marriage is an example of the latter, simply because information about a marriage is not usually part of the lifecycle information of a refinery. The representation of a predefined relationship is simpler, so we start with that. Predefined relationship:IN OWL VERSION OF ISO 15926-2 (ISO standard, on the Internet):
<owl:Class rdf:ID="ClassOfConnectionOfIndividual"> <rdfs:subClassOf rdf:resource="#ClassOfRelationship"/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#classOfSide1"/> <owl:allValuesFrom rdf:resource="#ClassOfIndividual"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#classOfSide2"/> <owl:allValuesFrom rdf:resource="#ClassOfIndividual"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> <owl:Class rdf:ID="ClassOfDirectConnection"> <rdfs:subClassOf rdf:resource="#ClassOfConnectionOfIndividual"/> </owl:Class>
IN ISO 15926-4 REFERENCE DATA (ISO standard, on the Internet):
<part2:ClassOfInanimatePhysicalObject rdf:ID="R262439"> <rdfs:subClassOf rdf:resource="#R13307654"/> <!--flange--> <rdfs:label xml:lang="en">Flange 300lbs RF</rdfs:label> <part2:definition xml:lang="en"> A flange with a raised face and 300lbs rating, defined in ASME B16.47. </part2:definition> </part2:ClassOfInanimatePhysicalObject> <part2:ClassOfDirectConnection rdf:ID="R3409021"> <rdfs:subClassOf rdf:resource="http://dm.rdlfacade.org/data#DirectConnection"/> <rdfs:label xml:lang="en">Direct connection using ASME B16.47 300lbs RF flanges</rdfs:label> <part2:definition xml:lang="en"> A direct connection using ASME B16.47 300lbs raised face flanges. </part2:definition> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="http://dm.rdlfacade.org/data#side1"/> <owl:allValuesFrom rdf:resource="#R262439"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="http://dm.rdlfacade.org/data#side2"/> <owl:allValuesFrom rdf:resource="#R262439"/> </owl:Restriction> </rdfs:subClassOf> </part2:ClassOfDirectConnection>
IN PLANT LIFECYCLE DATA: (please keep in mind that this is a "longhand" representation, normally hidden behind a shorthand template)
<part2:DirectConnection rdf:ID="LT-562123.2"> <rdf:type rdf:resource="http://rdl.rdlfacade.org/data#R3409021"/> <part2:side1 rdf:resource="#PHO-598398-20071214T1423Z"/> <!--temporal part of pump PHO-598398 being connected--> <part2:side2 rdf:resource="#PHO-439349-20071214T1423Z"/> <!--temporal part of pipe PHO-439349 being connected--> </part2:DirectConnection> NOTE 1 - The declarations of these temporal parts are not shown here. NOTE 2 - If we want to test the above connection we refer to the ID 'LT-562123.2', not to the individual connected objects.
"Other" relationship:Our Marriage relationship class and its subclasses are subclasses of "OtherRelationship". In ISO 15926-4 this takes some extra work, but then it can be used by everybody. That extra work is shown below: IN OWL VERSION OF ISO 15926-2 (ISO standard, on the Internet):
<owl:Class rdf:ID="ClassOfRelationshipWithSignature"> <rdfs:subClassOf rdf:resource="#ClassOfRelationship"/> <rdfs:subClassOf rdf:resource="#Relationship"/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#classOfEnd1"/> <owl:allValuesFrom rdf:resource="#RoleAndDomain"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#classOfEnd2"/> <owl:allValuesFrom rdf:resource="#RoleAndDomain"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> <owl:Class rdf:ID="OtherRelationship"> <rdfs:subClassOf rdf:resource="#Relationship"/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#end1"/> <owl:allValuesFrom rdf:resource="#Thing"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#end2"/> <owl:allValuesFrom rdf:resource="#Thing"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class>
IN ISO 15926-4 REFERENCE DATA (ISO standard, on the Internet):
Roles
<part2:Role rdf:ID="MarriagePartner"/> <part2:Role rdf:ID="Husband"> <rdfs:subClassOf rdf:resource="#MarriagePartner"/> </part2:Role> <part2:Role rdf:ID="Wife"> <rdfs:subClassOf rdf:resource="#MarriagePartner"/> </part2:Role>
Properties
NOTE - Using human-understandable property names, rather than the ones from the data model, may be done in OWL, not in EXPRESS.
<owl:ObjectProperty rdf:ID="marriagePartner1"> <rdfs:subPropertyOf rdf:resource="http://dm.rdlfacade.org/data#end1"/> </owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="marriagePartner2"> <rdfs:subPropertyOf rdf:resource="http://dm.rdlfacade.org/data#end2"/> </owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="husband"> <rdfs:subPropertyOf rdf:resource="#marriagePartner1"/> </owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="wife"> <rdfs:subPropertyOf rdf:resource="#marriagePartner2"/> </owl:ObjectProperty>
Person classes
<part2:ClassOfPerson rdf:ID="Person"/> <part2:ClassOfPerson rdf:ID="MalePerson"> <rdfs:subClassOf rdf:resource="#Person"/> </part2:ClassOfPerson> <part2:ClassOfPerson rdf:ID="FemalePerson"> <rdfs:subClassOf rdf:resource="#Person"/> </part2:ClassOfPerson>
Roles and Domains
<part2:RoleAndDomain rdf:ID="MarriagePartnerAndPerson"> <!--normally gets an R-number--> <rdfs:subClassOf rdf:resource="#MarriagePartner"/> <rdfs:subClassOf rdf:resource="#Person"/> <rdfs:label xml:lang="en">MarriagePartnerAndPerson</rdfs:label> <part2:definition xml:lang="en">A person in the role of marriage partner.</part2:definition> </part2:RoleAndDomain> <part2:RoleAndDomain rdf:ID="HusbandAndMalePerson"> <!--normally gets an R-number--> <rdfs:subClassOf rdf:resource="#Husband"/> <rdfs:subClassOf rdf:resource="#MalePerson"/> <rdfs:label xml:lang="en">HusbandAndMalePerson</rdfs:label> <part2:definition xml:lang="en">A male person in the role of husband.</part2:definition> </part2:RoleAndDomain> <part2:RoleAndDomain rdf:ID="WifeAndFemalePerson"> <!--normally gets an R-number--> <rdfs:subClassOf rdf:resource="#Wife"/> <rdfs:subClassOf rdf:resource="#FemalePerson"/> <rdfs:label xml:lang="en">WifeAndFemalePerson</rdfs:label> <part2:definition xml:lang="en">A female person in the role of wife.</part2:definition> </part2:RoleAndDomain>
Relationship classes
<part2:ClassOfRelationshipWithSignature rdf:ID="Marriage"> <rdfs:subClassOf rdf:resource="http://dm.rdlfacade.org/data#OtherRelationship"/> <rdfs:label xml:lang="en">Marriage</rdfs:label> <part2:definition xml:lang="en"> An interpersonal relationship with governmental, social, or religious recognition, usually intimate and sexual, and often created as a contract. </part2:definition> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="http://dm.rdlfacade.org/data#end1"/> <owl:allValuesFrom rdf:resource="#MarriagePartnerAndPerson"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="http://dm.rdlfacade.org/data#end2"/> <owl:allValuesFrom rdf:resource="#MarriagePartnerAndPerson"/> </owl:Restriction> </rdfs:subClassOf> </part2:ClassOfRelationshipWithSignature> <part2:ClassOfRelationshipWithSignature rdf:ID="HeterosexualMarriage"> <rdfs:subClassOf rdf:resource="#Marriage"/> <rdfs:label xml:lang="en">HeterosexualMarriage</rdfs:label> <part2:definition xml:lang="en">A marriage between a man and a woman.</part2:definition> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#husband"/> <owl:allValuesFrom rdf:resource="#HusbandAndMalePerson"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#wife"/> <owl:allValuesFrom rdf:resource="#WifeAndFemalePerson"/> </owl:Restriction> </rdfs:subClassOf> </part2:ClassOfRelationshipWithSignature>
IN PERSONAL LIFECYCLE DATA: (please keep in mind that the listings below are "longhand" representations, normally hidden behind a shorthand template)
<part2:OtherRelationship rdf:ID="LT-439892.1"> <rdf:type rdf:resource="http://rdl.rdlfacade.org/data#HeterosexualMarriage"/> <rdfs:label xml:lang="en">Marriage relationship between John Doe and Jane Smith.</rdfs:label> <husband rdf:resource="#PHO-324992-20071214T1424Z"/> <!--temporal part of person PHO-324992 being married--> <wife rdf:resource="#PHO-324093-20071214T1424Z"/> <!--temporal part of person PHO-324093 being married--> </part2:OtherRelationship> NOTE - From the above one can infer that, provided that this instance of OtherRelationship is correct, PHO-324992-20071214T1424Z is an instance of MalePerson in the role of husband, and that PHO-324093-20071214T1424Z is an instance of FemalePerson in the role of wife in this heterosexual marriage. These are temporal parts of John and Jane, that started their existence on Dec. 14th 2007 at 2:24pm (declarations not shown here). Now, if we would like to put on record that Pete Smith, the father or Jane, approved this marriage, we can represent this as follows: <part2:Approval rdf:ID="LT-439892.2"> <part2:approved rdf:resource="#LT-439892.1"/> <!--the above marriage relationship--> <part2:approver rdf:resource="#PHO-439348-20071102T1835Z"/> <!--temporal part of Pete Smith--> </part2:Approval>
Predefined relationships - derived from OtherRelationshipThe predefined relationships of ISO 15926-2 can also be derived from the entity type OtherRelationship. This can be done as follows: Analysis
Derivation of the ISO 15926-2 predefined CompositionOfIndividual relationship (for legend click here) Roles
<part2:Role rdf:ID="Part"/> <part2:Role rdf:ID="Whole"/>
Properties
<owl:ObjectProperty rdf:ID="part"> <rdfs:subPropertyOf rdf:resource="http://dm.rdlfacade.org/data#end1"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="whole"> <rdfs:subPropertyOf rdf:resource="http://dm.rdlfacade.org/data#end2"/> </owl:ObjectProperty>
Roles and Domains
<part2:RoleAndDomain rdf:ID="PartAndPossibleIndividual"> <!--normally gets an R-number--> <rdfs:subClassOf rdf:resource="#Part"/> <rdfs:subClassOf rdf:resource="http://dm.rdlfacade.org/data#PossibleIndividual"/> <rdfs:label xml:lang="en">PartAndPossibleIndividual</rdfs:label> <part2:definition xml:lang="en"> A possible individual in the role of part of a composition. </part2:definition> </part2:RoleAndDomain> <part2:RoleAndDomain rdf:ID="WholeAndPossibleIndividual"> <!--normally gets an R-number--> <rdfs:subClassOf rdf:resource="#Whole"/> <rdfs:subClassOf rdf:resource="http://dm.rdlfacade.org/data#PossibleIndividual"/> <rdfs:label xml:lang="en">WholeAndPossibleIndividual</rdfs:label> <part2:definition xml:lang="en"> A possible individual in the role of whole of a composition. </part2:definition> </part2:RoleAndDomain>
Relationship class
<part2:ClassOfRelationshipWithSignature rdf:ID="CompositionOfIndividual"> <rdfs:subClassOf rdf:resource="http://dm.rdlfacade.org/data#OtherRelationship"/> <rdfs:label xml:lang="en">composition of individual</rdfs:label> <part2:definition xml:lang="en"> A Relationship that indicates that the part PossibleIndividual is a part of the whole PossibleIndividual. </part2:definition> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#part"/> <owl:allValuesFrom rdf:resource="#PartAndPossibleIndividual"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#whole"/> <owl:allValuesFrom rdf:resource="#WholeAndPossibleIndividual"/> </owl:Restriction> </rdfs:subClassOf> </part2:ClassOfRelationshipWithSignature>
Asymmetric relationshipsAsymmetric relationships have a class at one end and a possible individual at the other end. For example the relationship: Ford Motor Company manufactures Ford Mustangs (so cars of that type, not a particular car). For this purpose the entity type ClassOfRelationshipWithRelatedEnd1 or -2 shall be used. We can extend our Marriage example by representing the (granted, somewhat farfetched) information that whenever John Doe would marry, it shall be with a woman. In OWL this is represented as follows: <part2:ClassOfRelationshipWithRelatedEnd1 rdf:ID="JohnDoe-sMarriages"> <rdfs:subClassOf rdf:resource="http://rdl.rdlfacade.org/data#HetrosexualMarriage"/> <rdfs:label xml:lang="en">JohnDoe'sMarriage</rdfs:label> <part2:definition xml:lang="en">A marriage relationship between John Doe and a woman.</part2:definition> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="http://dm.rdlfacade.org/data#related"/> <owl:hasValue rdf:resource="#PHO-324992"/> <!--whole-life John Doe--> </owl:Restriction> </rdfs:subClassOf> </part2:ClassOfRelationshipWithRelatedEnd1> NOTE - The two other Restrictions are inherited from the superclass http://rdl.rdlfacade.org/data#HetrosexualMarriage. If John Doe had been declared to be a member of FemalePerson, the validator would protest. IN PERSONAL LIFECYCLE DATA: <part2:OtherRelationship rdf:ID="LT-439892.1"> <rdf:type rdf:resource="http://www.xyz.com/refdata#JohnDoe-sMarriages"/> <!--normally an alphanumerical identifier will be used--> <rdfs:label xml:lang="en">Marriage relationship between John Doe and Jane Smith.</rdfs:label> <husband rdf:resource="#PHO-324992-20071214T1424Z"/> <!--temporal part of person PHO-324992 being married--> <wife rdf:resource="#PHO-324093-20071214T1424Z"/> <!--temporal part of person PHO-324093 being married--> <part2:related rdf:resource="#PHO-324992"/> <!--whole-life John Doe--> </part2:OtherRelationship> Again, it is a bit far-fetched :-), but it shows the systematics.
Type of relationshipIn OWL we know nine subclasses of rdf:Property: In all cases where ISO 15926 uses a Relationship class instead of an rdf:Property this way of typing properties is not possible. Instead ISO 15926-2 classifies the relationship with a member of ClassOfClassOfRelationship. These are defined in the ISO 15926-4 reference data. You may see something like: <owl:Class rdf:ID="TransitiveRelationship"> <rdfs:subClassOf rdf:resource="#ClassOfRelationship"/> </owl:Class> NOTE - The above entity type is mimicked to be in Part 2; it may be proposed to become that. <owl:Class rdf:ID="CompositionOfIndividual"> <rdf:type rdf:resource="#TransitiveRelationship"/> <rdfs:subClassOf rdf:resource="#Relationship"/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#part"/> <owl:allValuesFrom rdf:resource="#PossibleIndividual"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#whole"/> <owl:allValuesFrom rdf:resource="#PossibleIndividual"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> NOTE - This typing pushes the data model out of OWL-DL. This subject still requires discussion. Date and time of validity of a relationshipBy now you may have noted that the time aspect hasn't been attributed to the relationship, but to temporal parts of the parties involved. This does not apply to instances of ClassOfRelationship and its subtypes, because an ISO15926 axiom is that all classes exist since the Big Bang, and merely have to be discovered. So, when we represent the beginning of the marriage relationship between John Doe and Jane Smith: <part2:OtherRelationship rdf:ID="LT-439892.1"> <rdf:type rdf:resource="http://rdl.rdlfacade.org/data#HeterosexualMarriage"/> <rdfs:label xml:lang="en">Marriage relationship between John Doe and Jane Smith.</rdfs:label> <husband rdf:resource="#PHO-324992-20071214T1424Z"/> <!--temporal part of person PHO-324992 being married--> <wife rdf:resource="#PHO-324093-20071214T1424Z"/> <!--temporal part of person PHO-324093 being married--> </part2:OtherRelationship> we define initially (only shown for John Doe): <part2:TemporalWholePart rdf:ID="LT-439892.1"> <part2:part rdf:resource="#PHO-324992"/> <!--temporal whole of person PHO-324992--> <part2:whole rdf:resource="PHO-324992-20071214T1424Z"/> <!--temporal part of person PHO-324992 being married--> </part2:TemporalWholePart> <part2:PhysicalObject rdf:ID="PHO-324992-20071214T1424Z"/> <!--temporal part of person PHO-324992 being married--> <part2:Beginning rdf:ID="LT-509020.1"> <part2:part rdf:resource="#XSDT_20071214T1424Z"/> <!--date-time of marriage--> <part2:whole rdf:resource="#PHO-324992-20071214T1424Z"/> <!--temporal part of person PHO-324992 being married--> </part2:Beginning> and in the unfortunate case of a divorce we terminate the temporal parts like: <part2:Ending rdf:ID="LT-340905.1"> <part2:part rdf:resource="#XSDT_20361014T1000Z"/> <!--date-time of divorce--> <part2:whole rdf:resource="#PHO-324992-20071214T1424Z"/> <!--temporal part of person PHO-324992 being divorced--> </part2:Ending> Shorthand TemplatesShorthand Templates have no binary relationships, other than indirectly in the defining Longhand Template. These LTs collect a number of relationships to jointly represent a small chunk of information.
|