Skip to content

Template bundle

Key Explanation
label A user readable label for the entire container. The label is an object containing several translations of the label, the ISO language code is used as key, for example {en: "Some text", sv: "En text"}
description A user readable longer description to accompany the label, typically provided after the user clicks on the label or some help icon nearby. Same format as for the label.
root References a single template (via its id) to be considered the default template of this container.
templates An array of templates (form-items) that this bundle provides.
cachedChoices An indexed set of choices, provided so the client can avoid additional requests. See section on choice item and cached choices further down.

Example

 {
    "label": { "en": "Bibliography", "sv": "Bibliografi" },
    "description": { "en": "Some nice information about books", "sv": "Lite trevlig bokinformation" },
    "root": "book",
    "templates": [
        {
            "id": "publisheddate",
            "type": "text",
            "label": { "en":"Published" },
            "description": { "en": "The date this book was first published" },
            "nodetype": "DATATYPE_LITERAL",
            "datatype": "http://www.w3.org/2001/XMLSchema.xsd#date",
            "property": "http://purl.org/dc/terms/date",
            "cardinality": { "pref": 1, "max": 1 }
        }, {
            "id": "title",
            "type": "text",
            "label": { "en": "Title" },
            "nodetype": "LANGUAGE_LITERAL",
            "property": "http://purl.org/dc/terms/title",
            "cardinality": { "min": 1, "pref": 4, "max": 5 }
        }, {
            "type": "group",
            "id": "book",
            "label": { "en": "Book" },
            "constraints": { "http://www.w3.org/TR/rdf-schema/type": "http://xmlns.com/foaf/0.1/Document" },
            "nodetype": "RESOURCE",
            "items": [
                "title",
                "publisheddate"
            ]
        }
    ]
}