Skip to content

Introducing RDForms templates

An RDForm-template is a data structure that describes how to edit, present or validate RDF. Each template is built up from smaller reusable parts referred to as items.

Three kinds of items in a template

Text item and choice item are field level structures in a template in the sense that they capture individual values in object position of statements (with a few exceptions). Group items on the other hand are form level in the sense that they bring together a list of other items to handle a set of statements that share the same subject. An RDForms-template is nothing more than a top-level group item.

Groups in groups

A group item may have another group item as a child to allow handling nested structures of statements.

Information expressed on an item

At the core the items of a template provides RDF specific information regaring which property, nodetype, potential language and datatype restrictions that applies. Furthermore, to allow the generation of the edit, present and validate views multilingual labels, explanatory texts, help texts, cardinality restrictions etc. are provided. For more information see the sections on each item type.

Bundles are containers for items

Items can be defined independently and reused in multiple templates via their identifiers. A set of items that belong together are managed in container structures referred to as bundles. Bundles are often stored as single JSON files. A common pattern is to provide bundles for well known schemas such as dcterms and foaf to foster reuse.

Reuse of items

There are two main ways for reusing items:

  1. Direct reuse by referring to an item via it's identifier from a group item.
  2. Indirect reuse by introducing an item that extends another item.

Extending an item is the more common approach as it allows overriding settings, e.g. to tweak the label or the cardinality restriction.