Relationship¶
Contents
The Relationship is a class for JSON objects, and represents contextual relationships
between two or more Entity instances.
The notations in Relationship is based on the JSON-LD semantics,
and is used to set up a semantic triple.
For example, one can specify a certain contextual-spatial relationship as follows:
How Relationship works¶
{
"@context": "https://.../amorphys-spatial.jsonld",
"@id": { "$ref": "setups/the-rig/components/LED" },
"in-front-of": { "$ref": "setups/the-rig/components/animal" }
}
In the example above, a semantic triple is specified:
<setups/the-rig/components/LED> <in-front-of> <setups/the-rig/components/animal> .
@id is used to specify the subject of the semantic triple.
in-front-of here is one of the properties defined in the ontology https://.../amorphys-spatial.jsonld,
which in turn is specified as the value for the @context property.
Note that the keys in-front-of and during are ontologically defined
elsewhere as spatial or contextual relationships.
See pre-defined relationship keys for what is already defined.
Pre-defined relationship keys¶
Each of the following pre-defined relationship keys work to restrict the relationship between the two object being specified.
Spatial relationships¶
(TODO)
Temporal relationships¶
(TODO)