Skip to main content

Or Field

Some fields can have multiple types of values depending on configuration. For example if we take the skos:prefLabel of a skos:Concept, hanami is configured by default to accept both xsd:string and rdf:langString as possible types. And this has 2 impacts on the UI:

fig 2: or field

fig 2: or field

First, the different values are grouped by compatible editors. You can see above that the first group is the editor for the xsd:string values, and the second group is handling the edition of the rdf:langString values.

Secondly, when clicking on the associated "add" button, if there are more than one possible type to choose from, the user is prompted with a choice. In the example above, the labels were configured so that "monolingual" is the option making use of xsd:string, and "multilingual" is the option making use of rdf:langString.

On the more technical side, sh:or is not the only configuration responsible for generating multiple possibilities. For example, if a property is configured to have sh:BlankNodeOrIRI for sh:nodeKind, this would generate 2 options as well.