Data schema

Permission: Settings management

Data schema setting represents global common dictionary for analysts working on specific use case. It is used to set how to represent or format data from Neo4j database in GUI or to define globally used virtual properties. Every property defined in Data schema is "locked" in GUI which means that users without Settings management are not allowed to change the title of these properties or to change the formula in virtual properties.

Configuration

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "DATA_SCHEMA".

  3. Enter JSON configuration and confirm by pressing "Save" button.

Default configuration

Default configuration contains no property definitions.

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "DATA_SCHEMA".

  3. Press button "Default" and store by pressing button "Save".

Automatic configuration

Automatic configuration can be used to generate configuration automatically with some logic based on data of first 1000 nodes and first 1000 relationships in database. This automatically generated configuration can be used as a good starting point to create your own configuration.

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "DATA_SCHEMA".

  3. Pres button "Automatic", wait for generator to generate JSON and store by pressing button "Save".

Description of configuration

Configuration is entered as JSON. Example of JSON:

{
"nodeProperties":{
"database":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"orderType":null,
"inputRestrictions":{
"mandatory":true,
"readOnly":false,
"strict":false,
"multiple":false,
"values":null,
"groups":null
}
},
{
"property":"type",
"title":"Type",
"dataType":"text",
"dataRole":"dimension",
"formatString":null,
"orderType":null,
"inputRestrictions":{
"mandatory":false,
"readOnly":false,
"strict":true,
"multiple":false,
"values":[
"TYPE 1.1",
"TYPE 1.2",
"TYPE 2.1",
"TYPE 2.2"
],
"groups":[
{
"label":"TYPE 1",
"values":[
"TYPE 1.1",
"TYPE 1.2"
]
},
{
"label":"TYPE 2",
"values":[
"TYPE 2.1",
"TYPE 2.2"
]
}
]
}
}
],
"virtual":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"formula":"return 'value';"
}
]
},
"relProperties":{
"database":[
{
"property":"type",
"title":"Type",
"dataType":"text",
"dataRole":"dimension",
"formatString":null,
"orderType":null,
"inputRestrictions":{
"mandatory":false,
"readOnly":false,
"strict":false,
"multiple":false,
"values":null,
"groups":null
}
},
{
"property":"subtype",
"title":"Subtype",
"dataType":"number",
"dataRole":"dimension",
"formatString":null,
"orderType":null,
"inputRestrictions":{
"mandatory":false,
"readOnly":false,
"strict":true,
"multiple":false,
"values":[
"TYPE 1.1",
"TYPE 1.2",
"TYPE 2.1",
"TYPE 2.2"
],
"groups":[
{
"label":"TYPE 1",
"values":[
"TYPE 1.1",
"TYPE 1.2"
]
},
{
"label":"TYPE 2",
"values":[
"TYPE 2.1",
"TYPE 2.2"
]
}
]
}
}
],
"virtual":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"formula":"return 'value';"
}
]
},
"mergedRelProperties":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"formula":"return 'value';"
}
],
"nodePropertyGroups":[
{
"title":"Main",
"properties":[
{
"property":"title"
},
{
"property":"type"
}
]
}
]
}

Explanation of JSON properties:

JSON property names used prior to version 1.12 are listed in parentheeses after the current name

Property

Values

Default

Description

Usage

nodeProperties

(nodeAttributes)

MANDATORY

List of DPD and list of VPD

 

Contains list of node Database Property Definitions (DPD) and node Virtual Property Definitions (VPD) used in GUI.

ACL page, Search page, Visualization

nodeProperties.database

Array of DPD objects

 

List of node DB properties used in GUI. Every DB property is defined as a JSON Object called DPD (Database Property Definition).

ACL page, Search page, Visualization

nodeProperties.virtual

Array of VPD objects

 

List of node virtual properties used in GUI. Every virtual property is defined as a JSON Object called VPD (Virtual Property Definition).

Visualization

relProperties

(edgeAttributes)

MANDATORY

List of DPD and list of VPD

 

Contains list of relationship Database Property Definitions (DPD) and relationship Virtual Property Definitions (VPD) used in GUI.

ACL page, Search page, Visualization

relProperties.database

Array of DPD objects

 

List of relationship DB properties used in GUI. Every DB property is defined as a JSON Object called DPD (Database Property Definition).

ACL page, Search page, Visualization

relProperties.virtual

Array of VPD objects

 

List of relationship virtual properties used in GUI. Every virtual property is defined as a JSON Object called VPD (Virtual Property Definition).

Visualization

mergedRelProperties

(edgeAttributes)

MANDATORY

Array of VPD objects

 

List of merged relationship virtual properties used in GUI. Every virtual property is defined as a JSON Object called VPD (Virtual Property Definition).

Visualization

VPD.property

MANDATORY

String

 

Technical name of virtual property which is defined by this VPD.

Visualization

VPD.title

String

VPD.property

Property title used in GUI. You can define custom title for every property. This is useful when you want to use user friendly and formated names in GUI instead of technical names of properties. When not defined or set to null then the value of VPD.property is used.

