Data schema

Permission: Settings management

Data schema setting is used to set how to represent data from Neo4j database in GUI. You have to have at least one valid DB property defined in DATA_SCHEMA in order to Graphlytic work properly, mainly the search functions.

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 several default attributes to see how configuration should looks like. Probably this configuration doesn't match model of your data but can serve as example of short configuration.

  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 is used to generate configuration which contains attributes of several random data nodes and several random relationships. Random nodes are selected as first 1000 nodes, random relationships are selected as first 1000 relationships. During generating of JSON there is also some logic to generate values based on content of random nodes and relationships.

This automatically generated configuration can be used as good starting point to create 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:

{
"nodeAttributes": [
{
"dataAttr": "title",
"label": "Title",
"dataType": "text",
"dataRole": null,
"formatString": null,
"orderType": null,
"inputRestrictions":{
"mandatory": true,
"readOnly": false,
"strict": false,
"multiple": false,
"values": null,
"groups": null
}
},
{
"dataAttr": "type",
"label": "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"]
}
]
}
}
],
"edgeAttributes": [
{
"dataAttr": "type",
"label": "Type",
"dataType": "text",
"dataRole": "dimension",
"formatString": null,
"orderType": null,
"inputRestrictions":{
"mandatory": false,
"readOnly": false,
"strict": false,
"multiple": false,
"values": null,
"groups": null
}
},
{
"dataAttr": "subtype",
"label": "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"]
}
]
}
}
],
"nodeAttributeGroups": [{
"label": "Main",
"attributes": [
{"dataAttr": "title"},
{"dataAttr": "type"}
]
}]
}

Explanation of JSON properties:

Property

Values

Default

Description

Usage

nodeAttributes

MANDATORY

Array of DSO objects

 

List of node DB properties used in GUI. Every DB property is defined as a JSON Object called DSO (Data Schema Object) or attributes.

ACL page, Search page, Visualization

edgeAttributes

MANDATORY

Array of DSO objects

 

List of relationship DB properties used in GUI. Every DB property is defined as a JSON Object called DSO (Data Schema Object) or attributes.

ACL page, Search page, Visualization

DSO.dataAttr

MANDATORY

String

 

Technical name of DB property which is defined by this DSO.

ACL page, Search page, Visualization

DSO.label

String

DSO.dataAttr

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 (DSO.dataAttr).

ACL page, Search page, Visualization

DSO.dataType

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

null

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

  • undefined, null or "text" - no formatting

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

  • "url" - value is formatted as clickable URL

ACL page, Search page, Visualization

DSO.formatString

Numeral.js format string

"0.00"

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

ACL page, Search page, Visualization

DSO.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 attribute is a code list and can be used in this way (e.g. filtering on values, counting of values)

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

Visualization filters

DSO.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

DSO.inputRestrictions

Object

 

Defines restrictions for input field in create and update forms.

Create and Update forms

DSO.inputRestrictions.mandatory

true, false

false

If set to true then this attribute is mandatory in create and update forms.

Create and Update forms

DSO.inputRestrictions.readOnly

true, false

false

If set to true then this attribute is read-only in create and update forms.

Create and Update forms

DSO.inputRestrictions.strict

true, false

false

Value of strict property is used only if dataType is set to "text" and dataRole is set to "dimension". If strict is set to true then only values from values or groups can be choosed in create and update forms as DB property value.

Create and Update forms

DSO.inputRestrictions.multiple

true, false

false

Value of multiple is used only if dataType is set to "text" and dataRole to "dimension". If multiple is set to true then multiple values from values or groups can be choosed in create and update forms. These values are then stored as plain text separated with commas in DB property.

Create and Update forms

DSO.inputRestrictions.values

Array of plain values

 

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

Create and Update forms

DSO.inputRestrictions.groups

Array of GDO objects

 

Values used in combo box divided into groups for better user orientation (accessible 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.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

nodeAttributeGroups

Array of NTDO objects

 

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

Create and Update forms

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.attributes

MANDATORY

Array of objects

 

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

Create and Update forms