numass-framework/site/content/docs/shards/meta/meta_structure.md

1.5 KiB

content_type title chapter ordering label version date published
doc_shard Meta-data object structure meta 4 meta_structure 1.1 27.08.2015 true
Meta structure

The Meta object is a tree-like structure, which can contain other meta objects as branches (which are called elements) and Value objects as leafs. Both Values and Meta elements are organized in String-keyed maps. And each map element is a list of appropriate type. By requesting single Value or Meta element one is supposed to request first element of this list.


Note that such lists are always immutable. Trying to change it may cause a error.


While meta itself does not have any write methods and is considered to be immutable, some of its extensions do have methods that can change meta structure. One should be careful not to use mutable meta elements when one need immutable one.

In order to conveniently edit meta, there is MetaBuilder class.

The naming of meta elements and values follows basic DataForge naming and navigation convention. Meaning that elements and values could be called like child_name.grand_child_name.value_name. One can event use numbers as queries in such paths like child_name.grand_child_name[3].value_name.