Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.
ASOBOLEV edited this page Feb 28, 2014 · 6 revisions

Support: Email || Guides: Installation | Getting started || Reference: General | Retrieval | Upload | Utilities

The G-Node MATLAB toolbox offers multiple functions for storing data in the G-Node Data Store. All examples on this page presuppose a valid session object session. This script sets up the environment:

import gnode.*;
set_up_classpath();

session = init('default');

Basic upload methods

create(session, obj, object_type)

Creates new object of specified object type on remote G-Node data store. Attempts to guess object type where possible; explicit argument is, however, preferred. New object needs to pass both client- and server-side validation. Returns generated ID for new object upon success.

new_id = create(session, new_obj, 'analogsignal');

returns ID of newly stored signal, and throws an exception in case of transmission problems.


update(session, obj, id)

Deploys changes to G-Node data store objects to the remote container defined by the session. The object's corresponding neo_id needs to be specified in some way: either explicitly, or via an implicit 'neo_id' field on the object. Object is validated before upload. Function returns ID of successfully stored object.

id = update(session, the_object)

applies changes to remote.

id = update(session, the_object, 'analogsignal_947');

applies changes for explicitly named object.


sync(session, obj, discard)

Synchronizes an object with remote. Useful in situations when update() etc. have changed local object(s). If 'discard' is set, changes are thrown out.

obj = sync(session, obj, false);

updates 'obj' on remote and fetches updated object, storing it in 'obj'.

Combined modification and retrieval

get_created(session, obj, object_type)

Creates and retrieves a G-Node data store object in one procedure call. This is a thin wrapper on top of create()/ get(), so the respective documentation applies. Object type is optional, but not guaranteed to be guessed correctly.

new_object = get_created(session, obj, 'analogsignal')

creates and returns signal 'obj' on remote.


get_updated(session, obj, id)

Retrieves object after performing a remote update; documentation for wrapped get()/update() functions applies.

updated_object = get_updated(session, modified_object, 'analogsignal_947')

pushes changes to remote server and returns the stored object including successfully applied changes.


Support: Email || Guides: Installation | Getting started || Reference: General | Retrieval | Upload | Utilities