Class: Entity

Entity()

Everything is an `Entity` Class.

For example: The higher-level `Annotation`, `AnnotationProperty`, `Class`, `ClassAssertion`, `DataPropertyAssertion`, `Individual`, etc. all inherent from `Entity` and have therefore the same interface.

As an end-user you never interact with the `Entity` Class directly, but rather interact with the higher-level Classes, which extend the `Entity` Class - see `Client` for more.

Constructor

new Entity()

The Entity Class

Author:
  • Michael Hirn <michael.j.hirn+rlay[]gmail.com>
Source:
See:
Example
<caption>Create new Entity</caption>

Extends

Methods

_schemaKeyHandler()

Manages a payload key e.g. annotations, target, or subject etc. and either finds (resolves) the CID or decodes the value/target.
Inherited From:
Source:
Returns:
[Array>] - Array of Array with path and Object

(async) assert(assertions) → {Array.<String>}

Create the class, data, object, and other assertions for an `Individual`
Parameters:
Name Type Description
assertions Object The non-inherent properties of the individual
Inherited From:
Source:
Returns:
- The `CID`s of the assertions
Type
Array.<String>

(async) fetch()

Given the payload of the entity it fetches the related entities and instantiates proper `Entities` from them.
Inherited From:
Source: