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 |
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
Usage
void del()
Arguments
None
Return
Type | Description |
---|---|
void |
reload
Usage
void reload()
Arguments
None
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
Usage
void remove()
Arguments
None
Return
Type | Description |
---|---|
void |
save
Usage
void save()
Arguments
None
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
Usage
string stringify()
Arguments
None
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
Usage
void update()
Arguments
None
Return
Type | Description |
---|---|
void |