Class: annotation

bbop-graph-noctua~annotation(kv_setopt) → {this}

new annotation(kv_setopt) → {this}

Edit annotations. Everything can take annotations. This structure of the raw key-value set has been updated in the wire protocol. It now looks like: : {"key": "contributor", "value": "GOC:kltm" } or: : {"key": "contributor", "value": "GOC:kltm", "value-type":"foo"}
Parameters:
Name Type Attributes Description
kv_set Object <optional>
optional a set of keys and values; a simple object
Source:
Returns:
new instance
Type
this

Methods

annotation(key, valueopt, value_typeopt) → {String|null}

Add/modify a property by key and value (and maybe value_type).
Parameters:
Name Type Attributes Description
key String string
value String <optional>
string
value_type String <optional>
string
Source:
Returns:
returns property is key
Type
String | null

clone() → {annotation}

Clone an annotation.
Source:
Returns:
a fresh annotation for no shared structure
Type
annotation

delete(key) → {Boolean}

Delete a property by key.
Parameters:
Name Type Description
key String string
Source:
Returns:
true if not empty
Type
Boolean

id() → {String}

The unique id of this annotation.
Source:
Returns:
string
Type
String

key(keyopt) → {String|null}

Get/set annotation's key.
Parameters:
Name Type Attributes Description
key String <optional>
string
Source:
Returns:
returns string of annotation
Type
String | null

value(valueopt) → {String|null}

Get/set annotation's value.
Parameters:
Name Type Attributes Description
value String <optional>
string
Source:
Returns:
returns string of annotation
Type
String | null

value_type(value_typeopt) → {String|null}

Get/set annotation's value-type.
Parameters:
Name Type Attributes Description
value_type String <optional>
string
Source:
Returns:
returns string of annotation
Type
String | null