Class: GraphConfiguration

$k. GraphConfiguration

new $k.GraphConfiguration()

Configuration of a graph

Extends

Methods

static$k.GraphConfiguration.forContext(context) : $k.GraphConfiguration

Returns the graph configuration for the context)

Name Type Description
context $k.SemanticElement optional

Context of the configuration

Since:
  • 4.1.0
Returns:
Type Description
$k.GraphConfiguration

static$k.GraphConfiguration.from(configurationElement) : $k.GraphConfiguration

Returns the confguration defined by the element

Name Type Description
configurationElement $k.SemanticElement

The configuration element

Since:
  • 4.1.0
Returns:
Type Description
$k.GraphConfiguration

addElements(semanticElements) : Array.<$k.SemanticElement>

Set the node topics

Name Type Description
semanticElements Array.<$k.SemanticElement>

The topics to add

Since:
  • 4.1.0
Returns:
Type Description
Array.<$k.SemanticElement> all elements in graph

categories(keyFilter, detailFilter) : Array.<object>

Name Type Description
keyFilter object optional

Alternative 1: An array of strings defining a filter which property names to include.

Alternative 2: An object with "include" and/or "exclude" keys

{"exclude": ["key1", ...]}
includes all but the listed properties, while
{"include": ["key1", ...]}
or
["key1", ...]
includes only the listed properties.

Non-optional properties are always included

detailFilter object optional

A filter to define the granularity of the JSON structure

[ "schema" ]
includes json with schema information

Since:
  • 4.1.0
Returns:
Type Description
Array.<object>

collapse(semanticElement) : Array.<object>

Collapse neigbours from node

Name Type Description
semanticElement object

The element to collapse

Since:
  • 4.1.0
Returns:
Type Description
Array.<object> The collapsed graph objects

configElement() : $k.SemanticElement

Since:
  • 4.1.0
Returns:
Type Description
$k.SemanticElement

decorateElements(elements, decoration)

Add some JSON to each element

Name Type Description
elements Array.<object>

The elements to be decorated

decoration object

some JSON

Since:
  • 4.3.0

expand(semanticElements, depth) : Array.<object>

Expand Node to its neighbours

Name Type Description
semanticElements Array.<object>

The element to expand

depth Integer optional

The depth to expand

Since:
  • 4.1.0
Returns:
Type Description
Array.<object> The expanded graph objects

expandNodes(expandDepth) : Array.<object>

Expand the Nodes to their neighbours

Name Type Description
expandDepth integer optional

The depth to expand the semantic objects via their connection, default value is 1

Since:
  • 4.1.0
Returns:
Type Description
Array.<object> The expanded graph objects

possibleRelationTargets(sourceTopic, keyFilter, detailFilter) : Array.<object>

Returns the possible relationtypes by targetTopic

Name Type Description
sourceTopic semanticElement

Wissensnetzelement

keyFilter object optional

Alternative 1: An array of strings defining a filter which property names to include.

Alternative 2: An object with "include" and/or "exclude" keys

{"exclude": ["key1", ...]}
includes all but the listed properties, while
{"include": ["key1", ...]}
or
["key1", ...]
includes only the listed properties.

Non-optional properties are always included

detailFilter object optional

A filter to define the granularity of the JSON structure

[ "schema" ]
includes json with schema information

Since:
  • 4.1.0
Returns:
Type Description
Array.<object> Map with key: target Topic value: Array with possibleRelationTypes

render(keyFilter, detailFilter) : Array.<object>

Renders the graph node as literal objects

Name Type Description
keyFilter object optional

Alternative 1: An array of strings defining a filter which property names to include.

Alternative 2: An object with "include" and/or "exclude" keys

{"exclude": ["key1", ...]}
includes all but the listed properties, while
{"include": ["key1", ...]}
or
["key1", ...]
includes only the listed properties.

Non-optional properties are always included

detailFilter object optional

A filter to define the granularity of the JSON structure

[ "schema" ]
includes json with schema information

Since:
  • 4.1.0
Returns:
Type Description
Array.<object> The rendered graph objects

semanticElements() : Array.<semanticElement>

Since:
  • 4.1.0
Returns:
Type Description
Array.<semanticElement>