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

  • "nodeAttributes" - list of all node attributes used in GUI. mandatory Each attribute definition consists of:

    • "dataAttr" - technical name (DB attribute key), used for JSON references. mandatory

    • "label" - attribute name shown in GUI. mandatory

    • "dataType" - defines type of formatting. mandatory . Possible values:

      • text - no formatting

      • number - number formatted based on format in "formatString"

      • url - value is formatted as clickable URL

    • "formatString" - if "dataType" is set to "number" then formatString is used with Numeral.js library to format numbers. Note: language dependent formating is set according to user locale set in user profile.

    • "dataRole" - how to treat value on GUI. mandatory . Possible values:

      • dimension - means that attribute is a code list

      • metric - means that attribute is a value

    • "orderType" - how to order this attribute in search results. Possible values:

      • STRING

      • INT

      • LONG

      • FLOAT

      • DOUBLE

    • "inputRestrictions" - defines restrictions for input field in create and update forms

      • "mandatory" - true / false - if set to true then this attribute is mandatory in create and update forms. mandatory

      • "readOnly" - true / false - if set to true then this attribute is read-only in create and update forms

      • "strict" - true / false - is used only if "dataType" is set to "text" and "dataRole" to "dimension". If "strict" is set to true then only values from "values" or "groups" can be choosed in create and update forms

      • "multiple" - true / false - 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

      • "values" - values used in combo box (used only if "dataType" is set to "text", "dataRole" is set to "dimension" and "strict" is set to false)

      • "groups" - values used in combo box divided into groups for better user orientation (used only if "dataType" is set to "text", "dataRole" is set to "dimension" and "strict" is set to true)

  • "edgeAttributes" - list of all relationship attributes used in GUI. mandatory Each attribute definition consists of:

    • "dataAttr" - technical name (DB attribute key), used for JSON references. mandatory

    • "label" - attribute name shown in GUI. mandatory

    • "dataType" - defines type of formatting. mandatory . Possible values:

      • text - no formatting

      • number - number formatted based on format in "formatString"

      • url - value is formatted as clickable URL

    • "formatString" - if "dataType" is set to "number" then formatString is used with Numeral.js library to format numbers. Note: language dependent formating is set according to user locale set in user profile.

    • "dataRole" - how to treat value on GUI. mandatory . Possible values:

      • dimension - means that attribute is code list

      • metric - means that attribute is value

    • "mandatory" - true / false - if it is required in create and update operations with node. mandatory

    • "orderType" - how to order this attribute in search results. Possible values:

      • STRING

      • INT

      • LONG

      • FLOAT

      • DOUBLE

    • "inputRestrictions" - defines restrictions for input field in create and update forms

      • "mandatory" - true / false - if set to true then this attribute is mandatory in create and update forms. mandatory

      • "readOnly" - true / false - if set to true then this attribute is read-only in create and update forms

      • "strict" - true / false - is used only if "dataType" is set to "text" and "dataRole" to "dimension". If "strict" is set to true then only values from "values" or "groups" can be choosed in create and update forms

      • "multiple" - true / false - 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

      • "values" - values used in combo box (only if "dataType" is set to "text" and "dataRole" is set to "dimension" and the "groups" attribute is not defined)

      • "groups" - values used in combo box divided into groups for better user orientation (only if "dataType" is set to "text" and "dataRole" is set to "dimension")

  • "nodeAttributeGroups" - set how to group node attributes to tabs in view, create and update forms.

    • "label" - label for tab. mandatory

    • "attributes" - list of attribute refenreces. mandatory

      • "dataAttr" - name of attribute, should be equal to value of "dataAttr" in "nodeAttributes" list