Kamala Documentation

Schema editor

This page documents some of the features of Kamala's schema editor. With this editor the users can quickly add fields and relations to a type. The editor is schema driven meaning it allows for reusing and sharing your knowledge.

Key features 


To use the schema editor, create a new topic type from the dashboard (see image), or navigate to a pre-existing topic type.

Create a new topic type from the dashboardCreate a new topic type from the dashboard

The schema editor is available as second tab on a topic type screen, right behind 'instances'. Initially, there are no fields.

Schema editor tab on topic type pageSchema editor tab on topic type page

Adding fields 

To add new fields to a topic type, use the green 'add' button in the top left corner of the schema editor. It will pop up a dialog to add a field. Various types of fields are available by default, like a text field, name field, checkbox field and a relation to other topics. As an example, 'phone number' is used here as a text field for topic type 'person'.

The 'add field' dialogThe 'add field' dialog

After adding some fields, the schema editor might look like this. It shows 'phone number' as text field, 'date of birth' as date field and 'employer' as relation.

The 'person' topic type, showing some fieldsThe 'person' topic type, showing some fields

The relation field shows an additional input field. The topic type to be used as values for the relation should be filled in here. The next image shows an appropriate value for the 'employment' relation: 'organization'. Existing topic types will appear as you type, or the option to create a new topic type is presented.

Choose a new or existing topic typeChoose a new or existing topic type

The next image shows the 'person' schema completely filled. 'Organization' has been included as a value for the 'employer' relation field. Additional values can be added for a single relation field.

The 'person' schema, fully filledThe 'person' schema, fully filled

The values are presented as links, to quickly manage schemas for other topic types. The next image shows the schema editor for 'organization', where the employment relation to person is available directly (NB: the labels of the relation field have already been edited, click the field name to open an editor that can change the labels).

Schema editor for 'organization'Schema editor for 'organization'

Reuse existing fields 

The 'organization' schema can be filled as before. Existing fields can be reused, like the 'phone number' field, previously introduced by 'person'. As you start typing a field name, matches will show up. Simply select the existing field to reuse it.

Existing fields can be reusedExisting fields can be reused

Fields that are reused between topic types receive an additional marker to show that they are also used in other schemas.

Field 'phone number' is now a reused fieldField 'phone number' is now a reused field

Removing fields 

The right hand side of the schema editor shows 'minus' icons to remove fields. Reused fields are only detached from the current schema. Fields that are not reused are completely removed, provided they are not used to type any values.

Icons to the right to remove fieldsIcons to the right to remove fields

Marking fields as mandatory 

Fields can be marked as mandatory by using the asterisk button next to a field name. Topics of this type will need to fill in a value for this field type. A phone number can be marked as mandatory, for example.

Button to mark field as mandatoryButton to mark field as mandatory

Marking fields as multi valued 

Fields can be marked to contain multiple values by using the list button next to a field name.

Button to mark field to allow multiple valuesButton to mark field to allow multiple values

Last updated on