Class: Obsel

Obsel

new Obsel(ident:, type:, begin:, end:, subject:, attributes:)

Parameters:
Name Type Description
ident: string

the obsel id

type: string

the obsel type

begin: integer

the obsel begin time

end: integer

the obsel end time

subject: string

the obsel subject

attributes: object

the obsel attributes

Source:

Methods

Add a related obsel

Source:

del_attribute_value()

Delete an attribute

Source:

Delete a related obsel

Source:

force_state_refresh()

Force reload

Source:

fromJSON(j:)

Initialize the Obsel attributes from the given JSON-LD representation

Parameters:
Name Type Description
j: object

a JSON-LD serialization

Source:

get_attribute_value()

Return the value of the given attribute type for this obsel

Source:

get_id() → {string}

Get the Obsel id

Source:
Returns:

the id

Type
string

get_uri() → {string}

Get the Obsel URI

Source:
Returns:

the URI

Type
string

list_attribute_types()

List attribute types

Source:

remove()

Delete the obsel from the trace

Source:
Throws:
Will throw an exception if it could not be removed.

set_attribute_value()

Set the value of an attribute

Source:

toCompactJSON()

Return a compact JSON representation of the obsel. Use predefined + custom shorthands for types/properties

Source:

toJSON()

Return a JSON representation of the obsel

Source:

toJSONstring()

Return a JSON string serialization

Source:

toTurtle()

Return a Turtle representation of the obsel, assuming that : is bound to the KTBS namespace, and that m: is bound to the model namespace.

Source: