- From: Holger Knublauch <holger@topquadrant.com>
- Date: Thu, 29 Jan 2015 13:06:36 +1000
- To: public-data-shapes-wg@w3.org
On 1/29/2015 11:33, Karen Coyle wrote: > > I think that some examples, with human-readable documentation if they > are in code (for those of us who do not easily read code), would help. > Eric's examples could be a good model. Using a consistent example sounds like a good idea. Allow me to reuse and extend the Rectangle ontology defined in the current LDOM Primer. The ontology is illustrated here: https://w3c.github.io/data-shapes/data-shapes-primer/images/square-class-diagram.png Let's start with an RDF Schema for it: ex:Rectangle a rdfs:Class ; rdfs:subClassOf rdfs:Resource . # or owl:Thing ex:height a owl:FunctionalProperty ; rdfs:domain ex:Rectangle ; rdfs:range xsd:integer . RDFS or OWL tools can use that graph. These tools can also use the graph even if it has additional triples: ex:Rectangle a rdfs:Class ; # or owl:Class rdfs:subClassOf rdfs:Resource ; # or owl:Thing ldom:property [ ldom:predicate ex:height ; ldom:valueType xsd:integer ; ldom:minCount 1 ; ldom:maxCount 1 ; ] ... The ldom:property triples are simply meaningless for OWL tools, while OWL triples such as the owl:FunctionalProperty are usually meaningless for LDOM tools. So here you have the separation between Open-World semantics and Closed-World semantics. Just use the right language that is up for the job. But: you can put them all into the same file that you publish online without making anyone unhappy. The following instance ex:MyRectangle a ex:Rectangle . # no ex:height would be perfectly valid with Open-World assumption and OWL, because the OWL model does not enforce a minimum cardinality on the rectangle (even if it has an owl:minCardinality restriction it would still be OK to have such a rectangle because the ex:height may be added later or elsewhere on the web). An LDOM processor would flag ex:MyRectangle as invalid, because it lacks the ex:height property. Next Topic: Contexts I have just written up a draft for how LDOM contexts would work: https://w3c.github.io/data-shapes/data-shapes-primer/#contexts Look at the example there: ex:Rectangle ldom:property [ ldom:predicate dct:publisher ; ldom:minCount 1 ; ldom:context <http://example.org/trackable> ] . This tells the system that *in the context called <http://example.org/trackable>*, every rectangle must have a dct:publisher. Applications that require "trackable" data can activate any constraint that is linked to that context. All other applications will by default ignore the constraint above. When checking constraints, the engine is told to include or exclude certain contexts. Still, all constraints can in theory be published in a single file, and merged together into a giant global graph. > > I'm not at all clear on what it means that it "leverages some > object-oriented concepts to the Web." LDOM uses OO concepts such as inheritance, encapsulation and abstraction. RDF Schema looks similar to object-orientation but doesn't really work that way (e.g. the concept of rdfs:domain is misunderstood by almost everyone). > I don't want to design a class structure that is aimed at my > validation rules but that will have a different OW meaning. An easy > example is disjointness -- I may want some properties or classes to be > disjoint for validation, but not carry that into the OW because it > could interfere where I wish to mix my data with that of others. I > want to keep validation and RDF semantics separate. That's why my original design from last year clearly separates two languages for open-world vs closed world semantics: https://twitter.com/HolgerKnublauch/status/494648159931346944 (Replace SPIN with LDOM there and you get the idea). As you have seen on the DC mailing list, there is strong resistance against re-defining OWL with closed world semantics, and I believe most people here on that list except Peter agree on that. > > And yet, essentially, for us the open web is where our users are. We > have to go there. Therefore we are very oriented toward that solution. Sure, that use case is covered, and the closed-enterprise settings that we need in practice is covered too. In fact we have been using SPIN on top of OWL ontologies for many years. HTH Holger
Received on Thursday, 29 January 2015 03:07:11 UTC