Class: Relation

Relation(opts)

The Relation class wraps folder

Cannot directly be instantiated

Constructor

new Relation(opts)

Creates a Relation

Parameters:
Name Type Description
opts object

The configuration options.

Methods

add(nodeAId, relTypeId, nodeBId) → {Promise.<any>}

Add a relation of type bidirectional or parent child between two nodes

Parameters:
Name Type Description
nodeAId

The parent node

relTypeId

The id of the relation

nodeBId

The child node

Returns:
Type
Promise.<any>

add(nodeAId, relTypeId, nodeBId) → {Promise.<any>}

Add a relation of type bidirectional or parent child between two nodes

Parameters:
Name Type Description
nodeAId

The parent node

relTypeId

The id of the relation

nodeBId

The child node

Returns:
Type
Promise.<any>

addGroup(uuid, type, groupName) → {Promise.<any>}

Add a relation between two nodes

Parameters:
Name Type Description
uuid

The UUID of the node

type

The id of the relation

groupName

The name of the group

Returns:
Type
Promise.<any>

addGroup(uuid, type, groupName) → {Promise.<any>}

Add a relation between two nodes

Parameters:
Name Type Description
uuid

The UUID of the node

type

The id of the relation

groupName

The name of the group

Returns:
Type
Promise.<any>

addNodeToGroup(groupId, groupId) → {Promise.<any>}

Add a node in a relation of type group

Parameters:
Name Type Description
groupId

The UUID of the node

groupId

The id of the group

Returns:
Type
Promise.<any>

addNodeToGroup(groupId, groupId) → {Promise.<any>}

Add a node in a relation of type group

Parameters:
Name Type Description
groupId

The UUID of the node

groupId

The id of the group

Returns:
Type
Promise.<any>

delete(relationId) → {Promise.<any>|Promise.<(*|never)>}

Delete a relation

Parameters:
Name Type Description
relationId

The id of a relation

Returns:
Type
Promise.<any> | Promise.<(*|never)>

delete(relationId) → {Promise.<any>|Promise.<(*|never)>}

Delete a relation

Parameters:
Name Type Description
relationId

The id of a relation

Returns:
Type
Promise.<any> | Promise.<(*|never)>

deleteGroup(groupId) → {Promise.<any>|Promise.<(*|never)>}

Delete a group

Parameters:
Name Type Description
groupId

The id of the group

Returns:
Type
Promise.<any> | Promise.<(*|never)>

deleteGroup(groupId) → {Promise.<any>|Promise.<(*|never)>}

Delete a group

Parameters:
Name Type Description
groupId

The id of the group

Returns:
Type
Promise.<any> | Promise.<(*|never)>

deleteItemFromGroup(uuid, groupId) → {Promise.<any>|Promise.<(*|never)>}

Delete node from a group

Parameters:
Name Type Description
uuid

The UUID of the node

groupId

The id of the group

Returns:
Type
Promise.<any> | Promise.<(*|never)>

deleteItemFromGroup(uuid, groupId) → {Promise.<any>|Promise.<(*|never)>}

Delete node from a group

Parameters:
Name Type Description
uuid

The UUID of the node

groupId

The id of the group

Returns:
Type
Promise.<any> | Promise.<(*|never)>

