|
| 1 | +id: https://example.org/arrays |
| 2 | +name: arrays-example |
| 3 | +title: Array Example |
| 4 | +description: |- |
| 5 | + Example LinkML schema to demonstrate HDMF-style 2D Arrays |
| 6 | +license: MIT |
| 7 | +see_also: |
| 8 | + - https://hdmf-dev.github.io/hdmf-term-lists |
| 9 | + |
| 10 | +prefixes: |
| 11 | + linkml: https://w3id.org/linkml/ |
| 12 | + schema: http://schema.org/ |
| 13 | + example: https://example.org/ |
| 14 | + |
| 15 | +default_curi_maps: |
| 16 | + - semweb_context |
| 17 | +default_prefix: example |
| 18 | +default_range: string |
| 19 | + |
| 20 | +imports: |
| 21 | + - linkml:types |
| 22 | + |
| 23 | +classes: |
| 24 | + |
| 25 | + TimestampSeries: |
| 26 | + implements: |
| 27 | + - linkml:OneDimensionalSeries |
| 28 | + # TODO abstract from children |
| 29 | + |
| 30 | + IrregularlySampledTimestampSeries: |
| 31 | + is_a: TimestampSeries |
| 32 | + implements: |
| 33 | + - linkml:OneDimensionalSeries |
| 34 | + attributes: |
| 35 | + name: # the row label |
| 36 | + key: true # unique when nested (unlike identifier, which is a global identifier) |
| 37 | + implements: |
| 38 | + - linkml:name |
| 39 | + values: |
| 40 | + range: float |
| 41 | + multivalued: true |
| 42 | + required: true |
| 43 | + implements: |
| 44 | + - linkml:elements |
| 45 | + unit: |
| 46 | + ucum_code: s |
| 47 | + |
| 48 | + RegularlySampledTimestampSeries: |
| 49 | + is_a: TimestampSeries |
| 50 | + implements: |
| 51 | + - linkml:OneDimensionalSeries |
| 52 | + attributes: |
| 53 | + name: # the row label |
| 54 | + key: true # unique when nested (unlike identifier, which is a global identifier) |
| 55 | + implements: |
| 56 | + - linkml:name |
| 57 | + sampling_rate: |
| 58 | + range: float |
| 59 | + required: true |
| 60 | + unit: |
| 61 | + ucum_code: Hz |
| 62 | + starting_time: |
| 63 | + range: float |
| 64 | + required: true |
| 65 | + unit: |
| 66 | + ucum_code: s |
| 67 | + length: # must be defined by outer container when it cannot be inferred |
| 68 | + range: integer |
| 69 | + values: |
| 70 | + range: float |
| 71 | + multivalued: true |
| 72 | + equals_expression: "{array_index} / {sampling_rate} + {starting_time}" # TODO define array_index |
| 73 | + # equals_expression: "for i in range(length): {i} / {sampling_rate} + {starting_time}" |
| 74 | + implements: |
| 75 | + - linkml:elements |
| 76 | + unit: |
| 77 | + ucum_code: s |
| 78 | + |
| 79 | + Electrode: |
| 80 | + attributes: |
| 81 | + name: |
| 82 | + key: true # unique when nested (unlike identifier, which is a global identifier) |
| 83 | + range: string |
| 84 | + impedance: |
| 85 | + range: float |
| 86 | + unit: |
| 87 | + ucum_code: Ohm |
| 88 | + |
| 89 | + ElectrodeSeries: |
| 90 | + implements: |
| 91 | + - linkml:OneDimensionalSeries |
| 92 | + attributes: |
| 93 | + name: # the row label |
| 94 | + key: true # unique when nested (unlike identifier, which is a global identifier) |
| 95 | + implements: |
| 96 | + - linkml:name |
| 97 | + values: |
| 98 | + range: Electrode |
| 99 | + multivalued: true |
| 100 | + required: true |
| 101 | + inlined: true # not needed if value is not an object |
| 102 | + inlined_as_list: true |
| 103 | + implements: |
| 104 | + - linkml:elements |
| 105 | + |
| 106 | + ElectricalArray: |
| 107 | + implements: |
| 108 | + - linkml:TwoDimensionalArray |
| 109 | + attributes: |
| 110 | + time: |
| 111 | + range: TimestampSeries # abstract - could be IrregularlySampled... or RegularlySampled... |
| 112 | + required: true |
| 113 | + implements: |
| 114 | + - linkml:axis0 |
| 115 | + inlined: true |
| 116 | + electrode: |
| 117 | + range: ElectrodeSeries |
| 118 | + required: true |
| 119 | + implements: |
| 120 | + - linkml:axis1 |
| 121 | + inlined: true |
| 122 | + values: |
| 123 | + range: float |
| 124 | + multivalued: true |
| 125 | + required: true |
| 126 | + unit: |
| 127 | + ucum_code: V |
| 128 | + implements: |
| 129 | + - linkml:elements |
| 130 | + |
| 131 | + IrregularlySampledElectricalArray: |
| 132 | + is_a: ElectricalArray |
| 133 | + slot_usage: |
| 134 | + time: |
| 135 | + range: IrregularlySampledTimestampSeries |
| 136 | + |
| 137 | + RegularlySampledElectricalArray: |
| 138 | + is_a: ElectricalArray |
| 139 | + attributes: |
| 140 | + time: |
| 141 | + range: RegularlySampledTimestampSeries |
0 commit comments