definition of as:Collection and as:items very confused

as:Collection <http://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection> contains one as:items <http://www.w3.org/TR/activitystreams-vocabulary/#dfn-items> which is defined as

as:items a owl:ObjectProperty, 
           owl:FunctionalProperty ;  
  rdfs:label "items"@en ;       
  rdfs:domain as:Collection ;
  rdfs:subPropertyOf prov:hadMember ;
  rdfs:range [
    a owl:Class ;
    owl:unionOf (
      [
        a owl:Class ;
        owl:unionOf ( as:Object as:LinkNotHandler )
      ]
      as:OrderedItems
    )
  ] .

as:LinkNotHandler a owl:Class ;
  rdfs:label "Links that are Not Handlers"@en ;
  rdfs:subClassOf as:Link ,
                  [ rdf:type owl:Class ;
                    owl:complementOf as:ActivityHandler
                  ] ;
  rdfs:comment "Represents instances of as:Link that are not also as:ActivityHandler"@en .
So some issues:

the domain of as:items is a as:Collection, which can only have one element, namely the value of as:items . The spec says about as:items <http://www.w3.org/TR/activitystreams-vocabulary/#dfn-items> that it "Identifies the items contained in a collection" and "The items might be ordered or unordered"
the range of as:items is the class which is the union of 
the class as:Object which is pretty much anything, since as:Object is just defined as equivalent to prov:Entity which is defined as <http://www.w3.org/ns/prov#Entity> "a physical, digital, conceptual, or other kind of thing with some fixed aspects; entities may be real or imaginary"
the very specialised class of Links that are not activity handlers 
ordered items
This is very much the type of modelling error that someone who just got going in RDF but with a background in OO programming would make. 

Why bother creating an as:Collection which can contain only one element, when RDF has a number of collections, and indeed when relations themselves define collections: e.g. relations ( a.k.a predicates ) can be one to one ( functional ) or one to many.
why define a class that can contain pretty much anything and then on top of that also some extremely particular things such as "Links that are not activity handlers", and ordered collections. Are "Links that are not activity handlers" something that has no fixed aspect? Are ordered items things that have no fixed aspect?
Why bother with ordered and unordered disctinction when RDF has the tools to allow both, and JSON-LD was built to map those nicely to JSON?
It looks to me like some simple attempt to go from modelling in OO programming to modelling in RDF, without taking into consideration the differences. 

as:items is an owl:FunctionalProperty and ends with  s which indicates that the authors were thinking in terms of object oriented programming fields. Fields can only have one value in OO. Collections are then modelled as objects containing an Array of objects that allow an index for each successive element, or recursively with Lists ( where each element can point to its successor ), or some combination of these ways of working. 

In RDF an object can have any number of relations of the same name: i.e. a relation can be one to many. One does not need to create a collection type with one attribute that can contain a collection. So for example the AtomOwl <http://bblfish.net/work/atom-owl/2006-06-06/AtomOwl.html> ontology allows the awol:entry relation to be one to many. Or in LDP an ldp:Collection can contain any number of ldp:contains elements that is one to many, i.e. one can write:

<> a lpd:Collection;
   ldp:contains <e1>, <e2>, <e3> .
If one of these things contained something that was a List that could work too. 

So in short there is an abstraction here that is completely un-necessary, badly defined, and does not re-use any of the well known types developed in RDF to deal with these. It looks like the intention here is pretty much to provide what ldp:Containers do furthermore, so that one may not need to duplicate all this work.

Social Web Architect
http://bblfish.net/

Received on Friday, 24 April 2015 08:27:43 UTC