getAllRelationGroups(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get all relations of type group

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations of type group

Type
Promise.<any> | Promise.<(*|never)>

getAllRelationGroups(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get all relations of type group

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations of type group

Type
Promise.<any> | Promise.<(*|never)>

getRelationGroups(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get relations of type many to many for a node

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations of type many to many for a node

Type
Promise.<any> | Promise.<(*|never)>

getRelationGroups(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get relations of type many to many for a node

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations of type many to many for a node

Type
Promise.<any> | Promise.<(*|never)>

getRelations(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get relations for a node

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations for a node

Type
Promise.<any> | Promise.<(*|never)>

getRelations(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get relations for a node

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations for a node

Type
Promise.<any> | Promise.<(*|never)>

getRelationTypes(type) → {Promise.<any>|Promise.<(*|never)>}

Get relations for a type

Parameters:
Name Type Description
type

The relation type

Returns:

Return a list of relations for a type

Type
Promise.<any> | Promise.<(*|never)>

getRelationTypes(type) → {Promise.<any>|Promise.<(*|never)>}

Get relations for a type

Parameters:
Name Type Description
type

The relation type

Returns:

Return a list of relations for a type

Type
Promise.<any> | Promise.<(*|never)>

setGroupName(groupId, groupName) → {Promise.<any>}

Set the name of a group

Parameters:
Name Type Description
groupId

The id of the group

groupName

The new name of the group

Returns:
Type
Promise.<any>

setGroupName(groupId, groupName) → {Promise.<any>}

Set the name of a group

Parameters:
Name Type Description
groupId

The id of the group

groupName

The new name of the group

Returns:
Type
Promise.<any>

setRestUrl(restUrl)

Set the rest url

Parameters:
Name Type Description
restUrl

The rest url

setRestUrl(restUrl)

Set the rest url

Parameters:
Name Type Description
restUrl

The rest url

setToken(token)

Set the token in Relation variables

Parameters:
Name Type Description
token

The authorization token value

setToken(token)

Set the token in Relation variables

Parameters:
Name Type Description
token

The authorization token value

Relation(opts)

The Relation class wraps folder

Cannot directly be instantiated

Constructor

new Relation(opts)

Creates a Relation

Parameters:
Name Type Description
opts object

The configuration options.

Methods

add(nodeAId, relTypeId, nodeBId) → {Promise.<any>}

Add a relation of type bidirectional or parent child between two nodes

Parameters:
Name Type Description
nodeAId

The parent node

relTypeId

The id of the relation

nodeBId

The child node

Returns:
Type
Promise.<any>

add(nodeAId, relTypeId, nodeBId) → {Promise.<any>}

Add a relation of type bidirectional or parent child between two nodes

Parameters:
Name Type Description
nodeAId

The parent node

relTypeId

The id of the relation

nodeBId

The child node

Returns:
Type
Promise.<any>

addGroup(uuid, type, groupName) → {Promise.<any>}

Add a relation between two nodes

Parameters:
Name Type Description
uuid

The UUID of the node

type

The id of the relation

groupName

The name of the group

Returns:
Type
Promise.<any>

addGroup(uuid, type, groupName) → {Promise.<any>}

Add a relation between two nodes

Parameters:
Name Type Description
uuid

The UUID of the node

type

The id of the relation

groupName

The name of the group

Returns:
Type
Promise.<any>

addNodeToGroup(groupId, groupId) → {Promise.<any>}

Add a node in a relation of type group

Parameters:
Name Type Description
groupId

The UUID of the node

groupId

The id of the group

Returns:
Type
Promise.<any>

addNodeToGroup(groupId, groupId) → {Promise.<any>}

Add a node in a relation of type group

Parameters:
Name Type Description
groupId

The UUID of the node

groupId

The id of the group

Returns:
Type
Promise.<any>

delete(relationId) → {Promise.<any>|Promise.<(*|never)>}

Delete a relation

Parameters:
Name Type Description
relationId

The id of a relation

Returns:
Type
Promise.<any> | Promise.<(*|never)>

delete(relationId) → {Promise.<any>|Promise.<(*|never)>}

Delete a relation

Parameters:
Name Type Description
relationId

The id of a relation

Returns:
Type
Promise.<any> | Promise.<(*|never)>

deleteGroup(groupId) → {Promise.<any>|Promise.<(*|never)>}

Delete a group

Parameters:
Name Type Description
groupId

The id of the group

Returns:
Type
Promise.<any> | Promise.<(*|never)>

deleteGroup(groupId) → {Promise.<any>|Promise.<(*|never)>}

Delete a group

Parameters:
Name Type Description
groupId

The id of the group

Returns:
Type
Promise.<any> | Promise.<(*|never)>

deleteItemFromGroup(uuid, groupId) → {Promise.<any>|Promise.<(*|never)>}

Delete node from a group

Parameters:
Name Type Description
uuid

The UUID of the node

groupId

The id of the group

Returns:
Type
Promise.<any> | Promise.<(*|never)>

deleteItemFromGroup(uuid, groupId) → {Promise.<any>|Promise.<(*|never)>}

Delete node from a group

Parameters:
Name Type Description
uuid

The UUID of the node

groupId

The id of the group

Returns:
Type
Promise.<any> | Promise.<(*|never)>

getAllRelationGroups(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get all relations of type group

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations of type group

Type
Promise.<any> | Promise.<(*|never)>

getAllRelationGroups(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get all relations of type group

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations of type group

Type
Promise.<any> | Promise.<(*|never)>

getRelationGroups(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get relations of type many to many for a node

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations of type many to many for a node

Type
Promise.<any> | Promise.<(*|never)>

getRelationGroups(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get relations of type many to many for a node

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations of type many to many for a node

Type
Promise.<any> | Promise.<(*|never)>

getRelations(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get relations for a node

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations for a node

Type
Promise.<any> | Promise.<(*|never)>

getRelations(uuid) → {Promise.<any>|Promise.<(*|never)>}

Get relations for a node

Parameters:
Name Type Description
uuid

The uuid of a node

Returns:

Return a list of relations for a node

Type
Promise.<any> | Promise.<(*|never)>

getRelationTypes(type) → {Promise.<any>|Promise.<(*|never)>}

Get relations for a type

Parameters:
Name Type Description
type

The relation type

Returns:

Return a list of relations for a type

Type
Promise.<any> | Promise.<(*|never)>

getRelationTypes(type) → {Promise.<any>|Promise.<(*|never)>}

Get relations for a type

Parameters:
Name Type Description
type

The relation type

Returns:

Return a list of relations for a type

Type
Promise.<any> | Promise.<(*|never)>

setGroupName(groupId, groupName) → {Promise.<any>}

Set the name of a group

Parameters:
Name Type Description
groupId

The id of the group

groupName

The new name of the group

Returns:
Type
Promise.<any>

setGroupName(groupId, groupName) → {Promise.<any>}

Set the name of a group

Parameters:
Name Type Description
groupId

The id of the group

groupName

The new name of the group

Returns:
Type
Promise.<any>

setRestUrl(restUrl)

Set the rest url

Parameters:
Name Type Description
restUrl

The rest url

setRestUrl(restUrl)

Set the rest url

Parameters:
Name Type Description
restUrl

The rest url

setToken(token)

Set the token in Relation variables

Parameters:
Name Type Description
token

The authorization token value

setToken(token)

Set the token in Relation variables

Parameters:
Name Type Description
token

The authorization token value