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