|
| 1 | +% nix.Property class contains the concrete values associated with metadata. |
| 2 | +% |
| 3 | +% nix.Property dynamic properties: |
| 4 | +% id (char): read-only, automatically created id of the entity. |
| 5 | +% name (char): read-only, name of the entity. |
| 6 | +% definition (char): read-write, additional description of the entity. |
| 7 | +% unit (char): read-write, unit of the values associated with a Property. |
| 8 | +% The provided unit has to be an SI unit. |
| 9 | +% datatype (char): read-only, provides the datatype of the values associated |
| 10 | +% with a Property. Attribute is set when the Property is created. |
| 11 | +% |
| 12 | +% nix.Property dynamic child entity properties: |
| 13 | +% values access to all value child entities. |
| 14 | +% |
| 15 | +% Property values can be set via the dynamic child entity property. When |
| 16 | +% values are set, they replace any previously stored values. The new values |
| 17 | +% always have to be of a datatype supported by the Property. |
| 18 | +% |
| 19 | +% Example: currProperty.values = {'last name', 'first name'}; |
| 20 | +% |
| 21 | +% The values themselves have two properties: value and uncertainty which |
| 22 | +% can be accessed and updated individually. |
| 23 | +% |
| 24 | +% Individual values can be accessed and set by their value property. A set |
| 25 | +% value has to match the datatype of the Property. |
| 26 | +% |
| 27 | +% Example: currProperty.values{1}.value %-- get first value of Property. |
| 28 | +% currProperty.values{2}.value = 'some value' %-- set second value of Property. |
| 29 | +% |
| 30 | +% Each value comes with its own uncertainty property which can be accessed |
| 31 | +% and set. NOTE: this will probably change in the near future, moving the |
| 32 | +% uncertainty from the individual value to the level of the Property. |
| 33 | +% |
| 34 | +% Example: %-- get uncertainty of first property value. |
| 35 | +% currProperty.values{1}.uncertainty |
| 36 | +% %-- set uncertainty of second property value. |
| 37 | +% currProperty.values{1}.uncertainty = 0.1 |
| 38 | +% |
1 | 39 | % Copyright (c) 2016, German Neuroinformatics Node (G-Node)
|
2 | 40 | %
|
3 | 41 | % All rights reserved.
|
|
7 | 45 | % LICENSE file in the root of the Project.
|
8 | 46 |
|
9 | 47 | classdef Property < nix.NamedEntity
|
10 |
| - % PROPERTY Metadata Property class |
11 |
| - % NIX metadata property |
12 | 48 |
|
13 | 49 | properties (Hidden)
|
14 |
| - % namespace reference for nix-mx functions |
15 |
| - alias = 'Property' |
| 50 | + alias = 'Property' % nix-mx namespace to access Property specific nix backend functions. |
16 | 51 | end
|
17 | 52 |
|
18 | 53 | properties (Dependent)
|
|
58 | 93 | end
|
59 | 94 |
|
60 | 95 | function r = valueCount(obj)
|
| 96 | + % Get the number of the child values of the invoking Property. |
| 97 | + % |
| 98 | + % Returns: (uint) The number of child values. |
| 99 | + % |
| 100 | + % Example: vc = currProperty.valueCount(); |
| 101 | + |
61 | 102 | r = nix.Utils.fetchEntityCount(obj, 'valueCount');
|
62 | 103 | end
|
63 | 104 |
|
64 | 105 | function [] = deleteValues(obj)
|
| 106 | + % Deletes all values from the invoking Property. |
| 107 | + % |
| 108 | + % Example: check = currProperty.deleteValues(); |
| 109 | + |
65 | 110 | fname = strcat(obj.alias, '::deleteValues');
|
66 | 111 | nix_mx(fname, obj.nixhandle);
|
67 | 112 | end
|
|
0 commit comments