FIAF / modelling-workshops

Modelling Workshops
0 stars 1 forks source link

Fix hasEvent, define more rigorous subclasses of Event and Activity #22

Open EOltmanns opened 1 year ago

EOltmanns commented 1 year ago

Please see issue #21 for the rationale behind this change set.

If the suggested approach is acceptable, please review the changed as well as the unchanged definitions of events and activities carefully as I am not an expert on film cataloguing rules and might well have got the assignment to WorkVariant vs. Manifestation etc. wrong in various cases.

paulduchesne commented 1 year ago

Thank you for this work @EOltmanns, the only thing I am wondering about splitting into a different issue is the inverse property isActivityOf, isEventOf. This would absolutely best practise, but would require a bit of work to apply across all relevant properties - would it be possible to remove these from the PR and then we open a branch to address them?

EOltmanns commented 1 year ago

Well, I have defined the inverse properties purely for readability's sake because they simplify the definition of the restrictions right below them. For that reason, I have used anonymous nodes _:isEventOf and _:isActivityOf which cannot be referenced from outside the ontology. In fact, I wonder if data exchange is actually easier if the ontology does not define inverse properties publicly. What do you thin? Should I avoid them anyway?

Mind you, I have been wondering whether I should have used owl:allValuesFrom instead of owl:someValuesFrom, really, so I may have to fix this pull request anyway before it is accepted.

paulduchesne commented 1 year ago

In fact, I wonder if data exchange is actually easier if the ontology does not define inverse properties publicly. What do you thin? Should I avoid them anyway?

This did come up in discussion a bit, not having inverse properties forces a certain direction which your queries have to take. I have never found it a real impediment when SPARQL querying Wikidata for example, which has only single direction properties.

Mind you, I have been wondering whether I should have used owl:allValuesFrom instead of owl:someValuesFrom, really, so I may have to fix this pull request anyway before it is accepted.

It would be good to get on a call at some point and discuss the ramifications of adding these statements.

As for another update, I have started by implementing the unionOf wrap for the eight properties with multiple domains in the source repo. Thanks again for pointing these out.

EOltmanns commented 1 year ago

Alright, I think I stand by my choice of owl:someValuesFrom (as opposed to ows:allValuesFrom) and we can discuss the matter tomorrow. Meanwhile, I have rebased the pull request. With regard to inverse properties, here are the alternatives. Currently suggested implementation of restriction clases:

_:isEventOf owl:inverseOf fiaf:hasEvent .

<https://fiafcore.org/ontology/ItemEvent> a owl:Restriction ;
    dc:source "FIAF Cataloguing Manual 3.3.2"^^xsd:string ;
    owl:onProperty _:isEventOf ;
    owl:someValuesFrom fiaf:Item .

<https://fiafcore.org/ontology/ManifestationEvent> a owl:Restriction ;
    dc:source "FIAF Cataloguing Manual 2.4.2"^^xsd:string ;
    owl:onProperty _:isEventOf ;
    owl:someValuesFrom fiaf:Manifestation .

<https://fiafcore.org/ontology/WorkVariantEvent> a owl:Restriction ;
    dc:source "FIAF Cataloguing Manual 1.4.2"^^xsd:string ;
    owl:onProperty _:isEventOf ;
    owl:someValuesFrom fiaf:WorkVariant .

Note that _:isEventOf is used here but is not exposed publicly, so the ontology clearly conveys the sense of a "preferred direction". Of course, there is always the possibility to define a derived ontology which adds inverse properties if somebody cannot do without them.

When not defining the inverse property explicitly, the restriction class definitions just get a little bit more verbose:

<https://fiafcore.org/ontology/ItemEvent> a owl:Restriction ;
    dc:source "FIAF Cataloguing Manual 3.3.2"^^xsd:string ;
    owl:onProperty [
        owl:inverseOf fiaf:hasEvent
    ] ;
    owl:someValuesFrom fiaf:Item .

<https://fiafcore.org/ontology/ManifestationEvent> a owl:Restriction ;
    dc:source "FIAF Cataloguing Manual 2.4.2"^^xsd:string ;
    owl:onProperty [
        owl:inverseOf fiaf:hasEvent
    ] ;
    owl:someValuesFrom fiaf:Manifestation .

<https://fiafcore.org/ontology/WorkVariantEvent> a owl:Restriction ;
    dc:source "FIAF Cataloguing Manual 1.4.2"^^xsd:string ;
    owl:onProperty [
        owl:inverseOf fiaf:hasEvent
    ] ;
    owl:someValuesFrom fiaf:WorkVariant .