Describing alternative identifier combinations in OWL

Hi all!

I'm working on a vocabulary describing (Swedish) legal documents. We
use very simple OWL, basically owl:Restriction to describe certain
necessary properties, of which some are used to uniquely identify the
documents (also forming the basis of their URI:s). Some restrictions
are very loose (e.g. just saying owl:minCardinality 0), and basically
serve to document recommended but optional properties (from this or
other vocabularies, i.e. Dublin Core terms).

(Note that it's not always feasible to simply connect these optional
properties to the relevant classes with rdfs:domain, since some
properties come from other vocabularies, and others have multiple uses
which makes a domain declaration too strict. This is one reason for
our "loose" use of owl:Restriction.)

I'm now considering detailing the properties which are required to
uniquely identify a certain resource for a given type. We have some
cases where identification differs, e.g. for historical reasons.
Therefore we cannot require all properties to be present on all
instances.

(Note: since our model is very idiomatic, I use contrived examples here.)

An idea of the variations can be gleaned by considering these URI patterns:

* "http://example.org/publ/{collection}/{issue}:{number}"
* "http://example.org/publ/{collection}/{issue}/p.{pageNumber}"
* "http://example.org/publ/{collection}/{locator}"

The simplest way is to just describe the available properties as optional, e.g.:

    :LegalDocument a owl:Class;
        rdfs:subClassOf [
                a owl:Restriction;
                owl:onProperty :collection;
                owl:cardinality 1
            ], [
                a owl:Restriction;
                owl:onProperty :issue;
                owl:minCardinality 0
            ], [
                a owl:Restriction;
                owl:onProperty :number;
                owl:minCardinality 0
            ], [
                a owl:Restriction;
                owl:onProperty :pageNumber;
                owl:minCardinality 0
            ], [
                a owl:Restriction;
                owl:onProperty :locator;
                owl:minCardinality 0
            ];
        # ...

Another way would be to describe the alternatives in a union, like:

    :LegalDocument a owl:Class;
        rdfs:subClassOf [
                a owl:Restriction;
                owl:onProperty :collection;
                owl:cardinality 1
        ];
        rdfs:subClassOf [
            owl:unionOf (
                [
                    rdfs:subClassOf [
                        a owl:Restriction;
                        owl:onProperty :issue;
                        owl:cardinality 1
                    ], [
                        a owl:Restriction;
                        owl:onProperty :number;
                        owl:cardinality 1
                    ]
                ] [
                    rdfs:subClassOf [
                        a owl:Restriction;
                        owl:onProperty :issue;
                        owl:cardinality 1
                    ], [
                        a owl:Restriction;
                        owl:onProperty :pageNumber;
                        owl:cardinality 1
                    ]
                ] [
                    rdfs:subClassOf [
                        a owl:Restriction;
                        owl:onProperty :locator;
                        owl:cardinality 1
                    ]
                ]
            );
        ];
        # ...

However, thanks to OWL 2 there is now also owl:hasKey, which *seems*
to provide a much clearer way to describe this scenario. For the
example URI:s above, perhaps this would be a preferable description:

    :LegalDocument a owl:Class;
        rdfs:subClassOf [
            owl:unionOf (
                [
                    owl:hasKey (:collection :issue :number)
                ] [
                    owl:hasKey (:collection :issue :pageNumber)
                ] [
                    owl:hasKey (:collection :locator)
                ]
            );
        ];
        # ...

For some document types, we have a simpler situation where e.g. this
would suffice:

    :Report a owl:Class;
        owl:hasKey (:issue :number);
        # ...

What are your thoughts on this? I know this isn't a very strict and
complete use of OWL, but it fulfils our needs very well, both for
creating human-readable documentation and for simple means of data
driven validation.

Best regards,
Niklas

Received on Friday, 16 April 2010 14:06:28 UTC