Skip to main content

Create and edit an item

When in a collection, you can access the form of any item by clicking its uri. The form contains all fields that are defined in the shacl files of that collection. On the left hand side, there is a navigation pane to navigate quickly to included objects. A search bar is also available to filter these included objects by name.

fig 1: form of country conceptscheme with included concepts in the navigation pane

fig 1: form of country conceptscheme with included concepts in the navigation pane

The input fields are based on the expected datatype of that property, ensuring valid data. When done editing an item, press the save button to update the changes in the triple store.

Create an item from scratch

Navigate to the list of items of the collection where you wish to add an item and click the Create item button, and select the Form Scratch option. A form is generated to create a new item. Depending on how the collection is configured, some values can already be pre-filled. When a collection is configured to have multiple root types, you will have to select of which type the new item is.

fig 2: create an item in a collection with multiple root types

fig 2: create an item in a collection with multiple root types

When you are done entering the data of the new item, click the save button. Hanami will generate a URI for the item, store it in the rdf store and update elastic.

It will also perform a check to see if the data has been changed in the store since you started editing the item.

Create an item with file upload

Similarly to the previous option, you can choose to create an item through the From File Upload option instead. There you will be prompted to upload a file using any of many usual rdf file format, like .ttl, .rdf, .nt, .n3 and .jsonld.

fig 3: File upload prompt for item creation

fig 3: File upload prompt for item creation

It is to be noted that if you upload a file that would override an existing item, you will be prompted to confirm said override. Once the upload is done, you will be redirected to the form of the newly created item.