Re: Is there a way to specify a data format based on RDF ?

Paul Gearon wrote:
> 
> On Jun 13, 2007, at 5:33 PM, Kjetil Kjernsmo wrote:
> 
>>
>> On Wednesday 13 June 2007, Andrea Splendiani wrote:
>>> I want to be able to specify what it should contain, like: a valid
>>> document must have at least one address.
>>
>> For that kind of thing, you would probably want to look into the
>> cardinality constraints of OWL. It may do what you want.
> 
> This crossed my mind as well, but reading between the lines I don't 
> think it will suit.
> 
> I'm guessing that Andrea needs to *enforce* a cardinality constraint on 
> her address as 1.  While you can describe this, there's no way to 
> enforce that an address entry will appear in RDF.  It's that whole 
> open-world assumption thing.

An approach we sometimes find useful is to apply additional assumptions 
at key points in a processing chain. In particular, to temporarily make 
a closed-world and unique (apart from explicit aliases) names assumption 
and then check the message is a model of the ontology under those 
assumptions.

In particular, the Eyeball tool [*] provides an extensible range of 
plugin validators which support something like this.

> Likewise, it's also only possible to ensure that the maximum cardinality 
> doesn't exceed 1 by putting in a lot of data to describe that all the 
> addresses are different from each other.  (You also don't want to 
> sidestep that requirement by making the canonical text representation of 
> an address inverseFunctional on the address, as that puts you into OWL 
> Full.)

Eyeball doesn't mind if you are in OWL/full.

> RDF just isn't well suited for describing structures that MUST include a 
> particular field.  (You *can* do this, but then you're ignoring RDF's 
> semantics, and just treating it as a weird database).

Additional assumptions are not quite the same as ignoring the semantics :-)

In engineering terms there is often a point where you have to say 
"whilst the world is open this is all the data I'm actually going to get 
and I have to check if this data is complete enough to meet the 
assumptions of my next processing step". That doesn't stop you 
benefiting from the flexibility of the open world assumption right up to 
the point where you have perform a closed-world model check in order to 
proceed (e.g. actually send a message to that address).

Dave

[*] http://jena.sourceforge.net/Eyeball/
-- 
Hewlett-Packard Limited
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England

Received on Thursday, 14 June 2007 10:27:38 UTC