diff --git a/datamodel/demo/minimal_organisation.sql b/datamodel/demo/minimal_organisation.sql new file mode 100644 index 00000000..1ca57faa --- /dev/null +++ b/datamodel/demo/minimal_organisation.sql @@ -0,0 +1,58 @@ +/* qwat - Demo data organisation for sia405 control cable and protection tube*/ + +INSERT INTO qwat_od.organisation ( + obj_id, + identifier, + identifier_short, + municipality_number, + organisation_type, + remark, + status, + uid, + last_modification, + fk_dataowner, + fk_provider + ) +VALUES ( + 'ch20p3q400002114', + 'Service intercommunal de gestion SIGE', + 'SIGE', + NULL, + 8608, + NULL, + 9047, + 'CHE108954487', + '20240906', + NULL, + NULL + ); + +INSERT INTO qwat_od.organisation ( + obj_id, + identifier, + identifier_short, + municipality_number, + organisation_type, + remark, + status, + uid, + last_modification, + fk_dataowner, + fk_provider + ) +VALUES ( + 'ch20p3q400000107', + 'unbekannt', + 'inconnu', + NULL, + 8606, -- Privat + 'Für alle Objekte mit unklarer Zuständigkeit', + 9047, + 'CHE108954487', + '20211116', + NULL, + NULL + ); + + + diff --git a/datamodel/demo/sia405_cable_point_qwat_demo.sql b/datamodel/demo/sia405_cable_point_qwat_demo.sql new file mode 100644 index 00000000..c44af001 --- /dev/null +++ b/datamodel/demo/sia405_cable_point_qwat_demo.sql @@ -0,0 +1,40 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 15.7 +-- Dumped by pg_dump version 15.3 + +-- Started on 2025-04-15 15:32:58 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- TOC entry 5027 (class 0 OID 430210) +-- Dependencies: 390 +-- Data for Name: sia405cc_cable_point; Type: TABLE DATA; Schema: qwat_od; Owner: postgres +-- + +INSERT INTO qwat_od.sia405cc_cable_point VALUES ('ch000000CI000000', 'test cable_manhole', '01010000A01555000005F55116A36C1F417CD75EE9E95A03410000000000000000', 9386, 9392, NULL, 9396, 9399, 2024, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-12-09 15:50:15.682221', 'ch20p3q400002114', 'ch20p3q400002114', NULL, NULL); +INSERT INTO qwat_od.sia405cc_cable_point VALUES ('ch000000CI000001', 'test cable cabin', '01010000A0155500002C4F527EBB6C1F415610BC11005B03410000000000000000', 9387, 9392, NULL, 9396, 9399, 2024, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-12-09 15:50:15.687228', 'ch20p3q400002114', 'ch20p3q400002114', 'ch20p3q400002114', NULL); +INSERT INTO qwat_od.sia405cc_cable_point VALUES ('ch000000CI000004', 'cable sleeve', '01010000A015550000057EEA08966C1F41F133368DDF5A03410000000000000000', 9385, 9392, NULL, 9395, 9399, 2024, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-12-09 16:32:11.898244', 'ch20p3q400002114', 'ch20p3q400002114', 'ch20p3q400002114', NULL); +INSERT INTO qwat_od.sia405cc_cable_point VALUES ('ch000000CI000002', 'cable point 1', '01010000A0155500004361FBB19F6C1F411485E272EB5A03410000000000000000', 9388, 9392, NULL, 9395, 9399, 2024, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-12-09 16:32:39.995317', 'ch20p3q400002114', 'ch20p3q400002114', 'ch20p3q400000107', NULL); +INSERT INTO qwat_od.sia405cc_cable_point VALUES ('ch000000CI000003', 'cable point 2', '01010000A015550000425994589B6C1F417CE9AD1DE75A03410000000000000000', 9388, 9392, NULL, 9395, 9399, 2024, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-12-09 16:32:39.997009', 'ch20p3q400002114', 'ch20p3q400002114', 'ch20p3q400000107', NULL); +INSERT INTO qwat_od.sia405cc_cable_point VALUES ('ch000000CI000005', 'cabine 2', '01010000A015550000F1277EAA536C1F412CF60307815A03410000000000000000', 9387, 9392, NULL, 9395, 9399, 2024, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-12-09 16:33:32.997477', 'ch20p3q400002114', 'ch20p3q400002114', 'ch20p3q400002114', NULL); + + +-- Completed on 2025-04-15 15:32:58 + +-- +-- PostgreSQL database dump complete +-- + diff --git a/datamodel/demo/sia405_cable_qwat_demo.sql b/datamodel/demo/sia405_cable_qwat_demo.sql new file mode 100644 index 00000000..05007064 --- /dev/null +++ b/datamodel/demo/sia405_cable_qwat_demo.sql @@ -0,0 +1,36 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 15.7 +-- Dumped by pg_dump version 15.3 + +-- Started on 2025-04-15 15:33:56 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- TOC entry 5028 (class 0 OID 430225) +-- Dependencies: 392 +-- Data for Name: sia405cc_cable; Type: TABLE DATA; Schema: qwat_od; Owner: postgres +-- + +INSERT INTO qwat_od.sia405cc_cable VALUES ('ch000000CB000001', 'test cable', 9339, 9346, 9347, 9365, 2024, NULL, NULL, NULL, 350, '01090000A0155500000100000001020000800200000005F55116A36C1F417CD75EE9E95A034100000000000000002C4F527EBB6C1F415610BC11005B03410000000000000000', 9361, NULL, '2024-12-09 16:34:16.404826', 'ch20p3q400002114', 'ch20p3q400002114', 'ch20p3q400002114', NULL); +INSERT INTO qwat_od.sia405cc_cable VALUES ('ch000000CB000002', 'cable 2', 9339, 9346, 9347, 9365, 2024, NULL, NULL, NULL, NULL, '01090000A01555000001000000010200008005000000F1277EAA536C1F412CF60307815A03410000000000000000057EEA08966C1F41F133368DDF5A03410000000000000000425994589B6C1F417CE9AD1DE75A034100000000000000004361FBB19F6C1F411485E272EB5A0341000000000000000005F55116A36C1F417CD75EE9E95A03410000000000000000', 9361, NULL, '2024-12-09 16:36:10.937486', 'ch20p3q400002114', 'ch20p3q400002114', 'ch20p3q400002114', NULL); + + +-- Completed on 2025-04-15 15:33:56 + +-- +-- PostgreSQL database dump complete +-- + diff --git a/datamodel/demo/sia405_protection_tube_qwat_demo.sql b/datamodel/demo/sia405_protection_tube_qwat_demo.sql new file mode 100644 index 00000000..e22ec81f --- /dev/null +++ b/datamodel/demo/sia405_protection_tube_qwat_demo.sql @@ -0,0 +1,35 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 15.7 +-- Dumped by pg_dump version 15.3 + +-- Started on 2025-04-15 15:29:40 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- TOC entry 5027 (class 0 OID 430392) +-- Dependencies: 403 +-- Data for Name: sia405pt_protection_tube; Type: TABLE DATA; Schema: qwat_od; Owner: postgres +-- + +INSERT INTO qwat_od.sia405pt_protection_tube VALUES ('ch000000PT000002', 'test pt LV03', NULL, '498', 500, NULL, NULL, 9443, 9446, NULL, NULL, NULL, '01090000A015550000010000000102000080020000000428014D956C1F41CEBC9289535B034100000000000000000BF630A4976C1F416744A7E13E5B03410000000000000000', '2024-12-09 14:02:29.962032', 'ch20p3q400002114', 'ch20p3q400002114', 'ch20p3q400002114', NULL, NULL); + + +-- Completed on 2025-04-15 15:29:41 + +-- +-- PostgreSQL database dump complete +-- + diff --git a/datamodel/ordinary_data/controlcable/03_qwat_control_cable_db_sia405.sql b/datamodel/ordinary_data/controlcable/03_qwat_control_cable_db_sia405.sql new file mode 100644 index 00000000..1e2ab80c --- /dev/null +++ b/datamodel/ordinary_data/controlcable/03_qwat_control_cable_db_sia405.sql @@ -0,0 +1,239 @@ +------ This file generates the postgres database (Modul fernwirkkabel (based on SIA405_FERNWIRKKABEL_3D_2015_LV95 (Version 18.04.2018) in en for QQIS +------ Rename classes for integration in specific TEKSI module based on this convention: https://github.com/orgs/teksi/discussions/100#discussioncomment-9058690 +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 09.12.2024 11:13:15 +------ with 3D coordinates + +--- CREATE FUNCTION qgep_sys.update_last_modified() exists already +------- +CREATE TABLE qwat_od.sia405cc_cable_point +( + obj_id varchar(16) NOT NULL, + CONSTRAINT pkey_qwat_od_sia405cc_cable_point_obj_id PRIMARY KEY (obj_id) +) +WITH ( + OIDS = False +); +CREATE SEQUENCE qwat_od.seq_sia405cc_cable_point_oid INCREMENT 1 MINVALUE 0 MAXVALUE 999999 START 0; +ALTER TABLE qwat_od.sia405cc_cable_point ALTER COLUMN obj_id SET DEFAULT qwat_sys.generate_oid('qwat_od','sia405cc_cable_point'); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.obj_id IS 'INTERLIS STANDARD OID (with Postfix/Präfix), see www.interlis.ch'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN name_number text; + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT _name_number_length_max_40 CHECK(char_length(name_number)<=40); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.name_number IS ''; +--ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN geometry_geometry geometry('POINT', :SRID); +-- CREATE INDEX in_qwat_sia405cc_cable_point_geometry_geometry ON qwat_od.sia405cc_cable_point USING gist (geometry_geometry ); +-- COMMENT ON COLUMN qwat_od.sia405cc_cable_point.geometry_geometry IS ''; +ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN geometry3d_geometry geometry('POINTZ', :SRID); +CREATE INDEX in_qwat_sia405cc_cable_point_geometry3d_geometry ON qwat_od.sia405cc_cable_point USING gist (geometry3d_geometry ); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.geometry3d_geometry IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN kind integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.kind IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN horizontal_positioning integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.horizontal_positioning IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN altitude decimal(7,3) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.altitude IS 'Altitude of component / Oberkante Bauteil / Bord supérieur de l''élément contructif'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN elevation_determination integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.elevation_determination IS 'Elevation determination of geometry (3D) / Höhenbestimmung der Geometrie (3D) / Définition de la détermination altimétrique de la Géométrie (3D)'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN status integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.status IS 'Operating and planning status of the structure / Betriebs- bzw. Planungszustand des Bauwerks / Etat de fonctionnement et de planification de l’ouvrage'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN installation_year smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.installation_year IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN sur_plus_cover decimal(4,1) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.sur_plus_cover IS 'Numerical mean value of an object / Numerisch mittlerer Wert eines Objektes / Valeur moyenne d''un objet'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN condition text; + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT _condition_length_max_40 CHECK(char_length(condition)<=40); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.condition IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN remark text; + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT _remark_length_max_80 CHECK(char_length(remark)<=80); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.remark IS 'General remarks / Allgemeine Bemerkungen / Remarques générales'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN dimension1 smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.dimension1 IS 'Larger dimension of an object (e.g. length) / grösseres Mass eines Objektes (z.B. Länge) / plus grande mesure d''un objet (par ex. Longueur, diamètre)'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN dimension2 smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.dimension2 IS 'smaller dimension of an object (e.g. width) / kleineres Mass eines Objektes (z.B. Breite) / plus petite msure d''un objet (par ex. Largeur)'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN altitude_lower_edge decimal(7,3) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.altitude_lower_edge IS 'Altitude lower edge of component / Höhe Unterkante / bord inférieur de l''élément constructif'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN symbolori decimal(4,1) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.symbolori IS 'Default: 90 degree / Default: 90 Grad / Default: 90 degre'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN depth smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.depth IS 'Extension3D, Fonction (calculated value) = altitude minus altitude_lower_edge / Erweiterung 3D, Funktion (berechneter Wert) = Hoehe minus Hoehe_UK. / Extension 3D, Fonction (valuer calculée) = Altitude minus Altitude_BI.'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now(); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN fk_dataowner varchar(16); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.fk_dataowner IS 'Foreignkey to Metaattribute dataowner (as an organisation) - this is the person or body who is allowed to delete, change or maintain this object / Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten / Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN fk_provider varchar(16); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.fk_provider IS 'Foreignkey to Metaattribute provider (as an organisation) - this is the person or body who delivered the data / Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat / FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données '; +------- +CREATE TRIGGER +update_last_modified_sia405cc_cable_point +BEFORE UPDATE OR INSERT ON + qwat_od.sia405cc_cable_point +FOR EACH ROW EXECUTE PROCEDURE + qwat_sys.update_last_modified(); +------- +CREATE TABLE qwat_od.sia405cc_cable +( + obj_id varchar(16) NOT NULL, + CONSTRAINT pkey_qwat_od_sia405cc_cable_obj_id PRIMARY KEY (obj_id) +) +WITH ( + OIDS = False +); +CREATE SEQUENCE qwat_od.seq_sia405cc_cable_oid INCREMENT 1 MINVALUE 0 MAXVALUE 999999 START 0; +ALTER TABLE qwat_od.sia405cc_cable ALTER COLUMN obj_id SET DEFAULT qwat_sys.generate_oid('qwat_od','sia405cc_cable'); +COMMENT ON COLUMN qwat_od.sia405cc_cable.obj_id IS 'INTERLIS STANDARD OID (with Postfix/Präfix), see www.interlis.ch'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN name_number text; + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT _name_number_length_max_40 CHECK(char_length(name_number)<=40); +COMMENT ON COLUMN qwat_od.sia405cc_cable.name_number IS ' / z.B. Kabelpunktanfang_Kabelpunkteende / xxx_z.B. Point_cableanfang_Point_cableeende'; +-- ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN geometry_geometry geometry('COMPOUNDCURVE', :SRID); +-- CREATE INDEX in_qwat_sia405cc_cable_geometry_geometry ON qwat_od.sia405cc_cable USING gist (geometry_geometry ); +-- COMMENT ON COLUMN qwat_od.sia405cc_cable.geometry_geometry IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN function integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.function IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN cable_type integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.cable_type IS 'Cable type / Kabelart / Genre de cable'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN horizontal_positioning integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.horizontal_positioning IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN status integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.status IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN installation_year smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.installation_year IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN sur_plus_cover decimal(4,1) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.sur_plus_cover IS 'Numerical mean value of an object / Numerisch mittlerer Wert eines Objektes / Valeur moyenne d''un objet'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN condition text; + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT _condition_length_max_40 CHECK(char_length(condition)<=40); +COMMENT ON COLUMN qwat_od.sia405cc_cable.condition IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN remark text; + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT _remark_length_max_80 CHECK(char_length(remark)<=80); +COMMENT ON COLUMN qwat_od.sia405cc_cable.remark IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN width smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.width IS 'Width of cable trench / Breite Kabeltrasse / Largeur du tracé du câble'; +ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN geometry3d_geometry geometry('COMPOUNDCURVEZ', :SRID); +CREATE INDEX in_qwat_sia405cc_cable_geometry3d_geometry ON qwat_od.sia405cc_cable USING gist (geometry3d_geometry ); +COMMENT ON COLUMN qwat_od.sia405cc_cable.geometry3d_geometry IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN elevation_determination integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.elevation_determination IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN depth smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.depth IS 'Extension 3D, heigth of of cable trench [mm]. / Erweiterung 3D, Mächtigkeit (Höhe) Kabeltrasse [mm]. / Extension 3D, épaisseur (largeur) du trace du câble [mm].'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now(); +COMMENT ON COLUMN qwat_od.sia405cc_cable.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN fk_dataowner varchar(16); +COMMENT ON COLUMN qwat_od.sia405cc_cable.fk_dataowner IS 'Foreignkey to Metaattribute dataowner (as an organisation) - this is the person or body who is allowed to delete, change or maintain this object / Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten / Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN fk_provider varchar(16); +COMMENT ON COLUMN qwat_od.sia405cc_cable.fk_provider IS 'Foreignkey to Metaattribute provider (as an organisation) - this is the person or body who delivered the data / Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat / FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données '; +------- +CREATE TRIGGER +update_last_modified_sia405cc_cable +BEFORE UPDATE OR INSERT ON + qwat_od.sia405cc_cable +FOR EACH ROW EXECUTE PROCEDURE + qwat_sys.update_last_modified(); + +------------ Relationships and Value Tables ----------- ; +ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN fk_owner varchar(16); +ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT rel_sia405cc_cable_point_owner FOREIGN KEY (fk_owner) REFERENCES qwat_od.organisation(obj_id) ON UPDATE CASCADE ON DELETE set null DEFERRABLE INITIALLY DEFERRED; +CREATE TABLE qwat_vl.sia405cc_cable_point_kind () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_point_kind ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_point_kind_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9385,9385,'cable_sleeve','Kabelmuffe','manchon_cable', 'manicotto_del_cavo', 'manson_de_cablu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9388,9388,'cable_point','Kabelpunkt','point_de_cable', 'punto_cavo', 'punct_de_cablu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9386,9386,'cable_manhole','Kabelschacht','chambre_cable', '', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9387,9387,'cabine','Kabine','cabine', 'cabina', 'cabina', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9384,9384,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9389,9389,'others','weitere','autre', '', '', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT fkey_vl_sia405cc_cable_point_kind FOREIGN KEY (kind) + REFERENCES qwat_vl.sia405cc_cable_point_kind (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_point_horizontal_positioning () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_point_horizontal_positioning ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_point_horizontal_positioning_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_point_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9392,9392,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9390,9390,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9391,9391,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT fkey_vl_sia405cc_cable_point_horizontal_positioning FOREIGN KEY (horizontal_positioning) + REFERENCES qwat_vl.sia405cc_cable_point_horizontal_positioning (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_point_elevation_determination () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_point_elevation_determination ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_point_elevation_determination_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_point_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9394,9394,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9395,9395,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9396,9396,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT fkey_vl_sia405cc_cable_point_elevation_determination FOREIGN KEY (elevation_determination) + REFERENCES qwat_vl.sia405cc_cable_point_elevation_determination (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_point_status () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_point_status ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_point_status_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9397,9397,'inoperative','ausser_Betrieb','hors_service', 'fuori_servizio', 'rrr_ausser_Betrieb', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9398,9398,'inoperative.reserve','ausser_Betrieb.Reserve','hors_service.en_reserve', 'fuori_servizio.riserva', 'rrr_ausser_Betrieb.Reserve', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9399,9399,'operational','in_Betrieb','en_service', 'in_funzione', 'functionala', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9400,9400,'operational.tentative','in_Betrieb.provisorisch','en_service.provisoire', 'in_funzione.provvisorio', 'functionala.provizoriu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9401,9401,'others','weitere','', '', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9402,9402,'other.calculation_alternative','weitere.Berechnungsvariante','autre.variante_de_calcule', 'altro.variante_calcolo', 'alta.varianta_calcul', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9403,9403,'other.planned','weitere.geplant','autre.planifie', 'altro.previsto', 'rrr_weitere.geplant', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9404,9404,'other.project','weitere.Projekt','autre.projet', 'altro.progetto', 'alta.proiect', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT fkey_vl_sia405cc_cable_point_status FOREIGN KEY (status) + REFERENCES qwat_vl.sia405cc_cable_point_status (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN fk_owner varchar(16); +ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT rel_cable_owner FOREIGN KEY (fk_owner) REFERENCES qwat_od.organisation(obj_id) ON UPDATE CASCADE ON DELETE set null DEFERRABLE INITIALLY DEFERRED; +CREATE TABLE qwat_vl.sia405cc_cable_function () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_function ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_function_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9339,9339,'signal_cable','Signalkabel','cable_de_signal', 'cavo_di_segnale', 'cablu_de_semnal', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9340,9340,'control_cable','Steuerkabel','cable_de_conduite', 'cavo_di_comando', 'cablu_de_control', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9341,9341,'power_cable','Stromkabel','cable_de_courant', 'cavo_di_alimentazione', 'cablu_de_alimentare', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9338,9338,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9342,9342,'others','weitere','autres', 'zzz_weitere', 'rrr_weitere', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_function FOREIGN KEY (function) + REFERENCES qwat_vl.sia405cc_cable_function (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_cable_type () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_cable_type ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_cable_type_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_cable_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9345,9345,'coaxial','koaxial','coaxial', 'zzz_coassiale', 'rrr_koaxial', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_cable_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9344,9344,'copper','Kupfer','cuivre', 'zzz_rame', 'zzz_Kupfer', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_cable_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9346,9346,'fiber_optic','Lichtwellenleiter','optique', 'zzz_Lichtwellenleiter', 'rrr_Lichtwellenleiter', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_cable_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9343,9343,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_cable_type FOREIGN KEY (cable_type) + REFERENCES qwat_vl.sia405cc_cable_cable_type (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_horizontal_positioning () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_horizontal_positioning ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_horizontal_positioning_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9347,9347,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9348,9348,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9349,9349,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_horizontal_positioning FOREIGN KEY (horizontal_positioning) + REFERENCES qwat_vl.sia405cc_cable_horizontal_positioning (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_status () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_status ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_status_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9363,9363,'inoperative','ausser_Betrieb','hors_service', 'fuori_servizio', 'rrr_ausser_Betrieb', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9364,9364,'inoperative.reserve','ausser_Betrieb.Reserve','hors_service.en_reserve', 'fuori_servizio.riserva', 'rrr_ausser_Betrieb.Reserve', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9365,9365,'operational','in_Betrieb','en_service', 'in_funzione', 'functionala', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9366,9366,'operational.tentative','in_Betrieb.provisorisch','en_service.provisoire', 'in_funzione.provvisorio', 'functionala.provizoriu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9367,9367,'others','weitere','autre', '', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9368,9368,'other.calculation_alternative','weitere.Berechnungsvariante','autre.variante_de_calcule', 'altro.variante_calcolo', 'alta.varianta_calcul', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9369,9369,'other.planned','weitere.geplant','autre.planifie', 'altro.previsto', 'rrr_weitere.geplant', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9370,9370,'other.project','weitere.Projekt','autre.projet', 'altro.progetto', 'alta.proiect', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_status FOREIGN KEY (status) + REFERENCES qwat_vl.sia405cc_cable_status (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_elevation_determination () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_elevation_determination ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_elevation_determination_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9359,9359,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9360,9360,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9361,9361,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_elevation_determination FOREIGN KEY (elevation_determination) + REFERENCES qwat_vl.sia405cc_cable_elevation_determination (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +--------- Relations to class organisation for dataowner and provider (new 3.11.2014); + +ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT rel_od_sia405cc_cable_point_fk_dataowner FOREIGN KEY (fk_dataowner) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT rel_od_sia405cc_cable_point_fk_dataprovider FOREIGN KEY (fk_provider) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT rel_od_sia405cc_cable_fk_dataowner FOREIGN KEY (fk_dataowner) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT rel_od_sia405cc_cable_fk_dataprovider FOREIGN KEY (fk_provider) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; + +------ Indexes on identifiers + + CREATE UNIQUE INDEX in_od_sia405cc_cable_point_name_number ON qwat_od.sia405cc_cable_point USING btree (name_number ASC NULLS LAST, fk_dataowner ASC NULLS LAST); + CREATE UNIQUE INDEX in_od_sia405cc_cable_name_number ON qwat_od.sia405cc_cable USING btree (name_number ASC NULLS LAST, fk_dataowner ASC NULLS LAST); + + + + + diff --git a/datamodel/ordinary_data/controlcable/09_qwat_control_cable_dictionaries.sql b/datamodel/ordinary_data/controlcable/09_qwat_control_cable_dictionaries.sql new file mode 100644 index 00000000..04307fc4 --- /dev/null +++ b/datamodel/ordinary_data/controlcable/09_qwat_control_cable_dictionaries.sql @@ -0,0 +1,96 @@ +------ this file generates the qwat is_dictionary (Modul fernwirkkabel(based on SIA405_FERNWIRKKABEL_3D_2015_LV95 (Version 18.04.2018)) in en on TEKSI +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 09.12.2024 12:10:03 +------ with 3D coordinates + + INSERT INTO qwat_sys.dictionary_od_table (id, tablename, name_en, shortcut_en, name_de, shortcut_de, name_fr, shortcut_fr, name_it, shortcut_it, name_ro, shortcut_ro) VALUES (8500,'sia405cc_cable','cable','CB','Kabel','','Cable','','Cavo','NULL','Cablu','NULL'); + INSERT INTO qwat_sys.dictionary_od_table (id, tablename, name_en, shortcut_en, name_de, shortcut_de, name_fr, shortcut_fr, name_it, shortcut_it, name_ro, shortcut_ro) VALUES (8501,'sia405cc_cable_point','cable point','CI','Kabelpunkt','','Point cable','','Punto cavo','NULL','Punct de cablu','NULL'); + + + + + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9327,'sia405cc_cable','name_number','name_number','Name_Nummer','Nom_numero','nome_numero','nume_numarul','NULL','z.B. Kabelpunktanfang_Kabelpunkteende','xxx_z.B. Point_cableanfang_Point_cableeende','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9328,'sia405cc_cable','geometry','geometry','Geometrie','Geometrie','geometria','geometria','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','geometry',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9329,'sia405cc_cable','function','function','Funktion','Fonction','zzz_Funktion','zzz_Funktion','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9330,'sia405cc_cable','cable_type','cable_type','Kabelart','Genre','zzz_Kabelart','','Cable type','Kabelart','Genre de cable','zzz_Kabelart','rrr_Kabelart',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9331,'sia405cc_cable','horizontal_positioning','horizontal_positioning','Lagebestimmung','Determination_planimetrique','determinazione_posizione','precizie_pozitie','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9332,'sia405cc_cable','status','status','Status','Etat','stato','stare','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,'extends value range of SIA405 status',NULL,'Erweitert Wertebereich von SIA405 Status',NULL,'extension valeurs SIA405 Etat',NULL,'dilatato codominio SIA405 Stato',NULL,'rrr_Erweitert Wertebereich von SIA405 Status',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9333,'sia405cc_cable','installation_year','installation_year','Einbaujahr','Annee_construction','anno_costruzione','anul_instalarii','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint',NULL,' If unknown set lowest value of value range',NULL,'Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',NULL,'Si inconnu ajouter la plus bas valeur du domaine des valeurs',NULL,'Se sconosciuto, inserire valore minimo dell’intervallo di valori',NULL,'rrr_Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',1800,2100); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9334,'sia405cc_cable','sur_plus_cover','sur_plus_cover','Ueberdeckung','Couverture_ouvrage','zzz_Ueberdeckung','zzz_Ueberdeckung','Numerical mean value of an object','Numerisch mittlerer Wert eines Objektes','Valeur moyenne d''''un objet','Valore medio numerico di un oggetto','Valoarea medie numerica a unui obiect',ARRAY['Werkinformation']::qwat_od.plantype[],'true','decimal(4,1)','[m]','meter [m]','[m]','Meter [m]','[m]','mètre [m]','[m]','metro [m]','[m]','rrr_Meter [m]',0,999.9); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9335,'sia405cc_cable','remark','remark','Bemerkung','Remarque','','','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(80)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9336,'sia405cc_cable','condition','condition','Zustand','Condition','condizione','zzz_Zustand','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9353,'sia405cc_cable','width','width','Breite','Largeur','larghezza','latime','Width of cable trench','Breite Kabeltrasse','Largeur du tracé du câble','zzz_Breite Kabeltrasse','rrr_Breite Kabeltrasse',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]',' millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,4000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9355,'sia405cc_cable','geometry3d','geometry3d','Geometrie3D','Geometrie3D','geometria3d','geometria3D','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','geometry','[HKoord]','points with coordinates in the swiss national grid','[HKoord]','Punkte mit Schweizer Landeskoordinaten [HKoord]','[CoordH]','points avec coordonnées dans le système de coordonnées suisse','[HKoord]','Punti con coordinate nazionali svizzere','[HKoord]','rrr_Punkte mit Schweizer Landeskoordinaten',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9356,'sia405cc_cable','elevation_determination','elevation_determination','Hoehenbestimmung','Determination_altimetrique','determinazione_dell_altezza','determinare_altimetrica','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9357,'sia405cc_cable','depth','depth','Maechtigkeit','Epaisseur','spessore','adancime','Extension 3D, heigth of of cable trench [mm].','Erweiterung 3D, Mächtigkeit (Höhe) Kabeltrasse [mm].','Extension 3D, épaisseur (largeur) du trace du câble [mm].','zzz_Erweiterung 3D, Mächtigkeit (Höhe) Kabeltrasse [mm].','rrr_Erweiterung 3D, Mächtigkeit (Höhe) Kabeltrasse [mm].',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]','millimetro [mm]','[mm]','rrr_Millimeter [mm]',-99999,99999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,999999,'sia405cc_cable','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,999998,'sia405cc_cable','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,999997,'sia405cc_cable','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,999996,'sia405cc_cable','last_modification','last_modification','Letzte_Aenderung','DERNIERE_MODIFICATION','ultima_modifica','rrr_Letze_Aenderung','Last modification: INTERLIS_1_DATE','Letzte Änderung: INTERLIS_1_DATE','Dernière modification: INTERLIS_1_DATE','ultima_modifica: INTERLIS_1_DATE','rrr_Letzte Änderung: INTERLIS_1_DATE',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','TIMESTAMP','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9371,'sia405cc_cable_point','name_number','name_number','Name_Nummer','Nom_numero','nome_numero','nume_numarul','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9372,'sia405cc_cable_point','geometry','geometry','Geometrie','Geometrie','geometria','geometria','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','geometry','[NCoord]','Swiss national grid coordinates','[LKoord]','Schweizer Landeskoordinaten','[CoordNat]','coordonnées dans le système de coordonnées suisse','[CoordNaz]','Coordinate nazionali Svizzera','rrr_[LKoord]','rrr_Schweizer Landeskoordinaten',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9373,'sia405cc_cable_point','kind','kind','Art','Genre','tipo','tip','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9374,'sia405cc_cable_point','horizontal_positioning','horizontal_positioning','Lagebestimmung','Determination_planimetrique','determinazione_posizione','precizie_pozitie','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9375,'sia405cc_cable_point','altitude','altitude','Hoehe','Altitude','livello','altitudine','Altitude of component','Oberkante Bauteil','Bord supérieur de l''élément contructif','Bordo superiore del componente','Marginea superioara a componentei',ARRAY['Werkinformation']::qwat_od.plantype[],'true','decimal(7,3)','[m.a.sl.]','meters above sea level [m.a.sl.]','[M.ü.M.]','Meter über Meer [M.ü.M.]','[m.s.m.]','mètres sur mers [m.s.m.]','[m s.l.m.]','metro sul livello del mare [m s.l.m.]','rrr_[M.ü.M.]','rrr_Meter über Meer [M.ü.M.]',-200,5000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9376,'sia405cc_cable_point','elevation_determination','elevation_determination','Hoehenbestimmung','Determination_altimetrique','determinazione_dell_altezza','determinare_altimetrica','Elevation determination of geometry (3D)','Höhenbestimmung der Geometrie (3D)','Définition de la détermination altimétrique de la Géométrie (3D)','Determinazione dell''altezza della geometria (3D)','Determinarea altimetrica geometriei (3D)',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9377,'sia405cc_cable_point','status','status','Status','Etat','stato','stare','Operating and planning status of the structure','Betriebs- bzw. Planungszustand des Bauwerks','Etat de fonctionnement et de planification de l’ouvrage','Stato di funzionamento e di pianificazione del manufatto.','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,'extends value range of SIA405 status',NULL,'Erweitert Wertebereich von SIA405 Status',NULL,'extension valeurs SIA405 Etat',NULL,'dilatato codominio SIA405 Stato',NULL,'rrr_Erweitert Wertebereich von SIA405 Status',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9378,'sia405cc_cable_point','installation_year','installation_year','Einbaujahr','Annee_construction','anno_costruzione','anul_instalarii','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint',NULL,' If unknown set lowest value of value range',NULL,'Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',NULL,'Si inconnu ajouter la plus bas valeur du domaine des valeurs',NULL,'Se sconosciuto, inserire valore minimo dell’intervallo di valori',NULL,'rrr_Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',1800,2100); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9379,'sia405cc_cable_point','sur_plus_cover','sur_plus_cover','Ueberdeckung','Couverture_ouvrage','zzz_Ueberdeckung','','Numerical mean value of an object','Numerisch mittlerer Wert eines Objektes','Valeur moyenne d''un objet','Valore medio numerico di un oggetto','Valoarea medie numerica a unui obiect',ARRAY['Werkinformation']::qwat_od.plantype[],'true','decimal(4,1)','[m]','meter [m]','[m]','Meter [m]','[m]','mètre [m]','[m]','metro [m]','[m]','rrr_Meter [m]',0,999.9); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9380,'sia405cc_cable_point','condition','condition','Zustand','Condition','condizione','rrr_Zustand','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9381,'sia405cc_cable_point','remark','remark','Bemerkung','Remarque','osservazione','observatie','General remarks','Allgemeine Bemerkungen','Remarques générales','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(80)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9408,'sia405cc_cable_point','dimension1','dimension1','Dimension1','Dimension1','dimensione1','dimensiune1','Larger dimension of an object (e.g. length)','grösseres Mass eines Objektes (z.B. Länge)','plus grande mesure d''un objet (par ex. Longueur, diamètre)','Dimensione maggiore di un oggetto (ad es. lunghezza)','Dimensiunea mai mare a unui obiect (de exemplu, lungimea)',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]',' millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,4000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9409,'sia405cc_cable_point','dimension2','dimension2','Dimension2','Dimension2','dimensione2','dimenisune2','smaller dimension of an object (e.g. width)','kleineres Mass eines Objektes (z.B. Breite)','plus petite msure d''un objet (par ex. Largeur)','dimensione minore di un oggetto (ad es. larghezza)','dimensiunea mai mica a unui obiect (de exemplu, la?imea)',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]',' millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,4000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9410,'sia405cc_cable_point','altitude_lower_edge','altitude_lower_edge','Hoehe_UK','Altitude_BI','zzz_livello_bordo_inferiore','rrr_Hoehe_UK','Altitude lower edge of component','Höhe Unterkante','Bord inférieur de l''élément constructif','Bordo inferiore del componente','Marginea inferioara a componentei',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','decimal(7,3)','[m.a.sl.]','meters above sea level [m.a.sl.]','[M.ü.M.]','Meter über Meer [M.ü.M.]','[m.s.m.]','mètres sur mers [m.s.m.]','[m s.l.m.]','metro sul livello del mare [m s.l.m.]','rrr_[M.ü.M.]','rrr_Meter über Meer [M.ü.M.]',-200,5000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9411,'sia405cc_cable_point','symbolori','symbolori','SymbolOri','SymboleOri','simboloori','simbolori','Default: 90 degree','Default: 90 Grad','Default: 90 degre','Default: 90 gradi','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','decimal(4,1)','[degrees]','Degree','[Altgrad]','[Altgrad]','[degres]','degrées [degres]','[vecchi gradi]','vecchi gradi','rrr_[Altgrad]','rrr_Altgrad',0,359.9); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9412,'sia405cc_cable_point','depth','depth','Maechtigkeit','Epaisseur','spessore','adancime','Extension3D, Fonction (calculated value) = altitude minus altitude_lower_edge','Erweiterung 3D, Funktion (berechneter Wert) = Hoehe minus Hoehe_UK.','Extension 3D, Fonction (valuer calculée) = Altitude minus Altitude_BI.','zzz_Erweiterung 3D, Funktion (berechneter Wert) = Hoehe minus Hoehe_UK.','rrr_Erweiterung 3D, Funktion (berechneter Wert) = Hoehe minus Hoehe_UK.',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]','millimetro [mm]','[mm]','rrr_Millimeter [mm]',-99999,99999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9472,'sia405cc_cable_point','geometry3d','geometry3d','Geometrie3D','Geometrie3D','geometria3d','geometria3D','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','geometry','[HKoord]','Swiss national grid coordinates','[HKoord]','Schweizer Landeskoordinaten [HKoord]','[CoordH]','coordonnées dans le système de coordonnées suisse','[HKoord]','Coordinate nazionali Svizzera','[HKoord]','rrr_Schweizer Landeskoordinaten [HKoord]',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,999999,'sia405cc_cable_point','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,999998,'sia405cc_cable_point','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,999997,'sia405cc_cable_point','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,999996,'sia405cc_cable_point','last_modification','last_modification','Letzte_Aenderung','DERNIERE_MODIFICATION','ultima_modifica','rrr_Letze_Aenderung','Last modification: INTERLIS_1_DATE','Letzte Änderung: INTERLIS_1_DATE','Dernière modification: INTERLIS_1_DATE','ultima_modifica: INTERLIS_1_DATE','rrr_Letzte Änderung: INTERLIS_1_DATE',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','TIMESTAMP','','','','','','','','','','',NULL,NULL); + + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9338,'sia405cc_cable','function','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9339,'sia405cc_cable','function','signal_cable','signal_cable',NULL,'Signalkabel',NULL,'cable_de_signal',NULL,'cavo_di_segnale',NULL,'cablu_de_semnal',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9340,'sia405cc_cable','function','control_cable','control_cable',NULL,'Steuerkabel',NULL,'cable_de_conduite',NULL,'cavo_di_comando',NULL,'cablu_de_control',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9341,'sia405cc_cable','function','power_cable','power_cable',NULL,'Stromkabel',NULL,'cable_de_courant',NULL,'cavo_di_alimentazione',NULL,'cablu_de_alimentare',NULL,'for district heating only','nur bei Fernwärme','uniquement pour le chauffage à distance','zzz_nur bei Fernwärme','zzz_nur bei Fernwärme'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9342,'sia405cc_cable','function','others','others',NULL,'weitere',NULL,'autres',NULL,'zzz_weitere',NULL,'rrr_weitere',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9330,9343,'sia405cc_cable','cable_type','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9330,9344,'sia405cc_cable','cable_type','copper','copper',NULL,'Kupfer',NULL,'cuivre',NULL,'zzz_rame',NULL,'zzz_Kupfer',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9330,9345,'sia405cc_cable','cable_type','coaxial','coaxial',NULL,'koaxial',NULL,'coaxial',NULL,'zzz_coassiale',NULL,'rrr_koaxial',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9330,9346,'sia405cc_cable','cable_type','fiber_optic','fiber_optic',NULL,'Lichtwellenleiter',NULL,'optique',NULL,'zzz_Lichtwellenleiter',NULL,'rrr_Lichtwellenleiter',NULL,'Fiber optic cable',NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9331,9347,'sia405cc_cable','horizontal_positioning','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9331,9348,'sia405cc_cable','horizontal_positioning','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9331,9349,'sia405cc_cable','horizontal_positioning','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9363,'sia405cc_cable','status','inoperative','inoperative',NULL,'ausser_Betrieb',NULL,'hors_service',NULL,'fuori_servizio',NULL,'rrr_ausser_Betrieb',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9364,'sia405cc_cable','status','inoperative.reserve','inoperative.reserve',NULL,'ausser_Betrieb.Reserve',NULL,'hors_service.en_reserve',NULL,'fuori_servizio.riserva',NULL,'rrr_ausser_Betrieb.Reserve',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9365,'sia405cc_cable','status','operational','operational',NULL,'in_Betrieb',NULL,'en_service',NULL,'in_funzione',NULL,'functionala',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9366,'sia405cc_cable','status','operational.tentative','operational.tentative',NULL,'in_Betrieb.provisorisch',NULL,'en_service.provisoire',NULL,'in_funzione.provvisorio',NULL,'functionala.provizoriu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9367,'sia405cc_cable','status','others','others',NULL,'weitere',NULL,'autre',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9368,'sia405cc_cable','status','other.calculation_alternative','other.calculation_alternative',NULL,'weitere.Berechnungsvariante',NULL,'autre.variante_de_calcule',NULL,'altro.variante_calcolo',NULL,'alta.varianta_calcul',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9369,'sia405cc_cable','status','other.planned','other.planned',NULL,'weitere.geplant',NULL,'autre.planifie',NULL,'altro.previsto',NULL,'rrr_weitere.geplant',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9370,'sia405cc_cable','status','other.project','other.project',NULL,'weitere.Projekt',NULL,'autre.projet',NULL,'altro.progetto',NULL,'alta.proiect',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9356,9359,'sia405cc_cable','elevation_determination','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9356,9360,'sia405cc_cable','elevation_determination','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9356,9361,'sia405cc_cable','elevation_determination','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9384,'sia405cc_cable_point','kind','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9385,'sia405cc_cable_point','kind','cable_sleeve','cable_sleeve',NULL,'Kabelmuffe',NULL,'manchon_cable',NULL,'manicotto_del_cavo',NULL,'manson_de_cablu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9386,'sia405cc_cable_point','kind','cable_manhole','cable_manhole',NULL,'Kabelschacht',NULL,'chambre_cable',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9387,'sia405cc_cable_point','kind','cabine','cabine',NULL,'Kabine',NULL,'cabine',NULL,'cabina',NULL,'cabina',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9388,'sia405cc_cable_point','kind','cable_point','cable_point',NULL,'Kabelpunkt',NULL,'point_de_cable',NULL,'punto_cavo',NULL,'punct_de_cablu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9389,'sia405cc_cable_point','kind','others','others',NULL,'weitere',NULL,'autre',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9374,9390,'sia405cc_cable_point','horizontal_positioning','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9374,9391,'sia405cc_cable_point','horizontal_positioning','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9374,9392,'sia405cc_cable_point','horizontal_positioning','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9376,9394,'sia405cc_cable_point','elevation_determination','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9376,9395,'sia405cc_cable_point','elevation_determination','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9376,9396,'sia405cc_cable_point','elevation_determination','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9397,'sia405cc_cable_point','status','inoperative','inoperative',NULL,'ausser_Betrieb',NULL,'hors_service',NULL,'fuori_servizio',NULL,'rrr_ausser_Betrieb',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9398,'sia405cc_cable_point','status','inoperative.reserve','inoperative.reserve',NULL,'ausser_Betrieb.Reserve',NULL,'hors_service.en_reserve',NULL,'fuori_servizio.riserva',NULL,'rrr_ausser_Betrieb.Reserve',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9399,'sia405cc_cable_point','status','operational','operational',NULL,'in_Betrieb',NULL,'en_service',NULL,'in_funzione',NULL,'functionala',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9400,'sia405cc_cable_point','status','operational.tentative','operational.tentative',NULL,'in_Betrieb.provisorisch',NULL,'en_service.provisoire',NULL,'in_funzione.provvisorio',NULL,'functionala.provizoriu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9401,'sia405cc_cable_point','status','others','others',NULL,'weitere',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9402,'sia405cc_cable_point','status','other.calculation_alternative','other.calculation_alternative',NULL,'weitere.Berechnungsvariante',NULL,'autre.variante_de_calcule',NULL,'altro.variante_calcolo',NULL,'alta.varianta_calcul',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9403,'sia405cc_cable_point','status','other.planned','other.planned',NULL,'weitere.geplant',NULL,'autre.planifie',NULL,'altro.previsto',NULL,'rrr_weitere.geplant',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9404,'sia405cc_cable_point','status','other.project','other.project',NULL,'weitere.Projekt',NULL,'autre.projet',NULL,'altro.progetto',NULL,'alta.proiect',NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/datamodel/ordinary_data/controlcable/qwat_control_cable_fk_folder.sql b/datamodel/ordinary_data/controlcable/qwat_control_cable_fk_folder.sql new file mode 100644 index 00000000..b1a89762 --- /dev/null +++ b/datamodel/ordinary_data/controlcable/qwat_control_cable_fk_folder.sql @@ -0,0 +1,5 @@ +ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN fk_folder integer ; +ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT sia405cc_cable_fk_folder FOREIGN KEY (fk_folder) REFERENCES qwat_od.folder(id) MATCH FULL; CREATE INDEX fki_sia405cc_cable_fk_folder ON qwat_od.sia405cc_cable(fk_folder); + +ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN fk_folder integer ; +ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT sia405cc_cable_point_fk_folder FOREIGN KEY (fk_folder) REFERENCES qwat_od.folder(id) MATCH FULL; CREATE INDEX fki_sia405cc_cable_point_fk_folder ON qwat_od.sia405cc_cable_point(fk_folder); \ No newline at end of file diff --git a/datamodel/ordinary_data/organisation/03_qwat_db_organisation.sql b/datamodel/ordinary_data/organisation/03_qwat_db_organisation.sql new file mode 100644 index 00000000..bf36adf4 --- /dev/null +++ b/datamodel/ordinary_data/organisation/03_qwat_db_organisation.sql @@ -0,0 +1,110 @@ +------ This file generates the database class organisation (Modul qwat (2020)) in en on QQIS +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 10.04.2024 15:47:40 +------ with 3D coordinates +BEGIN; + +---- 03_qwat_db_organisation.sql ---------- + +--------------------------- + +CREATE TABLE qwat_vl.value_list_base2 +( +code integer NOT NULL, +vsacode integer NOT NULL, +value_en character varying(100), +value_de character varying(100), +value_fr character varying(100), +value_it character varying(100), +value_ro character varying(100), +abbr_en character varying(3), +abbr_de character varying(3), +abbr_fr character varying(3), +abbr_it character varying(3), +abbr_ro character varying(3), +active boolean, +CONSTRAINT pkey_qwat_value_list_code PRIMARY KEY (code) +) +WITH ( + OIDS = False +); +------- +------- + +CREATE TABLE qwat_od.organisation +( + obj_id varchar(16) NOT NULL, + CONSTRAINT pkey_qwat_od_organisation_obj_id PRIMARY KEY (obj_id) +) +WITH ( + OIDS = False +); +CREATE SEQUENCE qwat_od.seq_organisation_oid INCREMENT 1 MINVALUE 0 MAXVALUE 999999 START 0; + ALTER TABLE qwat_od.organisation ALTER COLUMN obj_id SET DEFAULT qwat_sys.generate_oid('qwat_od','organisation'); +COMMENT ON COLUMN qwat_od.organisation.obj_id IS 'INTERLIS STANDARD OID (with Postfix/Präfix), see www.interlis.ch'; + ALTER TABLE qwat_od.organisation ADD COLUMN identifier text; + ALTER TABLE qwat_od.organisation ADD CONSTRAINT og_identifier_length_max_255 CHECK(char_length(identifier)<=255); +COMMENT ON COLUMN qwat_od.organisation.identifier IS 'The designation for municipalities is adopted according to the FSO list; for private individuals according to the UID register, if necessary with the addition of the location of the branch if no separate UID exists for it. / Die Bezeichnung für Gemeinden wird gemäss BFS-Liste übernommen; für Private gemäss UID-Register, allenfalls mit Zusatz des Ortes der Filiale, falls keine separate UID dafür besteht. / La désignation pour les communes est reprise selon la liste de l''OFS ; pour les particuliers, selon le registre UID, éventuellement avec l''ajout du lieu de la filiale s''il n''existe pas d''UID séparé pour celle-ci.'; + ALTER TABLE qwat_od.organisation ADD COLUMN identifier_short text; + ALTER TABLE qwat_od.organisation ADD CONSTRAINT og_identifier_short_length_max_12 CHECK(char_length(identifier_short)<=12); +COMMENT ON COLUMN qwat_od.organisation.identifier_short IS ' / Kurzbezeichnung / désignation abrégée'; + ALTER TABLE qwat_od.organisation ADD COLUMN municipality_number smallint ; +COMMENT ON COLUMN qwat_od.organisation.municipality_number IS 'Official number of municipality of federal office for statistics, mandatory for the municipalities. / Offizielle Gemeinde Nummer gemäss Bundesamt für Statistik, bei Gemeinden zwingend, sonst leer lassen. / Numéro officiel de la commune selon l''Office fédéral de la statistique, obligatoire pour les communes. Sinon, laissez vide.'; + ALTER TABLE qwat_od.organisation ADD COLUMN organisation_type integer ; +COMMENT ON COLUMN qwat_od.organisation.organisation_type IS 'Type of organisatoin / Art der Organisation / Genre d''organisation'; + ALTER TABLE qwat_od.organisation ADD COLUMN remark text; + ALTER TABLE qwat_od.organisation ADD CONSTRAINT og_remark_length_max_255 CHECK(char_length(remark)<=255); +COMMENT ON COLUMN qwat_od.organisation.remark IS 'General remarks / Allgemeine Bemerkungen / Remarques générales'; + ALTER TABLE qwat_od.organisation ADD COLUMN status integer ; +COMMENT ON COLUMN qwat_od.organisation.status IS 'yyy_Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind / Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind / Statut de l''organisation, pour que les organisations disparues ne soient pas simplement supprimées et qu''il soit possible de contrôler s''il existe encore des relations avec les organisations disparues, par exemple en cas de fusion de communes ou de faillite d''une société'; + ALTER TABLE qwat_od.organisation ADD COLUMN uid text; + ALTER TABLE qwat_od.organisation ADD CONSTRAINT og_uid_length_max_12 CHECK(char_length(uid)<=12); +COMMENT ON COLUMN qwat_od.organisation.uid IS 'Reference to the company identification of the Federal Office for Statistics (www.uid.admin.ch), e.g. CHE123456789 / Referenz zur Unternehmensidentifikation des Bundesamts fuer Statistik (www.uid.admin.ch), z.B. CHE123456789 / Référence pour l’identification des entreprises selon l’Office fédéral de la statistique OFS (www.uid.admin.ch), par exemple: CHE123456789'; + ALTER TABLE qwat_od.organisation ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now(); +COMMENT ON COLUMN qwat_od.organisation.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE'; + ALTER TABLE qwat_od.organisation ADD COLUMN fk_dataowner varchar(16); +COMMENT ON COLUMN qwat_od.organisation.fk_dataowner IS 'Foreignkey to Metaattribute dataowner (as an organisation) - this is the person or body who is allowed to delete, change or maintain this object / Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten / Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe'; + ALTER TABLE qwat_od.organisation ADD COLUMN fk_provider varchar(16); +COMMENT ON COLUMN qwat_od.organisation.fk_provider IS 'Foreignkey to Metaattribute provider (as an organisation) - this is the person or body who delivered the data / Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat / FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données '; +------- +CREATE TRIGGER +update_last_modified_organisation +BEFORE UPDATE OR INSERT ON + qwat_od.organisation +FOR EACH ROW EXECUTE PROCEDURE + qwat_sys.update_last_modified(); + +------- + +------------ Relationships and Value Tables ----------- ; + +CREATE TABLE qwat_vl.organisation_organisation_type () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.organisation_organisation_type ADD CONSTRAINT pkey_qwat_vl_organisation_organisation_type_code PRIMARY KEY (code); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8608,8608,'waste_water_association','Abwasserverband','association_epuration_eau', 'consorzio_depurazione', 'rrr_Abwasserverband', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8715,8715,'federation','Bund','federation', 'confederazione', 'rrr_Bund', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8604,8604,'municipality','Gemeinde','commune', 'comune', 'municipiul', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9319,9319,'municipal_department','Gemeindeabteilung','departement_communal', 'dipartimento_comunale', 'departamentul_municipal', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8610,8610,'cooperative','Genossenschaft_Korporation','cooperative', 'cooperativa_corporazione', 'rrr_Genossenschaft_Korporation', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8605,8605,'canton','Kanton','canton', 'cantone', 'rrr_Kanton', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8606,8606,'private','Privat','prive', 'privato', 'privata', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.organisation ADD CONSTRAINT fkey_vl_organisation_organisation_type FOREIGN KEY (organisation_type) + REFERENCES qwat_vl.organisation_organisation_type (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.organisation_status () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.organisation_status ADD CONSTRAINT pkey_qwat_vl_organisation_status_code PRIMARY KEY (code); + INSERT INTO qwat_vl.organisation_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9047,9047,'activ','aktiv','active', 'attivo', 'rrr_aktiv', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9048,9048,'gone','untergegangen','disparue', 'decaduta', 'rrr_untergegangen', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.organisation ADD CONSTRAINT fkey_vl_organisation_status FOREIGN KEY (status) + REFERENCES qwat_vl.organisation_status (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; + + --------- Relations to class organisation for dataowner and provider (new 3.11.2014); + +ALTER TABLE qwat_od.organisation ADD CONSTRAINT rel_od_organisation_fk_dataowner FOREIGN KEY (fk_dataowner) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.organisation ADD CONSTRAINT rel_od_organisation_fk_dataprovider FOREIGN KEY (fk_provider) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; + +----- Indexes on identifiers + + CREATE UNIQUE INDEX in_od_organisation_identifier ON qwat_od.organisation USING btree (identifier ASC NULLS LAST, fk_dataowner ASC NULLS LAST); + + COMMIT; diff --git a/datamodel/ordinary_data/organisation/09_qwat_organisation_dictionaries.sql b/datamodel/ordinary_data/organisation/09_qwat_organisation_dictionaries.sql new file mode 100644 index 00000000..71159673 --- /dev/null +++ b/datamodel/ordinary_data/organisation/09_qwat_organisation_dictionaries.sql @@ -0,0 +1,45 @@ +------ this file generates the qwat is_dictionary (clas organisation Modul dss(2020)) in en on TEKSI +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 22.04.2024 17:55:05 +------ with 3D coordinates + + + + INSERT INTO qwat_sys.dictionary_od_table (id, tablename, name_en, shortcut_en, name_de, shortcut_de, name_fr, shortcut_fr, name_it, shortcut_it, name_ro, shortcut_ro) VALUES (47,'organisation','organisation','OG','Organisation','OG','Organisation','OG','Organizzazione','NULL','organizatia','NULL'); + + + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,2587,'organisation','remark','remark','Bemerkung','REMARQUE','osservazione','observatie','General remarks','Allgemeine Bemerkungen','Remarques générales','Osservazioni generali','Observatii',ARRAY['Werkinformation','GEP_Verband','GEP_Traegerschaft','PAA','SAA']::qwat_od.plantype[],'true','varchar(255)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,3611,'organisation','municipality_number','municipality_number','Gemeindenummer','NO_COMMUNE','numero_comune','numarul_municipalitatii','Official number of municipality of federal office for statistics, mandatory for the municipalities.','Offizielle Gemeinde Nummer gemäss Bundesamt für Statistik, bei Gemeinden zwingend, sonst leer lassen.','Numéro officiel de la commune selon l''Office fédéral de la statistique, obligatoire pour les communes. Sinon, laissez vide.','Numero ufficiale del Comune secondo l''Ufficio federale di statistica, obbligatorio per i comuni, altrimenti lasciare vuoto.','rrr_Offizielle Gemeinde Nummer gemäss Bundesamt für Statistik, bei Gemeinden zwingend, sonst leer lassen.',ARRAY['Werkinformation','GEP_Verband','GEP_Traegerschaft','PAA','SAA']::qwat_od.plantype[],'true','smallint',NULL,'community number',NULL,'Gemeindenummer',NULL,'Numero Commune',NULL,'numero della comunità',NULL,'rrr_Gemeindenummer',1,9999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,5086,'organisation','uid','uid','UID','UID','UID','uid','Reference to the company identification of the Federal Office for Statistics (www.uid.admin.ch), e.g. CHE123456789','Referenz zur Unternehmensidentifikation des Bundesamts fuer Statistik (www.uid.admin.ch), z.B. CHE123456789','Référence pour l’identification des entreprises selon l’Office fédéral de la statistique OFS (www.uid.admin.ch), par exemple: CHE123456789','Riferimento all''identificativo aziendale dell''Ufficio federale di statistica (www.uid.admin.ch), ad es. CHE123456789','Referin?a la identificarea companiei de la Oficiul Federal de Statistica (www.uid.admin.ch), de exemplu CHE123456789.',ARRAY['Werkinformation','GEP_Verband','GEP_Traegerschaft','PAA','SAA']::qwat_od.plantype[],'true','varchar(12)','[UID]','Company Identification of the Federal Office of Statistics [UID]','[UID]','Unternehmensidentifikation des Bundesamts fuer Statistik [UID]','[UID]','identification des entreprises selon l’Office fédéral de la statistique OFS [UID]','[UID]','Identificazione della società dell’Ufficio federale di statistica [UID]','[UID]','rrr_Unternehmensidentifikation des Bundesamts fuer Statistik [UID]',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,5089,'organisation','identifier','identifier','Bezeichnung','DESIGNATION','denominazione','identificator','The designation for municipalities is adopted according to the FSO list; for private individuals according to the UID register, if necessary with the addition of the location of the branch if no separate UID exists for it.','Die Bezeichnung für Gemeinden wird gemäss BFS-Liste übernommen; für Private gemäss UID-Register, allenfalls mit Zusatz des Ortes der Filiale, falls keine separate UID dafür besteht.','La désignation pour les communes est reprise selon la liste de l''OFS ; pour les particuliers, selon le registre UID, éventuellement avec l''ajout du lieu de la filiale s''il n''existe pas d''UID séparé pour celle-ci.','La designazione per i comuni è tratta dall''elenco dell''UST; per i privati dal registro UID, se necessario con l''aggiunta del luogo della filiale se non esiste un UID separato per essa.','Denumirea pentru comune este preluata din lista FSO; pentru persoanele fizice, din registrul UID, daca este necesar, cu adaugarea locului sucursalei, în cazul în care nu exista un UID separat pentru aceasta.',ARRAY['Werkinformation','GEP_Verband','PAA','SAA']::qwat_od.plantype[],'true','varchar(255)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,8520,'organisation','identifier_short','identifier_short','Kurzbezeichnung','DESIGNATION_ABREGEE','designazione_abbreviata','','NULL','Kurzbezeichnung','désignation abrégée','NULL','Denumirea pentru comune este preluata din lista FSO; pentru persoanele fizice, din registrul UID, daca este necesar, cu adaugarea locului sucursalei, în cazul în care nu exista un UID separat pentru aceasta.',ARRAY['Werkinformation','GEP_Verband','GEP_Traegerschaft','PAA','SAA']::qwat_od.plantype[],'true','varchar(12)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,8603,'organisation','organisation_type','organisation_type','Organisationstyp','GENRE_ORGANISATION','tipo_organizzazione','tipul_de_organizatie','Type of organisatoin','Art der Organisation','Genre d''organisation','Genere dell''organizzazione','Tipul de organiza?ie',ARRAY['Werkinformation','GEP_Verband','PAA','SAA']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,9046,'organisation','status','status','Status','ETAT','stato','stare','yyy_Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind','Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind','Statut de l''organisation, pour que les organisations disparues ne soient pas simplement supprimées et qu''il soit possible de contrôler s''il existe encore des relations avec les organisations disparues, par exemple en cas de fusion de communes ou de faillite d''une société','Stato dell''organizzazione, affinché le organizzazioni decadute non debbano essere semplicemente cancellate e sia possibile vedere se esistono ancora relazioni con organizzazioni decadute, ad. es. in caso di aggregazione tra comuni o fallimento di una ditta','rrr_Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind',ARRAY['Werkinformation','GEP_Verband','PAA','SAA']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,9234,'organisation','oid','oid','OID','OID','OID','OID','Stable unique object identification for all objects and classes','Stabile eindeutige Objektidentifikation für alle Objekte und Klassen','Identification d''objet unique stable pour tous les objets et toutes les classes','Identificazione univoca e stabile per tutti gli oggetti e le classi','Identificare unica stabila a obiectelor pentru toate obiectele ?i clasele',ARRAY['Leitungskataster','Werkinformation','GEP_Verband','PAA','SAA']::qwat_od.plantype[],'true','varchar(16)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + + + + + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,999999,'organisation','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,999998,'organisation','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,999997,'organisation','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,999996,'organisation','last_modification','last_modification','Letzte_Aenderung','DERNIERE_MODIFICATION','ultima_modifica','rrr_Letze_Aenderung','Last modification: INTERLIS_1_DATE','Letzte Änderung: INTERLIS_1_DATE','Dernière modification: INTERLIS_1_DATE','ultima_modifica: INTERLIS_1_DATE','rrr_Letzte Änderung: INTERLIS_1_DATE',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','TIMESTAMP','','','','','','','','','','',NULL,NULL); + + + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8605,'organisation','organisation_type','canton','canton',NULL,'Kanton',NULL,'canton',NULL,'cantone',NULL,'rrr_Kanton',NULL,'yyy_Teil einer kantonalen Verwaltung (z.B. Amt für Umweltschutz, Amt für Abwasserentsorgung)','Teil einer kantonalen Verwaltung (z.B. Amt für Umweltschutz, Amt für Abwasserentsorgung)','Partie d''une administration cantonale (p. ex. office de l''environnement, OFROU, office de l''évacuation des eaux usées))','Parte di un''amministrazione cantonale (es. Ufficio per la protezione dell''ambiente, Ufficio per lo smaltimento delle acque)','rrr_Teil einer kantonalen Verwaltung (z.B. Amt für Umweltschutz, Amt für Abwasserentsorgung)'); + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8610,'organisation','organisation_type','cooperative','cooperative',NULL,'Genossenschaft_Korporation',NULL,'cooperative',NULL,'cooperativa_corporazione',NULL,'rrr_Genossenschaft_Korporation',NULL,'yyy_Genossenschaft oder Korperation: Körperschaft öffentlichen Rechts. Falls privaten Rechtes dann als Privat abbilden.','Genossenschaft oder Korporation: Körperschaft öffentlichen Rechts. Falls privaten Rechtes dann als Privat abbilden.','Coopérative: entité de droit public. Si elle est de droit privée, elle est attribuée comme privé.','Cooperativa o corporazione: corporazione di diritto pubblico. Se di diritto privato, segnare come privato.','rrr_Genossenschaft oder Korperation: Körperschaft öffentlichen Rechts. Falls privaten Rechtes dann als Privat abbilden.'); + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8715,'organisation','organisation_type','federation','federation',NULL,'Bund',NULL,'federation',NULL,'confederazione',NULL,'rrr_Bund',NULL,'Part of a federal administration (e.g. Federal Office for the Environment, FEDRO, armasuisse)','Teil einer Bundesverwaltung (z.B. Bundesamt für Umwelt, ASTRA, Armasuisse)','Partie d''une administration fédérale (p. ex. Office fédéral de l''environnement, OFROU, armasuisse)','Parte di un''amministrazione federale (ad es. Ufficio federale dell''ambiente, USTRA, armasuisse)','rrr_Teil einer Bundesverwaltung (z.B. Bundesamt für Umwelt, ASTRA, Armasuisse)'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,9319,'organisation','organisation_type','municipal_department','municipal_department',NULL,'Gemeindeabteilung',NULL,'departement_communal',NULL,'dipartimento_comunale',NULL,'departamentul_municipal',NULL,'Part of a municipal administration that assumes a role ((e.g. Geoinformation Stadt Bern) as a responsible_entity, data provider, etc. (but not as data owner / (public) owner).','Teil einer Gemeindeverwaltung, die eine Rolle übernimmt ((z.B. Geoinformation Stadt Bern) als Traegerschaft, Datenlieferant, etc. (aber nicht als Datenherr / (oeffentlicher) Eigentuemer)','Partie d''une administration communale qui assume un rôle (par ex. Geoinformation Stadt Bern) en tant que porteur, fournisseur de données, etc. (mais pas en tant que maître des données / propriétaire (public))','Parte di un''amministrazione comunale che assume un ruolo ((ad esempio Geoinformation Stadt Bern) come sponsor, fornitore di dati, ecc. (ma non come proprietario dei dati / proprietario (pubblico)).','Parte a unei administra?ii municipale care î?i asuma un rol ((de exemplu, Geoinformation Stadt Bern) ca sponsor, furnizor de date etc. (dar nu ca proprietar de date / proprietar (public)).'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8604,'organisation','organisation_type','municipality','municipality',NULL,'Gemeinde',NULL,'commune',NULL,'comune',NULL,'municipiul',NULL,'Municipality according to Federal Statistical Office','Gemeinde gemäss Bundesamt für Statistik','Commune selon l''Office fédéral de la statistique','Comune secondo l''Ufficio federale di statistica','Municipiul conform Oficiului Federal de Statistica'); + + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8606,'organisation','organisation_type','private','private',NULL,'Privat',NULL,'prive',NULL,'privato',NULL,'privata',NULL,'yyy_Privatperson oder Privatorganisation, welche im Rahmen der Entwässerungsplanung auftritt','Privatperson oder Privatorganisation, welche im Rahmen der Entwässerungsplanung auftritt','Personne privée ou organisation privée qui intervient dans le cadre de la planification de l''évacuation des eaux.','Persona od organizzazione privata attiva nella pianificazione dello smaltimento delle acque','rrr_Privatperson oder Privatorganisation, welche im Rahmen der Entwässerungsplanung auftritt'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8608,'organisation','organisation_type','waste_water_association','waste_water_association',NULL,'Abwasserverband',NULL,'association_epuration_eau',NULL,'consorzio_depurazione',NULL,'rrr_Abwasserverband',NULL,'waste water association','Abwasserverband','Association epuration eau','Consorzio depurazione acque','rrr_Abwasserverband'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,9046,9047,'organisation','status','activ','activ',NULL,'aktiv',NULL,'active',NULL,'attivo',NULL,'rrr_aktiv',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,9046,9048,'organisation','status','gone','gone',NULL,'untergegangen',NULL,'disparue',NULL,'decaduta',NULL,'rrr_untergegangen',NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/datamodel/ordinary_data/protectiontube/03_qwat_protection_tube_db_sia405.sql b/datamodel/ordinary_data/protectiontube/03_qwat_protection_tube_db_sia405.sql new file mode 100644 index 00000000..7485c812 --- /dev/null +++ b/datamodel/ordinary_data/protectiontube/03_qwat_protection_tube_db_sia405.sql @@ -0,0 +1,115 @@ +------ This file generates the postgres database (Modul schutzrohr (based on SIA405_SCHUTZROHR_3D_2015_LV95 (Version 18.04.2018) in en for QQIS +------ Rename classes for integration in specific TEKSI module based on this convention: https://github.com/orgs/teksi/discussions/100#discussioncomment-9058690 +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 09.12.2024 10:33:37 +------ with 3D coordinates +BEGIN; + +------- +CREATE TABLE qwat_od.sia405pt_protection_tube +( + obj_id varchar(16) NOT NULL, + CONSTRAINT pkey_qwat_od_sia405pt_protection_tube_obj_id PRIMARY KEY (obj_id) +) +WITH ( + OIDS = False +); +CREATE SEQUENCE qwat_od.seq_sia405pt_protection_tube_oid INCREMENT 1 MINVALUE 0 MAXVALUE 999999 START 0; +ALTER TABLE qwat_od.sia405pt_protection_tube ALTER COLUMN obj_id SET DEFAULT qwat_sys.generate_oid('qwat_od','sia405pt_protection_tube'); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.obj_id IS 'INTERLIS STANDARD OID (with Postfix/Präfix), see www.interlis.ch'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN name_number text; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT _name_number_length_max_40 CHECK(char_length(name_number)<=40); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.name_number IS ''; +-- ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN geometry_geometry geometry('COMPOUNDCURVE', :SRID); +-- CREATE INDEX in_qwat_sia405pt_protection_tube_geometry_geometry ON qwat_od.sia405pt_protection_tube USING gist (geometry_geometry ); +-- COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.geometry_geometry IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN material integer ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.material IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN nominal_diameter text; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT _nominal_diameter_length_max_10 CHECK(char_length(nominal_diameter)<=10); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.nominal_diameter IS 'as TEXT, as in some cases double values with slash (eg. 1500/800) / als TEXT, da zum Teil auch Doppelwerte mit Schrägstrich (z.B. 1500/800) / comme TEXTE, parcequ''on a aussi des valeurs doubles (par example 1500/800)'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN outside_diameter smallint ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.outside_diameter IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN lenght smallint ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.lenght IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN installation_year smallint ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.installation_year IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN horizontal_positioning integer ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.horizontal_positioning IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN status integer ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.status IS 'Operating and planning status of the structure / Betriebs- bzw. Planungszustand des Bauwerks / Etat de fonctionnement et de planification de l’ouvrage'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN sur_plus_cover decimal(4,1) ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.sur_plus_cover IS 'yyy_mittlerer Wert eines Objektes / mittlerer Wert eines Objektes / xxx_mittlerer Wert eines Objektes'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN condition text; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT _condition_length_max_30 CHECK(char_length(condition)<=30); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.condition IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN remark text; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT _remark_length_max_80 CHECK(char_length(remark)<=80); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.remark IS 'General remarks / Allgemeine Bemerkungen / Remarques générales'; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN geometry3d_geometry geometry('COMPOUNDCURVEZ', :SRID); +CREATE INDEX in_qwat_sia405pt_protection_tube_geometry3d_geometry ON qwat_od.sia405pt_protection_tube USING gist (geometry3d_geometry ); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.geometry3d_geometry IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now(); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_dataowner varchar(16); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.fk_dataowner IS 'Foreignkey to Metaattribute dataowner (as an organisation) - this is the person or body who is allowed to delete, change or maintain this object / Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten / Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_provider varchar(16); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.fk_provider IS 'Foreignkey to Metaattribute provider (as an organisation) - this is the person or body who delivered the data / Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat / FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données '; +------- +CREATE TRIGGER +update_last_modified_sia405cc_protection_tube +BEFORE UPDATE OR INSERT ON + qwat_od.sia405pt_protection_tube +FOR EACH ROW EXECUTE PROCEDURE + qwat_sys.update_last_modified(); + +------------ Relationships and Value Tables ----------- ; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_owner varchar(16); +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT rel_sia405pt_protection_tube_owner FOREIGN KEY (fk_owner) REFERENCES qwat_od.organisation(obj_id) ON UPDATE CASCADE ON DELETE set null DEFERRABLE INITIALLY DEFERRED; +CREATE TABLE qwat_vl.sia405pt_protection_tube_material () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405pt_protection_tube_material ADD CONSTRAINT pkey_qwat_vl_sia405pt_protection_tube_material_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9438,9438,'concrete','Beton','beton', 'calcestruzzo', 'beton', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9437,9437,'cast_iron.gray_iron','Guss.Grauguss','fonte.fonte_grise', 'ghisa.ghisa_grigia', 'fonta.fonta_cenusie', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9436,9436,'cast_iron.ductile_cast','Guss.Guss_duktil','fonte.fonte_ductil', 'ghisa.ghisa_duttile', 'fonta.fonta_ductila', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9433,9433,'plastic.polyethylene','Kunststoff.Polyethylen','matiere_synthetique.polyethylene', 'materiale_sintetico.polietilene', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9434,9434,'plastic.PVC','Kunststoff.Polyvinylchlorid','matiere_synthetique.chlorure_de_polyvinyle', 'materiale_sintetico.polivinilcloruro', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9435,9435,'steel','Stahl','acier', 'acciaio', 'otel', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9432,9432,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT fkey_vl_sia405pt_protection_tube_material FOREIGN KEY (material) + REFERENCES qwat_vl.sia405pt_protection_tube_material (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405pt_protection_tube_horizontal_positioning () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405pt_protection_tube_horizontal_positioning ADD CONSTRAINT pkey_qwat_vl_sia405pt_protection_tube_horizontal_positioning_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405pt_protection_tube_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9443,9443,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9444,9444,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9445,9445,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT fkey_vl_sia405pt_protection_tube_horizontal_positioning FOREIGN KEY (horizontal_positioning) + REFERENCES qwat_vl.sia405pt_protection_tube_horizontal_positioning (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405pt_protection_tube_status () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405pt_protection_tube_status ADD CONSTRAINT pkey_qwat_vl_sia405pt_protection_tube_status_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9446,9446,'inoperative','ausser_Betrieb','hors_service', 'fuori_servizio', 'rrr_ausser_Betrieb', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9447,9447,'inoperative.reserve','ausser_Betrieb.Reserve','hors_service.en_reserve', 'fuori_servizio.riserva', 'rrr_ausser_Betrieb.Reserve', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9448,9448,'operational','in_Betrieb','en_service', 'in_funzione', 'functionala', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9449,9449,'operational.tentative','in_Betrieb.provisorisch','en_service.provisoire', 'in_funzione.provvisorio', 'functionala.provizoriu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9450,9450,'others','weitere','', '', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9451,9451,'other.calculation_alternative','weitere.Berechnungsvariante','autre.variante_de_calcule', 'altro.variante_calcolo', 'alta.varianta_calcul', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9452,9452,'other.planned','weitere.geplant','autre.planifie', 'altro.previsto', 'rrr_weitere.geplant', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9453,9453,'other.project','weitere.Projekt','autre.projet', 'altro.progetto', 'alta.proiect', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT fkey_vl_sia405pt_protection_tube_status FOREIGN KEY (status) + REFERENCES qwat_vl.sia405pt_protection_tube_status (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +--------- Relations to class organisation for dataowner and provider (new 3.11.2014); + +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT rel_od_sia405pt_protection_tube_fk_dataowner FOREIGN KEY (fk_dataowner) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT rel_od_sia405pt_protection_tube_fk_dataprovider FOREIGN KEY (fk_provider) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; + +--------- Extra Relation to class pipe of tdh +ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_pipe integer; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT rel_od_sia405pt_protection_tube_fk_pipe FOREIGN KEY (fk_pipe) REFERENCES qwat_od.pipe(id) DEFERRABLE INITIALLY DEFERRED; + +------ Indexes on identifiers + + CREATE UNIQUE INDEX in_od_sia405pt_protection_tube_name_number ON qwat_od.sia405pt_protection_tube USING btree (name_number ASC NULLS LAST, fk_dataowner ASC NULLS LAST); + +COMMIT; diff --git a/datamodel/ordinary_data/protectiontube/09_qwat_protection_tube_dictionaries.sql b/datamodel/ordinary_data/protectiontube/09_qwat_protection_tube_dictionaries.sql new file mode 100644 index 00000000..b16a5846 --- /dev/null +++ b/datamodel/ordinary_data/protectiontube/09_qwat_protection_tube_dictionaries.sql @@ -0,0 +1,48 @@ +------ this file generates the qwat is_dictionary (Modul schutzrohr(based on SIA405_SCHUTZROHR_3D_2015_LV95 (Version 18.04.2018)) in en on TEKSI +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 09.12.2024 10:34:09 +------ with 3D coordinates + + INSERT INTO qwat_sys.dictionary_od_table (id, tablename, name_en, shortcut_en, name_de, shortcut_de, name_fr, shortcut_fr, name_it, shortcut_it, name_ro, shortcut_ro) VALUES (8502,'sia405pt_protection_tube','protection tube','PT','Schutzrohr','PT','tube de protection','TP','pozzetto termico','NULL','rrr_Schutzrohr','NULL'); + + + + + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9418,'sia405pt_protection_tube','name_number','name_number','Name_Nummer','Nom_numero','nome_numero','nume_numarul','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9419,'sia405pt_protection_tube','geometry','geometry','Geometrie','Geometrie','geometria','geometria','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','geometry',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9420,'sia405pt_protection_tube','material','material','Material','Materiau','materiale','material','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9421,'sia405pt_protection_tube','nominal_diameter','nominal_diameter','Nennweite','Largeur_nominale','larghezza_nominale','diametrul_nominal','as TEXT, as in some cases double values with slash (eg. 1500/800)','als TEXT, da zum Teil auch Doppelwerte mit Schrägstrich (z.B. 1500/800)','comme TEXTE, parcequ''on a aussi des valeurs doubles (par example 1500/800)','come TESTO, poiché in alcuni casi i valori sono doppi con la barra (es. 1500/800).','ca TEXT, deoarece în unele cazuri se dubleaza valorile cu o bara oblica (de exemplu, 1500/800)',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(10)',NULL,'as TEXT, because sometimes also double values with slash inbetween eg. 500/800',NULL,'als TEXT, da zum Teil auch Doppelwerte mit Schrägstrich (1500/1000)',NULL,'En tant que TEXT, car peut contenir des valeurs doubles avec barre oblique (1500/1000)',NULL,'come TESTO, poiché in alcuni casi valori doppi con slash (1500/1000)',NULL,'rrr_als TEXT, da zum Teil auch Doppelwerte mit Schrägstrich (1500/1000)',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9422,'sia405pt_protection_tube','outside_diameter','outside_diameter','Aussendurchmesser','Diametre_exterieur','diametro_esterno','diametrul_exterior','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimétre [mm]','[mm]','millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,999999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9423,'sia405pt_protection_tube','lenght','lenght','Laenge','Longeur','lunghezza','lungime','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimétre [mm]','[mm]','millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,999999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9424,'sia405pt_protection_tube','installation_year','installation_year','Einbaujahr','Annee_construction','anno_costruzione','anul_instalarii','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint',NULL,' If unknown set lowest value of value range',NULL,'Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',NULL,'Si inconnu ajouter la plus bas valeur du domaine des valeurs',NULL,'Se sconosciuto, inserire valore minimo dell’intervallo di valori',NULL,'rrr_Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',1800,2100); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9425,'sia405pt_protection_tube','horizontal_positioning','horizontal_positioning','Lagebestimmung','Determination_planimetrique','determinazione_posizione','precizie_pozitie','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9426,'sia405pt_protection_tube','status','status','Status','Etat','stato','stare','Operating and planning status of the structure','Betriebs- bzw. Planungszustand des Bauwerks','Etat de fonctionnement et de planification de l’ouvrage','Stato di funzionamento e di pianificazione del manufatto.','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,'extends value range of SIA405 status',NULL,'Erweitert Wertebereich von SIA405 Status',NULL,'extension valeurs SIA405 Etat',NULL,'dilatato codominio SIA405 Stato',NULL,'rrr_Erweitert Wertebereich von SIA405 Status',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9427,'sia405pt_protection_tube','sur_plus_cover','sur_plus_cover','Ueberdeckung','Couverture','zzz_Ueberdeckung','','yyy_mittlerer Wert eines Objektes','mittlerer Wert eines Objektes','xxx_mittlerer Wert eines Objektes','zzz_mittlerer Wert eines Objektes','rrr_mittlerer Wert eines Objektes',ARRAY['Werkinformation']::qwat_od.plantype[],'true','decimal(4,1)','[m]','meter [m]','[m]','Meter [m]','[m]','mètre [m]','[m]','metro [m]','[m]','rrr_Meter [m]',0,999.9); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9428,'sia405pt_protection_tube','condition','condition','Zustand','Condition','condizione','rrr_Zustand','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(30)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9429,'sia405pt_protection_tube','remark','remark','Bemerkung','Remarque','osservazione','observatie','General remarks','Allgemeine Bemerkungen','Remarques générales','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(80)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9457,'sia405pt_protection_tube','geometry3d','geometry3d','Geometrie3D','Geometrie3D','geometria3d','geometria3D','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','geometry','[HKoord]','points with coordinates in the swiss national grid','[HKoord]','Punkte mit Schweizer Landeskoordinaten [HKoord]','[CoordH]','points avec coordonnées dans le système de coordonnées suisse','[HKoord]','Punti con coordinate nazionali svizzere','[HKoord]','rrr_Punkte mit Schweizer Landeskoordinaten',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,999999,'sia405pt_protection_tube','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,999998,'sia405pt_protection_tube','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,999997,'sia405pt_protection_tube','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,999996,'sia405pt_protection_tube','last_modification','last_modification','Letzte_Aenderung','DERNIERE_MODIFICATION','ultima_modifica','rrr_Letze_Aenderung','Last modification: INTERLIS_1_DATE','Letzte Änderung: INTERLIS_1_DATE','Dernière modification: INTERLIS_1_DATE','ultima_modifica: INTERLIS_1_DATE','rrr_Letzte Änderung: INTERLIS_1_DATE',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','TIMESTAMP','','','','','','','','','','',NULL,NULL); + + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9432,'sia405pt_protection_tube','material','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9433,'sia405pt_protection_tube','material','plastic.polyethylene','plastic.polyethylene',NULL,'Kunststoff.Polyethylen',NULL,'matiere_synthetique.polyethylene',NULL,'materiale_sintetico.polietilene',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9434,'sia405pt_protection_tube','material','plastic.PVC','plastic.PVC',NULL,'Kunststoff.Polyvinylchlorid',NULL,'matiere_synthetique.chlorure_de_polyvinyle',NULL,'materiale_sintetico.polivinilcloruro',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9435,'sia405pt_protection_tube','material','steel','steel',NULL,'Stahl',NULL,'acier',NULL,'acciaio',NULL,'otel',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9436,'sia405pt_protection_tube','material','cast_iron.ductile_cast','cast_iron.ductile_cast',NULL,'Guss.Guss_duktil',NULL,'fonte.fonte_ductil',NULL,'ghisa.ghisa_duttile',NULL,'fonta.fonta_ductila',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9437,'sia405pt_protection_tube','material','cast_iron.gray_iron','cast_iron.gray_iron',NULL,'Guss.Grauguss',NULL,'fonte.fonte_grise',NULL,'ghisa.ghisa_grigia',NULL,'fonta.fonta_cenusie',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9438,'sia405pt_protection_tube','material','concrete','concrete',NULL,'Beton',NULL,'beton',NULL,'calcestruzzo',NULL,'beton',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9425,9443,'sia405pt_protection_tube','horizontal_positioning','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9425,9444,'sia405pt_protection_tube','horizontal_positioning','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9425,9445,'sia405pt_protection_tube','horizontal_positioning','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9446,'sia405pt_protection_tube','status','inoperative','inoperative',NULL,'ausser_Betrieb',NULL,'hors_service',NULL,'fuori_servizio',NULL,'rrr_ausser_Betrieb',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9447,'sia405pt_protection_tube','status','inoperative.reserve','inoperative.reserve',NULL,'ausser_Betrieb.Reserve',NULL,'hors_service.en_reserve',NULL,'fuori_servizio.riserva',NULL,'rrr_ausser_Betrieb.Reserve',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9448,'sia405pt_protection_tube','status','operational','operational',NULL,'in_Betrieb',NULL,'en_service',NULL,'in_funzione',NULL,'functionala',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9449,'sia405pt_protection_tube','status','operational.tentative','operational.tentative',NULL,'in_Betrieb.provisorisch',NULL,'en_service.provisoire',NULL,'in_funzione.provvisorio',NULL,'functionala.provizoriu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9450,'sia405pt_protection_tube','status','others','others',NULL,'weitere',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9451,'sia405pt_protection_tube','status','other.calculation_alternative','other.calculation_alternative',NULL,'weitere.Berechnungsvariante',NULL,'autre.variante_de_calcule',NULL,'altro.variante_calcolo',NULL,'alta.varianta_calcul',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9452,'sia405pt_protection_tube','status','other.planned','other.planned',NULL,'weitere.geplant',NULL,'autre.planifie',NULL,'altro.previsto',NULL,'rrr_weitere.geplant',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9453,'sia405pt_protection_tube','status','other.project','other.project',NULL,'weitere.Projekt',NULL,'autre.projet',NULL,'altro.progetto',NULL,'alta.proiect',NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/datamodel/ordinary_data/protectiontube/qwat_protection_tube_fk_folder.sql b/datamodel/ordinary_data/protectiontube/qwat_protection_tube_fk_folder.sql new file mode 100644 index 00000000..d654bc45 --- /dev/null +++ b/datamodel/ordinary_data/protectiontube/qwat_protection_tube_fk_folder.sql @@ -0,0 +1,2 @@ +ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_folder integer ; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT sia405pt_protection_tube_fk_folder FOREIGN KEY (fk_folder) REFERENCES qwat_od.folder(id) MATCH FULL; CREATE INDEX fki_sia405pt_protection_tube_fk_folder ON qwat_od.sia405pt_protection_tube(fk_folder); diff --git a/datamodel/scripts/setup.sh b/datamodel/scripts/setup.sh index 19f872b5..d2f32c36 100755 --- a/datamodel/scripts/setup.sh +++ b/datamodel/scripts/setup.sh @@ -262,6 +262,26 @@ psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_da echo "Starting tr_valve_pipe insertion..." psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/valve/tr_valve_pipe.sql +echo "Starting organisation insertion..." +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/system/oid_generation.sql +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/system/02_sys.sql +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/system/09_qwat_dictionaries.sql + +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/organisation/03_qwat_db_organisation.sql +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/organisation/09_qwat_organisation_dictionaries.sql + +echo "Starting controlcable insertion..." +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/controlcable/03_qwat_control_cable_db_sia405.sql +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/controlcable/09_qwat_control_cable_dictionaries.sql +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/controlcable/qwat_control_cable_fk_folder.sql + +echo "Starting protection_tube insertion..." +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/protectiontube/03_qwat_protection_tube_db_sia405.sql +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/protectiontube/09_qwat_protection_tube_dictionaries.sql +psql service=${PGSERVICE} -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/ordinary_data/protectiontube/qwat_protection_tube_fk_folder.sql + + + echo "Starting view creation..." PGSERVICE=${PGSERVICE} SRID=$SRID ${DIR}/ordinary_data/views/insert_views.sh diff --git a/datamodel/system/02_sys.sql b/datamodel/system/02_sys.sql new file mode 100644 index 00000000..6c3f7a64 --- /dev/null +++ b/datamodel/system/02_sys.sql @@ -0,0 +1,23 @@ +------ LAST MODIFIED ----- +CREATE FUNCTION qwat_sys.update_last_modified() RETURNS trigger AS $$ +BEGIN + NEW.last_modification := TIMEOFDAY(); + + RETURN NEW; +END; +$$ LANGUAGE PLPGSQL; + +CREATE FUNCTION qwat_sys.update_last_modified_parent() RETURNS trigger AS $$ +DECLARE + table_name TEXT; +BEGIN + table_name = TG_ARGV[0]; + + EXECUTE ' + UPDATE ' || table_name || ' + SET last_modification = TIMEOFDAY()::timestamp + WHERE obj_id = ''' || NEW.obj_id || ''' +'; + RETURN NEW; +END; +$$ LANGUAGE PLPGSQL; diff --git a/datamodel/system/09_qwat_dictionaries.sql b/datamodel/system/09_qwat_dictionaries.sql new file mode 100644 index 00000000..5f883961 --- /dev/null +++ b/datamodel/system/09_qwat_dictionaries.sql @@ -0,0 +1,107 @@ +------ this file generates the qwat is_dictionary (Modul fernwaerme(based on SIA405_FERNWAERME_3D_2015_LV95 (Version 18.04.2018)) in en on TEKSI +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 28.10.2024 20:12:17 +------ with 3D coordinates + +CREATE TABLE qwat_sys.dictionary_od_table +( + id integer NOT NULL, + tablename text, + name_en text, + shortcut_en character(2), + name_de text, + shortcut_de character(2), + name_fr text, + shortcut_fr character(2), + name_it text, + shortcut_it character(4), + name_ro text, + shortcut_ro character(4), + CONSTRAINT pkey_qwat_is_dictonary_id PRIMARY KEY (id), + CONSTRAINT unq_qwat_is_dictonary_tablename UNIQUE (tablename) +) +WITH ( + OIDS = False +); +ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_en UNIQUE (name_en); +ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_en UNIQUE (shortcut_en); +ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_de UNIQUE (name_de); +---- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_de UNIQUE (shortcut_de); +ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_fr UNIQUE (name_fr); +---- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_fr UNIQUE (shortcut_fr); +--- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_it UNIQUE (name_it); +--- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_it UNIQUE (shortcut_it); +--- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_ro UNIQUE (name_ro); +--- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_ro UNIQUE (shortcut_ro); + + + +DROP TYPE IF EXISTS qwat_od.plantype; +CREATE TYPE qwat_od.plantype AS ENUM ('Leitungskataster','Werkinformation', 'GEP_Verband', 'GEP_Traegerschaft', 'PAA', 'SAA', 'kein_Plantyp_definiert'); +CREATE TABLE qwat_sys.dictionary_od_field ( + id serial NOT NULL, + class_id integer, + attribute_id integer, + table_name character varying(80), + field_name character varying(80), + field_name_en character varying(80), + field_name_de character varying(100), + field_name_fr character varying(100), + field_name_it character varying(100), + field_name_ro character varying(100), + field_description_en text, + field_description_de text, + field_description_fr text, + field_description_it text, + field_description_ro text, + field_mandatory qwat_od.plantype[], + field_visible boolean, + field_datatype character varying(40), + field_unit_de character varying(20), + field_unit_description_de character varying(90), + field_unit_en character varying(20), + field_unit_description_en character varying(90), + field_unit_fr character varying(20), + field_unit_description_fr character varying(90), + field_unit_it character varying(20), + field_unit_description_it character varying(90), + field_unit_ro character varying(20), + field_unit_description_ro character varying(90), + field_min numeric, + field_max numeric, + CONSTRAINT is_dictionary_od_field_pkey PRIMARY KEY (id) +); + + + +CREATE TABLE qwat_sys.dictionary_od_values ( + id serial NOT NULL, + class_id integer, + attribute_id integer, + value_id integer, + table_name character varying(80), + field_name character varying(80), + value_name character varying(100), + value_name_en character varying(80), + shortcut_en character(4), + value_name_de character varying(100), + shortcut_de character(4), + value_name_fr character varying(100), + shortcut_fr character(4), + value_name_it character varying(100), + shortcut_it character(4), + value_name_ro character varying(100), + shortcut_ro character(4), + value_description_en text, + value_description_de text, + value_description_fr text, + value_description_it text, + value_description_ro text, +CONSTRAINT is_dictionary_od_values_pkey PRIMARY KEY (id) +); + + + +CREATE UNIQUE INDEX in_dictionary_od_table ON qwat_sys.dictionary_od_table USING btree (tablename ASC NULLS LAST); +CREATE UNIQUE INDEX in_dictionary_od_field ON qwat_sys.dictionary_od_field USING btree (class_id ASC NULLS LAST, attribute_id ASC NULLS LAST); +CREATE UNIQUE INDEX in_dictionary_od_values ON qwat_sys.dictionary_od_values USING btree (class_id ASC NULLS LAST, attribute_id ASC NULLS LAST, value_id ASC NULLS LAST); diff --git a/datamodel/system/oid_generation.sql b/datamodel/system/oid_generation.sql new file mode 100644 index 00000000..093dc80e --- /dev/null +++ b/datamodel/system/oid_generation.sql @@ -0,0 +1,83 @@ +-- this file generates a new SQL function to create INTERLIS STANDARDOID's for all the qwat_od.* tables. +-- you need to add entries for your organizations into the table qwat_sys.oid_prefixes +-- questions regarding this function should be directed to Arnaud Poncet, Pully +-- Adapted for TEKSI VSA-DSS 2020 Stefan Burckhardt + +CREATE TABLE qwat_sys.oid_prefixes +( + id serial NOT NULL, + prefix character(8), + organization text, + active boolean, + CONSTRAINT pkey_qwat_is_oid_prefixes_id PRIMARY KEY (id ) +) +WITH ( + OIDS=FALSE +); +COMMENT ON TABLE qwat_sys.oid_prefixes + IS 'This table contains OID prefixes for different communities or organizations. The application or administrator changing this table has to make sure that only one record is set to active.'; + +-- sample entry for Invalid - you need to adapt this entry later for your own organization +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch000000','Invalid',TRUE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch11h8mw','Stadt Uster',FALSE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch15z36d','SIGE',FALSE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch13p7mz','Arbon',FALSE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch176dc9','Sigip',FALSE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch17f516','Prilly',FALSE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch17nq5g','Triform',FALSE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch2003p6','Vevey',FALSE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch238z74','La Tour-de-Peilz',FALSE); +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch234hqx','BTI',FALSE); + +CREATE INDEX in_qwat_is_oid_prefixes_active + ON qwat_sys.oid_prefixes + USING btree + (active ); + +CREATE UNIQUE INDEX in_qwat_is_oid_prefixes_id + ON qwat_sys.oid_prefixes + USING btree + (id ); + +-- function for generating StandardOIDs + +CREATE OR REPLACE FUNCTION qwat_sys.generate_oid(schema_name text, table_name text) + RETURNS text AS +$BODY$ +DECLARE + myrec_prefix record; + myrec_shortcut record; + myrec_seq record; +BEGIN + -- first we have to get the OID prefix + BEGIN + SELECT prefix::text INTO myrec_prefix FROM qwat_sys.oid_prefixes WHERE active = TRUE; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'no active record found in table qwat_sys.oid_prefixes'; + WHEN TOO_MANY_ROWS THEN + RAISE EXCEPTION 'more than one active records found in table qwat_sys.oid_prefixes'; + END; + -- test if prefix is of correct length + IF char_length(myrec_prefix.prefix) != 8 THEN + RAISE EXCEPTION 'character length of prefix must be 8'; + END IF; + --get table 2char shortcut + BEGIN + SELECT shortcut_en INTO STRICT myrec_shortcut FROM qwat_sys.dictionary_od_table WHERE tablename = table_name; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'dictionary entry for table % not found', table_name; + WHEN TOO_MANY_ROWS THEN + RAISE EXCEPTION 'dictonary entry for table % not unique', table_name; + END; + --get sequence for table + EXECUTE format('SELECT nextval(''%1$I.seq_%2$I_oid'') AS seqval', schema_name, table_name) INTO myrec_seq; + IF NOT FOUND THEN + RAISE EXCEPTION 'sequence for table % not found', table_name; + END IF; + RETURN myrec_prefix.prefix || myrec_shortcut.shortcut_en || to_char(myrec_seq.seqval,'FM000000'); +END; +$BODY$ + LANGUAGE plpgsql STABLE + COST 100; diff --git a/datamodel/tests/test_add_protection_tube.sql b/datamodel/tests/test_add_protection_tube.sql new file mode 100644 index 00000000..28d21ab0 --- /dev/null +++ b/datamodel/tests/test_add_protection_tube.sql @@ -0,0 +1,11 @@ +-- add a protection_tube +--INSERT INTO qwat_od.protection_tube (id, name) VALUES (1, 'Demo protection_tube'); +INSERT INTO qwat_od.protection_tube (name_number, material, nominal_diameter, outside_diameter, lenght, installation_year, horizontal_positioning, status, sur_plus_cover, condition, remark, geometry3d_geometry) +VALUES ('Demo protection_tube', 9438 ,'800', 805, '', 2024, 9443, 9448,2.3, 'test protection tube added',ST_Force3D(ST_GeomFromText('LINESTRINGZ(540900.2686702100 152955.4115092800 0, 540900.4100672200 152952.3142217600 0)',21781))); + + + +UPDATE qwat_od.protection_tube SET geometry = st_setsrid('linestring(530000 148260 0, 530001 148260 0)'::geometry, 21781) where id=11; + +-- restore the initial state +DELETE FROM qwat_od.protection_tube diff --git a/datamodel/update/delta/delta_1.4.2_000_oid_generation.sql b/datamodel/update/delta/delta_1.4.2_000_oid_generation.sql new file mode 100644 index 00000000..74c2e7ae --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_000_oid_generation.sql @@ -0,0 +1,75 @@ +-- this file generates a new SQL function to create INTERLIS STANDARDOID's for all the qwat_od.* tables. +-- you need to add entries for your organizations into the table qwat_sys.oid_prefixes +-- questions regarding this function should be directed to Arnaud Poncet, Pully +-- Adapted for TEKSI VSA-DSS 2020 Stefan Burckhardt + +CREATE TABLE qwat_sys.oid_prefixes +( + id serial NOT NULL, + prefix character(8), + organization text, + active boolean, + CONSTRAINT pkey_qwat_is_oid_prefixes_id PRIMARY KEY (id ) +) +WITH ( + OIDS=FALSE +); +COMMENT ON TABLE qwat_sys.oid_prefixes + IS 'This table contains OID prefixes for different communities or organizations. The application or administrator changing this table has to make sure that only one record is set to active.'; + +-- sample entry for Invalid - you need to adapt this entry later for your own organization +INSERT INTO qwat_sys.oid_prefixes (prefix,organization,active) VALUES ('ch000000','Invalid',TRUE); + + +CREATE INDEX in_qwat_is_oid_prefixes_active + ON qwat_sys.oid_prefixes + USING btree + (active ); + +CREATE UNIQUE INDEX in_qwat_is_oid_prefixes_id + ON qwat_sys.oid_prefixes + USING btree + (id ); + +-- function for generating StandardOIDs + +CREATE OR REPLACE FUNCTION qwat_sys.generate_oid(schema_name text, table_name text) + RETURNS text AS +$BODY$ +DECLARE + myrec_prefix record; + myrec_shortcut record; + myrec_seq record; +BEGIN + -- first we have to get the OID prefix + BEGIN + SELECT prefix::text INTO myrec_prefix FROM qwat_sys.oid_prefixes WHERE active = TRUE; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'no active record found in table qwat_sys.oid_prefixes'; + WHEN TOO_MANY_ROWS THEN + RAISE EXCEPTION 'more than one active records found in table qwat_sys.oid_prefixes'; + END; + -- test if prefix is of correct length + IF char_length(myrec_prefix.prefix) != 8 THEN + RAISE EXCEPTION 'character length of prefix must be 8'; + END IF; + --get table 2char shortcut + BEGIN + SELECT shortcut_en INTO STRICT myrec_shortcut FROM qwat_sys.dictionary_od_table WHERE tablename = table_name; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'dictionary entry for table % not found', table_name; + WHEN TOO_MANY_ROWS THEN + RAISE EXCEPTION 'dictonary entry for table % not unique', table_name; + END; + --get sequence for table + EXECUTE format('SELECT nextval(''%1$I.seq_%2$I_oid'') AS seqval', schema_name, table_name) INTO myrec_seq; + IF NOT FOUND THEN + RAISE EXCEPTION 'sequence for table % not found', table_name; + END IF; + RETURN myrec_prefix.prefix || myrec_shortcut.shortcut_en || to_char(myrec_seq.seqval,'FM000000'); +END; +$BODY$ + LANGUAGE plpgsql STABLE + COST 100; diff --git a/datamodel/update/delta/delta_1.4.2_001_add_02_sys.sql b/datamodel/update/delta/delta_1.4.2_001_add_02_sys.sql new file mode 100644 index 00000000..6c3f7a64 --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_001_add_02_sys.sql @@ -0,0 +1,23 @@ +------ LAST MODIFIED ----- +CREATE FUNCTION qwat_sys.update_last_modified() RETURNS trigger AS $$ +BEGIN + NEW.last_modification := TIMEOFDAY(); + + RETURN NEW; +END; +$$ LANGUAGE PLPGSQL; + +CREATE FUNCTION qwat_sys.update_last_modified_parent() RETURNS trigger AS $$ +DECLARE + table_name TEXT; +BEGIN + table_name = TG_ARGV[0]; + + EXECUTE ' + UPDATE ' || table_name || ' + SET last_modification = TIMEOFDAY()::timestamp + WHERE obj_id = ''' || NEW.obj_id || ''' +'; + RETURN NEW; +END; +$$ LANGUAGE PLPGSQL; diff --git a/datamodel/update/delta/delta_1.4.2_002_add_09_qwat_dictionaries.sql b/datamodel/update/delta/delta_1.4.2_002_add_09_qwat_dictionaries.sql new file mode 100644 index 00000000..5f883961 --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_002_add_09_qwat_dictionaries.sql @@ -0,0 +1,107 @@ +------ this file generates the qwat is_dictionary (Modul fernwaerme(based on SIA405_FERNWAERME_3D_2015_LV95 (Version 18.04.2018)) in en on TEKSI +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 28.10.2024 20:12:17 +------ with 3D coordinates + +CREATE TABLE qwat_sys.dictionary_od_table +( + id integer NOT NULL, + tablename text, + name_en text, + shortcut_en character(2), + name_de text, + shortcut_de character(2), + name_fr text, + shortcut_fr character(2), + name_it text, + shortcut_it character(4), + name_ro text, + shortcut_ro character(4), + CONSTRAINT pkey_qwat_is_dictonary_id PRIMARY KEY (id), + CONSTRAINT unq_qwat_is_dictonary_tablename UNIQUE (tablename) +) +WITH ( + OIDS = False +); +ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_en UNIQUE (name_en); +ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_en UNIQUE (shortcut_en); +ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_de UNIQUE (name_de); +---- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_de UNIQUE (shortcut_de); +ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_fr UNIQUE (name_fr); +---- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_fr UNIQUE (shortcut_fr); +--- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_it UNIQUE (name_it); +--- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_it UNIQUE (shortcut_it); +--- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_name_ro UNIQUE (name_ro); +--- ALTER TABLE qwat_sys.dictionary_od_table ADD CONSTRAINT unq_qwat_is_dictonary_shortcut_ro UNIQUE (shortcut_ro); + + + +DROP TYPE IF EXISTS qwat_od.plantype; +CREATE TYPE qwat_od.plantype AS ENUM ('Leitungskataster','Werkinformation', 'GEP_Verband', 'GEP_Traegerschaft', 'PAA', 'SAA', 'kein_Plantyp_definiert'); +CREATE TABLE qwat_sys.dictionary_od_field ( + id serial NOT NULL, + class_id integer, + attribute_id integer, + table_name character varying(80), + field_name character varying(80), + field_name_en character varying(80), + field_name_de character varying(100), + field_name_fr character varying(100), + field_name_it character varying(100), + field_name_ro character varying(100), + field_description_en text, + field_description_de text, + field_description_fr text, + field_description_it text, + field_description_ro text, + field_mandatory qwat_od.plantype[], + field_visible boolean, + field_datatype character varying(40), + field_unit_de character varying(20), + field_unit_description_de character varying(90), + field_unit_en character varying(20), + field_unit_description_en character varying(90), + field_unit_fr character varying(20), + field_unit_description_fr character varying(90), + field_unit_it character varying(20), + field_unit_description_it character varying(90), + field_unit_ro character varying(20), + field_unit_description_ro character varying(90), + field_min numeric, + field_max numeric, + CONSTRAINT is_dictionary_od_field_pkey PRIMARY KEY (id) +); + + + +CREATE TABLE qwat_sys.dictionary_od_values ( + id serial NOT NULL, + class_id integer, + attribute_id integer, + value_id integer, + table_name character varying(80), + field_name character varying(80), + value_name character varying(100), + value_name_en character varying(80), + shortcut_en character(4), + value_name_de character varying(100), + shortcut_de character(4), + value_name_fr character varying(100), + shortcut_fr character(4), + value_name_it character varying(100), + shortcut_it character(4), + value_name_ro character varying(100), + shortcut_ro character(4), + value_description_en text, + value_description_de text, + value_description_fr text, + value_description_it text, + value_description_ro text, +CONSTRAINT is_dictionary_od_values_pkey PRIMARY KEY (id) +); + + + +CREATE UNIQUE INDEX in_dictionary_od_table ON qwat_sys.dictionary_od_table USING btree (tablename ASC NULLS LAST); +CREATE UNIQUE INDEX in_dictionary_od_field ON qwat_sys.dictionary_od_field USING btree (class_id ASC NULLS LAST, attribute_id ASC NULLS LAST); +CREATE UNIQUE INDEX in_dictionary_od_values ON qwat_sys.dictionary_od_values USING btree (class_id ASC NULLS LAST, attribute_id ASC NULLS LAST, value_id ASC NULLS LAST); diff --git a/datamodel/update/delta/delta_1.4.2_003_add_organisation.sql b/datamodel/update/delta/delta_1.4.2_003_add_organisation.sql new file mode 100644 index 00000000..bf36adf4 --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_003_add_organisation.sql @@ -0,0 +1,110 @@ +------ This file generates the database class organisation (Modul qwat (2020)) in en on QQIS +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 10.04.2024 15:47:40 +------ with 3D coordinates +BEGIN; + +---- 03_qwat_db_organisation.sql ---------- + +--------------------------- + +CREATE TABLE qwat_vl.value_list_base2 +( +code integer NOT NULL, +vsacode integer NOT NULL, +value_en character varying(100), +value_de character varying(100), +value_fr character varying(100), +value_it character varying(100), +value_ro character varying(100), +abbr_en character varying(3), +abbr_de character varying(3), +abbr_fr character varying(3), +abbr_it character varying(3), +abbr_ro character varying(3), +active boolean, +CONSTRAINT pkey_qwat_value_list_code PRIMARY KEY (code) +) +WITH ( + OIDS = False +); +------- +------- + +CREATE TABLE qwat_od.organisation +( + obj_id varchar(16) NOT NULL, + CONSTRAINT pkey_qwat_od_organisation_obj_id PRIMARY KEY (obj_id) +) +WITH ( + OIDS = False +); +CREATE SEQUENCE qwat_od.seq_organisation_oid INCREMENT 1 MINVALUE 0 MAXVALUE 999999 START 0; + ALTER TABLE qwat_od.organisation ALTER COLUMN obj_id SET DEFAULT qwat_sys.generate_oid('qwat_od','organisation'); +COMMENT ON COLUMN qwat_od.organisation.obj_id IS 'INTERLIS STANDARD OID (with Postfix/Präfix), see www.interlis.ch'; + ALTER TABLE qwat_od.organisation ADD COLUMN identifier text; + ALTER TABLE qwat_od.organisation ADD CONSTRAINT og_identifier_length_max_255 CHECK(char_length(identifier)<=255); +COMMENT ON COLUMN qwat_od.organisation.identifier IS 'The designation for municipalities is adopted according to the FSO list; for private individuals according to the UID register, if necessary with the addition of the location of the branch if no separate UID exists for it. / Die Bezeichnung für Gemeinden wird gemäss BFS-Liste übernommen; für Private gemäss UID-Register, allenfalls mit Zusatz des Ortes der Filiale, falls keine separate UID dafür besteht. / La désignation pour les communes est reprise selon la liste de l''OFS ; pour les particuliers, selon le registre UID, éventuellement avec l''ajout du lieu de la filiale s''il n''existe pas d''UID séparé pour celle-ci.'; + ALTER TABLE qwat_od.organisation ADD COLUMN identifier_short text; + ALTER TABLE qwat_od.organisation ADD CONSTRAINT og_identifier_short_length_max_12 CHECK(char_length(identifier_short)<=12); +COMMENT ON COLUMN qwat_od.organisation.identifier_short IS ' / Kurzbezeichnung / désignation abrégée'; + ALTER TABLE qwat_od.organisation ADD COLUMN municipality_number smallint ; +COMMENT ON COLUMN qwat_od.organisation.municipality_number IS 'Official number of municipality of federal office for statistics, mandatory for the municipalities. / Offizielle Gemeinde Nummer gemäss Bundesamt für Statistik, bei Gemeinden zwingend, sonst leer lassen. / Numéro officiel de la commune selon l''Office fédéral de la statistique, obligatoire pour les communes. Sinon, laissez vide.'; + ALTER TABLE qwat_od.organisation ADD COLUMN organisation_type integer ; +COMMENT ON COLUMN qwat_od.organisation.organisation_type IS 'Type of organisatoin / Art der Organisation / Genre d''organisation'; + ALTER TABLE qwat_od.organisation ADD COLUMN remark text; + ALTER TABLE qwat_od.organisation ADD CONSTRAINT og_remark_length_max_255 CHECK(char_length(remark)<=255); +COMMENT ON COLUMN qwat_od.organisation.remark IS 'General remarks / Allgemeine Bemerkungen / Remarques générales'; + ALTER TABLE qwat_od.organisation ADD COLUMN status integer ; +COMMENT ON COLUMN qwat_od.organisation.status IS 'yyy_Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind / Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind / Statut de l''organisation, pour que les organisations disparues ne soient pas simplement supprimées et qu''il soit possible de contrôler s''il existe encore des relations avec les organisations disparues, par exemple en cas de fusion de communes ou de faillite d''une société'; + ALTER TABLE qwat_od.organisation ADD COLUMN uid text; + ALTER TABLE qwat_od.organisation ADD CONSTRAINT og_uid_length_max_12 CHECK(char_length(uid)<=12); +COMMENT ON COLUMN qwat_od.organisation.uid IS 'Reference to the company identification of the Federal Office for Statistics (www.uid.admin.ch), e.g. CHE123456789 / Referenz zur Unternehmensidentifikation des Bundesamts fuer Statistik (www.uid.admin.ch), z.B. CHE123456789 / Référence pour l’identification des entreprises selon l’Office fédéral de la statistique OFS (www.uid.admin.ch), par exemple: CHE123456789'; + ALTER TABLE qwat_od.organisation ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now(); +COMMENT ON COLUMN qwat_od.organisation.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE'; + ALTER TABLE qwat_od.organisation ADD COLUMN fk_dataowner varchar(16); +COMMENT ON COLUMN qwat_od.organisation.fk_dataowner IS 'Foreignkey to Metaattribute dataowner (as an organisation) - this is the person or body who is allowed to delete, change or maintain this object / Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten / Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe'; + ALTER TABLE qwat_od.organisation ADD COLUMN fk_provider varchar(16); +COMMENT ON COLUMN qwat_od.organisation.fk_provider IS 'Foreignkey to Metaattribute provider (as an organisation) - this is the person or body who delivered the data / Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat / FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données '; +------- +CREATE TRIGGER +update_last_modified_organisation +BEFORE UPDATE OR INSERT ON + qwat_od.organisation +FOR EACH ROW EXECUTE PROCEDURE + qwat_sys.update_last_modified(); + +------- + +------------ Relationships and Value Tables ----------- ; + +CREATE TABLE qwat_vl.organisation_organisation_type () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.organisation_organisation_type ADD CONSTRAINT pkey_qwat_vl_organisation_organisation_type_code PRIMARY KEY (code); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8608,8608,'waste_water_association','Abwasserverband','association_epuration_eau', 'consorzio_depurazione', 'rrr_Abwasserverband', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8715,8715,'federation','Bund','federation', 'confederazione', 'rrr_Bund', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8604,8604,'municipality','Gemeinde','commune', 'comune', 'municipiul', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9319,9319,'municipal_department','Gemeindeabteilung','departement_communal', 'dipartimento_comunale', 'departamentul_municipal', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8610,8610,'cooperative','Genossenschaft_Korporation','cooperative', 'cooperativa_corporazione', 'rrr_Genossenschaft_Korporation', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8605,8605,'canton','Kanton','canton', 'cantone', 'rrr_Kanton', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_organisation_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (8606,8606,'private','Privat','prive', 'privato', 'privata', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.organisation ADD CONSTRAINT fkey_vl_organisation_organisation_type FOREIGN KEY (organisation_type) + REFERENCES qwat_vl.organisation_organisation_type (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.organisation_status () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.organisation_status ADD CONSTRAINT pkey_qwat_vl_organisation_status_code PRIMARY KEY (code); + INSERT INTO qwat_vl.organisation_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9047,9047,'activ','aktiv','active', 'attivo', 'rrr_aktiv', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.organisation_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9048,9048,'gone','untergegangen','disparue', 'decaduta', 'rrr_untergegangen', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.organisation ADD CONSTRAINT fkey_vl_organisation_status FOREIGN KEY (status) + REFERENCES qwat_vl.organisation_status (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; + + --------- Relations to class organisation for dataowner and provider (new 3.11.2014); + +ALTER TABLE qwat_od.organisation ADD CONSTRAINT rel_od_organisation_fk_dataowner FOREIGN KEY (fk_dataowner) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.organisation ADD CONSTRAINT rel_od_organisation_fk_dataprovider FOREIGN KEY (fk_provider) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; + +----- Indexes on identifiers + + CREATE UNIQUE INDEX in_od_organisation_identifier ON qwat_od.organisation USING btree (identifier ASC NULLS LAST, fk_dataowner ASC NULLS LAST); + + COMMIT; diff --git a/datamodel/update/delta/delta_1.4.2_004_add_control_cable.sql b/datamodel/update/delta/delta_1.4.2_004_add_control_cable.sql new file mode 100644 index 00000000..e5d39762 --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_004_add_control_cable.sql @@ -0,0 +1,265 @@ +DO $$ +DECLARE + srid_value INTEGER; +BEGIN + -- Récupérer la valeur SRID depuis la table qwat_sys.settings + SELECT value INTO srid_value FROM qwat_sys.settings WHERE name = 'srid'; + + + +------ This file generates the postgres database (Modul fernwirkkabel (based on SIA405_FERNWIRKKABEL_3D_2015_LV95 (Version 18.04.2018) in en for QQIS +------ Rename classes for integration in specific TEKSI module based on this convention: https://github.com/orgs/teksi/discussions/100#discussioncomment-9058690 +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 09.12.2024 11:13:15 +------ with 3D coordinates + +--- CREATE FUNCTION qgep_sys.update_last_modified() exists already +------- +CREATE TABLE qwat_od.sia405cc_cable_point +( + obj_id varchar(16) NOT NULL, + CONSTRAINT pkey_qwat_od_sia405cc_cable_point_obj_id PRIMARY KEY (obj_id) +) +WITH ( + OIDS = False +); +CREATE SEQUENCE qwat_od.seq_sia405cc_cable_point_oid INCREMENT 1 MINVALUE 0 MAXVALUE 999999 START 0; +ALTER TABLE qwat_od.sia405cc_cable_point ALTER COLUMN obj_id SET DEFAULT qwat_sys.generate_oid('qwat_od','sia405cc_cable_point'); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.obj_id IS 'INTERLIS STANDARD OID (with Postfix/Präfix), see www.interlis.ch'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN name_number text; + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT _name_number_length_max_40 CHECK(char_length(name_number)<=40); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.name_number IS ''; +--ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN geometry_geometry geometry('POINT', :SRID); +-- CREATE INDEX in_qwat_sia405cc_cable_point_geometry_geometry ON qwat_od.sia405cc_cable_point USING gist (geometry_geometry ); +-- COMMENT ON COLUMN qwat_od.sia405cc_cable_point.geometry_geometry IS ''; + +-- Adapted for Delta file +--ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN geometry3d_geometry geometry('POINTZ', :SRID); + +-- Construire et exécuter la commande ALTER TABLE avec la valeur SRID récupérée +EXECUTE format('ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN geometry3d_geometry geometry(''POINTZ'', %s)', srid_value); + +CREATE INDEX in_qwat_sia405cc_cable_point_geometry3d_geometry ON qwat_od.sia405cc_cable_point USING gist (geometry3d_geometry ); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.geometry3d_geometry IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN kind integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.kind IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN horizontal_positioning integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.horizontal_positioning IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN altitude decimal(7,3) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.altitude IS 'Altitude of component / Oberkante Bauteil / Bord supérieur de l''élément contructif'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN elevation_determination integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.elevation_determination IS 'Elevation determination of geometry (3D) / Höhenbestimmung der Geometrie (3D) / Définition de la détermination altimétrique de la Géométrie (3D)'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN status integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.status IS 'Operating and planning status of the structure / Betriebs- bzw. Planungszustand des Bauwerks / Etat de fonctionnement et de planification de l’ouvrage'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN installation_year smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.installation_year IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN sur_plus_cover decimal(4,1) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.sur_plus_cover IS 'Numerical mean value of an object / Numerisch mittlerer Wert eines Objektes / Valeur moyenne d''un objet'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN condition text; + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT _condition_length_max_40 CHECK(char_length(condition)<=40); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.condition IS ''; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN remark text; + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT _remark_length_max_80 CHECK(char_length(remark)<=80); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.remark IS 'General remarks / Allgemeine Bemerkungen / Remarques générales'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN dimension1 smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.dimension1 IS 'Larger dimension of an object (e.g. length) / grösseres Mass eines Objektes (z.B. Länge) / plus grande mesure d''un objet (par ex. Longueur, diamètre)'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN dimension2 smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.dimension2 IS 'smaller dimension of an object (e.g. width) / kleineres Mass eines Objektes (z.B. Breite) / plus petite msure d''un objet (par ex. Largeur)'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN altitude_lower_edge decimal(7,3) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.altitude_lower_edge IS 'Altitude lower edge of component / Höhe Unterkante / bord inférieur de l''élément constructif'; +ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN symbolori decimal(4,1) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.symbolori IS 'Default: 90 degree / Default: 90 Grad / Default: 90 degre'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN depth smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.depth IS 'Extension3D, Fonction (calculated value) = altitude minus altitude_lower_edge / Erweiterung 3D, Funktion (berechneter Wert) = Hoehe minus Hoehe_UK. / Extension 3D, Fonction (valuer calculée) = Altitude minus Altitude_BI.'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now(); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN fk_dataowner varchar(16); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.fk_dataowner IS 'Foreignkey to Metaattribute dataowner (as an organisation) - this is the person or body who is allowed to delete, change or maintain this object / Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten / Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe'; + ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN fk_provider varchar(16); +COMMENT ON COLUMN qwat_od.sia405cc_cable_point.fk_provider IS 'Foreignkey to Metaattribute provider (as an organisation) - this is the person or body who delivered the data / Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat / FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données '; +------- +CREATE TRIGGER +update_last_modified_sia405cc_cable_point +BEFORE UPDATE OR INSERT ON + qwat_od.sia405cc_cable_point +FOR EACH ROW EXECUTE PROCEDURE + qwat_sys.update_last_modified(); +------- +CREATE TABLE qwat_od.sia405cc_cable +( + obj_id varchar(16) NOT NULL, + CONSTRAINT pkey_qwat_od_sia405cc_cable_obj_id PRIMARY KEY (obj_id) +) +WITH ( + OIDS = False +); +CREATE SEQUENCE qwat_od.seq_sia405cc_cable_oid INCREMENT 1 MINVALUE 0 MAXVALUE 999999 START 0; +ALTER TABLE qwat_od.sia405cc_cable ALTER COLUMN obj_id SET DEFAULT qwat_sys.generate_oid('qwat_od','sia405cc_cable'); +COMMENT ON COLUMN qwat_od.sia405cc_cable.obj_id IS 'INTERLIS STANDARD OID (with Postfix/Präfix), see www.interlis.ch'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN name_number text; + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT _name_number_length_max_40 CHECK(char_length(name_number)<=40); +COMMENT ON COLUMN qwat_od.sia405cc_cable.name_number IS ' / z.B. Kabelpunktanfang_Kabelpunkteende / xxx_z.B. Point_cableanfang_Point_cableeende'; +-- ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN geometry_geometry geometry('COMPOUNDCURVE', :SRID); +-- CREATE INDEX in_qwat_sia405cc_cable_geometry_geometry ON qwat_od.sia405cc_cable USING gist (geometry_geometry ); +-- COMMENT ON COLUMN qwat_od.sia405cc_cable.geometry_geometry IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN function integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.function IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN cable_type integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.cable_type IS 'Cable type / Kabelart / Genre de cable'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN horizontal_positioning integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.horizontal_positioning IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN status integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.status IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN installation_year smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.installation_year IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN sur_plus_cover decimal(4,1) ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.sur_plus_cover IS 'Numerical mean value of an object / Numerisch mittlerer Wert eines Objektes / Valeur moyenne d''un objet'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN condition text; + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT _condition_length_max_40 CHECK(char_length(condition)<=40); +COMMENT ON COLUMN qwat_od.sia405cc_cable.condition IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN remark text; + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT _remark_length_max_80 CHECK(char_length(remark)<=80); +COMMENT ON COLUMN qwat_od.sia405cc_cable.remark IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN width smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.width IS 'Width of cable trench / Breite Kabeltrasse / Largeur du tracé du câble'; + +-- Adapted for Delta file +--ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN geometry3d_geometry geometry('COMPOUNDCURVEZ', :SRID); + +-- Construire et exécuter la commande ALTER TABLE avec la valeur SRID récupérée +EXECUTE format('ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN geometry3d_geometry geometry(''COMPOUNDCURVEZ'', %s)', srid_value); + +CREATE INDEX in_qwat_sia405cc_cable_geometry3d_geometry ON qwat_od.sia405cc_cable USING gist (geometry3d_geometry ); +COMMENT ON COLUMN qwat_od.sia405cc_cable.geometry3d_geometry IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN elevation_determination integer ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.elevation_determination IS ''; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN depth smallint ; +COMMENT ON COLUMN qwat_od.sia405cc_cable.depth IS 'Extension 3D, depth (height) of an object [mm]. / Erweiterung 3D Mächtigkeit (Höhe) eines Objektes [mm]. / Extension 3D, épaisseur (hauteur) d''un objet [mm].'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now(); +COMMENT ON COLUMN qwat_od.sia405cc_cable.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN fk_dataowner varchar(16); +COMMENT ON COLUMN qwat_od.sia405cc_cable.fk_dataowner IS 'Foreignkey to Metaattribute dataowner (as an organisation) - this is the person or body who is allowed to delete, change or maintain this object / Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten / Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe'; + ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN fk_provider varchar(16); +COMMENT ON COLUMN qwat_od.sia405cc_cable.fk_provider IS 'Foreignkey to Metaattribute provider (as an organisation) - this is the person or body who delivered the data / Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat / FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données '; +------- +CREATE TRIGGER +update_last_modified_sia405cc_cable +BEFORE UPDATE OR INSERT ON + qwat_od.sia405cc_cable +FOR EACH ROW EXECUTE PROCEDURE + qwat_sys.update_last_modified(); + +------------ Relationships and Value Tables ----------- ; +ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN fk_owner varchar(16); +ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT rel_sia405cc_cable_point_owner FOREIGN KEY (fk_owner) REFERENCES qwat_od.organisation(obj_id) ON UPDATE CASCADE ON DELETE set null DEFERRABLE INITIALLY DEFERRED; +CREATE TABLE qwat_vl.sia405cc_cable_point_kind () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_point_kind ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_point_kind_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9385,9385,'cable_sleeve','Kabelmuffe','manchon_cable', 'manicotto_del_cavo', 'manson_de_cablu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9388,9388,'cable_point','Kabelpunkt','point_de_cable', 'punto_cavo', 'punct_de_cablu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9386,9386,'cable_manhole','Kabelschacht','chambre_cable', '', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9387,9387,'cabine','Kabine','cabine', 'cabina', 'cabina', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9384,9384,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_kind (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9389,9389,'others','weitere','autre', '', '', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT fkey_vl_sia405cc_cable_point_kind FOREIGN KEY (kind) + REFERENCES qwat_vl.sia405cc_cable_point_kind (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_point_horizontal_positioning () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_point_horizontal_positioning ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_point_horizontal_positioning_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_point_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9392,9392,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9390,9390,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9391,9391,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT fkey_vl_sia405cc_cable_point_horizontal_positioning FOREIGN KEY (horizontal_positioning) + REFERENCES qwat_vl.sia405cc_cable_point_horizontal_positioning (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_point_elevation_determination () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_point_elevation_determination ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_point_elevation_determination_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_point_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9394,9394,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9395,9395,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9396,9396,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT fkey_vl_sia405cc_cable_point_elevation_determination FOREIGN KEY (elevation_determination) + REFERENCES qwat_vl.sia405cc_cable_point_elevation_determination (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_point_status () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_point_status ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_point_status_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9397,9397,'inoperative','ausser_Betrieb','hors_service', 'fuori_servizio', 'rrr_ausser_Betrieb', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9398,9398,'inoperative.reserve','ausser_Betrieb.Reserve','hors_service.en_reserve', 'fuori_servizio.riserva', 'rrr_ausser_Betrieb.Reserve', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9399,9399,'operational','in_Betrieb','en_service', 'in_funzione', 'functionala', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9400,9400,'operational.tentative','in_Betrieb.provisorisch','en_service.provisoire', 'in_funzione.provvisorio', 'functionala.provizoriu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9401,9401,'others','weitere','', '', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9402,9402,'other.calculation_alternative','weitere.Berechnungsvariante','autre.variante_de_calcule', 'altro.variante_calcolo', 'alta.varianta_calcul', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9403,9403,'other.planned','weitere.geplant','autre.planifie', 'altro.previsto', 'rrr_weitere.geplant', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_point_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9404,9404,'other.project','weitere.Projekt','autre.projet', 'altro.progetto', 'alta.proiect', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT fkey_vl_sia405cc_cable_point_status FOREIGN KEY (status) + REFERENCES qwat_vl.sia405cc_cable_point_status (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN fk_owner varchar(16); +ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT rel_cable_owner FOREIGN KEY (fk_owner) REFERENCES qwat_od.organisation(obj_id) ON UPDATE CASCADE ON DELETE set null DEFERRABLE INITIALLY DEFERRED; +CREATE TABLE qwat_vl.sia405cc_cable_function () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_function ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_function_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9339,9339,'signal_cable','Signalkabel','cable_de_signal', 'cavo_di_segnale', 'cablu_de_semnal', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9340,9340,'control_cable','Steuerkabel','cable_de_conduite', 'cavo_di_comando', 'cablu_de_control', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9341,9341,'power_cable','Stromkabel','cable_de_courant', 'cavo_di_alimentazione', 'cablu_de_alimentare', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9338,9338,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_function (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9342,9342,'others','weitere','autres', 'zzz_weitere', 'rrr_weitere', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_function FOREIGN KEY (function) + REFERENCES qwat_vl.sia405cc_cable_function (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_cable_type () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_cable_type ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_cable_type_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_cable_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9345,9345,'coaxial','koaxial','coaxial', 'zzz_coassiale', 'rrr_koaxial', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_cable_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9344,9344,'copper','Kupfer','cuivre', 'zzz_rame', 'zzz_Kupfer', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_cable_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9346,9346,'fiber_optic','Lichtwellenleiter','optique', 'zzz_Lichtwellenleiter', 'rrr_Lichtwellenleiter', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_cable_type (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9343,9343,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_cable_type FOREIGN KEY (cable_type) + REFERENCES qwat_vl.sia405cc_cable_cable_type (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_horizontal_positioning () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_horizontal_positioning ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_horizontal_positioning_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9347,9347,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9348,9348,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9349,9349,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_horizontal_positioning FOREIGN KEY (horizontal_positioning) + REFERENCES qwat_vl.sia405cc_cable_horizontal_positioning (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_status () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_status ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_status_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9363,9363,'inoperative','ausser_Betrieb','hors_service', 'fuori_servizio', 'rrr_ausser_Betrieb', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9364,9364,'inoperative.reserve','ausser_Betrieb.Reserve','hors_service.en_reserve', 'fuori_servizio.riserva', 'rrr_ausser_Betrieb.Reserve', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9365,9365,'operational','in_Betrieb','en_service', 'in_funzione', 'functionala', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9366,9366,'operational.tentative','in_Betrieb.provisorisch','en_service.provisoire', 'in_funzione.provvisorio', 'functionala.provizoriu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9367,9367,'others','weitere','autre', '', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9368,9368,'other.calculation_alternative','weitere.Berechnungsvariante','autre.variante_de_calcule', 'altro.variante_calcolo', 'alta.varianta_calcul', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9369,9369,'other.planned','weitere.geplant','autre.planifie', 'altro.previsto', 'rrr_weitere.geplant', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9370,9370,'other.project','weitere.Projekt','autre.projet', 'altro.progetto', 'alta.proiect', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_status FOREIGN KEY (status) + REFERENCES qwat_vl.sia405cc_cable_status (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405cc_cable_elevation_determination () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405cc_cable_elevation_determination ADD CONSTRAINT pkey_qwat_vl_sia405cc_cable_elevation_determination_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405cc_cable_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9359,9359,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9360,9360,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405cc_cable_elevation_determination (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9361,9361,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT fkey_vl_sia405cc_cable_elevation_determination FOREIGN KEY (elevation_determination) + REFERENCES qwat_vl.sia405cc_cable_elevation_determination (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +--------- Relations to class organisation for dataowner and provider (new 3.11.2014); + +ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT rel_od_sia405cc_cable_point_fk_dataowner FOREIGN KEY (fk_dataowner) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT rel_od_sia405cc_cable_point_fk_dataprovider FOREIGN KEY (fk_provider) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT rel_od_sia405cc_cable_fk_dataowner FOREIGN KEY (fk_dataowner) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT rel_od_sia405cc_cable_fk_dataprovider FOREIGN KEY (fk_provider) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; + +------ Indexes on identifiers + + CREATE UNIQUE INDEX in_od_sia405cc_cable_point_name_number ON qwat_od.sia405cc_cable_point USING btree (name_number ASC NULLS LAST, fk_dataowner ASC NULLS LAST); + CREATE UNIQUE INDEX in_od_sia405cc_cable_name_number ON qwat_od.sia405cc_cable USING btree (name_number ASC NULLS LAST, fk_dataowner ASC NULLS LAST); + +--- fk_folder +ALTER TABLE qwat_od.sia405cc_cable ADD COLUMN fk_folder integer ; +ALTER TABLE qwat_od.sia405cc_cable ADD CONSTRAINT sia405cc_cable_fk_folder FOREIGN KEY (fk_folder) REFERENCES qwat_od.folder(id) MATCH FULL; CREATE INDEX fki_sia405cc_cable_fk_folder ON qwat_od.sia405cc_cable(fk_folder); + +ALTER TABLE qwat_od.sia405cc_cable_point ADD COLUMN fk_folder integer ; +ALTER TABLE qwat_od.sia405cc_cable_point ADD CONSTRAINT sia405cc_cable_point_fk_folder FOREIGN KEY (fk_folder) REFERENCES qwat_od.folder(id) MATCH FULL; CREATE INDEX fki_sia405cc_cable_point_fk_folder ON qwat_od.sia405cc_cable_point(fk_folder); + + +END $$; diff --git a/datamodel/update/delta/delta_1.4.2_005_add_protection_tube.sql b/datamodel/update/delta/delta_1.4.2_005_add_protection_tube.sql new file mode 100644 index 00000000..d3c658e2 --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_005_add_protection_tube.sql @@ -0,0 +1,134 @@ +DO $$ +DECLARE + srid_value INTEGER; +BEGIN + -- Récupérer la valeur SRID depuis la table qwat_sys.settings + SELECT value INTO srid_value FROM qwat_sys.settings WHERE name = 'srid'; + + + +------ This file generates the postgres database (Modul schutzrohr (based on SIA405_SCHUTZROHR_3D_2015_LV95 (Version 18.04.2018) in en for QQIS +------ Rename classes for integration in specific TEKSI module based on this convention: https://github.com/orgs/teksi/discussions/100#discussioncomment-9058690 +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 09.12.2024 10:33:37 +------ with 3D coordinates + + +------- +CREATE TABLE qwat_od.sia405pt_protection_tube +( + obj_id varchar(16) NOT NULL, + CONSTRAINT pkey_qwat_od_sia405pt_protection_tube_obj_id PRIMARY KEY (obj_id) +) +WITH ( + OIDS = False +); +CREATE SEQUENCE qwat_od.seq_sia405pt_protection_tube_oid INCREMENT 1 MINVALUE 0 MAXVALUE 999999 START 0; +ALTER TABLE qwat_od.sia405pt_protection_tube ALTER COLUMN obj_id SET DEFAULT qwat_sys.generate_oid('qwat_od','sia405pt_protection_tube'); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.obj_id IS 'INTERLIS STANDARD OID (with Postfix/Präfix), see www.interlis.ch'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN name_number text; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT _name_number_length_max_40 CHECK(char_length(name_number)<=40); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.name_number IS ''; +-- ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN geometry_geometry geometry('COMPOUNDCURVE', :SRID); +-- CREATE INDEX in_qwat_sia405pt_protection_tube_geometry_geometry ON qwat_od.sia405pt_protection_tube USING gist (geometry_geometry ); +-- COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.geometry_geometry IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN material integer ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.material IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN nominal_diameter text; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT _nominal_diameter_length_max_10 CHECK(char_length(nominal_diameter)<=10); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.nominal_diameter IS 'as TEXT, as in some cases double values with slash (eg. 1500/800) / als TEXT, da zum Teil auch Doppelwerte mit Schrägstrich (z.B. 1500/800) / comme TEXTE, parcequ''on a aussi des valeurs doubles (par example 1500/800)'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN outside_diameter smallint ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.outside_diameter IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN lenght smallint ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.lenght IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN installation_year smallint ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.installation_year IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN horizontal_positioning integer ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.horizontal_positioning IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN status integer ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.status IS 'Operating and planning status of the structure / Betriebs- bzw. Planungszustand des Bauwerks / Etat de fonctionnement et de planification de l’ouvrage'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN sur_plus_cover decimal(4,1) ; +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.sur_plus_cover IS 'yyy_mittlerer Wert eines Objektes / mittlerer Wert eines Objektes / xxx_mittlerer Wert eines Objektes'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN condition text; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT _condition_length_max_30 CHECK(char_length(condition)<=30); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.condition IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN remark text; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT _remark_length_max_80 CHECK(char_length(remark)<=80); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.remark IS 'General remarks / Allgemeine Bemerkungen / Remarques générales'; +-- Adapted for Delta file +--ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN geometry3d_geometry geometry('COMPOUNDCURVEZ', :SRID); + +-- Construire et exécuter la commande ALTER TABLE avec la valeur SRID récupérée +EXECUTE format('ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN geometry3d_geometry geometry(''COMPOUNDCURVEZ'', %s)', srid_value); +CREATE INDEX in_qwat_sia405pt_protection_tube_geometry3d_geometry ON qwat_od.sia405pt_protection_tube USING gist (geometry3d_geometry ); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.geometry3d_geometry IS ''; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now(); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_dataowner varchar(16); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.fk_dataowner IS 'Foreignkey to Metaattribute dataowner (as an organisation) - this is the person or body who is allowed to delete, change or maintain this object / Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten / Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe'; + ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_provider varchar(16); +COMMENT ON COLUMN qwat_od.sia405pt_protection_tube.fk_provider IS 'Foreignkey to Metaattribute provider (as an organisation) - this is the person or body who delivered the data / Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat / FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données '; +------- +CREATE TRIGGER +update_last_modified_sia405cc_protection_tube +BEFORE UPDATE OR INSERT ON + qwat_od.sia405pt_protection_tube +FOR EACH ROW EXECUTE PROCEDURE + qwat_sys.update_last_modified(); + +------------ Relationships and Value Tables ----------- ; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_owner varchar(16); +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT rel_sia405pt_protection_tube_owner FOREIGN KEY (fk_owner) REFERENCES qwat_od.organisation(obj_id) ON UPDATE CASCADE ON DELETE set null DEFERRABLE INITIALLY DEFERRED; +CREATE TABLE qwat_vl.sia405pt_protection_tube_material () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405pt_protection_tube_material ADD CONSTRAINT pkey_qwat_vl_sia405pt_protection_tube_material_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9438,9438,'concrete','Beton','beton', 'calcestruzzo', 'beton', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9437,9437,'cast_iron.gray_iron','Guss.Grauguss','fonte.fonte_grise', 'ghisa.ghisa_grigia', 'fonta.fonta_cenusie', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9436,9436,'cast_iron.ductile_cast','Guss.Guss_duktil','fonte.fonte_ductil', 'ghisa.ghisa_duttile', 'fonta.fonta_ductila', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9433,9433,'plastic.polyethylene','Kunststoff.Polyethylen','matiere_synthetique.polyethylene', 'materiale_sintetico.polietilene', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9434,9434,'plastic.PVC','Kunststoff.Polyvinylchlorid','matiere_synthetique.chlorure_de_polyvinyle', 'materiale_sintetico.polivinilcloruro', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9435,9435,'steel','Stahl','acier', 'acciaio', 'otel', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9432,9432,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT fkey_vl_sia405pt_protection_tube_material FOREIGN KEY (material) + REFERENCES qwat_vl.sia405pt_protection_tube_material (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405pt_protection_tube_horizontal_positioning () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405pt_protection_tube_horizontal_positioning ADD CONSTRAINT pkey_qwat_vl_sia405pt_protection_tube_horizontal_positioning_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405pt_protection_tube_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9443,9443,'accurate','genau','precis', 'precisa', 'precisa', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9444,9444,'unknown','unbekannt','inconnue', 'sconosciuto', 'necunoscuta', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_horizontal_positioning (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9445,9445,'inaccurate','ungenau','imprecis', 'impreciso', 'imprecisa', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT fkey_vl_sia405pt_protection_tube_horizontal_positioning FOREIGN KEY (horizontal_positioning) + REFERENCES qwat_vl.sia405pt_protection_tube_horizontal_positioning (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +CREATE TABLE qwat_vl.sia405pt_protection_tube_status () INHERITS (qwat_vl.value_list_base2); +ALTER TABLE qwat_vl.sia405pt_protection_tube_status ADD CONSTRAINT pkey_qwat_vl_sia405pt_protection_tube_status_code PRIMARY KEY (code); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9446,9446,'inoperative','ausser_Betrieb','hors_service', 'fuori_servizio', 'rrr_ausser_Betrieb', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9447,9447,'inoperative.reserve','ausser_Betrieb.Reserve','hors_service.en_reserve', 'fuori_servizio.riserva', 'rrr_ausser_Betrieb.Reserve', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9448,9448,'operational','in_Betrieb','en_service', 'in_funzione', 'functionala', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9449,9449,'operational.tentative','in_Betrieb.provisorisch','en_service.provisoire', 'in_funzione.provvisorio', 'functionala.provizoriu', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9450,9450,'others','weitere','', '', '', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9451,9451,'other.calculation_alternative','weitere.Berechnungsvariante','autre.variante_de_calcule', 'altro.variante_calcolo', 'alta.varianta_calcul', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9452,9452,'other.planned','weitere.geplant','autre.planifie', 'altro.previsto', 'rrr_weitere.geplant', '', '', '', '', '', 'true'); + INSERT INTO qwat_vl.sia405pt_protection_tube_status (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (9453,9453,'other.project','weitere.Projekt','autre.projet', 'altro.progetto', 'alta.proiect', '', '', '', '', '', 'true'); + ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT fkey_vl_sia405pt_protection_tube_status FOREIGN KEY (status) + REFERENCES qwat_vl.sia405pt_protection_tube_status (code) MATCH SIMPLE + ON UPDATE RESTRICT ON DELETE RESTRICT; +--------- Relations to class organisation for dataowner and provider (new 3.11.2014); + +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT rel_od_sia405pt_protection_tube_fk_dataowner FOREIGN KEY (fk_dataowner) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT rel_od_sia405pt_protection_tube_fk_dataprovider FOREIGN KEY (fk_provider) REFERENCES qwat_od.organisation(obj_id) DEFERRABLE INITIALLY DEFERRED; + +--------- Extra Relation to class pipe of tdh +ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_pipe integer; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT rel_od_sia405pt_protection_tube_fk_pipe FOREIGN KEY (fk_pipe) REFERENCES qwat_od.pipe(id) DEFERRABLE INITIALLY DEFERRED; + +------ Indexes on identifiers + + CREATE UNIQUE INDEX in_od_sia405pt_protection_tube_name_number ON qwat_od.sia405pt_protection_tube USING btree (name_number ASC NULLS LAST, fk_dataowner ASC NULLS LAST); + +-- fk_folder_relation +ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN fk_folder integer ; +ALTER TABLE qwat_od.sia405pt_protection_tube ADD CONSTRAINT sia405pt_protection_tube_fk_folder FOREIGN KEY (fk_folder) REFERENCES qwat_od.folder(id) MATCH FULL; CREATE INDEX fki_sia405pt_protection_tube_fk_folder ON qwat_od.sia405pt_protection_tube(fk_folder); + + + +END $$; diff --git a/datamodel/update/delta/delta_1.4.2_006_add_09_qwat_organisation_dictionaries.sql b/datamodel/update/delta/delta_1.4.2_006_add_09_qwat_organisation_dictionaries.sql new file mode 100644 index 00000000..71159673 --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_006_add_09_qwat_organisation_dictionaries.sql @@ -0,0 +1,45 @@ +------ this file generates the qwat is_dictionary (clas organisation Modul dss(2020)) in en on TEKSI +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 22.04.2024 17:55:05 +------ with 3D coordinates + + + + INSERT INTO qwat_sys.dictionary_od_table (id, tablename, name_en, shortcut_en, name_de, shortcut_de, name_fr, shortcut_fr, name_it, shortcut_it, name_ro, shortcut_ro) VALUES (47,'organisation','organisation','OG','Organisation','OG','Organisation','OG','Organizzazione','NULL','organizatia','NULL'); + + + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,2587,'organisation','remark','remark','Bemerkung','REMARQUE','osservazione','observatie','General remarks','Allgemeine Bemerkungen','Remarques générales','Osservazioni generali','Observatii',ARRAY['Werkinformation','GEP_Verband','GEP_Traegerschaft','PAA','SAA']::qwat_od.plantype[],'true','varchar(255)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,3611,'organisation','municipality_number','municipality_number','Gemeindenummer','NO_COMMUNE','numero_comune','numarul_municipalitatii','Official number of municipality of federal office for statistics, mandatory for the municipalities.','Offizielle Gemeinde Nummer gemäss Bundesamt für Statistik, bei Gemeinden zwingend, sonst leer lassen.','Numéro officiel de la commune selon l''Office fédéral de la statistique, obligatoire pour les communes. Sinon, laissez vide.','Numero ufficiale del Comune secondo l''Ufficio federale di statistica, obbligatorio per i comuni, altrimenti lasciare vuoto.','rrr_Offizielle Gemeinde Nummer gemäss Bundesamt für Statistik, bei Gemeinden zwingend, sonst leer lassen.',ARRAY['Werkinformation','GEP_Verband','GEP_Traegerschaft','PAA','SAA']::qwat_od.plantype[],'true','smallint',NULL,'community number',NULL,'Gemeindenummer',NULL,'Numero Commune',NULL,'numero della comunità',NULL,'rrr_Gemeindenummer',1,9999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,5086,'organisation','uid','uid','UID','UID','UID','uid','Reference to the company identification of the Federal Office for Statistics (www.uid.admin.ch), e.g. CHE123456789','Referenz zur Unternehmensidentifikation des Bundesamts fuer Statistik (www.uid.admin.ch), z.B. CHE123456789','Référence pour l’identification des entreprises selon l’Office fédéral de la statistique OFS (www.uid.admin.ch), par exemple: CHE123456789','Riferimento all''identificativo aziendale dell''Ufficio federale di statistica (www.uid.admin.ch), ad es. CHE123456789','Referin?a la identificarea companiei de la Oficiul Federal de Statistica (www.uid.admin.ch), de exemplu CHE123456789.',ARRAY['Werkinformation','GEP_Verband','GEP_Traegerschaft','PAA','SAA']::qwat_od.plantype[],'true','varchar(12)','[UID]','Company Identification of the Federal Office of Statistics [UID]','[UID]','Unternehmensidentifikation des Bundesamts fuer Statistik [UID]','[UID]','identification des entreprises selon l’Office fédéral de la statistique OFS [UID]','[UID]','Identificazione della società dell’Ufficio federale di statistica [UID]','[UID]','rrr_Unternehmensidentifikation des Bundesamts fuer Statistik [UID]',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,5089,'organisation','identifier','identifier','Bezeichnung','DESIGNATION','denominazione','identificator','The designation for municipalities is adopted according to the FSO list; for private individuals according to the UID register, if necessary with the addition of the location of the branch if no separate UID exists for it.','Die Bezeichnung für Gemeinden wird gemäss BFS-Liste übernommen; für Private gemäss UID-Register, allenfalls mit Zusatz des Ortes der Filiale, falls keine separate UID dafür besteht.','La désignation pour les communes est reprise selon la liste de l''OFS ; pour les particuliers, selon le registre UID, éventuellement avec l''ajout du lieu de la filiale s''il n''existe pas d''UID séparé pour celle-ci.','La designazione per i comuni è tratta dall''elenco dell''UST; per i privati dal registro UID, se necessario con l''aggiunta del luogo della filiale se non esiste un UID separato per essa.','Denumirea pentru comune este preluata din lista FSO; pentru persoanele fizice, din registrul UID, daca este necesar, cu adaugarea locului sucursalei, în cazul în care nu exista un UID separat pentru aceasta.',ARRAY['Werkinformation','GEP_Verband','PAA','SAA']::qwat_od.plantype[],'true','varchar(255)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,8520,'organisation','identifier_short','identifier_short','Kurzbezeichnung','DESIGNATION_ABREGEE','designazione_abbreviata','','NULL','Kurzbezeichnung','désignation abrégée','NULL','Denumirea pentru comune este preluata din lista FSO; pentru persoanele fizice, din registrul UID, daca este necesar, cu adaugarea locului sucursalei, în cazul în care nu exista un UID separat pentru aceasta.',ARRAY['Werkinformation','GEP_Verband','GEP_Traegerschaft','PAA','SAA']::qwat_od.plantype[],'true','varchar(12)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,8603,'organisation','organisation_type','organisation_type','Organisationstyp','GENRE_ORGANISATION','tipo_organizzazione','tipul_de_organizatie','Type of organisatoin','Art der Organisation','Genre d''organisation','Genere dell''organizzazione','Tipul de organiza?ie',ARRAY['Werkinformation','GEP_Verband','PAA','SAA']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,9046,'organisation','status','status','Status','ETAT','stato','stare','yyy_Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind','Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind','Statut de l''organisation, pour que les organisations disparues ne soient pas simplement supprimées et qu''il soit possible de contrôler s''il existe encore des relations avec les organisations disparues, par exemple en cas de fusion de communes ou de faillite d''une société','Stato dell''organizzazione, affinché le organizzazioni decadute non debbano essere semplicemente cancellate e sia possibile vedere se esistono ancora relazioni con organizzazioni decadute, ad. es. in caso di aggregazione tra comuni o fallimento di una ditta','rrr_Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind',ARRAY['Werkinformation','GEP_Verband','PAA','SAA']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,9234,'organisation','oid','oid','OID','OID','OID','OID','Stable unique object identification for all objects and classes','Stabile eindeutige Objektidentifikation für alle Objekte und Klassen','Identification d''objet unique stable pour tous les objets et toutes les classes','Identificazione univoca e stabile per tutti gli oggetti e le classi','Identificare unica stabila a obiectelor pentru toate obiectele ?i clasele',ARRAY['Leitungskataster','Werkinformation','GEP_Verband','PAA','SAA']::qwat_od.plantype[],'true','varchar(16)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + + + + + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,999999,'organisation','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,999998,'organisation','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,999997,'organisation','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (47,999996,'organisation','last_modification','last_modification','Letzte_Aenderung','DERNIERE_MODIFICATION','ultima_modifica','rrr_Letze_Aenderung','Last modification: INTERLIS_1_DATE','Letzte Änderung: INTERLIS_1_DATE','Dernière modification: INTERLIS_1_DATE','ultima_modifica: INTERLIS_1_DATE','rrr_Letzte Änderung: INTERLIS_1_DATE',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','TIMESTAMP','','','','','','','','','','',NULL,NULL); + + + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8605,'organisation','organisation_type','canton','canton',NULL,'Kanton',NULL,'canton',NULL,'cantone',NULL,'rrr_Kanton',NULL,'yyy_Teil einer kantonalen Verwaltung (z.B. Amt für Umweltschutz, Amt für Abwasserentsorgung)','Teil einer kantonalen Verwaltung (z.B. Amt für Umweltschutz, Amt für Abwasserentsorgung)','Partie d''une administration cantonale (p. ex. office de l''environnement, OFROU, office de l''évacuation des eaux usées))','Parte di un''amministrazione cantonale (es. Ufficio per la protezione dell''ambiente, Ufficio per lo smaltimento delle acque)','rrr_Teil einer kantonalen Verwaltung (z.B. Amt für Umweltschutz, Amt für Abwasserentsorgung)'); + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8610,'organisation','organisation_type','cooperative','cooperative',NULL,'Genossenschaft_Korporation',NULL,'cooperative',NULL,'cooperativa_corporazione',NULL,'rrr_Genossenschaft_Korporation',NULL,'yyy_Genossenschaft oder Korperation: Körperschaft öffentlichen Rechts. Falls privaten Rechtes dann als Privat abbilden.','Genossenschaft oder Korporation: Körperschaft öffentlichen Rechts. Falls privaten Rechtes dann als Privat abbilden.','Coopérative: entité de droit public. Si elle est de droit privée, elle est attribuée comme privé.','Cooperativa o corporazione: corporazione di diritto pubblico. Se di diritto privato, segnare come privato.','rrr_Genossenschaft oder Korperation: Körperschaft öffentlichen Rechts. Falls privaten Rechtes dann als Privat abbilden.'); + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8715,'organisation','organisation_type','federation','federation',NULL,'Bund',NULL,'federation',NULL,'confederazione',NULL,'rrr_Bund',NULL,'Part of a federal administration (e.g. Federal Office for the Environment, FEDRO, armasuisse)','Teil einer Bundesverwaltung (z.B. Bundesamt für Umwelt, ASTRA, Armasuisse)','Partie d''une administration fédérale (p. ex. Office fédéral de l''environnement, OFROU, armasuisse)','Parte di un''amministrazione federale (ad es. Ufficio federale dell''ambiente, USTRA, armasuisse)','rrr_Teil einer Bundesverwaltung (z.B. Bundesamt für Umwelt, ASTRA, Armasuisse)'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,9319,'organisation','organisation_type','municipal_department','municipal_department',NULL,'Gemeindeabteilung',NULL,'departement_communal',NULL,'dipartimento_comunale',NULL,'departamentul_municipal',NULL,'Part of a municipal administration that assumes a role ((e.g. Geoinformation Stadt Bern) as a responsible_entity, data provider, etc. (but not as data owner / (public) owner).','Teil einer Gemeindeverwaltung, die eine Rolle übernimmt ((z.B. Geoinformation Stadt Bern) als Traegerschaft, Datenlieferant, etc. (aber nicht als Datenherr / (oeffentlicher) Eigentuemer)','Partie d''une administration communale qui assume un rôle (par ex. Geoinformation Stadt Bern) en tant que porteur, fournisseur de données, etc. (mais pas en tant que maître des données / propriétaire (public))','Parte di un''amministrazione comunale che assume un ruolo ((ad esempio Geoinformation Stadt Bern) come sponsor, fornitore di dati, ecc. (ma non come proprietario dei dati / proprietario (pubblico)).','Parte a unei administra?ii municipale care î?i asuma un rol ((de exemplu, Geoinformation Stadt Bern) ca sponsor, furnizor de date etc. (dar nu ca proprietar de date / proprietar (public)).'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8604,'organisation','organisation_type','municipality','municipality',NULL,'Gemeinde',NULL,'commune',NULL,'comune',NULL,'municipiul',NULL,'Municipality according to Federal Statistical Office','Gemeinde gemäss Bundesamt für Statistik','Commune selon l''Office fédéral de la statistique','Comune secondo l''Ufficio federale di statistica','Municipiul conform Oficiului Federal de Statistica'); + + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8606,'organisation','organisation_type','private','private',NULL,'Privat',NULL,'prive',NULL,'privato',NULL,'privata',NULL,'yyy_Privatperson oder Privatorganisation, welche im Rahmen der Entwässerungsplanung auftritt','Privatperson oder Privatorganisation, welche im Rahmen der Entwässerungsplanung auftritt','Personne privée ou organisation privée qui intervient dans le cadre de la planification de l''évacuation des eaux.','Persona od organizzazione privata attiva nella pianificazione dello smaltimento delle acque','rrr_Privatperson oder Privatorganisation, welche im Rahmen der Entwässerungsplanung auftritt'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,8603,8608,'organisation','organisation_type','waste_water_association','waste_water_association',NULL,'Abwasserverband',NULL,'association_epuration_eau',NULL,'consorzio_depurazione',NULL,'rrr_Abwasserverband',NULL,'waste water association','Abwasserverband','Association epuration eau','Consorzio depurazione acque','rrr_Abwasserverband'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,9046,9047,'organisation','status','activ','activ',NULL,'aktiv',NULL,'active',NULL,'attivo',NULL,'rrr_aktiv',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (47,9046,9048,'organisation','status','gone','gone',NULL,'untergegangen',NULL,'disparue',NULL,'decaduta',NULL,'rrr_untergegangen',NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/datamodel/update/delta/delta_1.4.2_007_add_09_qwat_control_cable_dictionaries.sql b/datamodel/update/delta/delta_1.4.2_007_add_09_qwat_control_cable_dictionaries.sql new file mode 100644 index 00000000..04307fc4 --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_007_add_09_qwat_control_cable_dictionaries.sql @@ -0,0 +1,96 @@ +------ this file generates the qwat is_dictionary (Modul fernwirkkabel(based on SIA405_FERNWIRKKABEL_3D_2015_LV95 (Version 18.04.2018)) in en on TEKSI +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 09.12.2024 12:10:03 +------ with 3D coordinates + + INSERT INTO qwat_sys.dictionary_od_table (id, tablename, name_en, shortcut_en, name_de, shortcut_de, name_fr, shortcut_fr, name_it, shortcut_it, name_ro, shortcut_ro) VALUES (8500,'sia405cc_cable','cable','CB','Kabel','','Cable','','Cavo','NULL','Cablu','NULL'); + INSERT INTO qwat_sys.dictionary_od_table (id, tablename, name_en, shortcut_en, name_de, shortcut_de, name_fr, shortcut_fr, name_it, shortcut_it, name_ro, shortcut_ro) VALUES (8501,'sia405cc_cable_point','cable point','CI','Kabelpunkt','','Point cable','','Punto cavo','NULL','Punct de cablu','NULL'); + + + + + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9327,'sia405cc_cable','name_number','name_number','Name_Nummer','Nom_numero','nome_numero','nume_numarul','NULL','z.B. Kabelpunktanfang_Kabelpunkteende','xxx_z.B. Point_cableanfang_Point_cableeende','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9328,'sia405cc_cable','geometry','geometry','Geometrie','Geometrie','geometria','geometria','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','geometry',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9329,'sia405cc_cable','function','function','Funktion','Fonction','zzz_Funktion','zzz_Funktion','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9330,'sia405cc_cable','cable_type','cable_type','Kabelart','Genre','zzz_Kabelart','','Cable type','Kabelart','Genre de cable','zzz_Kabelart','rrr_Kabelart',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9331,'sia405cc_cable','horizontal_positioning','horizontal_positioning','Lagebestimmung','Determination_planimetrique','determinazione_posizione','precizie_pozitie','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9332,'sia405cc_cable','status','status','Status','Etat','stato','stare','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,'extends value range of SIA405 status',NULL,'Erweitert Wertebereich von SIA405 Status',NULL,'extension valeurs SIA405 Etat',NULL,'dilatato codominio SIA405 Stato',NULL,'rrr_Erweitert Wertebereich von SIA405 Status',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9333,'sia405cc_cable','installation_year','installation_year','Einbaujahr','Annee_construction','anno_costruzione','anul_instalarii','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint',NULL,' If unknown set lowest value of value range',NULL,'Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',NULL,'Si inconnu ajouter la plus bas valeur du domaine des valeurs',NULL,'Se sconosciuto, inserire valore minimo dell’intervallo di valori',NULL,'rrr_Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',1800,2100); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9334,'sia405cc_cable','sur_plus_cover','sur_plus_cover','Ueberdeckung','Couverture_ouvrage','zzz_Ueberdeckung','zzz_Ueberdeckung','Numerical mean value of an object','Numerisch mittlerer Wert eines Objektes','Valeur moyenne d''''un objet','Valore medio numerico di un oggetto','Valoarea medie numerica a unui obiect',ARRAY['Werkinformation']::qwat_od.plantype[],'true','decimal(4,1)','[m]','meter [m]','[m]','Meter [m]','[m]','mètre [m]','[m]','metro [m]','[m]','rrr_Meter [m]',0,999.9); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9335,'sia405cc_cable','remark','remark','Bemerkung','Remarque','','','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(80)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9336,'sia405cc_cable','condition','condition','Zustand','Condition','condizione','zzz_Zustand','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9353,'sia405cc_cable','width','width','Breite','Largeur','larghezza','latime','Width of cable trench','Breite Kabeltrasse','Largeur du tracé du câble','zzz_Breite Kabeltrasse','rrr_Breite Kabeltrasse',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]',' millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,4000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9355,'sia405cc_cable','geometry3d','geometry3d','Geometrie3D','Geometrie3D','geometria3d','geometria3D','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','geometry','[HKoord]','points with coordinates in the swiss national grid','[HKoord]','Punkte mit Schweizer Landeskoordinaten [HKoord]','[CoordH]','points avec coordonnées dans le système de coordonnées suisse','[HKoord]','Punti con coordinate nazionali svizzere','[HKoord]','rrr_Punkte mit Schweizer Landeskoordinaten',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9356,'sia405cc_cable','elevation_determination','elevation_determination','Hoehenbestimmung','Determination_altimetrique','determinazione_dell_altezza','determinare_altimetrica','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,9357,'sia405cc_cable','depth','depth','Maechtigkeit','Epaisseur','spessore','adancime','Extension 3D, heigth of of cable trench [mm].','Erweiterung 3D, Mächtigkeit (Höhe) Kabeltrasse [mm].','Extension 3D, épaisseur (largeur) du trace du câble [mm].','zzz_Erweiterung 3D, Mächtigkeit (Höhe) Kabeltrasse [mm].','rrr_Erweiterung 3D, Mächtigkeit (Höhe) Kabeltrasse [mm].',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]','millimetro [mm]','[mm]','rrr_Millimeter [mm]',-99999,99999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,999999,'sia405cc_cable','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,999998,'sia405cc_cable','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,999997,'sia405cc_cable','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8500,999996,'sia405cc_cable','last_modification','last_modification','Letzte_Aenderung','DERNIERE_MODIFICATION','ultima_modifica','rrr_Letze_Aenderung','Last modification: INTERLIS_1_DATE','Letzte Änderung: INTERLIS_1_DATE','Dernière modification: INTERLIS_1_DATE','ultima_modifica: INTERLIS_1_DATE','rrr_Letzte Änderung: INTERLIS_1_DATE',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','TIMESTAMP','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9371,'sia405cc_cable_point','name_number','name_number','Name_Nummer','Nom_numero','nome_numero','nume_numarul','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9372,'sia405cc_cable_point','geometry','geometry','Geometrie','Geometrie','geometria','geometria','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','geometry','[NCoord]','Swiss national grid coordinates','[LKoord]','Schweizer Landeskoordinaten','[CoordNat]','coordonnées dans le système de coordonnées suisse','[CoordNaz]','Coordinate nazionali Svizzera','rrr_[LKoord]','rrr_Schweizer Landeskoordinaten',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9373,'sia405cc_cable_point','kind','kind','Art','Genre','tipo','tip','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9374,'sia405cc_cable_point','horizontal_positioning','horizontal_positioning','Lagebestimmung','Determination_planimetrique','determinazione_posizione','precizie_pozitie','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9375,'sia405cc_cable_point','altitude','altitude','Hoehe','Altitude','livello','altitudine','Altitude of component','Oberkante Bauteil','Bord supérieur de l''élément contructif','Bordo superiore del componente','Marginea superioara a componentei',ARRAY['Werkinformation']::qwat_od.plantype[],'true','decimal(7,3)','[m.a.sl.]','meters above sea level [m.a.sl.]','[M.ü.M.]','Meter über Meer [M.ü.M.]','[m.s.m.]','mètres sur mers [m.s.m.]','[m s.l.m.]','metro sul livello del mare [m s.l.m.]','rrr_[M.ü.M.]','rrr_Meter über Meer [M.ü.M.]',-200,5000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9376,'sia405cc_cable_point','elevation_determination','elevation_determination','Hoehenbestimmung','Determination_altimetrique','determinazione_dell_altezza','determinare_altimetrica','Elevation determination of geometry (3D)','Höhenbestimmung der Geometrie (3D)','Définition de la détermination altimétrique de la Géométrie (3D)','Determinazione dell''altezza della geometria (3D)','Determinarea altimetrica geometriei (3D)',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9377,'sia405cc_cable_point','status','status','Status','Etat','stato','stare','Operating and planning status of the structure','Betriebs- bzw. Planungszustand des Bauwerks','Etat de fonctionnement et de planification de l’ouvrage','Stato di funzionamento e di pianificazione del manufatto.','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,'extends value range of SIA405 status',NULL,'Erweitert Wertebereich von SIA405 Status',NULL,'extension valeurs SIA405 Etat',NULL,'dilatato codominio SIA405 Stato',NULL,'rrr_Erweitert Wertebereich von SIA405 Status',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9378,'sia405cc_cable_point','installation_year','installation_year','Einbaujahr','Annee_construction','anno_costruzione','anul_instalarii','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint',NULL,' If unknown set lowest value of value range',NULL,'Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',NULL,'Si inconnu ajouter la plus bas valeur du domaine des valeurs',NULL,'Se sconosciuto, inserire valore minimo dell’intervallo di valori',NULL,'rrr_Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',1800,2100); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9379,'sia405cc_cable_point','sur_plus_cover','sur_plus_cover','Ueberdeckung','Couverture_ouvrage','zzz_Ueberdeckung','','Numerical mean value of an object','Numerisch mittlerer Wert eines Objektes','Valeur moyenne d''un objet','Valore medio numerico di un oggetto','Valoarea medie numerica a unui obiect',ARRAY['Werkinformation']::qwat_od.plantype[],'true','decimal(4,1)','[m]','meter [m]','[m]','Meter [m]','[m]','mètre [m]','[m]','metro [m]','[m]','rrr_Meter [m]',0,999.9); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9380,'sia405cc_cable_point','condition','condition','Zustand','Condition','condizione','rrr_Zustand','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9381,'sia405cc_cable_point','remark','remark','Bemerkung','Remarque','osservazione','observatie','General remarks','Allgemeine Bemerkungen','Remarques générales','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(80)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9408,'sia405cc_cable_point','dimension1','dimension1','Dimension1','Dimension1','dimensione1','dimensiune1','Larger dimension of an object (e.g. length)','grösseres Mass eines Objektes (z.B. Länge)','plus grande mesure d''un objet (par ex. Longueur, diamètre)','Dimensione maggiore di un oggetto (ad es. lunghezza)','Dimensiunea mai mare a unui obiect (de exemplu, lungimea)',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]',' millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,4000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9409,'sia405cc_cable_point','dimension2','dimension2','Dimension2','Dimension2','dimensione2','dimenisune2','smaller dimension of an object (e.g. width)','kleineres Mass eines Objektes (z.B. Breite)','plus petite msure d''un objet (par ex. Largeur)','dimensione minore di un oggetto (ad es. larghezza)','dimensiunea mai mica a unui obiect (de exemplu, la?imea)',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]',' millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,4000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9410,'sia405cc_cable_point','altitude_lower_edge','altitude_lower_edge','Hoehe_UK','Altitude_BI','zzz_livello_bordo_inferiore','rrr_Hoehe_UK','Altitude lower edge of component','Höhe Unterkante','Bord inférieur de l''élément constructif','Bordo inferiore del componente','Marginea inferioara a componentei',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','decimal(7,3)','[m.a.sl.]','meters above sea level [m.a.sl.]','[M.ü.M.]','Meter über Meer [M.ü.M.]','[m.s.m.]','mètres sur mers [m.s.m.]','[m s.l.m.]','metro sul livello del mare [m s.l.m.]','rrr_[M.ü.M.]','rrr_Meter über Meer [M.ü.M.]',-200,5000); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9411,'sia405cc_cable_point','symbolori','symbolori','SymbolOri','SymboleOri','simboloori','simbolori','Default: 90 degree','Default: 90 Grad','Default: 90 degre','Default: 90 gradi','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','decimal(4,1)','[degrees]','Degree','[Altgrad]','[Altgrad]','[degres]','degrées [degres]','[vecchi gradi]','vecchi gradi','rrr_[Altgrad]','rrr_Altgrad',0,359.9); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9412,'sia405cc_cable_point','depth','depth','Maechtigkeit','Epaisseur','spessore','adancime','Extension3D, Fonction (calculated value) = altitude minus altitude_lower_edge','Erweiterung 3D, Funktion (berechneter Wert) = Hoehe minus Hoehe_UK.','Extension 3D, Fonction (valuer calculée) = Altitude minus Altitude_BI.','zzz_Erweiterung 3D, Funktion (berechneter Wert) = Hoehe minus Hoehe_UK.','rrr_Erweiterung 3D, Funktion (berechneter Wert) = Hoehe minus Hoehe_UK.',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimètre [mm]','[mm]','millimetro [mm]','[mm]','rrr_Millimeter [mm]',-99999,99999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,9472,'sia405cc_cable_point','geometry3d','geometry3d','Geometrie3D','Geometrie3D','geometria3d','geometria3D','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','geometry','[HKoord]','Swiss national grid coordinates','[HKoord]','Schweizer Landeskoordinaten [HKoord]','[CoordH]','coordonnées dans le système de coordonnées suisse','[HKoord]','Coordinate nazionali Svizzera','[HKoord]','rrr_Schweizer Landeskoordinaten [HKoord]',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,999999,'sia405cc_cable_point','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,999998,'sia405cc_cable_point','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,999997,'sia405cc_cable_point','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8501,999996,'sia405cc_cable_point','last_modification','last_modification','Letzte_Aenderung','DERNIERE_MODIFICATION','ultima_modifica','rrr_Letze_Aenderung','Last modification: INTERLIS_1_DATE','Letzte Änderung: INTERLIS_1_DATE','Dernière modification: INTERLIS_1_DATE','ultima_modifica: INTERLIS_1_DATE','rrr_Letzte Änderung: INTERLIS_1_DATE',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','TIMESTAMP','','','','','','','','','','',NULL,NULL); + + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9338,'sia405cc_cable','function','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9339,'sia405cc_cable','function','signal_cable','signal_cable',NULL,'Signalkabel',NULL,'cable_de_signal',NULL,'cavo_di_segnale',NULL,'cablu_de_semnal',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9340,'sia405cc_cable','function','control_cable','control_cable',NULL,'Steuerkabel',NULL,'cable_de_conduite',NULL,'cavo_di_comando',NULL,'cablu_de_control',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9341,'sia405cc_cable','function','power_cable','power_cable',NULL,'Stromkabel',NULL,'cable_de_courant',NULL,'cavo_di_alimentazione',NULL,'cablu_de_alimentare',NULL,'for district heating only','nur bei Fernwärme','uniquement pour le chauffage à distance','zzz_nur bei Fernwärme','zzz_nur bei Fernwärme'); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9329,9342,'sia405cc_cable','function','others','others',NULL,'weitere',NULL,'autres',NULL,'zzz_weitere',NULL,'rrr_weitere',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9330,9343,'sia405cc_cable','cable_type','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9330,9344,'sia405cc_cable','cable_type','copper','copper',NULL,'Kupfer',NULL,'cuivre',NULL,'zzz_rame',NULL,'zzz_Kupfer',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9330,9345,'sia405cc_cable','cable_type','coaxial','coaxial',NULL,'koaxial',NULL,'coaxial',NULL,'zzz_coassiale',NULL,'rrr_koaxial',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9330,9346,'sia405cc_cable','cable_type','fiber_optic','fiber_optic',NULL,'Lichtwellenleiter',NULL,'optique',NULL,'zzz_Lichtwellenleiter',NULL,'rrr_Lichtwellenleiter',NULL,'Fiber optic cable',NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9331,9347,'sia405cc_cable','horizontal_positioning','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9331,9348,'sia405cc_cable','horizontal_positioning','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9331,9349,'sia405cc_cable','horizontal_positioning','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9363,'sia405cc_cable','status','inoperative','inoperative',NULL,'ausser_Betrieb',NULL,'hors_service',NULL,'fuori_servizio',NULL,'rrr_ausser_Betrieb',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9364,'sia405cc_cable','status','inoperative.reserve','inoperative.reserve',NULL,'ausser_Betrieb.Reserve',NULL,'hors_service.en_reserve',NULL,'fuori_servizio.riserva',NULL,'rrr_ausser_Betrieb.Reserve',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9365,'sia405cc_cable','status','operational','operational',NULL,'in_Betrieb',NULL,'en_service',NULL,'in_funzione',NULL,'functionala',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9366,'sia405cc_cable','status','operational.tentative','operational.tentative',NULL,'in_Betrieb.provisorisch',NULL,'en_service.provisoire',NULL,'in_funzione.provvisorio',NULL,'functionala.provizoriu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9367,'sia405cc_cable','status','others','others',NULL,'weitere',NULL,'autre',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9368,'sia405cc_cable','status','other.calculation_alternative','other.calculation_alternative',NULL,'weitere.Berechnungsvariante',NULL,'autre.variante_de_calcule',NULL,'altro.variante_calcolo',NULL,'alta.varianta_calcul',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9369,'sia405cc_cable','status','other.planned','other.planned',NULL,'weitere.geplant',NULL,'autre.planifie',NULL,'altro.previsto',NULL,'rrr_weitere.geplant',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9332,9370,'sia405cc_cable','status','other.project','other.project',NULL,'weitere.Projekt',NULL,'autre.projet',NULL,'altro.progetto',NULL,'alta.proiect',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9356,9359,'sia405cc_cable','elevation_determination','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9356,9360,'sia405cc_cable','elevation_determination','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8500,9356,9361,'sia405cc_cable','elevation_determination','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9384,'sia405cc_cable_point','kind','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9385,'sia405cc_cable_point','kind','cable_sleeve','cable_sleeve',NULL,'Kabelmuffe',NULL,'manchon_cable',NULL,'manicotto_del_cavo',NULL,'manson_de_cablu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9386,'sia405cc_cable_point','kind','cable_manhole','cable_manhole',NULL,'Kabelschacht',NULL,'chambre_cable',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9387,'sia405cc_cable_point','kind','cabine','cabine',NULL,'Kabine',NULL,'cabine',NULL,'cabina',NULL,'cabina',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9388,'sia405cc_cable_point','kind','cable_point','cable_point',NULL,'Kabelpunkt',NULL,'point_de_cable',NULL,'punto_cavo',NULL,'punct_de_cablu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9373,9389,'sia405cc_cable_point','kind','others','others',NULL,'weitere',NULL,'autre',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9374,9390,'sia405cc_cable_point','horizontal_positioning','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9374,9391,'sia405cc_cable_point','horizontal_positioning','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9374,9392,'sia405cc_cable_point','horizontal_positioning','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9376,9394,'sia405cc_cable_point','elevation_determination','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9376,9395,'sia405cc_cable_point','elevation_determination','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9376,9396,'sia405cc_cable_point','elevation_determination','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9397,'sia405cc_cable_point','status','inoperative','inoperative',NULL,'ausser_Betrieb',NULL,'hors_service',NULL,'fuori_servizio',NULL,'rrr_ausser_Betrieb',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9398,'sia405cc_cable_point','status','inoperative.reserve','inoperative.reserve',NULL,'ausser_Betrieb.Reserve',NULL,'hors_service.en_reserve',NULL,'fuori_servizio.riserva',NULL,'rrr_ausser_Betrieb.Reserve',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9399,'sia405cc_cable_point','status','operational','operational',NULL,'in_Betrieb',NULL,'en_service',NULL,'in_funzione',NULL,'functionala',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9400,'sia405cc_cable_point','status','operational.tentative','operational.tentative',NULL,'in_Betrieb.provisorisch',NULL,'en_service.provisoire',NULL,'in_funzione.provvisorio',NULL,'functionala.provizoriu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9401,'sia405cc_cable_point','status','others','others',NULL,'weitere',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9402,'sia405cc_cable_point','status','other.calculation_alternative','other.calculation_alternative',NULL,'weitere.Berechnungsvariante',NULL,'autre.variante_de_calcule',NULL,'altro.variante_calcolo',NULL,'alta.varianta_calcul',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9403,'sia405cc_cable_point','status','other.planned','other.planned',NULL,'weitere.geplant',NULL,'autre.planifie',NULL,'altro.previsto',NULL,'rrr_weitere.geplant',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8501,9377,9404,'sia405cc_cable_point','status','other.project','other.project',NULL,'weitere.Projekt',NULL,'autre.projet',NULL,'altro.progetto',NULL,'alta.proiect',NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/datamodel/update/delta/delta_1.4.2_008_add_09_qwat_protection_tube_dictionaries.sql b/datamodel/update/delta/delta_1.4.2_008_add_09_qwat_protection_tube_dictionaries.sql new file mode 100644 index 00000000..b16a5846 --- /dev/null +++ b/datamodel/update/delta/delta_1.4.2_008_add_09_qwat_protection_tube_dictionaries.sql @@ -0,0 +1,48 @@ +------ this file generates the qwat is_dictionary (Modul schutzrohr(based on SIA405_SCHUTZROHR_3D_2015_LV95 (Version 18.04.2018)) in en on TEKSI +------ For questions etc. please contact Stefan Burckhardt stefan.burckhardt@sjib.ch +------ version 09.12.2024 10:34:09 +------ with 3D coordinates + + INSERT INTO qwat_sys.dictionary_od_table (id, tablename, name_en, shortcut_en, name_de, shortcut_de, name_fr, shortcut_fr, name_it, shortcut_it, name_ro, shortcut_ro) VALUES (8502,'sia405pt_protection_tube','protection tube','PT','Schutzrohr','PT','tube de protection','TP','pozzetto termico','NULL','rrr_Schutzrohr','NULL'); + + + + + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9418,'sia405pt_protection_tube','name_number','name_number','Name_Nummer','Nom_numero','nome_numero','nume_numarul','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(40)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9419,'sia405pt_protection_tube','geometry','geometry','Geometrie','Geometrie','geometria','geometria','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','geometry',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9420,'sia405pt_protection_tube','material','material','Material','Materiau','materiale','material','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9421,'sia405pt_protection_tube','nominal_diameter','nominal_diameter','Nennweite','Largeur_nominale','larghezza_nominale','diametrul_nominal','as TEXT, as in some cases double values with slash (eg. 1500/800)','als TEXT, da zum Teil auch Doppelwerte mit Schrägstrich (z.B. 1500/800)','comme TEXTE, parcequ''on a aussi des valeurs doubles (par example 1500/800)','come TESTO, poiché in alcuni casi i valori sono doppi con la barra (es. 1500/800).','ca TEXT, deoarece în unele cazuri se dubleaza valorile cu o bara oblica (de exemplu, 1500/800)',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(10)',NULL,'as TEXT, because sometimes also double values with slash inbetween eg. 500/800',NULL,'als TEXT, da zum Teil auch Doppelwerte mit Schrägstrich (1500/1000)',NULL,'En tant que TEXT, car peut contenir des valeurs doubles avec barre oblique (1500/1000)',NULL,'come TESTO, poiché in alcuni casi valori doppi con slash (1500/1000)',NULL,'rrr_als TEXT, da zum Teil auch Doppelwerte mit Schrägstrich (1500/1000)',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9422,'sia405pt_protection_tube','outside_diameter','outside_diameter','Aussendurchmesser','Diametre_exterieur','diametro_esterno','diametrul_exterior','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimétre [mm]','[mm]','millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,999999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9423,'sia405pt_protection_tube','lenght','lenght','Laenge','Longeur','lunghezza','lungime','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint','[mm]','millimeter [mm]','[mm]','Millimeter [mm]','[mm]','milimétre [mm]','[mm]','millimetro [mm]','[mm]','rrr_Millimeter [mm]',0,999999); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9424,'sia405pt_protection_tube','installation_year','installation_year','Einbaujahr','Annee_construction','anno_costruzione','anul_instalarii','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','smallint',NULL,' If unknown set lowest value of value range',NULL,'Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',NULL,'Si inconnu ajouter la plus bas valeur du domaine des valeurs',NULL,'Se sconosciuto, inserire valore minimo dell’intervallo di valori',NULL,'rrr_Falls unbekannt, tiefsten Wert des Wertebereichs einsetzen',1800,2100); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9425,'sia405pt_protection_tube','horizontal_positioning','horizontal_positioning','Lagebestimmung','Determination_planimetrique','determinazione_posizione','precizie_pozitie','NULL','NULL','NULL','NULL','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9426,'sia405pt_protection_tube','status','status','Status','Etat','stato','stare','Operating and planning status of the structure','Betriebs- bzw. Planungszustand des Bauwerks','Etat de fonctionnement et de planification de l’ouvrage','Stato di funzionamento e di pianificazione del manufatto.','NULL',ARRAY['Leitungskataster','Werkinformation']::qwat_od.plantype[],'true','integer',NULL,'extends value range of SIA405 status',NULL,'Erweitert Wertebereich von SIA405 Status',NULL,'extension valeurs SIA405 Etat',NULL,'dilatato codominio SIA405 Stato',NULL,'rrr_Erweitert Wertebereich von SIA405 Status',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9427,'sia405pt_protection_tube','sur_plus_cover','sur_plus_cover','Ueberdeckung','Couverture','zzz_Ueberdeckung','','yyy_mittlerer Wert eines Objektes','mittlerer Wert eines Objektes','xxx_mittlerer Wert eines Objektes','zzz_mittlerer Wert eines Objektes','rrr_mittlerer Wert eines Objektes',ARRAY['Werkinformation']::qwat_od.plantype[],'true','decimal(4,1)','[m]','meter [m]','[m]','Meter [m]','[m]','mètre [m]','[m]','metro [m]','[m]','rrr_Meter [m]',0,999.9); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9428,'sia405pt_protection_tube','condition','condition','Zustand','Condition','condizione','rrr_Zustand','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(30)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9429,'sia405pt_protection_tube','remark','remark','Bemerkung','Remarque','osservazione','observatie','General remarks','Allgemeine Bemerkungen','Remarques générales','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','varchar(80)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,9457,'sia405pt_protection_tube','geometry3d','geometry3d','Geometrie3D','Geometrie3D','geometria3d','geometria3D','NULL','NULL','NULL','NULL','NULL',ARRAY['Werkinformation']::qwat_od.plantype[],'true','geometry','[HKoord]','points with coordinates in the swiss national grid','[HKoord]','Punkte mit Schweizer Landeskoordinaten [HKoord]','[CoordH]','points avec coordonnées dans le système de coordonnées suisse','[HKoord]','Punti con coordinate nazionali svizzere','[HKoord]','rrr_Punkte mit Schweizer Landeskoordinaten',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,999999,'sia405pt_protection_tube','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,999998,'sia405pt_protection_tube','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,999997,'sia405pt_protection_tube','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (8502,999996,'sia405pt_protection_tube','last_modification','last_modification','Letzte_Aenderung','DERNIERE_MODIFICATION','ultima_modifica','rrr_Letze_Aenderung','Last modification: INTERLIS_1_DATE','Letzte Änderung: INTERLIS_1_DATE','Dernière modification: INTERLIS_1_DATE','ultima_modifica: INTERLIS_1_DATE','rrr_Letzte Änderung: INTERLIS_1_DATE',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qwat_od.plantype[],'true','TIMESTAMP','','','','','','','','','','',NULL,NULL); + + + + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9432,'sia405pt_protection_tube','material','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9433,'sia405pt_protection_tube','material','plastic.polyethylene','plastic.polyethylene',NULL,'Kunststoff.Polyethylen',NULL,'matiere_synthetique.polyethylene',NULL,'materiale_sintetico.polietilene',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9434,'sia405pt_protection_tube','material','plastic.PVC','plastic.PVC',NULL,'Kunststoff.Polyvinylchlorid',NULL,'matiere_synthetique.chlorure_de_polyvinyle',NULL,'materiale_sintetico.polivinilcloruro',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9435,'sia405pt_protection_tube','material','steel','steel',NULL,'Stahl',NULL,'acier',NULL,'acciaio',NULL,'otel',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9436,'sia405pt_protection_tube','material','cast_iron.ductile_cast','cast_iron.ductile_cast',NULL,'Guss.Guss_duktil',NULL,'fonte.fonte_ductil',NULL,'ghisa.ghisa_duttile',NULL,'fonta.fonta_ductila',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9437,'sia405pt_protection_tube','material','cast_iron.gray_iron','cast_iron.gray_iron',NULL,'Guss.Grauguss',NULL,'fonte.fonte_grise',NULL,'ghisa.ghisa_grigia',NULL,'fonta.fonta_cenusie',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9420,9438,'sia405pt_protection_tube','material','concrete','concrete',NULL,'Beton',NULL,'beton',NULL,'calcestruzzo',NULL,'beton',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9425,9443,'sia405pt_protection_tube','horizontal_positioning','accurate','accurate',NULL,'genau',NULL,'precis',NULL,'precisa',NULL,'precisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9425,9444,'sia405pt_protection_tube','horizontal_positioning','unknown','unknown',NULL,'unbekannt',NULL,'inconnue',NULL,'sconosciuto',NULL,'necunoscuta',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9425,9445,'sia405pt_protection_tube','horizontal_positioning','inaccurate','inaccurate',NULL,'ungenau',NULL,'imprecis',NULL,'impreciso',NULL,'imprecisa',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9446,'sia405pt_protection_tube','status','inoperative','inoperative',NULL,'ausser_Betrieb',NULL,'hors_service',NULL,'fuori_servizio',NULL,'rrr_ausser_Betrieb',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9447,'sia405pt_protection_tube','status','inoperative.reserve','inoperative.reserve',NULL,'ausser_Betrieb.Reserve',NULL,'hors_service.en_reserve',NULL,'fuori_servizio.riserva',NULL,'rrr_ausser_Betrieb.Reserve',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9448,'sia405pt_protection_tube','status','operational','operational',NULL,'in_Betrieb',NULL,'en_service',NULL,'in_funzione',NULL,'functionala',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9449,'sia405pt_protection_tube','status','operational.tentative','operational.tentative',NULL,'in_Betrieb.provisorisch',NULL,'en_service.provisoire',NULL,'in_funzione.provvisorio',NULL,'functionala.provizoriu',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9450,'sia405pt_protection_tube','status','others','others',NULL,'weitere',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9451,'sia405pt_protection_tube','status','other.calculation_alternative','other.calculation_alternative',NULL,'weitere.Berechnungsvariante',NULL,'autre.variante_de_calcule',NULL,'altro.variante_calcolo',NULL,'alta.varianta_calcul',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9452,'sia405pt_protection_tube','status','other.planned','other.planned',NULL,'weitere.geplant',NULL,'autre.planifie',NULL,'altro.previsto',NULL,'rrr_weitere.geplant',NULL,NULL,NULL,NULL,NULL,NULL); + INSERT INTO qwat_sys.dictionary_od_values (class_id, attribute_id, value_id, table_name, field_name, value_name, value_name_en, shortcut_en, value_name_de, shortcut_de, value_name_fr, shortcut_fr, value_name_it, shortcut_it, value_name_ro, shortcut_ro, value_description_en, value_description_de, value_description_fr, value_description_it, value_description_ro) VALUES (8502,9426,9453,'sia405pt_protection_tube','status','other.project','other.project',NULL,'weitere.Projekt',NULL,'autre.projet',NULL,'altro.progetto',NULL,'alta.proiect',NULL,NULL,NULL,NULL,NULL,NULL);