Published on

A number of proposals have been made for Topic Maps/OWL interoperability, but this is really looking for interoperability on the wrong level. This paper instead looks at interoperability between OWL and TMCL, and shows how it is possible to convert OWL ontologies into TMCL schemas and vice versa, once a mapping for the vocabulary is available.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. TMCL and OWL Lars Marius Garshol <> 2008-10-17 TMRA 2008
  2. 2. RDF/TM interoperability today <ul><li>Instance data can be converted back and forth </li></ul><ul><ul><li>effectively allows RDF vocabularies to be used in TMs, and vice versa </li></ul></ul><ul><li>Schemas, however, cannot be converted </li></ul><ul><ul><li>must be converted manually </li></ul></ul><ul><ul><li>to do this, detailed knowledge of RDFS, OWL, and TMCL is needed </li></ul></ul><ul><ul><li>awkward and error-prone </li></ul></ul><ul><li>Schemas are needed for </li></ul><ul><ul><li>documentation, </li></ul></ul><ul><ul><li>schema-driven editors, </li></ul></ul><ul><ul><li>validation, </li></ul></ul><ul><ul><li>reasoning, </li></ul></ul><ul><ul><li>etc </li></ul></ul>?
  3. 3. Comparing TMCL with RDFS&OWL <ul><li>Similarities </li></ul><ul><ul><li>describe correct use of vocabularies </li></ul></ul><ul><ul><li>vocabularies, not separate languages </li></ul></ul><ul><li>Differences </li></ul><ul><ul><li>obviously based on different technologies (TM vs RDF) </li></ul></ul><ul><ul><li>TMCL intended for individual projects, RDFS/OWL for open semantic web </li></ul></ul><ul><ul><li>TMCL has validation semantics, while RDFS/OWL have reasoning semantics </li></ul></ul>
  4. 4. Validation Rule: Every dc:creator must be a person dc:creator person tm:type-instance dc:creator sheep tm:type-instance
  5. 5. Reasoning Rule: Every dc:creator must be a person dc:creator person rdf:type dc:creator sheep rdf:type rdf:type owl:disjointWith
  6. 6. RDFS and OWL <ul><li>Divided into four layers extending each other </li></ul><ul><li>Basic RDFS features: </li></ul><ul><ul><li>rdfs:Class - declares a class </li></ul></ul><ul><ul><li>rdfs:Property - declares a property </li></ul></ul><ul><ul><li>rdfs:domain - restricts type of subject </li></ul></ul><ul><ul><li>rdfs:range - restricts type of object </li></ul></ul><ul><li>Example: </li></ul><ul><ul><li>person rdf:type rdfs:Class . </li></ul></ul><ul><ul><li>resource rdf:type rdfs:Class . </li></ul></ul><ul><ul><li>dc:creator rdf:type rdfs:Property . </li></ul></ul><ul><ul><li>dc:creator rdfs:domain resource . </li></ul></ul><ul><ul><li>dc:creator rdfs:range person . </li></ul></ul>OWL Full OWL DL RDFS OWL Lite
  7. 7. TMCL <ul><li>Two parts: </li></ul><ul><ul><li>declarative constraints </li></ul></ul><ul><ul><li>TMQL-based constraints </li></ul></ul><ul><li>In addition: </li></ul><ul><ul><li>CTM templates for ease of authoring </li></ul></ul><ul><li>Basic features much as in RDFS </li></ul><ul><ul><li>tmcl:topictype </li></ul></ul><ul><ul><li>tmcl:nametype </li></ul></ul><ul><ul><li>tmcl:occurrencetype </li></ul></ul><ul><ul><li>tmcl:associationtype </li></ul></ul><ul><ul><li>tmcl:roletype </li></ul></ul><ul><li>c isa tmcl:roleplayer-constraint; </li></ul><ul><li>tmcl:card-min: 0 ; </li></ul><ul><li>tmcl:card-max: 1 . </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : c, tmcl:assoctype-role : dc:creator ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : c, tmcl:roletype-role : dcc:resource ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : c, tmcl:topictype-role : resource ) </li></ul>
  8. 8. Conversion principles <ul><li>Follow instance data conversion </li></ul><ul><ul><li>that is, source data valid against source schema should produce valid data against translated schema </li></ul></ul><ul><ul><li>means schema conversion is based on RTM/TMR mappings </li></ul></ul><ul><li>Translate intent </li></ul><ul><ul><li>on the level of: “every dc:creator must be a person” </li></ul></ul><ul><ul><li>ignore the reasoning/validation issue </li></ul></ul><ul><li>Aim for introspectable schemas </li></ul><ul><ul><li>be reasoning-friendly in RDF where possible (e.g. avoid OWL Full) </li></ul></ul><ul><ul><li>prefer TMCL Core over TMCL Query </li></ul></ul>
  9. 9. What the conversion does <ul><li>We can convert quite a lot of RDFS/OWL to TMCL </li></ul><ul><ul><li>if we restrict ourselves to TMCL Core then we can convert much less </li></ul></ul><ul><li>Reverse conversion is similar </li></ul><ul><ul><li>however, some features of TMCL are hard to reproduce in RDFS/OWL </li></ul></ul>OWL Full OWL DL RDFS OWL Lite TMCL Query TMCL Core
  10. 10. RDF-to-TM basics <ul><li>Any rdf:Class becomes a tmcl:topictype </li></ul><ul><ul><li>same for owl:Class, obviously </li></ul></ul><ul><li>Any rdf:Property becomes a statement type </li></ul><ul><ul><li>the question is: which? </li></ul></ul><ul><ul><li>the RTM mapping answers this for us </li></ul></ul><ul><li>Any rdf:domain statement becomes a constraint </li></ul><ul><ul><li>which type of constraint depends on the RTM mapping </li></ul></ul><ul><li>Any rdf:range statement becomes a constraint </li></ul><ul><ul><li>for name types: an error </li></ul></ul><ul><ul><li>for occurrence types: a datatype constraint </li></ul></ul><ul><ul><li>for association types: as for domain </li></ul></ul>
  11. 11. Name type mapping <ul><li>x rdf:domain y </li></ul><ul><li>x rtm:maps-to rtm:basename </li></ul><ul><li>x isa tmcl:nametype . </li></ul><ul><li>?c isa tmcl:topicname-constraint . </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:topictype-role : y ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:nametype-role : x ) </li></ul>What kind of constraint to map to?
  12. 12. Occurrence type mapping <ul><li>x rdfs:domain y </li></ul><ul><li>x rtm:maps-to rtm:occurrence </li></ul><ul><li>x isa tmcl:occurrencetype . </li></ul><ul><li>?c isa tmcl:topicoccurrence-constraint . </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:topictype-role : y ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:occurrencetype-role : x ) </li></ul>
  13. 13. Occurrence type (2) <ul><li>x rdfs:range z </li></ul><ul><li>x rtm:maps-to rtm:occurrence </li></ul><ul><li>?c isa tmcl:occurrencedatatype-constraint </li></ul><ul><li>tmcl:datatype: z . </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:occurrencetype-role : x ) </li></ul>
  14. 14. Association type mapping <ul><li>x rdfs:domain y </li></ul><ul><li>x rtm:maps-to rtm:association </li></ul><ul><li>x rtm:subject-role s </li></ul><ul><li>x isa tmcl:associationtype . </li></ul><ul><li>s isa tmcl:roletype . </li></ul><ul><li>?c isa tmcl:associationrole-constraint </li></ul><ul><li>tmcl:card-min: 1 </li></ul><ul><li>tmcl:card-max: 1 . </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:assoctype-role : x ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:roletype-role : s ) </li></ul><ul><li>?c2 isa tmcl:roleplayer-constraint . </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c2, tmcl:assoctype-role : x ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c2, tmcl:assoctype-role : s ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c2, tmcl:assoctype-role : y ) </li></ul>
  15. 15. Association type mapping (2) <ul><li>x rdfs:range z </li></ul><ul><li>x rtm:maps-to rtm:association </li></ul><ul><li>x rtm:object-role o </li></ul><ul><li>x isa tmcl:associationtype . </li></ul><ul><li>o isa tmcl:roletype . </li></ul><ul><li>?c isa tmcl:associationrole-constraint </li></ul><ul><li>tmcl:card-min: 1 </li></ul><ul><li>tmcl:card-max: 1 . </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:assoctype-role : x ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:roletype-role : o ) </li></ul><ul><li>?c2 isa tmcl:roleplayer-constraint . </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c2, tmcl:assoctype-role : x ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c2, tmcl:assoctype-role : o ) </li></ul><ul><li>tmcl:applies-to(tmcl:constraint-role : ?c2, tmcl:assoctype-role : z ) </li></ul>
  16. 16. RTM mapping <ul><li>rdfs:subClassOf  TMDM superclass-subclass associations </li></ul><ul><li>rdfs:subPropertyOf  TMDM superclass-subclass associations </li></ul><ul><li>rdfs:label  base name with the default type </li></ul><ul><li>rdfs:comment  occurrence of type rdfs:comment </li></ul><ul><li>rdfs:seeAlso  occurrence of type rdfs:seeAlso </li></ul><ul><li>rdfs:isDefinedBy  assoc. of type tmcl:definedBySchema </li></ul>
  17. 17. OWL to TMCL <ul><li>Much harder, but some things are easy </li></ul><ul><ul><li>owl:disjointWith -> tmcl:exclusive-instance </li></ul></ul><ul><ul><li>owl:complementOf -> tmcl:exclusive-instance </li></ul></ul><ul><ul><li>owl:equivalentClass -> subclass loop </li></ul></ul><ul><ul><li>owl:equivalentProperty -> subclass loop </li></ul></ul><ul><ul><li>cardinalities -> cardinalities </li></ul></ul><ul><ul><li>owl:InverseFunctionalProperty -> unique occurrence constraint </li></ul></ul><ul><ul><li>documentary properties -> use RTM mapping </li></ul></ul><ul><li>Some OWL, strangely, becomes input to the mapping </li></ul><ul><ul><li>owl:SymmetricProperty </li></ul></ul><ul><ul><li>owl:ObjectProperty </li></ul></ul><ul><ul><li>... </li></ul></ul>
  18. 18. Converts to TMCL Query <ul><li>owl:intersectionOf </li></ul><ul><li>owl:unionOf </li></ul><ul><li>owl:allValuesFrom </li></ul><ul><li>owl:someValuesFrom </li></ul><ul><li>owl:hasValue </li></ul>
  19. 19. Documentary information <ul><li>All convertible using RTM </li></ul><ul><ul><li>whether it gets picked up on the other side is not clear </li></ul></ul><ul><li>owl:DeprecatedClass </li></ul><ul><li>owl:DeprecatedProperty </li></ul><ul><li>owl:versionInfo </li></ul><ul><li>owl:priorVersion </li></ul><ul><li>owl:backwardCompatibleWith </li></ul><ul><li>owl:incompatibleWith </li></ul><ul><li>owl:Schema </li></ul><ul><li>owl:differentFrom & owl:AllDifferent </li></ul><ul><li>owl:oneOf </li></ul>
  20. 20. Non-convertible <ul><li>owl:TransitiveProperty </li></ul><ul><ul><li>no constraints, only used for reasoning </li></ul></ul><ul><ul><li>no way to reproduce this in TMCL </li></ul></ul><ul><ul><li>convert as is, to let software pick it up if supported </li></ul></ul><ul><li>owl:imports </li></ul><ul><ul><li>really abstract syntax, shouldn’t be converted </li></ul></ul><ul><li>owl:OntologyProperty </li></ul><ul><ul><li>no equivalent in Topic Maps </li></ul></ul><ul><li>owl:AnnotationProperty </li></ul><ul><ul><li>ditto </li></ul></ul>
  21. 21. TMCL to RDFS/OWL <ul><li>Works much the same way, but obviously in reverse </li></ul><ul><ul><li>based on the TMR mapping </li></ul></ul><ul><ul><li>no attempt made to convert TMQL constraints </li></ul></ul><ul><li>Converts to </li></ul><ul><ul><li>OWL Lite, if certain features are not used </li></ul></ul><ul><ul><li>OWL DL, if exclusive-instance or abstract classes are used </li></ul></ul><ul><ul><li>OWL Full, if the tmcl:*type classes are not disjoint (and a few other cases) </li></ul></ul><ul><li>Non-convertible elements </li></ul><ul><ul><li>regular expressions </li></ul></ul><ul><ul><li>subject identifier/locator constraints </li></ul></ul><ul><ul><li>scope constraints </li></ul></ul>
  22. 22. Basic workings <ul><li>tmcl:topictype -> owl:Class </li></ul><ul><li>tmcl:nametype -> owl:DatatypeProperty </li></ul><ul><li>tmcl:occurrencetype -> owl:DatatypeProperty </li></ul><ul><li>tmcl:associationtype -> owl:ObjectProperty </li></ul><ul><li>constraints -> rdfs:range & rdfs:domain </li></ul><ul><li>Abstract classes -> complicated OWL expression </li></ul>
  23. 23. Conclusion <ul><li>Conversion between TMCL and RDFS/OWL is possible! </li></ul><ul><ul><li>core of both standards convertible and roundtrippable </li></ul></ul><ul><ul><li>some limitations, however </li></ul></ul><ul><ul><li>much of OWL not convertible in introspectible fashion </li></ul></ul><ul><li>Further work </li></ul><ul><ul><li>finish TMCL </li></ul></ul><ul><ul><li>implement RDFS/OWL import in Ontopoly </li></ul></ul><ul><ul><li>implement RDFS/OWL export in Ontopoly </li></ul></ul>