Document Modelling | Version 3

Field Types

You have learned how to configure your document model. Find out about how to configure its input fields here.

Archived documentation for Sophora 3. End-of-support date for this version: 7/25/21

Documentation for Sophora 4

Overview

The CND

You can configure which properties your document should have in the CND and by adding mixins. You can learn more about this procedure here. The properties you add in the CND can have the following types:

Property Types
Property TypePurpose
booleanA property with only two possible values - true or false.
dateA property for date and time values.
doubleA property for floating-point numbers.
longA property for integers.
referenceA property for documents and childnodes.
stringA property for all sorts of text.

Adding the keyword multiple after the property declaration enables you to store multiple values into a single property. A complete property declaration should look like this: -'namespace:propertyName' (type) multiple. Of course, you can omit the keyword multiple. Multiple only works for properties of the types date and string.

The declaration of childnodes is a little bit different, since they don't have a specific type, but a supertype instead. A complete childnode declaration should look somewhat like this: +'namespace:childnodeName' (supertype). If the childnode is no specific subtype, you have to declare nt:base as supertype (roughly corresponding to the fact that all Java classes are subtypes of java.lang.Object).

Mutual Configuration Options for Properties

There are a few options in a property configuration that all properties have in common. These are:

  • Label, Label (Plural): The label which appears in the document editor.
  • Description: A short description text which will be displayed as an input field's tooltip.
  • Read only: Some input fields should be edited only by the server, scripts or the like, but not by a regular user. You can configure these properties as read-only. Default is no.
  • Required: Some input fields should not be empty when saving a document. Configure these as required. Default is no.
  • Editable by: Some fields should be edited only by a limited set of users. You can constrain the editability to a set of roles. Defaul is All Roles.
  • Required Document Permissions: Some fields should only be edited by users with a specific document permission. You can configure that here. Default is none.

Mutual Configuration Options for Childnodes

There are a few options in a childnode configuration that all childnodes have in common. These are:

  • Label, Label (Plural), Description: See above.
  • Valid ChildNode Types: You can configure which node types should be valid input types for the current child node.

String

String properties are the most versatile ones. You can configure a string property in many different ways, which will be elucidated in the following pages.

Date

Double

Long

Reference

Boolean

Childnodes

In contrast to the input field types of properties, there are no default input field types for childnodes. If the field Input Field Type is left blank, it depends on the actual childnode configuration how this is dealt with.

Miscellaneous

Input types we discourage from using

Those input types are:

  • Select Values: This field is required for the creaton of select values. It is used within a select value document to store the individual key-value pairs.
  • Image Clippings: The input field type Image Clippings is used to display the different image variants of an image document and their respective image clipping.

Last modified on 3/9/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon