Whitebeam Template Reference Documentation

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Template Reference Documentation

Collection Template

typeSet()

Create or modify a collection

See Also

rb.collection.typeRemove()    rb.collection.typeGet()    rb.collection.typeInfo()   

Syntax

number = rb.collection.typeSet(relationship)

Parameters

The 'typeSet' method takes 1 parameter:

Name Type/Value Range/Length Description
relationshipstruct typesee definition Required. Structure that defines the relationship

Results

The 'typeSet' method returns number:

Type/Value Range/Length Description
number   Unique integer ID for the type stored, or -1 if the operation failed.

Remarks

Each arc connection two entities must have a specific type. Only one arc of a specific type is allowed to exist between the pair. So for example if we have entities A and B there can be a relation called 'member' between them. There can at most one arc of this type connecting A with B.

The collection template requires that you register the name of a type of relationship before connecting entities of that type. Management of these 'arc types' is through the following methods, of which this is one:

  • typeSet - register or change data associated with a type of relationship.
  • typeRemove - Remove a type of relationship (which automatically deletes all relationships of that type from the system).
  • typeInfo - Return meta data about this relationship type
  • typeGet - Create an iterator to walk over all the relationship classes that exist.

A unique integer that represents the new collection type. This value isn't used very heavily. If the collection can't be created then the method returns -1. If collection class already exists then the method returns the existing ID of that class.

If the named type exists the opaque data (if present) is updated. If the type does not exist then it is created.

'typeSet' either creates a new class of relationship or updates an existing relationship class.

A relationship is defined with a unique name and an optional set of meta-data that describes that relationship.

Whitebeam release 1.3.36
(loadtime : 190ms)