[Fiware-ngsi] About attribute domain and its metadata

Ken Zangelin kzangeli at tid.es
Tue Sep 25 09:55:51 CEST 2012


Hi all ngsi lovers :-)

The ngsi specs aren't that clear about attribute domains and I would like to share my understanding of it.
It's important we all understand this the same way ...


Attribute Domain Name and Domain Metadata

Each entity has one unique Attribute Domain (one or none).
The attribute domain can be 'created' using the registerContext request or using the updateContext request.
Once created, it cannot be 're-created' - its name will stay as is.

The first entering attribute with 'isDomain=yes' is used to create the attribute domain (of its entity).
The name of this 'special attribute' will be used as the attribute domain name for the entity
and its metadata will be set as domain-metadata for the entity.
So, no attribute is created, just the domain itself.

When subsequent 'isDomain == true' attributes enter (using registerContext or updateContext),
no new domain is created - only that this attribute is part of the domain that already exists.
The metadata of this attribute is treated as private metadata of the attribute and not as
domain metadata.

If any metadata coincides with a domain metadata (in name and type), it will not be added as
private attribute metadata, but the domain metadata will be updated. This is true for all attributes,
not only the ones with 'isDomain == true' - as the domain metadata is common to all attributes.

Now, how do we add domain metadatas to an entity?
One way would be registering another 'isDomain=yes' attribute with the very same name as the attribute domain,
and add the metadata of this 'attribute' as domain metadata.
Either that, or we invent a special attribute name, like 'domainMetadataAddition' for addition of metadatas.
I see no other way of adding domain metadata.


So, comments are more than welcome ...

BR,

/KZ


________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-ngsi/attachments/20120925/b7917aad/attachment.html>


More information about the Fiware-ngsi mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy