onoma 0.6.4 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/locales/eng.yml +13 -0
- data/config/locales/fra.yml +13 -0
- data/db/reference.xml +20 -5
- data/lib/onoma/item.rb +2 -1
- data/lib/onoma/migration/actions/property_change.rb +36 -0
- data/lib/onoma/migrator/reference.rb +1 -1
- data/lib/onoma/nomenclature.rb +16 -0
- data/lib/onoma/nomenclature_set.rb +3 -2
- data/lib/onoma/property_nature.rb +2 -1
- data/lib/onoma/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a1d3a60aca712efdfb37ea58059793bb4d164cc
|
|
4
|
+
data.tar.gz: 9820f1841f4290baa78fdc175e117ae0cd09a508
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35d6295eea96bd196963b6cf9a2b753ea7025490c805fc40256716d32b90dd4ab3b0518654247b4f4493d107109080e494d55218ec84fb92bc67acc9614d374f
|
|
7
|
+
data.tar.gz: dcc273221ab82fbdcd5ffb22f3972e6b9d864bf3ac28a59b7f5d0d93b5eab48b7506a244101345a3e3e15e141d40ce270100114314781e6cebf4a7e14849d8f0
|
data/config/locales/eng.yml
CHANGED
|
@@ -1876,6 +1876,7 @@ eng:
|
|
|
1876
1876
|
surface_area_flow: "Surface area flow"
|
|
1877
1877
|
temperature: "Temperature"
|
|
1878
1878
|
time: "Time"
|
|
1879
|
+
unity_flow: "Unity flow"
|
|
1879
1880
|
volume: "Volume"
|
|
1880
1881
|
volume_area_density: "Volume area density"
|
|
1881
1882
|
volume_concentration: "Volume concentration"
|
|
@@ -1905,6 +1906,7 @@ eng:
|
|
|
1905
1906
|
acta_category: "Acta category"
|
|
1906
1907
|
document_natures:
|
|
1907
1908
|
items:
|
|
1909
|
+
ac_work_sheet: "AC work sheet"
|
|
1908
1910
|
account_journal_entry_sheet: "Account journal entry sheet"
|
|
1909
1911
|
activity_cost: "Activity cost"
|
|
1910
1912
|
animal_husbandry_register: "Animal husbandry register"
|
|
@@ -1942,6 +1944,7 @@ eng:
|
|
|
1942
1944
|
outgoing_payment_list__standard: "Outgoing payment list"
|
|
1943
1945
|
pending_vat_register: "Pending VAT register"
|
|
1944
1946
|
pfi_land_parcel_register: "Phytosanitary Frequency Indicators register"
|
|
1947
|
+
phytosanitary_applicator_sheet: "Applicator sheet"
|
|
1945
1948
|
phytosanitary_certification: "Phytosanitary certification"
|
|
1946
1949
|
phytosanitary_register: "Phytosanitary register"
|
|
1947
1950
|
prescription: "Prescription"
|
|
@@ -2163,6 +2166,7 @@ eng:
|
|
|
2163
2166
|
element_count: "Element count"
|
|
2164
2167
|
end_of_life_witness: "End of life witness"
|
|
2165
2168
|
energy: "Energy"
|
|
2169
|
+
engine_speed: "Engine speed"
|
|
2166
2170
|
entry_date: "Entry date"
|
|
2167
2171
|
entry_reason: "Entry reason"
|
|
2168
2172
|
estimated_harvest_alcoholic_volumetric_concentration: "Estimated harvest alcoholic volumetric concentration"
|
|
@@ -2186,6 +2190,7 @@ eng:
|
|
|
2186
2190
|
germination_rate: "Germination rate"
|
|
2187
2191
|
grains_area_density: "Grains area density"
|
|
2188
2192
|
grains_count: "Grains count"
|
|
2193
|
+
ground_speed: "Ground_speed"
|
|
2189
2194
|
hagberg_falling_number: "Hagberg falling number"
|
|
2190
2195
|
healthy: "Healthiness"
|
|
2191
2196
|
height: "Height"
|
|
@@ -2252,6 +2257,8 @@ eng:
|
|
|
2252
2257
|
nominal_storable_easement_area: "Nominal storable easement area"
|
|
2253
2258
|
nominal_storable_net_mass: "Nominal storable net mass"
|
|
2254
2259
|
nominal_storable_net_volume: "Nominal storable net volume"
|
|
2260
|
+
nozzle_count: "Nozzle count"
|
|
2261
|
+
nozzle_type: "Nozzle type"
|
|
2255
2262
|
organic_matter_concentration: "Organic matter concentration"
|
|
2256
2263
|
origin_country_code: "Origin country code"
|
|
2257
2264
|
origin_identification_number: "Origin identification number"
|
|
@@ -2295,6 +2302,8 @@ eng:
|
|
|
2295
2302
|
spans_count: "Spans count"
|
|
2296
2303
|
species_purity: "Species purity"
|
|
2297
2304
|
specific_weight: "Specific weight"
|
|
2305
|
+
spray_mix_volume_area_density: "Spray mix volume area density"
|
|
2306
|
+
spray_pressure: "Spray pressure"
|
|
2298
2307
|
stakes_count: "Stakes count"
|
|
2299
2308
|
subsoil_nature: "Subsoil nature"
|
|
2300
2309
|
sucrose_concentration: "Sucrose concentration"
|
|
@@ -4699,9 +4708,12 @@ eng:
|
|
|
4699
4708
|
parts_per_million: "Parts per million"
|
|
4700
4709
|
pascal: "Pascal"
|
|
4701
4710
|
percent: "Percent"
|
|
4711
|
+
plant_per_hour: "Plant per hour"
|
|
4702
4712
|
quintal: "Quintal"
|
|
4703
4713
|
quintal_per_hectare: "Quintal per hectare"
|
|
4704
4714
|
radian: "Radian"
|
|
4715
|
+
radian_per_second: "Radian per second"
|
|
4716
|
+
revolution_per_second: "Revolution per second"
|
|
4705
4717
|
second: "Second"
|
|
4706
4718
|
square_centimeter: "Square centimeter"
|
|
4707
4719
|
square_meter: "Square meter"
|
|
@@ -4716,6 +4728,7 @@ eng:
|
|
|
4716
4728
|
ton_per_hectare: "Ton per hectare"
|
|
4717
4729
|
unity: "Unity"
|
|
4718
4730
|
unity_per_hectare: "Unity per hectare"
|
|
4731
|
+
unity_per_hour: "Unity per hour"
|
|
4719
4732
|
unity_per_kilogram: "Unity per kilogram"
|
|
4720
4733
|
unity_per_liter: "Unity per liter"
|
|
4721
4734
|
unity_per_square_meter: "Unity per square meter"
|
data/config/locales/fra.yml
CHANGED
|
@@ -1948,6 +1948,7 @@ fra:
|
|
|
1948
1948
|
surface_area_flow: "Débit surfacique"
|
|
1949
1949
|
temperature: "Température"
|
|
1950
1950
|
time: "Temps"
|
|
1951
|
+
unity_flow: "Débit unitaire"
|
|
1951
1952
|
volume: "Volume"
|
|
1952
1953
|
volume_area_density: "Volume par surface"
|
|
1953
1954
|
volume_concentration: "Concentration volumique"
|
|
@@ -1977,6 +1978,7 @@ fra:
|
|
|
1977
1978
|
acta_category: "Catégorie ACTA"
|
|
1978
1979
|
document_natures:
|
|
1979
1980
|
items:
|
|
1981
|
+
ac_work_sheet: "Fiche de chantier ETA"
|
|
1980
1982
|
account_journal_entry_sheet: "Extrait de compte"
|
|
1981
1983
|
activity_cost: "Coûts de production détaillés"
|
|
1982
1984
|
animal_husbandry_register: "Registre d’élevage"
|
|
@@ -2016,6 +2018,7 @@ fra:
|
|
|
2016
2018
|
outgoing_payment_list__standard: "Lot de décaissements"
|
|
2017
2019
|
pending_vat_register: "État de TVA préparatoire"
|
|
2018
2020
|
pfi_land_parcel_register: "Bilan IFT"
|
|
2021
|
+
phytosanitary_applicator_sheet: "Fiche applicateur"
|
|
2019
2022
|
phytosanitary_certification: "Certi-Phyto"
|
|
2020
2023
|
phytosanitary_register: "Registre phytosanitaire"
|
|
2021
2024
|
prescription: "Prescription vétérinaire"
|
|
@@ -2270,6 +2273,7 @@ fra:
|
|
|
2270
2273
|
element_count: "Nombre d'éléments"
|
|
2271
2274
|
end_of_life_witness: "Témoin du décès"
|
|
2272
2275
|
energy: "Énergie"
|
|
2276
|
+
engine_speed: "Régime"
|
|
2273
2277
|
entry_date: "Date d'entrée"
|
|
2274
2278
|
entry_reason: "Motif d'entrée"
|
|
2275
2279
|
estimated_harvest_alcoholic_volumetric_concentration: "TAVP vendange"
|
|
@@ -2293,6 +2297,7 @@ fra:
|
|
|
2293
2297
|
germination_rate: "Taux de germination"
|
|
2294
2298
|
grains_area_density: "Grains par surface"
|
|
2295
2299
|
grains_count: "Nombre de grains"
|
|
2300
|
+
ground_speed: "Vitesse"
|
|
2296
2301
|
hagberg_falling_number: "Temps de chute de Hagberg"
|
|
2297
2302
|
healthy: "Bonne santé"
|
|
2298
2303
|
height: "Hauteur"
|
|
@@ -2359,6 +2364,8 @@ fra:
|
|
|
2359
2364
|
nominal_storable_easement_area: "Capacité de stockage surfacique nominale (emprise au sol)"
|
|
2360
2365
|
nominal_storable_net_mass: "Capacité de stockage massique nominale"
|
|
2361
2366
|
nominal_storable_net_volume: "Capacité de stockage volumique nominale"
|
|
2367
|
+
nozzle_count: "Nombre de buses"
|
|
2368
|
+
nozzle_type: "Couleur/type de buses"
|
|
2362
2369
|
organic_matter_concentration: "Teneur en matière organique"
|
|
2363
2370
|
origin_country_code: "Code pays d'origine"
|
|
2364
2371
|
origin_identification_number: "Numéro d'identification d'origine"
|
|
@@ -2403,6 +2410,8 @@ fra:
|
|
|
2403
2410
|
spans_count: "Nombre de travées"
|
|
2404
2411
|
species_purity: "Pureté spécifique"
|
|
2405
2412
|
specific_weight: "Poids spécifique"
|
|
2413
|
+
spray_mix_volume_area_density: "Volume de bouillie surfacique"
|
|
2414
|
+
spray_pressure: "Pression"
|
|
2406
2415
|
stakes_count: "Nombre de piquets"
|
|
2407
2416
|
subsoil_nature: "Type de sous-sol"
|
|
2408
2417
|
sucrose_concentration: "Teneur en sucre"
|
|
@@ -4950,9 +4959,12 @@ fra:
|
|
|
4950
4959
|
parts_per_million: "Partie par millions (ppm)"
|
|
4951
4960
|
pascal: "Pascal"
|
|
4952
4961
|
percent: "Pourcent"
|
|
4962
|
+
plant_per_hour: "Plante/Pied par heure"
|
|
4953
4963
|
quintal: "Quintal"
|
|
4954
4964
|
quintal_per_hectare: "Quintal par hectare"
|
|
4955
4965
|
radian: "Radian"
|
|
4966
|
+
radian_per_second: "Radian par seconde"
|
|
4967
|
+
revolution_per_second: "Tour par minute"
|
|
4956
4968
|
second: "Seconde"
|
|
4957
4969
|
square_centimeter: "Centimètre carré"
|
|
4958
4970
|
square_meter: "Mètre carré"
|
|
@@ -4967,6 +4979,7 @@ fra:
|
|
|
4967
4979
|
ton_per_hectare: "Tonne par hectare"
|
|
4968
4980
|
unity: "Unité"
|
|
4969
4981
|
unity_per_hectare: "Unité par hectare"
|
|
4982
|
+
unity_per_hour: "Unité par heure"
|
|
4970
4983
|
unity_per_kilogram: "Unité par kilogramme"
|
|
4971
4984
|
unity_per_liter: "Unité par litre"
|
|
4972
4985
|
unity_per_square_meter: "Unité par mètre carré"
|
data/db/reference.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0"?>
|
|
2
|
-
<nomenclatures xmlns="http://www.ekylibre.org/XML/2013/nomenclatures" version="
|
|
2
|
+
<nomenclatures xmlns="http://www.ekylibre.org/XML/2013/nomenclatures" version="20220714161601">
|
|
3
3
|
<nomenclature name="abilities" translateable="true">
|
|
4
4
|
<properties>
|
|
5
5
|
<property name="parameters" type="choice_list" choices="variety, issue_nature"/>
|
|
@@ -1719,7 +1719,7 @@
|
|
|
1719
1719
|
<property name="countries" type="item_list" choices="countries"/>
|
|
1720
1720
|
<property name="number" type="string" required="true" default="2"/>
|
|
1721
1721
|
<property name="precision" type="integer" required="true" default="2"/>
|
|
1722
|
-
<property name="symbol" type="string"/>
|
|
1722
|
+
<property name="symbol" type="string" fallbacks="name"/>
|
|
1723
1723
|
</properties>
|
|
1724
1724
|
<items>
|
|
1725
1725
|
<item name="AED" precision="2" active="true" countries="ae" number="784"/>
|
|
@@ -1821,7 +1821,7 @@
|
|
|
1821
1821
|
<item name="MNT" precision="2" active="true" countries="mn" number="496"/>
|
|
1822
1822
|
<item name="MOP" precision="2" active="true" countries="mo" number="446"/>
|
|
1823
1823
|
<item name="MRO" precision="2" active="true" countries="mr" number="478"/>
|
|
1824
|
-
<item name="MUR" precision="2" active="true" countries="mu" number="480"/>
|
|
1824
|
+
<item name="MUR" precision="2" active="true" countries="mu" number="480" symbol="Rs"/>
|
|
1825
1825
|
<item name="MVR" precision="2" active="true" countries="mv" number="462"/>
|
|
1826
1826
|
<item name="MWK" precision="2" active="true" countries="mw" number="454"/>
|
|
1827
1827
|
<item name="MXN" precision="2" active="true" countries="mx" number="484"/>
|
|
@@ -1913,6 +1913,7 @@
|
|
|
1913
1913
|
<item name="amount_of_substance" symbol="mol"/>
|
|
1914
1914
|
<item name="amount_of_substance_density" symbol="mol/kg"/>
|
|
1915
1915
|
<item name="angle" symbol="rad"/>
|
|
1916
|
+
<item name="angular_velocity" symbol="rad/s"/>
|
|
1916
1917
|
<item name="concentration" symbol="./m³"/>
|
|
1917
1918
|
<item name="distance" symbol="m"/>
|
|
1918
1919
|
<item name="distance_speed" symbol="m/s"/>
|
|
@@ -1934,6 +1935,7 @@
|
|
|
1934
1935
|
<item name="surface_area_flow" symbol="m²/s"/>
|
|
1935
1936
|
<item name="temperature" symbol="K"/>
|
|
1936
1937
|
<item name="time" symbol="s"/>
|
|
1938
|
+
<item name="unity_flow" symbol="./s"/>
|
|
1937
1939
|
<item name="volume" symbol="m³"/>
|
|
1938
1940
|
<item name="volume_area_density" symbol="m³/m²"/>
|
|
1939
1941
|
<item name="volume_concentration" symbol="m³/m³"/>
|
|
@@ -1964,10 +1966,12 @@
|
|
|
1964
1966
|
</nomenclature>
|
|
1965
1967
|
<nomenclature name="document_natures" translateable="true">
|
|
1966
1968
|
<properties>
|
|
1969
|
+
<property name="active" type="boolean" default="true"/>
|
|
1967
1970
|
<property name="category" type="item_list" choices="document_categories"/>
|
|
1968
1971
|
<property name="signed" type="boolean" default="false"/>
|
|
1969
1972
|
</properties>
|
|
1970
1973
|
<items>
|
|
1974
|
+
<item name="ac_work_sheet" category="management" active="false"/>
|
|
1971
1975
|
<item name="account_journal_entry_sheet" category="accountancy"/>
|
|
1972
1976
|
<item name="activity_cost" category="management"/>
|
|
1973
1977
|
<item name="animal_husbandry_register" category="animal_farming"/>
|
|
@@ -2009,6 +2013,7 @@
|
|
|
2009
2013
|
<item name="outgoing_payment_list__standard" category="exploitation"/>
|
|
2010
2014
|
<item name="pending_vat_register" category="accountancy"/>
|
|
2011
2015
|
<item name="pfi_land_parcel_register" category="land_parcel_management"/>
|
|
2016
|
+
<item name="phytosanitary_applicator_sheet" category="management"/>
|
|
2012
2017
|
<item name="phytosanitary_certification" category="land_parcel_management"/>
|
|
2013
2018
|
<item name="phytosanitary_register" category="land_parcel_management"/>
|
|
2014
2019
|
<item name="prescription" category="health"/>
|
|
@@ -2218,6 +2223,7 @@
|
|
|
2218
2223
|
<item name="element_count" datatype="integer"/>
|
|
2219
2224
|
<item name="end_of_life_witness" datatype="string"/>
|
|
2220
2225
|
<item name="energy" datatype="measure" unit="kilowatt_hour"/>
|
|
2226
|
+
<item name="engine_speed" datatype="measure" unit="revolution_per_minute"/>
|
|
2221
2227
|
<item name="entry_date" datatype="string"/>
|
|
2222
2228
|
<item name="entry_reason" datatype="string"/>
|
|
2223
2229
|
<item name="estimated_harvest_alcoholic_volumetric_concentration" datatype="measure" unit="volume_percent"/>
|
|
@@ -2241,6 +2247,7 @@
|
|
|
2241
2247
|
<item name="germination_rate" datatype="measure" unit="percent"/>
|
|
2242
2248
|
<item name="grains_area_density" datatype="measure" unit="unity_per_square_meter"/>
|
|
2243
2249
|
<item name="grains_count" datatype="measure" unit="thousand"/>
|
|
2250
|
+
<item name="ground_speed" datatype="measure" unit="kilometer_per_hour"/>
|
|
2244
2251
|
<item name="hagberg_falling_number" datatype="measure" unit="second"/>
|
|
2245
2252
|
<item name="healthy" datatype="boolean"/>
|
|
2246
2253
|
<item name="height" datatype="measure" unit="meter"/>
|
|
@@ -2307,6 +2314,8 @@
|
|
|
2307
2314
|
<item name="nominal_storable_easement_area" datatype="measure" unit="square_meter"/>
|
|
2308
2315
|
<item name="nominal_storable_net_mass" datatype="measure" unit="kilogram"/>
|
|
2309
2316
|
<item name="nominal_storable_net_volume" datatype="measure" unit="liter"/>
|
|
2317
|
+
<item name="nozzle_count" datatype="integer"/>
|
|
2318
|
+
<item name="nozzle_type" datatype="string"/>
|
|
2310
2319
|
<item name="organic_matter_concentration" datatype="measure" unit="mass_percent"/>
|
|
2311
2320
|
<item name="origin_country_code" datatype="string"/>
|
|
2312
2321
|
<item name="origin_identification_number" datatype="string"/>
|
|
@@ -2350,6 +2359,8 @@
|
|
|
2350
2359
|
<item name="spans_count" datatype="integer"/>
|
|
2351
2360
|
<item name="species_purity" datatype="measure" unit="percent"/>
|
|
2352
2361
|
<item name="specific_weight" datatype="measure" unit="kilogram_per_hectoliter"/>
|
|
2362
|
+
<item name="spray_mix_volume_area_density" datatype="measure" unit="liter_per_hectare"/>
|
|
2363
|
+
<item name="spray_pressure" datatype="measure" unit="bar"/>
|
|
2353
2364
|
<item name="stakes_count" datatype="integer" gathering="proportional_to_population"/>
|
|
2354
2365
|
<item name="subsoil_nature" datatype="choice" choices="soil_natures"/>
|
|
2355
2366
|
<item name="sucrose_concentration" datatype="measure" unit="mass_percent"/>
|
|
@@ -4315,7 +4326,7 @@
|
|
|
4315
4326
|
<item name="sower" category="equipment" variety="trailed_equipment" population_counting="unitary" abilities="sow" variable_indicators="geolocation" frozen_indicators="nominal_storable_net_volume, application_width, rows_count, theoretical_working_speed" nature="equipment"/>
|
|
4316
4327
|
<item name="species" category="fruit" variety="pollen" derivative_of="plant" population_counting="decimal" variable_indicators="reference_year" frozen_indicators="net_mass, net_volume" nature="article"/>
|
|
4317
4328
|
<item name="spinach" category="vegetable" variety="vegetable" derivative_of="spinacia_oleracea" population_counting="decimal" abilities="feed(animal)" variable_indicators="" frozen_indicators="net_mass" nature="article"/>
|
|
4318
|
-
<item name="sprayer" category="equipment" variety="trailed_equipment" population_counting="unitary" abilities="spray" variable_indicators="geolocation
|
|
4329
|
+
<item name="sprayer" category="equipment" variety="trailed_equipment" population_counting="unitary" abilities="spray" variable_indicators="geolocation, application_width, element_count, nominal_storable_net_volume, rows_count, theoretical_working_speed" frozen_indicators="" nature="equipment"/>
|
|
4319
4330
|
<item name="spread_renting" category="equipment_rent" variety="service" population_counting="decimal" abilities="spread(preparation)" variable_indicators="" frozen_indicators="usage_duration" nature="fee_and_service"/>
|
|
4320
4331
|
<item name="spreader" category="equipment" variety="trailed_equipment" population_counting="unitary" abilities="spread(preparation)" variable_indicators="geolocation" frozen_indicators="nominal_storable_net_volume, application_width, theoretical_working_speed" nature="equipment"/>
|
|
4321
4332
|
<item name="spreader_trailer" category="equipment" variety="trailed_equipment" population_counting="unitary" abilities="store(excrement), move, spread(excrement), store(raw_matter), store_fluid, spread(preparation)" variable_indicators="geolocation" frozen_indicators="nominal_storable_net_volume, nominal_storable_net_mass" nature="equipment"/>
|
|
@@ -4331,7 +4342,7 @@
|
|
|
4331
4342
|
<item name="telescopic_handler" category="equipment" variety="handling_equipment" population_counting="unitary" variable_indicators="geolocation" abilities="catch(product)" nature="equipment"/>
|
|
4332
4343
|
<item name="tool" category="equipment" variety="equipment" population_counting="unitary" nature="equipment"/>
|
|
4333
4344
|
<item name="topper" category="equipment" variety="trailed_equipment" population_counting="unitary" abilities="cut" frozen_indicators="application_width, theoretical_working_speed" variable_indicators="geolocation" nature="equipment"/>
|
|
4334
|
-
<item name="tractor" category="equipment" variety="tractor" population_counting="unitary" abilities="catch(matter), move, tow(matter), consume(oil), consume(fuel)" variable_indicators="
|
|
4345
|
+
<item name="tractor" category="equipment" variety="tractor" population_counting="unitary" abilities="catch(matter), move, tow(matter), consume(oil), consume(fuel)" variable_indicators="fuel_consumption, geolocation, motor_power, hour_counter, ground_speed" frozen_indicators="" linkage_points="rear, front" nature="equipment"/>
|
|
4335
4346
|
<item name="trade_show" category="trade_show" variety="service" population_counting="integer" variable_indicators="" nature="fee_and_service"/>
|
|
4336
4347
|
<item name="trailer" category="equipment" variety="trailed_equipment" population_counting="unitary" abilities="store_fluid, store(grain), store(grass), store(raw_matter), store(silage), move" variable_indicators="geolocation" frozen_indicators="nominal_storable_net_volume, nominal_storable_net_mass" nature="equipment"/>
|
|
4337
4348
|
<item name="training_course" category="service" variety="service" population_counting="decimal" variable_indicators="" frozen_indicators="usage_duration" nature="fee_and_service"/>
|
|
@@ -10252,6 +10263,7 @@
|
|
|
10252
10263
|
<item name="parts_per_million" dimension="none" symbol="ppm" d="1000000.0" base_unit="parts" base_dimension="" repartition_unit="million" repartition_dimension="none"/>
|
|
10253
10264
|
<item name="pascal" dimension="pressure" symbol="Pa" base_unit="pascal" base_dimension="pressure"/>
|
|
10254
10265
|
<item name="percent" dimension="none" symbol="%" d="100.0" base_unit="percent" base_dimension="none"/>
|
|
10266
|
+
<item name="plant_per_hour" dimension="unity_flow" symbol="plant/h" a="1.0" d="3600.0" base_unit="unity" base_dimension="none" repartition_unit="hour" repartition_dimension="time"/>
|
|
10255
10267
|
<item name="quintal" dimension="mass" symbol="q" a="100.0" base_unit="quintal" base_dimension="mass"/>
|
|
10256
10268
|
<item name="quintal_per_acre" dimension="mass_area_density" symbol="qt/acre" a="0.024710538146" base_unit="quintal" base_dimension="mass" repartition_unit="acre" repartition_dimension="surface_area"/>
|
|
10257
10269
|
<item name="quintal_per_are" dimension="mass_area_density" symbol="qt/a" a="1.0" base_unit="quintal" base_dimension="mass" repartition_unit="are" repartition_dimension="surface_area"/>
|
|
@@ -10259,6 +10271,8 @@
|
|
|
10259
10271
|
<item name="quintal_per_square_centimeter" dimension="mass_area_density" symbol="qt/cm²" a="1000000.0" base_unit="quintal" base_dimension="mass" repartition_unit="square_centimeter" repartition_dimension="surface_area"/>
|
|
10260
10272
|
<item name="quintal_per_square_meter" dimension="mass_area_density" symbol="qt/m²" a="100.0" base_unit="quintal" base_dimension="mass" repartition_unit="square_meter" repartition_dimension="surface_area"/>
|
|
10261
10273
|
<item name="radian" dimension="angle" symbol="rad" base_unit="radian" base_dimension="angle"/>
|
|
10274
|
+
<item name="radian_per_second" dimension="angular_velocity" symbol="rad/s" repartition_unit="second" repartition_dimension="time" base_unit="radian" base_dimension="angle"/>
|
|
10275
|
+
<item name="revolution_per_minute" dimension="angular_velocity" symbol="tr/min" a="0.10471975511965977" d="60.0" repartition_unit="minute" repartition_dimension="time"/>
|
|
10262
10276
|
<item name="second" dimension="time" symbol="s" base_unit="second" base_dimension="time"/>
|
|
10263
10277
|
<item name="square_centimeter" dimension="surface_area" symbol="cm²" a="0.0001" base_unit="square_centimeter" base_dimension="surface_area"/>
|
|
10264
10278
|
<item name="square_meter" dimension="surface_area" symbol="m²" base_unit="square_meter" base_dimension="surface_area"/>
|
|
@@ -10278,6 +10292,7 @@
|
|
|
10278
10292
|
<item name="ton_per_square_meter" dimension="mass_area_density" symbol="t/m²" a="1000.0" base_unit="ton" base_dimension="mass" repartition_unit="square_meter" repartition_dimension="surface_area"/>
|
|
10279
10293
|
<item name="unity" dimension="none" symbol="." base_unit="unity" base_dimension="none"/>
|
|
10280
10294
|
<item name="unity_per_hectare" dimension="surface_area_density" symbol="./ha" d="10000.0" base_unit="unity" base_dimension="none" repartition_unit="hectare" repartition_dimension="surface_area"/>
|
|
10295
|
+
<item name="unity_per_hour" dimension="unity_flow" symbol="./h" a="1.0" d="3600.0" base_unit="unity" base_dimension="none" repartition_unit="hour" repartition_dimension="time"/>
|
|
10281
10296
|
<item name="unity_per_kilogram" dimension="mass_density" symbol="./kg" base_unit="unity" base_dimension="none" repartition_unit="kilogram" repartition_dimension="mass"/>
|
|
10282
10297
|
<item name="unity_per_liter" dimension="concentration" symbol="./l" d="0.001" base_unit="unity" base_dimension="none" repartition_unit="liter" repartition_dimension="volume"/>
|
|
10283
10298
|
<item name="unity_per_square_meter" dimension="surface_area_density" symbol="./m²" base_unit="unity" base_dimension="none" repartition_unit="square_meter" repartition_dimension="surface_area"/>
|
data/lib/onoma/item.rb
CHANGED
|
@@ -279,11 +279,12 @@ module Onoma
|
|
|
279
279
|
if property
|
|
280
280
|
if value.nil? && property.fallbacks
|
|
281
281
|
property.fallbacks.each do |fallback|
|
|
282
|
+
value ||= @name if fallback == :name
|
|
282
283
|
value ||= @attributes[fallback]
|
|
283
284
|
break if value
|
|
284
285
|
end
|
|
285
286
|
end
|
|
286
|
-
value
|
|
287
|
+
value = cast_property(name, property.default) if property.default && value.nil?
|
|
287
288
|
end
|
|
288
289
|
value
|
|
289
290
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module Onoma
|
|
2
|
+
module Migration
|
|
3
|
+
module Actions
|
|
4
|
+
class PropertyChange < Onoma::Migration::Actions::Base
|
|
5
|
+
attr_reader :nomenclature, :name, :changes
|
|
6
|
+
def initialize(element)
|
|
7
|
+
name = element['property'].split('.')
|
|
8
|
+
@nomenclature = name.first
|
|
9
|
+
@name = name.second
|
|
10
|
+
|
|
11
|
+
@changes = {}
|
|
12
|
+
if element.has_attribute?('type')
|
|
13
|
+
changes[:type] = element.attr('type').to_sym
|
|
14
|
+
end
|
|
15
|
+
if element.has_attribute?('fallbacks')
|
|
16
|
+
@changes[:fallbacks] = element.attr('fallbacks').to_s.strip.split(/[[:space:]]*\,[[:space:]]*/).map(&:to_sym)
|
|
17
|
+
end
|
|
18
|
+
if element.has_attribute?('default')
|
|
19
|
+
@changes[:default] = element.attr('default').to_sym
|
|
20
|
+
end
|
|
21
|
+
if element.has_attribute?('required')
|
|
22
|
+
@changes[:required] = element.attr('required').to_s == 'true'
|
|
23
|
+
end
|
|
24
|
+
# @changes[:inherit] = !!(element.attr('inherit').to_s == 'true')
|
|
25
|
+
if element.has_attribute?('choices')
|
|
26
|
+
if type == :choice || type == :choice_list
|
|
27
|
+
@changes[:choices] = element.attr('choices').to_s.strip.split(/[[:space:]]*\,[[:space:]]*/).map(&:to_sym)
|
|
28
|
+
elsif type == :item || type == :item_list
|
|
29
|
+
@changes[:choices] = element.attr('choices').to_s.strip.to_sym
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
data/lib/onoma/nomenclature.rb
CHANGED
|
@@ -256,6 +256,22 @@ module Onoma
|
|
|
256
256
|
p
|
|
257
257
|
end
|
|
258
258
|
|
|
259
|
+
def change_property(name, updates = {})
|
|
260
|
+
property = property_natures[name]
|
|
261
|
+
|
|
262
|
+
unless property
|
|
263
|
+
raise "Property #{p.name} doesn't exist in nomenclature #{@name}"
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
updates.each do |k, v|
|
|
267
|
+
begin
|
|
268
|
+
property.send("#{k}=", v)
|
|
269
|
+
rescue NoMethodError => e
|
|
270
|
+
"#{k} attribute doesn't exist for property nature"
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
|
|
259
275
|
def sibling(name)
|
|
260
276
|
@set.find(name)
|
|
261
277
|
end
|
|
@@ -151,8 +151,9 @@ module Onoma
|
|
|
151
151
|
nomenclature.add_property(property_name, type, options)
|
|
152
152
|
end
|
|
153
153
|
|
|
154
|
-
def change_property(
|
|
155
|
-
|
|
154
|
+
def change_property(nomenclature_name, property_name, updates = {})
|
|
155
|
+
nomenclature = find!(nomenclature_name)
|
|
156
|
+
nomenclature.change_property(property_name, updates)
|
|
156
157
|
end
|
|
157
158
|
|
|
158
159
|
def remove_property(_nomenclature_name, _property_name, _options = {})
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
module Onoma
|
|
2
2
|
class PropertyNature
|
|
3
|
-
attr_reader :nomenclature
|
|
3
|
+
attr_reader :nomenclature
|
|
4
|
+
attr_accessor :name, :type, :fallbacks, :default, :source
|
|
4
5
|
|
|
5
6
|
# New item
|
|
6
7
|
def initialize(nomenclature, name, type, options = {})
|
data/lib/onoma/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onoma
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ekylibre developers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-07-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -153,6 +153,7 @@ files:
|
|
|
153
153
|
- lib/onoma/migration/actions/nomenclature_change.rb
|
|
154
154
|
- lib/onoma/migration/actions/nomenclature_creation.rb
|
|
155
155
|
- lib/onoma/migration/actions/nomenclature_removal.rb
|
|
156
|
+
- lib/onoma/migration/actions/property_change.rb
|
|
156
157
|
- lib/onoma/migration/actions/property_creation.rb
|
|
157
158
|
- lib/onoma/migration/base.rb
|
|
158
159
|
- lib/onoma/migrator.rb
|