Skip to main content
Version: 1.5.x

Collection element specifications

A collection element always contains a specification definition, which defines the element "type", with consequences for content and visualization.

Specification Type: artifact

Artifacts hold a reference to the element content via URI. The URI does not need to follow any specific schema, but the link should be static to access the content at any time. Artifacts should preferably be used for binary formats and large objects.

In contrast to compositePaged elements, artifacts are

  • not necessarily page-based,
  • and supposed to be immutable, i.e. their pages can not be deleted or reordered.

Annotations on artifacts are not supported.

"specification": {
"type": "artifact",
"mediaType": "application/pdf",
"contentURI": " <foo://example.com:8042/over/there>"
}
  • mediaType: The Media type (formerly known as MIME Type) of the artifact. Used to find a suitable viewer for the element.
  • contentURI: The URI by which the artifact can be addressed.

Specification Type: embeddedArtifact

EmbeddedArtifacts are the simplest type of elements.

"Embedded" means that the content of this element is not made available via external URI, but rather embedded in the specification. This type is mostly used for short and text based formats like plain text or Markdown.

  • embeddedArtifacts are also not necessarily page-based,
  • and immutable, i.e. their pages can not be deleted or reordered.

Annotations on these elements are not supported.

"specification": {
"type": "embeddedArtifact",
"mediaType": "text/markdown",
"content": "# Hello World \nThis is Markdown text!"
}
  • mediaType: The media type of the artifact. Used to find a suitable viewer for the element.
  • content: Element content based on media type.

Specification Type: compositePaged

CompositePaged elements require a page-based source, and they may (but don't need to) be assembled of data from multiple sources.

For this type of element, pageSequences are defined and allow the collation of multiple partial documents. They define a page based subset of a document provided by a single source.

CompositePaged Elements are the most versatile type of elements and allow user modifications like:

  • deletion on pages
  • duplication of pages
  • reordering of pages
  • merging of documents

These elements are best used with jadice web viewer which can display and modify pageSequences in a variety of ways:

  • bookmarks
  • annotations
  • page order and deletion
  • page rotation
  • and other render settings such as brightness and contrast
"specification": {
"type": "compositePaged",
"pageSequences": [
{
"mediaType": application/pdf,
"contentURI": "<foo://example.com:8042/over/ther>",
"pageIndices": [2,3]
},
{
"mediaType": image/png,
"contentURI": "https://www.archiv.com?doc=123",
"pageIndices": null
}
]
}
  • pageSequences: A list of page sequences to collate to a single element.
    • mediaType: The media type of the data.
    • contentURI: The URI where the source is provided.
    • pageIndices: A list of page indices to include. If this property is missing or null, the complete source with all its pages will be used.

Specification Type: collectionReference

With CollectionReferences we provide a link to a different collection.

The collection that is referenced will be loaded lazily and its data will only be fetched when actively called (i.e. when the node is expanded in the UI). The collectionReference element acts as a root node for the collection that is linked within.

"specification": {
"type":"collectionReference",
"collectionId": "10000000-1000-0000-0000-000000000000"
}
  • collectionId: the unique ID of the collection that is referenced.