Association

Properties

Name Type Description
branch branch

The Branch on which this Association resides.

branchId string

The ID of the branch that this Association resides on.

changesetId string

The changeset ID on which this node resides. If the node has not yet been saved, this may be null.

description string

The Description of this document.

directionality string

The directionality of the association - either DIRECTED or UNDIRECTED.

id string

The ID of this document.

properties object

The properties for this document.

repository repository

The Repository on which this Association resides.

repositoryId string

The ID of the repository that this Association resides on.

sourceNode node

The source node of the association.

targetNode node

The target node of the association.

title string

The Title of this document.

type string

The Type QName of the node (as a string)

typeQName qname

The Type QName of the node.

Methods

del

Deletes the node.

Return

Type Description
void

reload

Reloads the node.

Return

Type Description
void

Examples

In this code sample, we make changes to a node and then reload to restore the original values.

// set the title to "Original Title"
node.properties.title = "Original Title";
node.save();

// change the title
node.properties.title = "Changed Title";

// reload
node.reload();

// the title is now "Original Title"
var test = (node.properties.title == "Original Title");
// test is true

remove

Deletes the node.

Return

Type Description
void

save

Saves any changes to this node.

Return

Type Description
void

Examples

In this code sample, we make changes to a node and save the changes.

node.properties.title = "The new title of my node";
node.properties.category = "red";
node.save();

stringify

Hands back a json string of this object.

Return

Type Description
string

Examples

In this code sample, we take the JSON for the given document and produce a string representation of it.

var text = document.stringify(true);

update

Saves any changes to this node. This is the same as calling save().

Return

Type Description
void