Fields

Fields are the facts that give meaning to information facts. Every information node must specify its field type. Fields have no effect by themselves. They only have meaning when used with information nodes.

Field Basics

To create a basic field you merely need to specify a parentId and a name. The parentId can be any entity, and it is required just to satisfy the requirement that every fact must hang off another fact. The parentId, otherwise, has no intrinsic meaning.

The field name must be unique within the associated login.

Example:

We create a field called FullName

POST /createfield
{
    "parentId": "00000000C320A7BFD903745851915F6C33D20634E36C37C6",
    "name": "FullName"
}

A field can be referenced either using its node id, or using one of the following FRNs.

Description FRI
Full FRI frn:field:0000000009C2602130DEC995888A2CE624A7FCA1513E1B48:FullName
Login understood frn:field::FullName
Short FRI :FullName

Once created, the field can be used when writing information to entities

Example:

Here we write the data "John Watson" to an entity having id "00000000404AE4402DF969ACE2C2DA9133A23EA48773AF8A", specifying the field type of the data as FullName using a short FRI.

POST /write
{
    "nodeId": "00000000404AE4402DF969ACE2C2DA9133A23EA48773AF8A",
    "document": {
        "FullName": "John Watson"
    }
}

Field Properties

Property Default Effect on information nodes having this type
branch false The information node can parent other information nodes
searchable false The information node's entity can be found by searching using the node's value
uniqueByParent false At most one information node of this type can be parented by any given entity