Skip to main content

properties

The properties are key-value pairs associated with objects (Entity, Image, Video, Descriptor, etc) and connections.

Defining properties allow applications to later filter based on these properties.

There is no limit to the number of properties defined for an object. There is no restriction to add new, previously not present, properties to existing or new objects. Properties can be added, modified, or even deleted as needed.

NOTE: Property name starting with "_" are reserved for system-defined properties, thus, user-defined property names (keys) cannot start with "_".

The supported types for property values are:

  • number
  • string
  • boolean [true, false]
  • datetime (ISO 8601 representation)

Properties are defined as a JSON object in the following way:

[{
"AddEntity": {
"class": "Person",
"properties": {
"key1": 2, // Number value
"key2": 3.4, // Number value
"key3": "some_string", // String value
"key4": false, // Boolean value

// Time is a special case, defined as follows:
"key6": {
"_date": "2019-06-04T18:59:32+00:00"
},
"key5": {
"_date": "Sat Jun 04 18:59:32 UTC 2019"
}
}
}
}]

Note: Property types are enforced. Once a property is set for an Object, the type of the property will be enforced.

Example

[{
"AddEntity": {
"_ref": 1,
"class": "Person",
"properties": {
"name": "Jane Doe",
"email": "jane.doe@xyz.com",
"gender": "F",
"age": 11,
"height": 145.4,
"active": false,
"date_of_birth": {
"_date": "Sat May 29 18:59:24 PDT 2011"
}
}
}
}, {
"AddImage": {
"_ref": 2,
"properties": {
"date_captured": {
"_date": "Sat Jun 04 18:59:24 PDT 2019"
},
"type": "landscape",
"aperture": 2.34,
"flash_active": true
}
}
}, {
"AddConnection": {
"class": "BestFriendsForever",
"src": 1,
"dst": 2,
"properties": {
"place_met": "Interstellar Park",
"date": {
"_date": "Mon Aug 7 10:59:24 PDT 2017"
}
}
}
}]