Skip to content

Latest commit

 

History

History
366 lines (178 loc) · 9.55 KB

collection-page.schema.md

File metadata and controls

366 lines (178 loc) · 9.55 KB

Collection Page Schema

https://ns.adobe.com/xdm/external/activity-streams-2/collection-page

Used to represent distinct subsets of items from a Collection. Refer to the Activity Streams 2.0 Core for a complete description of the CollectionPage object.

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated Yes Experimental No Forbidden Permitted external/activity-streams-2/collection-page.schema.json

Schema Hierarchy

  • Collection Page https://ns.adobe.com/xdm/external/activity-streams-2/collection-page
    • Collection https://ns.adobe.com/xdm/external/activity-streams-2/collection
    • Link https://ns.adobe.com/xdm/external/activity-streams-2/link
    • Collection Page https://ns.adobe.com/xdm/external/activity-streams-2/collection-page

Collection Page Example

{
  "@context": {
    "activitystreams": "http://www.w3.org/ns/activitystreams#"
  },
  "activitystreams:summary": "Page 1 of Sally's notes",
  "@type": "http://www.w3.org/ns/activitystreams#CollectionPage",
  "@id": "http://example.org/foo?page=1",
  "activitystreams:partOf": "http://example.org/foo",
  "activitystreams:items": [
    {
      "@type": "http://www.w3.org/ns/activitystreams#Note",
      "activitystreams:name": "A Simple Note"
    },
    {
      "@type": "http://www.w3.org/ns/activitystreams#Note",
      "activitystreams:name": "Another Simple Note"
    }
  ]
}

Collection Page Properties

Property Type Required Defined by
activitystreams:current complex Optional Collection
activitystreams:first complex Optional Collection
activitystreams:items complex Optional Collection
activitystreams:last complex Optional Collection
activitystreams:next complex Optional Collection Page (this schema)
activitystreams:partOf complex Optional Collection Page (this schema)
activitystreams:prev complex Optional Collection Page (this schema)
activitystreams:totalItems integer Optional Collection
* any Additional this schema allows additional properties

activitystreams:current

In a paged Collection, indicates the page that contains the most recently updated member items. Refer to the Activity Streams 2.0 Core document for a complete description.

activitystreams:current

  • is optional
  • type: complex
  • defined in Collection

activitystreams:current Type

Any following options needs to be fulfilled.

Option 1

string

  • format: uri – Uniformous Resource Identifier (according to RFC3986)

Option 2

  • Collection Pagehttps://ns.adobe.com/xdm/external/activity-streams-2/collection-page

Option 3

  • Linkhttps://ns.adobe.com/xdm/external/activity-streams-2/link

activitystreams:first

In a paged Collection, indicates the furthest preceeding page of items in the collection. Refer to the Activity Streams 2.0 Core document for a complete description.

activitystreams:first

  • is optional
  • type: complex
  • defined in Collection

activitystreams:first Type

Any following options needs to be fulfilled.

Option 1

string

  • format: uri – Uniformous Resource Identifier (according to RFC3986)

Option 2

  • Collection Pagehttps://ns.adobe.com/xdm/external/activity-streams-2/collection-page

Option 3

  • Linkhttps://ns.adobe.com/xdm/external/activity-streams-2/link

activitystreams:items

Identifies the items contained in a collection. The items might be ordered or unordered. Refer to the Activity Streams 2.0 Core document for a complete description.

activitystreams:items

  • is optional
  • type: complex
  • defined in Collection

activitystreams:items Type

One of the following conditions need to be fulfilled.

Condition 1

Any following options needs to be fulfilled.

Option 1

  • Objecthttps://ns.adobe.com/xdm/external/activity-streams-2/object

Option 2

  • Linkhttps://ns.adobe.com/xdm/external/activity-streams-2/link

Condition 2

Array type:

All items must be of the type: Unknown type anyOf.

{
  "items": {
    "anyOf": [
      {
        "$ref": "https://ns.adobe.com/xdm/external/activity-streams-2/object",
        "$linkVal": "Object",
        "$linkPath": "object.schema.md"
      },
      {
        "$ref": "https://ns.adobe.com/xdm/external/activity-streams-2/link",
        "$linkVal": "Link",
        "$linkPath": "link.schema.md"
      }
    ],
    "type": "anyOf"
  },
  "type": "array"
}

activitystreams:last

In a paged Collection, indicates the furthest proceeding page of the collection. Refer to the Activity Streams 2.0 Core document for a complete description.

activitystreams:last

  • is optional
  • type: complex
  • defined in Collection

activitystreams:last Type

Any following options needs to be fulfilled.

Option 1

string

  • format: uri – Uniformous Resource Identifier (according to RFC3986)

Option 2

  • Collection Pagehttps://ns.adobe.com/xdm/external/activity-streams-2/collection-page

Option 3

  • Linkhttps://ns.adobe.com/xdm/external/activity-streams-2/link

activitystreams:next

In a paged Collection, indicates the next page of items. Refer to the Activity Streams 2.0 Core document for a complete description.

activitystreams:next

  • is optional
  • type: complex
  • defined in this schema

activitystreams:next Type

Any following options needs to be fulfilled.

Option 1

  • Collection Pagehttps://ns.adobe.com/xdm/external/activity-streams-2/collection-page

Option 2

  • Linkhttps://ns.adobe.com/xdm/external/activity-streams-2/link

activitystreams:partOf

Identifies the Collection to which a CollectionPage objects items belong. Refer to the Activity Streams 2.0 Core document for a complete description.

activitystreams:partOf

  • is optional
  • type: complex
  • defined in this schema

activitystreams:partOf Type

Any following options needs to be fulfilled.

Option 1

string

  • format: uri – Uniformous Resource Identifier (according to RFC3986)

Option 2

  • Collectionhttps://ns.adobe.com/xdm/external/activity-streams-2/collection

Option 3

  • Linkhttps://ns.adobe.com/xdm/external/activity-streams-2/link

activitystreams:prev

In a paged Collection, identifies the previous page of items. Refer to the Activity Streams 2.0 Core document for a complete description.

activitystreams:prev

  • is optional
  • type: complex
  • defined in this schema

activitystreams:prev Type

Any following options needs to be fulfilled.

Option 1

  • Collection Pagehttps://ns.adobe.com/xdm/external/activity-streams-2/collection-page

Option 2

  • Linkhttps://ns.adobe.com/xdm/external/activity-streams-2/link

activitystreams:totalItems

A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance. Refer to the Activity Streams 2.0 Core document for a complete description.

activitystreams:totalItems

  • is optional
  • type: integer
  • defined in Collection

activitystreams:totalItems Type

integer

  • minimum value: 0