Visualization

VPD.formula

String

 

Body of a javascript function used to calculate the value of this virtual property.

Visualization

VPD.dataType

undefined, null, "text", "number", "url"

null

Type of formatting for values in GUI of this virtual property.

  • undefined, null or "text" - no formatting, values are shown exactly as are returned from VPD.formula

  • "number" - number formatted based on rules defined with "formatString"

  • "url" - value is formatted as clickable URL

Visualization

VPD.formatString

Numeral.js format string

"0.00"

If dataType is set to "number" then for formatString is used with the Numeral.js library to format numbers in GUI. Note: language dependent formating is set according to user locale set in user profile.

Visualization

VPD.dataRole

undefined, null, "dimension", "metric"

null

Defines how to use virtual property in GUI.

  • null or undefined - no special meaning. Usually most of properties have dataRole set to null or not defined at all.

  • "dimension" - means that this property is a code list and can be used in this way (e.g. filtering on values, counting of values)

  • "metric" - means that this property is a numeric value which can be used in mathematical operations

Visualization

DPD.property

(DSO.dataAttr)

MANDATORY

String

 

Technical name of DB property which is defined by this DPD. Value is used for referencing purposes, e.g. in Style mappers.

ACL page, Search page, Visualization

DPD.title

(DPD.label)

String

DPD.property

Property title used in GUI. You can define custom title for every property. This is useful when you want to use user friendly and formated names in GUI instead of DB model names of properties. When not defined or set to null then the DB name of property is used (DPD.property).

ACL page, Search page, Visualization

DPD.dataType

undefined, null, "text", "number", "url"

null

Type of formatting for values in GUI of this DB property.

  • undefined, null or "text" - no formatting, values are shown exactly as are in DB

  • "number" - number formatted based on rules defined with "formatString"

  • "url" - value is formatted as clickable URL

ACL page, Search page, Visualization

DPD.formatString

Numeral.js format string

"0.00"

If dataType is set to "number" then for formatString is used with the Numeral.js library to format numbers in GUI. Note: language dependent formating is set according to user locale set in user profile.

ACL page, Search page, Visualization

DPD.dataRole

undefined, null, "dimension", "metric"

null

Defines how to use DB property in GUI.

  • null or undefined - no special meaning. Usually most of DB properties have dataRole set to null or not defined at all.

  • "dimension" - means that this property is a code list and can be used in this way (e.g. filtering on values, counting of values)

  • "metric" - means that this property is a numeric value which can be used in mathematical operations

Visualization filters

DPD.orderType

"STRING", "INT", "LONG", "FLOAT", "DOUBLE"

"STRING"

Defines how to order search results when the ordering is based on this DB property.

ACL page, Search page

DPD.inputRestrictions

Object

 

Defines restrictions for input field in create and update forms. See Input Restrictions for all types of input fields that can be created with this setting.

Create and Update forms

DPD.inputRestrictions.mandatory

true, false

false

If set to true then it's mandatory to enter some value in create and update forms (user can't save the change without any value entered for this property).

Create and Update forms

DPD.inputRestrictions.readOnly

true, false

false

If set to true then the value of this property is read-only in create and update forms.

Create and Update forms

DPD.inputRestrictions.strict

true, false

false

If strict is set to true then user can choose only values defined in values or groups when editing DB data via create or update form.

The strict values functionality is available only if dataType is set to "text" and dataRole to "dimension".

Create and Update forms

DPD.inputRestrictions.multiple

true, false

false

If multiple is set to true then user can choose multiple values (defined in values or groups ) as a property value when editing DB data via create or update form. These values are then stored as plain text separated with commas in DB property.

The multiple values functionality is available only if dataType is set to "text" and dataRole to "dimension".

Create and Update forms

DPD.inputRestrictions.values

Array of plain values

 

Values used in combo box (available only if dataType is set to "text", dataRole is set to "dimension" and strict is set to false).

Create and Update forms

DPD.inputRestrictions.groups

Array of GDO objects

 

Values used in combo box divided into groups for better user orientation (available only if dataType is set to "text", dataRole is set to "dimension" and strict is set to true). Every group is defined by GDO (Group Definition Object).

Create and Update forms

GDO.title

(GDO.label)

MANDATORY

String

 

Title of group of values shown in combo box in create and update forms.

Create and Update forms

GDO.values

MANDATORY

Array of plain values

 

Values used in this specific group in combo box in create and update forms.

Create and Update forms

nodePropertyGroups

(nodeAttributeGroups)

Array of NTDO objects

 

Set how to group node properties to tabs in view, create and update forms. Every tab is defined by NTDO (Node Tab Definition Object).

Create and Update forms

NTDO.title

(NTDO.label)

MANDATORY

String

 

Label (or title) of the group used as tab label in view, create and update forms.

Create and Update forms

NTDO.properties

(NTDO.attributes)

MANDATORY

Array of objects

 

Referenced DB properties used in this tab. Every reference is done with simple object which has only one property property where the value is name of referenced DB property. For example: {"property":"type"}

Create and Update forms