use crate::{primitives::*, properties, BaseBox};
properties! {
Collection {
docs [
"`Collection` objects are a specialization of the base `Object` that serve as a container for",
"other `Objects` or `Links`.",
"",
"The items within a `Collection` can be ordered or unordered. The `OrderedCollection` type MAY be",
"used to identify a `Collection` whose items are always ordered. In the JSON serialization, the",
"unordered items of a `Collection` are represented using the `items` property while ordered items",
"are represented using the `ordered_items` property.",
],
items {
docs [
"Identifies the items contained in a collection. The items might be ordered or unordered.",
"",
"- Range: `Object` | `Link` | Ordered List of [ `Object` | `Link` ]",
"- Functional: false",
],
types [
XsdString,
BaseBox,
],
required,
},
total_items {
docs [
"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.",
"",
"- Range: `xsd:nonNegativeInteger`",
"- Functional: true",
],
types [
XsdNonNegativeInteger,
],
functional,
},
current {
docs [
"In a paged `Collection`, indicates the page that contains the most recently updated member",
"items.",
"",
"- Range: `CollectionPage` | `Link`",
"- Functional: true",
],
types [
XsdAnyUri,
BaseBox,
],
functional,
},
first {
docs [
"In a paged `Collection`, indicates the furthest preceeding page of items in the collection.",
"",
"- Range: `CollectionPage` | `Link`",
"- Functional: true",
],
types [
XsdAnyUri,
BaseBox,
],
functional,
},
last {
docs [
"In a paged `Collection`, indicates the furthest proceeding page of the collection.",
"",
"- Range: `CollectionPage` | `Link`",
"- Functional: true",
],
types [
XsdAnyUri,
BaseBox,
],
},
}
}
properties! {
CollectionPage {
docs [
"The `CollectionPage` type extends from the base `Collection` type and inherits all of it's",
"properties.",
],
part_of {
docs [
"Identifies the `Collection` to which a `CollectionPage` objects items belong.",
"",
"Range: `Collection` | `Link`",
"Functional: true",
],
types [
XsdAnyUri,
BaseBox,
],
functional,
},
next {
docs [
"In a paged `Collection`, indicates the next page of items.",
"",
"- Range: `CollectionPage` | `Link`",
"- Functional: true",
],
types [
XsdAnyUri,
BaseBox,
],
functional,
},
prev {
docs [
"In a paged `Collection`, identifies the previous page of items.",
"",
"- Range: `CollectionPage` | `Link`",
"- Functional: true",
],
types [
XsdAnyUri,
BaseBox,
],
functional,
},
}
}
properties! {
OrderedCollectionPage {
docs ["The OrderedCollectionPage type MAY be used to identify a page whose items are strictly ordered." ],
start_index {
docs ["A non-negative integer value identifying the relative position within the logical view of a",
"strictly ordered collection.",
"",
"- Range: `xsd:nonNegativeInteger`",
"- Functional: true",
],
types [
XsdNonNegativeInteger,
],
functional,
},
}
}