This repository was archived by the owner on Jan 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Chapter model
Robert Pergl edited this page Dec 6, 2016
·
3 revisions
This page describes all objects of model, attributes and relations. This page correlates with the JSON schema.
Legend for Core/Local attributes markings:
- R = required
- O = optional
- X = forbidden (can not contain this attribute)
Chapter is the top-level object of the DS KM JSON files. It contains data about the chapter but also some metadata.
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
chapterid |
R | R | integer |
Constained by minimal and maximal value. |
namespace |
R | R | string |
core for the core chapter, anything else otherwise (a core chapter can not contain question localizations). |
formatversion |
R | R | integer |
Declares the version of the JSON schema used (e.g. format). "Metadata" for easier handling with files. |
title |
R | O | string |
title is required in the core, but a localization can override it or leave it unchanged. |
text |
O | O | string |
Introduction text of a chapter is always optional. |
questions |
R | R |
Question[] |
Array of questions in a chapter, the core chapter can contain only core questions (fully defined) but a localization can contain also question localization - extension/override). |
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
questionid |
R | R | integer |
Constrained by value >= 1. |
namespace |
X | O | string |
Only a localization can define namespace of the question (from which it is extended/overriden). |
precondition |
O | O | Precondition |
A question can "show up" only if another question is answered (it can depend on what the answer is). |
insertBefore |
X | O | QuestionPointer |
A new question in localization can specify its position by this attribute. |
references |
O | O |
Reference[] |
Define (or redefine) the array of references for the question. |
addReferences |
X | O |
Reference[] |
Only a localization (if the namespace is specified) can add extra references to original ones. |
experts |
O | O |
Expert[] |
Define (or redefine) the array of experts for the question. |
addExperts |
X | O |
Expert[] |
Only a localization (if the namespace is specified) can add extra experts to the original ones. |
type |
R | O |
string (enum) |
A question has a type that specifies how the answer will look like (options, text field, numeric, etc.). |
title |
R | O | string |
The question itself. |
text |
O | O | string |
An advice and a description of the question to provide respondent with additional infomation for the decision. |
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
type |
R | R |
string (enum) |
Must be option; it specifies the specialization of Question. |
answers |
R | O |
OptionAnswer[] |
length > 1 |
addAnswers |
X | O |
OptionAnswer[] |
Only a localization (if the namespace is specified) can add extra answers to the original ones. |
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
type |
R | R |
string (enum) |
Must not be option; it specifies the specialization of Question. |
Actual possible types of field questions are:
-
list = a list of
stringfields (respondent can add items) - number = a numeric answer (double or integer)
- string = a single string field
- text = a longer string such as a description
- date = date field
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
id |
R | R | integer |
Constrained by value >= 0. |
label |
R | R | string |
The text of answer (typically just "Yes" or "No"). |
advice |
O | O | string |
An optional advice to show up after picking this option. |
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
answerid |
O | O | integer |
Answer ID (>= 0). If not specified, the precondition takes any answer. |
questionid |
R | R | integer |
Question ID (>= 1). |
namespace |
O | O | string |
The default value is the same namespace, in which the precondition is defined (the innermost one). |
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
type |
R | R |
string (enum) |
Must be xref; it specifies the specialization of the reference. |
| chapterid | R | R | integer |
Chapter ID with minimal and maximal value constraint. |
questionid |
R | R | integer |
Question ID with value >= 1. |
namespace |
O | O | string |
Default value is the same namespace, in which the precondition is defined (the innermost one). |
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
type |
R | R |
string (enum) |
Must be dmpbook; it specifies the specialization of the reference. |
chapter |
R | R | string |
Chapter of the DMP book. |
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
type |
R | R |
string (enum) |
Must be url, it specifies the specialization of the reference. |
weblink |
R | R | string |
URI of the referenced resource. |
anchor |
O | O | string |
A text to show up instead of the URI. |
Pointer to question for the insertBefore attribute of Question in localizations.
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
questionid |
R | R | integer |
Question ID with value >= 1. |
namespace |
R | R | namespace | The namespace in which the question is defined. |
| Attribute | Core | Local | Type | Notes |
|---|---|---|---|---|
name |
R | R | string |
The full name of the expert. |
email |
O | O | string |
The email address for contacting the expert. |
class |
O | O |
string (enum) |
Can be individual (the default value) or organisation. |
- All referenced objects must exist (
namespace,chapterid,questionid,answerid). - Preconditions and crossreferences in Core can not reference localizations.
Intro
Knowledge Model
Validation