{# Copyright 2020 Karlsruhe Institute of Technology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #}

Records

Records are the basic components of Kadi4Mat, as they contain data and connect it with metadata. The data of a record can either consist of a single file or of multiple files (e.g. a series of multiple images) all sharing the same metadata. Records can also be grouped into collections or linked to other records, as described later.

Creating a new record

Creating a new record first requires entering its metadata. This includes basic information, such as title, (unique) identifier and description. Additional, arbitrary, extra metadata can also be specified, specific for each different kind of record. This generic metadata consists of key-value pairs, where each entry has at least a unique key, a type and a corresponding value with optional validation instructions. It is also possible to create templates for the generic metadata, as described in Templates. The following types can be used for this metadata:

String
A single text value.
Integer
A single integer value. Integer values can optionally have a unit further describing them.
Float
A single floating point value. Float values can optionally have a unit further describing them.
Boolean
A single boolean value which can either be true or false.
Date
A date and time value which can be selected from a date picker.
Dictionary
A nested value which can be used to combine multiple metadata entries under a single key.
List
A nested value which is similar to dictionaries with the difference that none of the values in a list have a key.

Aside from the metadata, it is possible to set the visibility of a record to either private or public, the latter giving every logged in user the ability to search for the record and view its contents without requiring explicit permission to do so. Finally, a record can be linked to one or more collections while creating it, which of course may also be done later on instead.

Once the metadata of a record has been created, the actual data of the record can be added in a separate view, which the application will redirect to automatically. This view is just one part of the record menu, the next section describes the purpose of the others.

Managing existing records

Aside from managing the files of a record there are also some other views, each of which can be accessed through the respective item in the navigation menu of a record. The menu items are briefly described below:

Record

This view gives an overview of the whole record, divided into different tabs, including all of its metadata and files, linked resources, access permissions and metadata revisions. On the main overview tab it is also possible to export, publish or copy a record. Publishing records is only available if at least one publication provider has been registered with the application.

Each file of a record also has another navigation menu similar to that of a record, accessed by clicking on the respective file. This menu provides the following two views:
File
Shows an overview about the file and its metadata. Additionally, some file types also include a basic preview functionality.
Edit file
Allows editing the basic metadata of a file or deleting it.
Update data
Allows editing the actual data of a file. Some file types may offer direct editing of the data, otherwise the regular upload functionality can be used.
Add files
This view allows adding one or more files to a record, usually by uploading them. Certain types of files may also be created directly via the web interface.
Edit record
This view allows editing the metadata of a record, which is mostly identical to creating a record. The main difference is that it is also possible to delete the record.
Manage links
In this view, a record can be linked to other records or collections using the respective tab. Collections are simple, logical groupings of multiple records, while links to another record can also contain additional metadata. Currently, this includes the name/type of the link and a timestamp, the latter being set automatically. Linking resources requires link permission in both resources that should be linked together. Note that users still won't be able to view any linked resources if they have no explicit permission to do so.
Manage permissions
This view allows explicitly setting access permissions for a record to individual users or groups of users. Currently, this works by using predefined roles. Details about the specific actions each role provides can be found using the Role permissions popover in this view. Note that group roles are always shown to users being able to manage permissions, even if the group would normally not be visible. This way, existing group roles can always be changed and/or removed, even if a user is not part of the group any more. Such group roles only contain very limited information about the group itself.
Searching existing records

When searching existing records, it is also possible to search for their generic metadata by using the Search extras toggle of the search form in the record navigation menu. It is possible to search for keys, types and different kinds of values based on the selected types. Multiple such queries can be combined with an AND or an OR operation in the form of (Q1 AND Q2) OR (Q3 AND Q4). Exact matches for keys and string values can be required by using double quotes, e.g. "key". Note that keys inside of nested metadata entries are indexed in the form of <parent_key>.<parent_key>.<key>. In case of list entries, keys are replaced by the corresponding index in the list instead, starting at 1.