description
Definition
A description is a short text that explains to the business user what a given concept (e.g. class, relationship, entity, attribute) means.
This is presented to the user in the sidebar, when the user clicks on the Knowledge Graph tab and hovers over the concepts.
Usage
The property description can be used in class, relationship, entity and all attributes. It is a single String value per language (no Array is allowed) and is defined with a language tag (en for English, it for Italian, de for German, fr for French or all for all languages).
Example:
kb {
class User {
name.en: "User"
description.en: "All users that ever used our product, including those that eventually cancelled their subscription."
...
boolean is_Owner {
name.en: "Owner"
// hint: use triple quotes for multi-line
description.en:
"""
A user is an owner if it was the user that created the organization.
Every organization has exactly one owner.
"""
sql: "${user.is_owner} = 1"
}
...
}
}
Triple-quoted strings (""") span multiple lines and behave like Java text blocks, with one deviation (below). Put the opening and closing """ on their own lines (the opening """ must be on its own line) and align the content with them, as above. The shared (common) indentation is removed, so you can freely indent the block to match the surrounding code. Trailing whitespace is stripped from each line - use the \s escape to keep a trailing space or a whitespace-only line. A closing """ on its own line is not part of the value; to add a trailing newline, leave a blank line before the closing """. The usual backslash escapes (\n, \t, \\, \uXXXX) work too, and \" escapes a quote that would otherwise help close the block.