w3c / activitystreams

Activity Streams 2.0
https://www.w3.org/TR/activitystreams-core/
Other
281 stars 61 forks source link

On the weird restriction on `items` in the definition of `OrderedCollection` #508

Closed timothee-haudebourg closed 3 weeks ago

timothee-haudebourg commented 4 years ago

Please Indicate One:

Please Describe the Issue:

I'm having trouble understanding the definition of as:OrderedCollection:

as:OrderedCollection a owl:Class ;
  rdfs:label "OrderedCollection"@en ;
  rdfs:comment "A variation of Collection in which items are strictly ordered"@en;
  rdfs:subClassOf [
    a owl:Class;
    owl:intersectionOf (
      as:Collection
      [
        a owl:Restriction;
        owl:onProperty as:items ;
        owl:allValuesFrom [
          a owl:Class ;
          owl:intersectionOf (
            as:OrderedItems
            [
              a owl:Class ;
              owl:complementOf [
                a owl:Class ;
                owl:unionOf ( as:Object as:Link )
              ]
            ]
          )
        ]
      ]
    )
  ] .

In particular, the restriction on the items property. What is the point of the intersection between OrderedItems and the complement of Object and Link? It seems to me that this intersection is equal to OrderedItems. What is the difference with the following definition:

as:OrderedCollection a owl:Class ;
  rdfs:label "OrderedCollection"@en ;
  rdfs:comment "A variation of Collection in which items are strictly ordered"@en;
  rdfs:subClassOf [
    a owl:Class;
    owl:intersectionOf (
      as:Collection
      [
        a owl:Restriction;
        owl:onProperty as:items ;
        owl:allValuesFrom as:OrderedItems
      ]
    )
  ] .
nightpool commented 4 years ago

So with the caveat that I don't understand OWL very well, and also that (as i understand things) the OWL document is only provided on an informational basis, and the official/normative definition of items is still in the activitystreams-vocabulary document: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-items, this does just seem like a bug.

My guess is that at an earlier point in drafting the document, the class was defined more like the range of the items property, with a union between Object, Link and an rdf:List of Object and Link:

as:items a owl:ObjectProperty ;
  rdfs:label "items"@en ;
  rdfs:domain as:Collection ;
  rdfs:range [
    a owl:Class ;
    owl:unionOf (
      [
        a owl:Class ;
        owl:unionOf ( as:Object as:Link )
      ]
      as:OrderedItems
    )
  ] .

And that this intersection was trying to "undo" that union. It's possible that this was changed early on in the process of originally drafting the document, but nobody updated the definition of OrderedCollection to match.

timothee-haudebourg commented 4 years ago

I see. By the way, in the activitystreams-vocabulary document I don't see any mention of any restriction on the items property of ordered collections (apart from the fact that it is assumed to be ordered). So ultimately we could simplify the OrderedCollection definition as follows, right?

as:OrderedCollection a owl:Class ;
  rdfs:label "OrderedCollection"@en ;
  rdfs:comment "A variation of Collection in which items are strictly ordered"@en;
  rdfs:subClassOf as:Collection
  ] .

I'm aware that the OWL document is not normative, but it is very useful in my case where I'm generating code from a RDF graph.

evanp commented 1 year ago

I believe the restriction's intention is to suggest that only Object and Link objects belong in the items property. I think that this is common usage, but not well-enforced.

The definition of Collection in the AS2 Core document is ''Collection objects are a specialization of the base Object that serve as a container for other Objects or Links.''

As mentioned above, the OWL vocabulary was an input to this specification process, but is not maintained, and is not normative. It may be useful for some projects, but it's not the way we define Activity Streams 2.0.

What would be a resolution to this issue that would work for the commenter?

evanp commented 3 weeks ago

This has been open and uncommented for over a year. It doesn't seem that we need to make a change to the OWL document, so I'm going to close this. Re-open if there is a next step needed.