new edge(subject, object, predicate)

Contructor for a BBOP graph model edge.

If no predicate is given, is used. Predicates are currently treated as raw strings.

Note that these edges have no ID associated with them.

Parameters

Name Type Optional Description

subject

string

 

node id string or node

object

string

 

node id string or node

predicate

string

 

(optional) a user-friendly description of the node

Returns

edge bbop model edge

Property

default_predicate

The predicate we'll use when none other is defined. You can probably safely ignore this if all of the edges in your graph are the same.

Methods

clone() → edge

Get a fresh new copy of the current edge (using bbop.clone for metadata object).

Returns

edge - new copy of edge

metadata(value) → any

Getter/setter for edge metadata.

The metadata value does not necessarily have to be an atomic type.

Parameter

Name Type Optional Description

value

any

 

(optional) new value for this property to take

Returns

any value

object_id() → string

Getter/setter for edge object id.

Returns

string string

predicate_id() → string

Getter/setter for edge predicate id.

Returns

string string

subject_id() → string

Getter/setter for edge subject id.

Returns

string string

type(value) → String

Getter/setter for edge type.

Parameter

Name Type Optional Description

value

String

 

(optional) new value for this property to take

Returns

String string