Skip to content

Commit

Permalink
Refactor Collection Paging
Browse files Browse the repository at this point in the history
Per:#193

This refactors the way paging works based on feedback from @azaroth42

The changes are fairly significant but result in a much cleaner
paging model that is more consistent with other paging efforts
(it's still distinct from LDP paging, for instance, but should be
far more compatible).
  • Loading branch information
jasnell committed Aug 26, 2015
1 parent a6ec198 commit 22490a1
Show file tree
Hide file tree
Showing 7 changed files with 795 additions and 1,125 deletions.
10 changes: 4 additions & 6 deletions activitystreams-core/activitystreams2-context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"Audio": "as:Audio",
"Block": "as:Block",
"Collection": "as:Collection",
"CollectionPage": "as:CollectionPage",
"Relationship": "as:Relationship",
"Content": "as:Content",
"Create": "as:Create",
Expand All @@ -39,6 +40,7 @@
"Object": "as:Object",
"Offer": "as:Offer",
"OrderedCollection": "as:OrderedCollection",
"OrderedCollectionPage": "as:OrderedCollectionPage",
"Organization": "as:Organization",
"Page": "as:Page",
"Person": "as:Person",
Expand Down Expand Up @@ -198,8 +200,8 @@
"@id": "as:scope",
"@type": "@id"
},
"self": {
"@id": "as:self",
"partOf": {
"@id": "as:partOf",
"@type": "@id"
},
"tag": {
Expand Down Expand Up @@ -263,10 +265,6 @@
},
"hreflang": "as:hreflang",
"id": "as:id",
"itemsPerPage": {
"@id": "as:itemsPerPage",
"@type": "xsd:nonNegativeInteger"
},
"latitude": {
"@id": "as:latitude",
"@type": "xsd:float"
Expand Down
476 changes: 337 additions & 139 deletions activitystreams-core/index.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions activitystreams-core/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ activitystreams2-context.jsonld
activitystreams1-context.jsonld
supplemental-context.jsonld
nanotabs.js
paging.png
paging2.png
Binary file added activitystreams-core/paging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added activitystreams-core/paging2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 22 additions & 19 deletions activitystreams-vocabulary/activitystreams2.owl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ as:current a owl:FunctionalProperty ,
rdfs:domain as:Collection ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Collection as:Link )
owl:unionOf ( as:CollectionPage as:Link )
] .

as:first a owl:FunctionalProperty ,
Expand All @@ -126,7 +126,7 @@ as:first a owl:FunctionalProperty ,
rdfs:domain as:Collection ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Collection as:Link )
owl:unionOf ( as:CollectionPage as:Link )
] .

as:generator a owl:ObjectProperty ;
Expand Down Expand Up @@ -181,7 +181,7 @@ as:last a owl:FunctionalProperty ,
rdfs:domain as:Collection ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Collection as:Link )
owl:unionOf ( as:CollectionPage as:Link )
] .

as:location a owl:ObjectProperty ;
Expand All @@ -195,10 +195,10 @@ as:location a owl:ObjectProperty ;
as:next a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "next"@en ;
rdfs:domain as:Collection ;
rdfs:domain as:CollectionPage ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Collection as:Link )
owl:unionOf ( as:CollectionPage as:Link )
] .

as:object a owl:ObjectProperty ;
Expand Down Expand Up @@ -233,10 +233,10 @@ as:anyOf a owl:ObjectProperty ;
as:prev a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "prev"@en ;
rdfs:domain as:Collection ;
rdfs:domain as:CollectionPage ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Collection as:Link )
owl:unionOf ( as:CollectionPage as:Link )
] .

as:preview a owl:ObjectProperty ;
Expand Down Expand Up @@ -280,10 +280,10 @@ as:scope a owl:ObjectProperty ;
owl:unionOf ( as:Object as:Link )
] .

as:self a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "self"@en ;
rdfs:domain as:Collection ;
as:partOf a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "partOf"@en ;
rdfs:domain as:CollectionPage ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Collection as:Link )
Expand Down Expand Up @@ -490,13 +490,6 @@ as:id a owl:DatatypeProperty ,
owl:unionOf (as:Link as:Object)
] .

as:itemsPerPage a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "itemsPerPage"@en ;
rdfs:comment "The maximum number of items per page in a logical Collection"@en ;
rdfs:range xsd:nonNegativeInteger ;
rdfs:domain as:Collection .

as:latitude a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "latitude"@en ;
Expand Down Expand Up @@ -583,7 +576,7 @@ as:startIndex a owl:DatatypeProperty ,
rdfs:label "startIndex"@en ;
rdfs:comment "In a strictly ordered logical collection, specifies the index position of the first item in the items list"@en ;
rdfs:range xsd:nonNegativeInteger ;
rdfs:domain as:OrderedCollection .
rdfs:domain as:OrderedCollectionPage .

as:startTime a owl:DatatypeProperty ,
owl:FunctionalProperty ;
Expand Down Expand Up @@ -746,6 +739,16 @@ as:Collection a owl:Class ;
rdfs:subClassOf as:Object ;
rdfs:comment "An ordered or unordered collection of Objects or Links"@en .

as:CollectionPage a owl:Class ;
rdfs:label "CollectionPage"@en ;
rdfs:subClassOf as:Collection ;
rdfs:comment "A subset of items from a Collection"@en .

as:OrderedCollectionPage a owl:Class ;
rdfs:label "OrderedCollectionPage"@en;
rdfs:subClassOf as:OrderedCollection, as:CollectionPage ;
rdfs:comment "An ordered subset of items from an OrderedCollection"@en .

as:Relationship a owl:Class, rdf:Statement ;
rdfs:label "Relationship"@en ;
rdfs:subClassOf as:Object ;
Expand Down
Loading

0 comments on commit 22490a1

Please sign in to comment.