¶ Domain of an avatar
The domain is a container of avatars. An avatar belongs to a single domain. To ease the identification of the avatar (IRI), the IRI is built with the domain name and a //identifier// suffix string. The latter identifier string must not contain a /
character. See Rdf avatar CRUD or JSON avatar CRUD for more details on avatar creation.
Example :
domain name = http://www.orange-labs.com/thingin/
thing id = http://www.orange-labs.com/thingin/livebox102458
The consequencies of this definition are:
- as the IRI is unique, inside a domain there is only one avatar with a given id.
- The $domain key can be used specifically to create domain filters in queries. This is a recommended practice to prune other avatars and focus a query on a domain-based subset of avatars. See Avatar Search for more details.
- Domains can be built in a hierarchical way, i.e. hierarchical levels in the IRIs of domains and avatars. In that case, it is possible to search on domains and sub-domains in a single query, using the parent/general domain as the filter.
¶ Domain API
Since ThingIn 2.4.X (06/2021) new features for easier domain management are available in the form of the Domain and Source APIs.
The new features for domain management are useful in the following cases:
- Creating domains (requirement since ThingIn 3.X)
- Setting/querying domain-level metadata such as tags, creation date, expiration date(optional)
- Isolating data within a domain depending of its source or date of injection (see https://wiki.thinginthefuture.com/en/public/Avatar_Sources)
- Creating temporary domains with set expiration date (demos, pocs, tests...)
- Administration purposes
- Deleting domains easily