Commit 2ef0d8b9 authored by Rushikesh Padsala's avatar Rushikesh Padsala
Browse files

changed to beta8 classes

parent fa13f958
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --
-- CityGML Energy ADE 3.0 (beta 7) -- CityGML Energy ADE 3.0 (beta 8)
-- --
-- Last update: 2025-10-14 -- Last update: 2025-12-15
-- --
-- This DDL script installs the 3DCityDB schema for the Energy ADE. It must be run -- This DDL script installs the 3DCityDB schema for the Energy ADE. It must be run
-- from within the ADE Manager plugin of the 3DCityDB Importer/Exporter. -- from within the ADE Manager plugin of the 3DCityDB Importer/Exporter.
...@@ -32,343 +32,363 @@ CREATE SEQUENCE ng3_qualified_attribute_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 9 ...@@ -32,343 +32,363 @@ CREATE SEQUENCE ng3_qualified_attribute_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 9
CREATE SEQUENCE ng3_suitability_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 9223372036854775807 START WITH 1 CACHE 1 NO CYCLE OWNED BY NONE; CREATE SEQUENCE ng3_suitability_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 9223372036854775807 START WITH 1 CACHE 1 NO CYCLE OWNED BY NONE;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create tables ************************************** -- *********************************** Create tables and indices **************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_address_to_building_unit -- ng3_cityobject (also for ade feature and feature with lifespan
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_address_to_building_unit ( CREATE TABLE ng3_cityobject (
address_id BIGINT NOT NULL, id BIGINT PRIMARY KEY,
building_unit_id BIGINT NOT NULL, objectclass_id INTEGER,
PRIMARY KEY (address_id, building_unit_id) perm_identifier VARCHAR,
perm_identifier_codespace VARCHAR,
valid_from TIMESTAMP WITH TIME ZONE,
valid_to TIMESTAMP WITH TIME ZONE,
layered_constr_id BIGINT,
lib_layered_constr_id BIGINT,
ref_point geometry(POINTZ)
); );
CREATE INDEX ng3_cto_oc_fkx ON ng3_cityobject USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_cto_lcns_fkx ON ng3_cityobject USING btree (layered_constr_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_cto_lib_lcns_fkx ON ng3_cityobject USING btree (lib_layered_constr_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_cto_ref_point_spx ON ng3_cityobject USING gist (ref_point);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_building - extends building table -- ng3_building - extends building table
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_building ( CREATE TABLE ng3_building (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
type VARCHAR, type VARCHAR,
type_codespace VARCHAR, type_codespace VARCHAR,
is_protected NUMERIC, owner_name VARCHAR,
constr_weight VARCHAR, ownership_type VARCHAR,
constr_weight_codespace VARCHAR, ownership_type_codespace VARCHAR,
attic_thm_status VARCHAR, is_protected NUMERIC,
basement_thm_status VARCHAR constr_weight VARCHAR,
constr_weight_codespace VARCHAR,
attic_thm_status VARCHAR,
basement_thm_status VARCHAR
); );
-- no indices needed for FKs
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_building_partition -- ng3_thematic_surface - extends (building) thematic_surface table
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_building_partition ( CREATE TABLE ng3_thematic_surface (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
objectclass_id INTEGER, is_shared NUMERIC,
-- Thermal Zone attributes total_surf_area NUMERIC,
heat_capacity NUMERIC, total_surf_area_uom VARCHAR,
heat_capacity_uom VARCHAR, opaque_surf_area NUMERIC,
infiltration_rate NUMERIC, opaque_surf_area_uom VARCHAR,
infiltration_rate_uom VARCHAR, open_to_surf_ratio NUMERIC,
is_cooled NUMERIC, open_to_surf_ratio_uom VARCHAR,
is_heated NUMERIC, thickness NUMERIC,
coincides_with_lod2_hull NUMERIC, thickness_uom VARCHAR,
coincides_with_lod3_hull NUMERIC, azimuth NUMERIC,
-- Usage Zone and BuildingUnit attributes azimuth_uom VARCHAR,
type VARCHAR, inclination NUMERIC,
type_codespace VARCHAR, inclination_uom VARCHAR,
-- Usage Zone attributes ground_view_factor NUMERIC,
is_primary NUMERIC, ground_view_factor_uom VARCHAR,
num_of_building_units INTEGER, sky_view_factor NUMERIC,
int_heat_gains NUMERIC, sky_view_factor_uom VARCHAR,
int_heat_gains_uom VARCHAR, heat_capacity NUMERIC,
int_heat_gains_conv NUMERIC, heat_capacity_uom VARCHAR
int_heat_gains_conv_uom VARCHAR,
int_heat_gains_lat NUMERIC,
int_heat_gains_lat_uom VARCHAR,
int_heat_gains_rad NUMERIC,
int_heat_gains_rad_uom VARCHAR,
-- BuildingUnit attributes
num_of_rooms INTEGER,
owner_name VARCHAR,
ownership_type VARCHAR,
ownership_type_codespace VARCHAR,
-- Used to store the FK to the schedule(s)
cooling_schedule_id BIGINT,
heating_schedule_id BIGINT,
ventilation_schedule_id BIGINT,
-- Used to store the association from UsageZone to BuildingUnit
usage_zone_id BIGINT,
-- Used to store the association from ThermalZone to UsageZone
thermal_zone_id BIGINT,
-- Parent id (Building(Part) of a ThermalZone, UsageZone or BuildintUnit
building_id BIGINT,
-- FK to the geometries in the surface_geometry table
lod1_solid_id BIGINT,
lod2_solid_id BIGINT,
lod3_solid_id BIGINT
); );
CREATE INDEX ng3_them_surf_is_shared_idx ON ng3_thematic_surface USING btree (is_shared ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- no indices needed for FKs
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_cityobject - extends cityobject table -- ng3_opening - extends (building) opening table
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_cityobject ( CREATE TABLE ng3_opening (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
layered_construction_id BIGINT, area NUMERIC,
ref_point geometry(POINTZ) area_uom VARCHAR,
azimuth NUMERIC,
azimuth_uom VARCHAR,
inclination NUMERIC,
inclination_uom VARCHAR,
ground_view_factor NUMERIC,
ground_view_factor_uom VARCHAR,
sky_view_factor NUMERIC,
sky_view_factor_uom VARCHAR
); );
-- no indices needed for FKs
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_ctyobj_relation -- ng3_ctyobj_relation
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_ctyobj_relation ( CREATE TABLE ng3_ctyobj_relation (
id BIGINT PRIMARY KEY DEFAULT nextval('ng3_ctyobj_relation_seq'::regclass), id BIGINT PRIMARY KEY DEFAULT nextval('ng3_ctyobj_relation_seq'::regclass),
-- this refers to ng3_cityobject (id), i.e. the source -- FK: this refers to ng3_cityobject (id), i.e. the source
ng3_cityobject_id BIGINT, ng3_cityobject_id BIGINT,
-- this refers to cityobject (id), i.e. the target -- Relation type
cityobject_id BIGINT,
relation_type VARCHAR, relation_type VARCHAR,
relation_type_codespace VARCHAR relation_type_codespace VARCHAR,
--FK: this refers to cityobject (id), i.e. the target
cityobject_id BIGINT
); );
CREATE INDEX ng3_cto_rel_fk1x ON ng3_ctyobj_relation USING btree (ng3_cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_cto_rel_fk2x ON ng3_ctyobj_relation USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_device
-- --------------------------------------------------------------------
CREATE TABLE ng3_device (
id BIGINT PRIMARY KEY,
objectclass_id INTEGER,
-- AbstractDevice attributes (also for LightingDevice, GenericDevice, GenericElectricalDevice)
model VARCHAR,
num_of_devices INTEGER,
year_of_manufacture INTEGER,
installed_power NUMERIC,
installed_power_uom VARCHAR,
nominal_efficiency NUMERIC,
nominal_efficiency_uom VARCHAR,
efficiency_indicator VARCHAR,
heat_diss NUMERIC,
heat_diss_uom VARCHAR,
heat_diss_conv NUMERIC,
heat_diss_conv_uom VARCHAR,
heat_diss_lat NUMERIC,
heat_diss_lat_uom VARCHAR,
heat_diss_rad NUMERIC,
heat_diss_rad_uom VARCHAR,
-- HeatPump attributes
heat_source VARCHAR,
cop_source_temp NUMERIC,
cop_source_temp_uom VARCHAR,
cop_operation_temp NUMERIC,
cop_operation_temp_uom VARCHAR,
-- Boiler attributes
has_condensation NUMERIC,
-- MovableShadingDevice attributes
type VARCHAR,
type_codespace VARCHAR,
installation_side VARCHAR,
max_cover_ratio NUMERIC,
max_cover_ratio_uom VARCHAR,
-- FK to table optical_property
transmittance_id BIGINT,
cityobject_id BIGINT
);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_device_operation -- ng3_optical_property
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_device_operation ( CREATE TABLE ng3_optical_property (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY DEFAULT nextval('ng3_optical_property_seq'::regclass),
type VARCHAR, objectclass_id INTEGER,
type_codespace VARCHAR, fraction NUMERIC,
yearly_global_efficiency NUMERIC, fraction_uom VARCHAR,
surface VARCHAR,
wavelength_range VARCHAR,
-- FK -- FK
schedule_id BIGINT, layered_constr_id BIGINT,
device_id BIGINT material_id BIGINT
); );
CREATE INDEX ng3_optpty_oc_fkx ON ng3_optical_property USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_optpty_lcns_fkx ON ng3_optical_property USING btree (layered_constr_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_optpty_mat_fkx ON ng3_optical_property USING btree (material_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_energy_perf_cert -- ng3_qualified_attribute
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_energy_perf_cert ( CREATE TABLE ng3_qualified_attribute (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY DEFAULT nextval('ng3_qualified_attribute_seq'::regclass),
type VARCHAR, objectclass_id INTEGER,
type_codespace VARCHAR, type VARCHAR,
label VARCHAR, type_codespace VARCHAR,
value NUMERIC, value NUMERIC,
value_uom VARCHAR, value_uom VARCHAR,
issue_date DATE, description VARCHAR,
expiration_date DATE, source VARCHAR,
cert_method VARCHAR,
cert_uri VARCHAR,
-- FK -- FK
building_id BIGINT, space_id BIGINT,
building_partition_id BIGINT building_id BIGINT
); );
CREATE INDEX ng3_qual_attr_oc_fkx ON ng3_qualified_attribute USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_qual_attr_type_idx ON ng3_qualified_attribute USING btree (type ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_qual_attr_bdg_part_fkx ON ng3_qualified_attribute USING btree (space_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_qual_attr_bdg_fkx ON ng3_qualified_attribute USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_layer -- ng3_suitability
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_layer ( CREATE TABLE ng3_suitability (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY DEFAULT nextval('ng3_suitability_seq'::regclass),
thickness NUMERIC, reason VARCHAR,
thickness_uom VARCHAR, reason_codespace VARCHAR,
material_id BIGINT, value NUMERIC,
value_uom VARCHAR,
description VARCHAR,
-- FK -- FK
layered_construction_id BIGINT schedule_id BIGINT,
cityobject_id BIGINT
); );
CREATE INDEX ng3_suit_sched_fkx ON ng3_suitability USING btree (schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_suit_cto_fkx ON ng3_suitability USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
--CREATE INDEX ng3_suit_reas_fkx ON ng3_suitability USING btree (reason ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_layered_construction
-- --------------------------------------------------------------------
CREATE TABLE ng3_layered_construction (
id BIGINT PRIMARY KEY,
objectclass_id INTEGER,
u_value NUMERIC,
u_value_uom VARCHAR,
g_value NUMERIC,
g_value_uom VARCHAR,
glazing_ratio NUMERIC,
glazing_ratio_uom VARCHAR,
library_code VARCHAR,
library_code_codespace VARCHAR,
-- FKs
layered_construction_id BIGINT,
library_id BIGINT
);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_library -- ng3_time_series
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_library ( CREATE TABLE ng3_time_series (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
objectclass_id INTEGER, objectclass_id INTEGER,
type VARCHAR, -- AbstractTimeSeries attributes
type_codespace VARCHAR, acquisition_method VARCHAR,
author VARCHAR, acquisition_method_codespace VARCHAR,
source VARCHAR interpolation_type VARCHAR,
source VARCHAR,
-- Other attributes
period_begin TIMESTAMP WITH TIME ZONE,
period_end TIMESTAMP WITH TIME ZONE,
start_time TIME WITHOUT TIME ZONE,
start_day INTEGER,
start_month INTEGER,
temporal_extent NUMERIC,
temporal_extent_unit VARCHAR,
-- temporal_extent_factor INTEGER,
-- temporal_extent_radix INTEGER,
time_interval NUMERIC,
time_interval_unit VARCHAR,
-- time_interval_factor INTEGER,
-- time_interval_radix INTEGER,
values_list TEXT,
values_list_uom VARCHAR,
uom VARCHAR,
file_uri VARCHAR,
num_of_header_lines INTEGER,
field_separator VARCHAR,
record_separator VARCHAR,
value_column_number INTEGER,
decimal_symbol VARCHAR,
auth_type VARCHAR,
auth_type_codespace VARCHAR,
base_url VARCHAR,
connection_type VARCHAR,
connection_type_codespace VARCHAR,
datastream_id VARCHAR,
link_to_observation VARCHAR,
link_to_sensor_description VARCHAR,
mqtt_server VARCHAR,
mqtt_topic VARCHAR,
observation_id VARCHAR,
observation_property VARCHAR,
sensor_id VARCHAR,
sensor_name VARCHAR
); );
CREATE INDEX ng3_ts_oc_fkx ON ng3_time_series USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_material -- ng3_schedule
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_material ( CREATE TABLE ng3_schedule (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
objectclass_id INTEGER, objectclass_id INTEGER,
-- Abstract library attributes library_code VARCHAR,
library_code VARCHAR,
library_code_codespace VARCHAR, library_code_codespace VARCHAR,
-- SolidMaterial attributes type VARCHAR,
thm_conductivity NUMERIC, type_codespace VARCHAR,
thm_conductivity_uom VARCHAR, start_time TIME WITHOUT TIME ZONE,
spec_heat_capacity NUMERIC, start_day INTEGER,
spec_heat_capacity_uom VARCHAR, start_month INTEGER,
density NUMERIC, start_year INTEGER,
density_uom VARCHAR, time_interval NUMERIC,
permeance NUMERIC, time_interval_unit VARCHAR,
permeance_uom VARCHAR, -- time_interval_factor INTEGER, -- used for temporalExtent
porosity NUMERIC, -- time_interval_radix INTEGER, -- used for temporalExtent
porosity_uom VARCHAR, -- DualValue Schedule
embodied_carbon NUMERIC, idle_value NUMERIC,
embodied_carbon_uom VARCHAR, idle_value_uom VARCHAR,
embodied_energy NUMERIC, usage_value NUMERIC,
embodied_energy_uom VARCHAR, usage_value_uom VARCHAR,
-- Gas attributes start_usage_time TIME WITHOUT TIME ZONE,
is_ventilated NUMERIC, end_usage_time TIME WITHOUT TIME ZONE,
r_value NUMERIC, -- Atomic Schedule
r_value_uom VARCHAR, constant_value NUMERIC,
constant_value_uom VARCHAR,
-- FK -- FK
time_series_id BIGINT,
library_id BIGINT library_id BIGINT
); );
CREATE INDEX ng3_sched_oc_fkx ON ng3_schedule USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sched_ts_fkx ON ng3_schedule USING btree (time_series_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sched_lib_fkx ON ng3_schedule USING btree (library_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_occupants
-- --------------------------------------------------------------------
CREATE TABLE ng3_occupants (
id BIGINT PRIMARY KEY,
type VARCHAR,
type_codespace VARCHAR,
num_of_occupants INTEGER,
heat_diss NUMERIC,
heat_diss_uom VARCHAR,
heat_diss_conv NUMERIC,
heat_diss_conv_uom VARCHAR,
heat_diss_lat NUMERIC,
heat_diss_lat_uom VARCHAR,
heat_diss_rad NUMERIC,
heat_diss_rad_uom VARCHAR,
avg_diet_type VARCHAR,
avg_diet_type_codespace VARCHAR,
avg_income_level VARCHAR,
avg_income_level_codespace VARCHAR,
avg_instr_level VARCHAR,
avg_instr_level_codespace VARCHAR,
-- FK
schedule_id BIGINT,
building_partition_id BIGINT
);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_opening - extends (building) opening table -- ng3_schedule_component
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_opening ( CREATE TABLE ng3_schedule_component (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
area NUMERIC, type VARCHAR,
area_uom VARCHAR, type_codespace VARCHAR,
azimuth NUMERIC, repetitions INTEGER NOT NULL DEFAULT 1,
azimuth_uom VARCHAR, additional_gap NUMERIC,
inclination NUMERIC, additional_gap_unit VARCHAR,
inclination_uom VARCHAR, -- additional_gap_factor INTEGER,
ground_view_factor NUMERIC, -- additional_gap_radix INTEGER,
ground_view_factor_uom VARCHAR, -- FK
sky_view_factor NUMERIC, parent_schedule_id BIGINT,
sky_view_factor_uom VARCHAR schedule_id BIGINT
); );
CREATE INDEX ng3_sched_comp_sched_fk1x ON ng3_schedule_component USING btree (parent_schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sched_comp_sched_fk2x ON ng3_schedule_component USING btree (schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_optical_property -- ng3_device_operation
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_optical_property ( CREATE TABLE ng3_device_operation (
id BIGINT PRIMARY KEY DEFAULT nextval('ng3_optical_property_seq'::regclass), id BIGINT PRIMARY KEY,
objectclass_id INTEGER, type VARCHAR,
fraction NUMERIC, type_codespace VARCHAR,
fraction_uom VARCHAR, yearly_global_efficiency NUMERIC,
surface VARCHAR,
wavelength_range VARCHAR,
-- FK -- FK
layered_construction_id BIGINT schedule_id BIGINT,
device_id BIGINT
); );
CREATE INDEX ng3_dev_opr_sched_fkx ON ng3_device_operation USING btree (schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_dev_opr_dev_fkx ON ng3_device_operation USING btree (device_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_qualified_attribute -- ng3_sensor_data
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_qualified_attribute ( CREATE TABLE ng3_sensor_data (
id BIGINT PRIMARY KEY DEFAULT nextval('ng3_qualified_attribute_seq'::regclass), id BIGINT PRIMARY KEY,
objectclass_id INTEGER, objectclass_id INTEGER,
type VARCHAR, type VARCHAR,
type_codespace VARCHAR, type_codespace VARCHAR,
value NUMERIC, value_type VARCHAR,
value_uom VARCHAR, value_type_codespace VARCHAR,
description VARCHAR, yearly_value NUMERIC,
source VARCHAR, yearly_value_uom VARCHAR,
-- FK -- FK
building_id BIGINT, time_series_id BIGINT,
building_partition_id BIGINT cityobject_id BIGINT,
--
position geometry(POINTZ)
); );
CREATE INDEX ng3_sns_data_oc_fkx ON ng3_sensor_data USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sns_data_ts_fkx ON ng3_sensor_data USING btree (time_series_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sns_data_cto_fkx ON ng3_sensor_data USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_refurbishment_measure -- ng3_layered_construction
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_refurbishment_measure ( CREATE TABLE ng3_layered_construction (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
objectclass_id INTEGER,
type VARCHAR, type VARCHAR,
type_codespace VARCHAR, type_codespace VARCHAR,
start_date DATE, u_value NUMERIC,
end_date DATE, u_value_uom VARCHAR,
library_code VARCHAR, g_value NUMERIC,
library_code_codespace VARCHAR, g_value_uom VARCHAR,
glazing_ratio NUMERIC,
glazing_ratio_uom VARCHAR,
inside_conv_coeff NUMERIC,
inside_conv_coeff_uom VARCHAR,
outside_conv_coeff NUMERIC,
outside_conv_coeff_uom VARCHAR,
-- FKs
layered_constr_id BIGINT,
library_id BIGINT
);
CREATE INDEX ng3_lcns_oc_fkx ON ng3_layered_construction USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_lcns_lcns_fkx ON ng3_layered_construction USING btree (layered_constr_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_lcns_lib_fkx ON ng3_layered_construction USING btree (library_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_utl_ntw_connection
-- --------------------------------------------------------------------
CREATE TABLE ng3_utl_ntw_connection (
id BIGINT PRIMARY KEY,
network_type VARCHAR,
network_type_codespace VARCHAR,
connection_status VARCHAR,
function_in_network VARCHAR,
function_in_network_codespace VARCHAR,
usage_in_network VARCHAR,
usage_in_network_codespace VARCHAR,
network_id VARCHAR,
network_node_id VARCHAR,
-- FK -- FK
building_id BIGINT, cityobject_id BIGINT
building_partition_id BIGINT
); );
CREATE INDEX ng3_utl_ntw_conn_cto_fkx ON ng3_utl_ntw_connection USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_resource -- ng3_resource
...@@ -388,11 +408,12 @@ CREATE TABLE ng3_resource ( ...@@ -388,11 +408,12 @@ CREATE TABLE ng3_resource (
amount_type_codespace VARCHAR, amount_type_codespace VARCHAR,
amount NUMERIC, amount NUMERIC,
amount_uom VARCHAR, amount_uom VARCHAR,
time_series_id BIGINT,
is_amount_normalized NUMERIC, is_amount_normalized NUMERIC,
normalization_param VARCHAR, normalization_param VARCHAR,
normalization_value NUMERIC, normalization_value NUMERIC,
normalization_value_uom VARCHAR, normalization_value_uom VARCHAR,
ref_period VARCHAR,
ref_period_codespace VARCHAR,
co2_equivalent NUMERIC, co2_equivalent NUMERIC,
co2_equivalent_uom VARCHAR, co2_equivalent_uom VARCHAR,
costs_money NUMERIC, costs_money NUMERIC,
...@@ -410,58 +431,63 @@ CREATE TABLE ng3_resource ( ...@@ -410,58 +431,63 @@ CREATE TABLE ng3_resource (
is_dangerous NUMERIC, is_dangerous NUMERIC,
is_recyclable NUMERIC, is_recyclable NUMERIC,
-- FK -- FK
amount_time_series_id BIGINT,
costs_time_series_id BIGINT,
yields_time_series_id BIGINT,
cityobject_id BIGINT cityobject_id BIGINT
); );
CREATE INDEX ng3_res_oc_fkx ON ng3_resource USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_res_ts1_fkx ON ng3_resource USING btree (amount_time_series_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_res_ts2_fkx ON ng3_resource USING btree (costs_time_series_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_res_ts3_fkx ON ng3_resource USING btree (yields_time_series_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_res_cto_fkx ON ng3_resource USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_schedule -- ng3_device
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_schedule ( CREATE TABLE ng3_device (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
objectclass_id INTEGER, objectclass_id INTEGER,
library_code VARCHAR, -- AbstractDevice attributes (also for LightingDevice, GenericDevice, GenericElectricalDevice)
library_code_codespace VARCHAR, model VARCHAR,
type VARCHAR, num_of_devices INTEGER,
type_codespace VARCHAR, year_of_manufacture INTEGER,
start_time TIME WITHOUT TIME ZONE, installed_power NUMERIC,
start_day INTEGER, installed_power_uom VARCHAR,
start_month INTEGER, nominal_efficiency NUMERIC,
start_year INTEGER, nominal_efficiency_uom VARCHAR,
time_interval NUMERIC, efficiency_indicator VARCHAR,
time_interval_unit VARCHAR, heat_diss NUMERIC,
-- time_interval_factor INTEGER, -- used for temporalExtent heat_diss_uom VARCHAR,
-- time_interval_radix INTEGER, -- used for temporalExtent heat_diss_conv NUMERIC,
-- DualValue Schedule heat_diss_conv_uom VARCHAR,
idle_value NUMERIC, heat_diss_lat NUMERIC,
idle_value_uom VARCHAR, heat_diss_lat_uom VARCHAR,
usage_value NUMERIC, heat_diss_rad NUMERIC,
usage_value_uom VARCHAR, heat_diss_rad_uom VARCHAR,
start_usage_time TIME WITHOUT TIME ZONE, -- HeatPump attributes
end_usage_time TIME WITHOUT TIME ZONE, heat_source VARCHAR,
-- Atomic Schedule cop_source_temp NUMERIC,
constant_value NUMERIC, cop_source_temp_uom VARCHAR,
constant_value_uom VARCHAR, cop_operation_temp NUMERIC,
cop_operation_temp_uom VARCHAR,
-- Boiler attributes
has_condensation NUMERIC,
-- MovableShadingDevice attributes
type VARCHAR,
type_codespace VARCHAR,
installation_side VARCHAR,
max_cover_ratio NUMERIC,
max_cover_ratio_uom VARCHAR,
-- FK -- FK
time_series_id BIGINT, transmittance_id BIGINT,
library_id BIGINT cityobject_id BIGINT
); );
CREATE INDEX ng3_dev_oc_fkx ON ng3_device USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_dev_opt_fkx ON ng3_device USING btree (transmittance_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_dev_cto_fkx ON ng3_device USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_schedule_component
-- --------------------------------------------------------------------
CREATE TABLE ng3_schedule_component (
id BIGINT PRIMARY KEY,
type VARCHAR,
type_codespace VARCHAR,
repetitions INTEGER NOT NULL DEFAULT 1,
additional_gap NUMERIC,
additional_gap_unit VARCHAR,
-- additional_gap_factor INTEGER,
-- additional_gap_radix INTEGER,
-- FK
parent_schedule_id BIGINT,
schedule_id BIGINT
);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_solar_collector -- ng3_solar_collector
...@@ -489,6 +515,10 @@ CREATE TABLE ng3_solar_collector ( ...@@ -489,6 +515,10 @@ CREATE TABLE ng3_solar_collector (
lod2_multi_surface_id BIGINT, lod2_multi_surface_id BIGINT,
lod3_multi_surface_id BIGINT lod3_multi_surface_id BIGINT
); );
CREATE INDEX ng3_sol_col_oc_fkx ON ng3_solar_collector USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sol_col_lod2_fkx ON ng3_solar_collector USING btree (lod2_multi_surface_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sol_col_lod3_fkx ON ng3_solar_collector USING btree (lod3_multi_surface_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_storage_device -- ng3_storage_device
...@@ -509,106 +539,183 @@ CREATE TABLE ng3_storage_device ( ...@@ -509,106 +539,183 @@ CREATE TABLE ng3_storage_device (
power_capacity NUMERIC, power_capacity NUMERIC,
power_capacity_uom VARCHAR power_capacity_uom VARCHAR
); );
CREATE INDEX ng3_sto_dev_oc_fkx ON ng3_storage_device USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_suitability -- ng3_library
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_suitability ( CREATE TABLE ng3_library (
id BIGINT PRIMARY KEY DEFAULT nextval('ng3_suitability_seq'::regclass), id BIGINT PRIMARY KEY,
reason VARCHAR, objectclass_id INTEGER,
reason_codespace VARCHAR, type VARCHAR,
value NUMERIC, type_codespace VARCHAR,
value_uom VARCHAR, author VARCHAR,
description VARCHAR, source VARCHAR
schedule_id BIGINT,
-- FK
cityobject_id BIGINT
); );
CREATE INDEX ng3_lib_oc_fkx ON ng3_library USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_them_surf_to_thermal_zone -- ng3_energy_perf_cert
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_them_surf_to_thermal_zone ( CREATE TABLE ng3_energy_perf_cert (
thematic_surface_id BIGINT NOT NULL, id BIGINT PRIMARY KEY,
thermal_zone_id BIGINT NOT NULL, type VARCHAR,
PRIMARY KEY (thematic_surface_id, thermal_zone_id) type_codespace VARCHAR,
label VARCHAR,
value NUMERIC,
value_uom VARCHAR,
cert_method VARCHAR,
-- FK
space_id BIGINT,
building_id BIGINT
); );
CREATE INDEX ng3_epc_bdgsp_fkx ON ng3_energy_perf_cert USING btree (space_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_epc_bdg_fkx ON ng3_energy_perf_cert USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_thematic_surface - extends (building) thematic_surface table -- ng3_refurbishment_measure
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_thematic_surface ( CREATE TABLE ng3_refurbishment_measure (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
total_surf_area NUMERIC, type VARCHAR,
total_surf_area_uom VARCHAR, type_codespace VARCHAR,
opaque_surf_area NUMERIC, status VARCHAR,
opaque_surf_area_uom VARCHAR, status_codespace VARCHAR,
open_to_surf_ratio NUMERIC, start_date DATE,
open_to_surf_ratio_uom VARCHAR, end_date DATE,
thickness NUMERIC, -- FK
thickness_uom VARCHAR, space_id BIGINT,
azimuth NUMERIC, building_id BIGINT
azimuth_uom VARCHAR,
inclination NUMERIC,
inclination_uom VARCHAR,
ground_view_factor NUMERIC,
ground_view_factor_uom VARCHAR,
sky_view_factor NUMERIC,
sky_view_factor_uom VARCHAR,
is_adiabatic NUMERIC,
heat_capacity NUMERIC,
heat_capacity_uom VARCHAR
); );
CREATE INDEX ng3_ref_meas_bdgsp_fkx ON ng3_refurbishment_measure USING btree (space_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_ref_meas_bdg_fkx ON ng3_refurbishment_measure USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_time_series -- ng3_occupants
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_time_series ( CREATE TABLE ng3_occupants (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
objectclass_id INTEGER, type VARCHAR,
-- AbstractTieSeries attributes type_codespace VARCHAR,
acquisition_method VARCHAR, num_of_occupants INTEGER,
acquisition_method_codespace VARCHAR, heat_diss NUMERIC,
interpolation_type VARCHAR, heat_diss_uom VARCHAR,
source VARCHAR, heat_diss_conv NUMERIC,
-- Other attributes heat_diss_conv_uom VARCHAR,
period_begin TIMESTAMP WITH TIME ZONE, heat_diss_lat NUMERIC,
period_end TIMESTAMP WITH TIME ZONE, heat_diss_lat_uom VARCHAR,
start_time TIME WITHOUT TIME ZONE, heat_diss_rad NUMERIC,
start_day INTEGER, heat_diss_rad_uom VARCHAR,
start_month INTEGER, avg_diet_type VARCHAR,
temporal_extent NUMERIC, avg_diet_type_codespace VARCHAR,
temporal_extent_unit VARCHAR, avg_income_level VARCHAR,
-- temporal_extent_factor INTEGER, avg_income_level_codespace VARCHAR,
-- temporal_extent_radix INTEGER, avg_instr_level VARCHAR,
time_interval NUMERIC, avg_instr_level_codespace VARCHAR,
time_interval_unit VARCHAR, -- FK
-- time_interval_factor INTEGER, schedule_id BIGINT,
-- time_interval_radix INTEGER, space_id BIGINT,
values_list TEXT, building_id BIGINT
values_list_uom VARCHAR, );
uom VARCHAR, CREATE INDEX ng3_occ_sched_fkx ON ng3_occupants USING btree (schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
file_uri VARCHAR, CREATE INDEX ng3_occ_spc_fkx ON ng3_occupants USING btree (space_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
num_of_header_lines INTEGER, CREATE INDEX ng3_occ_bdg_fkx ON ng3_occupants USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
field_separator VARCHAR,
record_separator VARCHAR,
value_column_number INTEGER, -- --------------------------------------------------------------------
decimal_symbol VARCHAR, -- ng3_space
auth_type VARCHAR, -- --------------------------------------------------------------------
auth_type_codespace VARCHAR, CREATE TABLE ng3_space (
base_url VARCHAR, id BIGINT PRIMARY KEY,
connection_type VARCHAR, objectclass_id INTEGER,
connection_type_codespace VARCHAR, type VARCHAR,
datastream_id VARCHAR, type_codespace VARCHAR,
link_to_observation VARCHAR, -- Building unit atts
link_to_sensor_description VARCHAR, num_of_rooms INTEGER,
mqtt_server VARCHAR, owner_name VARCHAR,
mqtt_topic VARCHAR, ownership_type VARCHAR,
observation_id VARCHAR, ownership_type_codespace VARCHAR,
observation_property VARCHAR, -- Zone atts
sensor_id VARCHAR, heat_capacity NUMERIC,
sensor_name VARCHAR heat_capacity_uom VARCHAR,
infiltration_rate NUMERIC,
infiltration_rate_uom VARCHAR,
is_cooled NUMERIC,
is_heated NUMERIC,
is_mech_ventilated NUMERIC,
int_heat_gains NUMERIC,
int_heat_gains_uom VARCHAR,
int_heat_gains_conv NUMERIC,
int_heat_gains_conv_uom VARCHAR,
int_heat_gains_lat NUMERIC,
int_heat_gains_lat_uom VARCHAR,
int_heat_gains_rad NUMERIC,
int_heat_gains_rad_uom VARCHAR,
coincides_with_lod2_hull NUMERIC,
coincides_with_lod3_hull NUMERIC,
-- FK
cool_schedule_id BIGINT,
heat_schedule_id BIGINT,
mech_vent_schedule_id BIGINT,
building_unit_id BIGINT,
space_id BIGINT,
building_id BIGINT,
lod1_solid_id BIGINT,
lod2_solid_id BIGINT,
lod3_solid_id BIGINT
);
CREATE INDEX ng3_spc_oc_fkx ON ng3_space USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_sched_fk1x ON ng3_space USING btree (cool_schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_sched_fk2x ON ng3_space USING btree (heat_schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_sched_fk3x ON ng3_space USING btree (mech_vent_schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_zn_fkx ON ng3_space USING btree (space_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_bdgu_fkx ON ng3_space USING btree (building_unit_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_bdg_fkx ON ng3_space USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_solid1_fkx ON ng3_space USING btree (lod1_solid_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_solid2_fkx ON ng3_space USING btree (lod2_solid_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_spc_solid3_fkx ON ng3_space USING btree (lod3_solid_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_address_to_building_unit
-- --------------------------------------------------------------------
CREATE TABLE ng3_address_to_building_unit (
address_id BIGINT NOT NULL,
space_id BIGINT NOT NULL,
PRIMARY KEY (address_id, space_id)
);
CREATE INDEX ng3_addr_to_bdgu_fk1x ON ng3_address_to_building_unit USING btree (address_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_addr_to_bdgu_fk2x ON ng3_address_to_building_unit USING btree (space_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_zone_thematic_surface
-- --------------------------------------------------------------------
CREATE TABLE ng3_zone_thematic_surface (
id BIGINT PRIMARY KEY,
objectclass_id INTEGER,
-- FK
space_id BIGINT
);
CREATE INDEX ng3_zn_them_surf_oc_fkx ON ng3_zone_thematic_surface USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_zn_them_surf_zn_fkx ON ng3_zone_thematic_surface USING btree (space_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_zone_opening
-- --------------------------------------------------------------------
CREATE TABLE ng3_zone_opening (
id BIGINT PRIMARY KEY,
objectclass_id INTEGER,
-- FK
zone_them_surf_id BIGINT
); );
CREATE INDEX ng3_zn_opn_oc_fkx ON ng3_zone_opening USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_zn_opn_zn_surf_fkx ON ng3_zone_opening USING btree (zone_them_surf_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_urban_function_area -- ng3_urban_function_area
...@@ -618,192 +725,134 @@ CREATE TABLE ng3_urban_function_area ( ...@@ -618,192 +725,134 @@ CREATE TABLE ng3_urban_function_area (
type VARCHAR, type VARCHAR,
type_codespace VARCHAR, type_codespace VARCHAR,
code VARCHAR, code VARCHAR,
code_codespace VARCHAR code_codespace VARCHAR,
area NUMERIC,
area_uom VARCHAR
); );
-- no indices needed for FK
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_utl_ntw_connection -- ng3_layer
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_utl_ntw_connection ( CREATE TABLE ng3_layer (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
network_type VARCHAR, thickness NUMERIC,
network_type_codespace VARCHAR, thickness_uom VARCHAR,
connection_status VARCHAR, -- FK
function_in_network VARCHAR, material_id BIGINT,
function_in_network_codespace VARCHAR, layered_constr_id BIGINT
usage_in_network VARCHAR,
usage_in_network_codespace VARCHAR,
network_id VARCHAR,
network_node_id VARCHAR,
-- FK
cityobject_id BIGINT
); );
CREATE INDEX ng3_lyr_mat_fkx ON ng3_layer USING btree (material_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_lyr_lcns_fkx ON ng3_layer USING btree (layered_constr_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_weather_data -- ng3_material
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE TABLE ng3_weather_data ( CREATE TABLE ng3_material (
id BIGINT PRIMARY KEY, id BIGINT PRIMARY KEY,
type VARCHAR, objectclass_id INTEGER,
type VARCHAR,
type_codespace VARCHAR, type_codespace VARCHAR,
value_type VARCHAR, -- SolidMaterial atts
value_type_codespace VARCHAR, is_transparent NUMERIC,
yearly_value NUMERIC, thm_conductivity NUMERIC,
yearly_value_uom VARCHAR, thm_conductivity_uom VARCHAR,
library_code VARCHAR, spec_heat_capacity NUMERIC,
library_code_codespace VARCHAR, spec_heat_capacity_uom VARCHAR,
density NUMERIC,
density_uom VARCHAR,
permeance NUMERIC,
permeance_uom VARCHAR,
porosity NUMERIC,
porosity_uom VARCHAR,
embodied_carbon NUMERIC,
embodied_carbon_uom VARCHAR,
embodied_energy NUMERIC,
embodied_energy_uom VARCHAR,
-- Liquid atts
viscosity NUMERIC,
viscosity_uom VARCHAR,
-- Gas atts
is_ventilated NUMERIC,
r_value NUMERIC,
r_value_uom VARCHAR,
-- FK -- FK
time_series_id BIGINT, library_id BIGINT
cityobject_id BIGINT,
--
position geometry(POINTZ)
); );
CREATE INDEX ng3_mat_oc_fkx ON ng3_material USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_mat_lib_fkx ON ng3_material USING btree (library_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create foreign keys ******************************** -- *********************************** Create Constraints *********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_address_to_building_unit -- ng3_optical_property
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_address_to_building_unit ADD CONSTRAINT ng3_addr_to_bdgu_fk1 FOREIGN KEY (address_id) REFERENCES address (id) ON DELETE CASCADE; ALTER TABLE ng3_optical_property ADD CONSTRAINT ng3_optpty_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_address_to_building_unit ADD CONSTRAINT ng3_addr_to_bdgu_fk2 FOREIGN KEY (building_unit_id) REFERENCES ng3_building_partition (id) ON DELETE CASCADE; ALTER TABLE ng3_optical_property ADD CONSTRAINT ng3_optpty_ng3_lcns_fk FOREIGN KEY (layered_constr_id) REFERENCES ng3_layered_construction (id);
ALTER TABLE ng3_optical_property ADD CONSTRAINT ng3_optpty_ng3_mat_fk FOREIGN KEY (material_id) REFERENCES ng3_material (id);
-- --------------------------------------------------------------------
-- ng3_building
-- --------------------------------------------------------------------
ALTER TABLE ng3_building ADD CONSTRAINT ng3_bdg_fk FOREIGN KEY (id) REFERENCES building (id);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_building_partition -- ng3_qualified_attribute
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_fk FOREIGN KEY (id) REFERENCES cityobject (id); ALTER TABLE ng3_qualified_attribute ADD CONSTRAINT ng3_qatt_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id); ALTER TABLE ng3_qualified_attribute ADD CONSTRAINT ng3_qatt_ng3_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id);
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_lod1_fk FOREIGN KEY (lod1_solid_id) REFERENCES surface_geometry (id); ALTER TABLE ng3_qualified_attribute ADD CONSTRAINT ng3_qatt_ng3_spc_fk FOREIGN KEY (space_id) REFERENCES ng3_space (id);
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_lod2_fk FOREIGN KEY (lod2_solid_id) REFERENCES surface_geometry (id);
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_lod3_fk FOREIGN KEY (lod3_solid_id) REFERENCES surface_geometry (id);
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_uz_fk FOREIGN KEY (usage_zone_id) REFERENCES ng3_building_partition (id) ON DELETE SET NULL;
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_tz_fk FOREIGN KEY (thermal_zone_id) REFERENCES ng3_building_partition (id) ON DELETE SET NULL;
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id);
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_sched_fk1 FOREIGN KEY (cooling_schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_sched_fk2 FOREIGN KEY (heating_schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
ALTER TABLE ng3_building_partition ADD CONSTRAINT ng3_bdgp_sched_fk3 FOREIGN KEY (ventilation_schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
-- --------------------------------------------------------------------
-- ng3_cityobject
-- --------------------------------------------------------------------
ALTER TABLE ng3_cityobject ADD CONSTRAINT ng3_cto_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_cityobject ADD CONSTRAINT ng3_cto_lcns_fk FOREIGN KEY (layered_construction_id) REFERENCES ng3_layered_construction (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_ctyobj_relation -- ng3_suitability
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_ctyobj_relation ADD CONSTRAINT ng3_cto_rel_fk2 FOREIGN KEY (cityobject_id) REFERENCES cityobject (id) ON DELETE SET NULL; ALTER TABLE ng3_suitability ADD CONSTRAINT ng3_suit_ng3_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id);
ALTER TABLE ng3_ctyobj_relation ADD CONSTRAINT ng3_cto_rel_fk1 FOREIGN KEY (ng3_cityobject_id) REFERENCES ng3_cityobject (id); ALTER TABLE ng3_suitability ADD CONSTRAINT ng3_suit_ng3_sched_fk FOREIGN KEY (schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
-- --------------------------------------------------------------------
-- ng3_device
-- --------------------------------------------------------------------
ALTER TABLE ng3_device ADD CONSTRAINT ng3_dev_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_device ADD CONSTRAINT ng3_dev_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_device ADD CONSTRAINT ng3_dev_opt_fk FOREIGN KEY (transmittance_id) REFERENCES ng3_optical_property (id) ON DELETE SET NULL;
ALTER TABLE ng3_device ADD CONSTRAINT ng3_dev_ng3_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_device_operation -- ng3_cityobject
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_device_operation ADD CONSTRAINT ng3_dev_opr_fk FOREIGN KEY (id) REFERENCES cityobject (id); ALTER TABLE ng3_cityobject ADD CONSTRAINT ng3_cto_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_device_operation ADD CONSTRAINT ng3_dev_opr_sched_fk FOREIGN KEY (schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL; ALTER TABLE ng3_cityobject ADD CONSTRAINT ng3_cto_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_device_operation ADD CONSTRAINT ng3_dev_opr_dev_fk FOREIGN KEY (device_id) REFERENCES ng3_device (id) ON DELETE SET NULL; ALTER TABLE ng3_cityobject ADD CONSTRAINT ng3_cto_ng3_lcns_fk FOREIGN KEY (layered_constr_id) REFERENCES ng3_layered_construction (id) ON DELETE SET NULL;
ALTER TABLE ng3_cityobject ADD CONSTRAINT ng3_cto_ng3_llcns_fk FOREIGN KEY (lib_layered_constr_id) REFERENCES ng3_layered_construction (id) ON DELETE SET NULL;
-- --------------------------------------------------------------------
-- ng3_energy_perf_cert
-- --------------------------------------------------------------------
ALTER TABLE ng3_energy_perf_cert ADD CONSTRAINT ng3_epc_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_energy_perf_cert ADD CONSTRAINT ng3_epc_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id) ON DELETE SET NULL;
ALTER TABLE ng3_energy_perf_cert ADD CONSTRAINT ng3_epc_bdg_part_fk FOREIGN KEY (building_partition_id) REFERENCES ng3_building_partition (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_layer -- ng3_ctyobj_relation
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_layer ADD CONSTRAINT ng3_lyr_fk FOREIGN KEY (id) REFERENCES cityobject (id); ALTER TABLE ng3_ctyobj_relation ADD CONSTRAINT ng3_cto_rel_fk2 FOREIGN KEY (ng3_cityobject_id) REFERENCES ng3_cityobject (id);
ALTER TABLE ng3_layer ADD CONSTRAINT ng3_lyr_mat_fk FOREIGN KEY (material_id) REFERENCES ng3_material (id) ON DELETE SET NULL; ALTER TABLE ng3_ctyobj_relation ADD CONSTRAINT ng3_cto_rel_fk1 FOREIGN KEY (cityobject_id) REFERENCES cityobject (id) ON DELETE CASCADE;
ALTER TABLE ng3_layer ADD CONSTRAINT ng3_lyr_lcns_fk FOREIGN KEY (layered_construction_id) REFERENCES ng3_layered_construction (id) ON DELETE SET NULL;
-- --------------------------------------------------------------------
-- ng3_layered_construction
-- --------------------------------------------------------------------
ALTER TABLE ng3_layered_construction ADD CONSTRAINT ng3_lcns_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_layered_construction ADD CONSTRAINT ng3_lcns_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_layered_construction ADD CONSTRAINT ng3_lcns_lcns_fk FOREIGN KEY (layered_construction_id) REFERENCES ng3_layered_construction (id) ON DELETE SET NULL;
ALTER TABLE ng3_layered_construction ADD CONSTRAINT ng3_lcns_lib_fk FOREIGN KEY (library_id) REFERENCES ng3_library (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_library -- ng3_building
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_library ADD CONSTRAINT ng3_lib_fk FOREIGN KEY (id) REFERENCES cityobject (id); ALTER TABLE ng3_building ADD CONSTRAINT ng3_bdg_fk FOREIGN KEY (id) REFERENCES building (id);
ALTER TABLE ng3_library ADD CONSTRAINT ng3_lib_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
-- --------------------------------------------------------------------
-- ng3_material
-- --------------------------------------------------------------------
ALTER TABLE ng3_material ADD CONSTRAINT ng3_mat_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_material ADD CONSTRAINT ng3_mat_lib_fk FOREIGN KEY (library_id) REFERENCES ng3_library (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_occupants -- ng3_thematic_surface
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_occupants ADD CONSTRAINT ng3_occ_fk FOREIGN KEY (id) REFERENCES cityobject (id); ALTER TABLE ng3_thematic_surface ADD CONSTRAINT ng3_them_surf_fk FOREIGN KEY (id) REFERENCES thematic_surface (id);
ALTER TABLE ng3_occupants ADD CONSTRAINT ng3_occ_sched_fk FOREIGN KEY (schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
ALTER TABLE ng3_occupants ADD CONSTRAINT ng3_occ_ng3_bdgp_fk FOREIGN KEY (building_partition_id) REFERENCES ng3_building_partition (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_opening -- ng3_opening
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_opening ADD CONSTRAINT ng3_opn_fk FOREIGN KEY (id) REFERENCES opening (id); ALTER TABLE ng3_opening ADD CONSTRAINT ng3_opn_fk FOREIGN KEY (id) REFERENCES opening (id);
-- --------------------------------------------------------------------
-- ng3_optical_property
-- --------------------------------------------------------------------
ALTER TABLE ng3_optical_property ADD CONSTRAINT ng3_optpty_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_optical_property ADD CONSTRAINT ng3_optpty_lcns_fk FOREIGN KEY (layered_construction_id) REFERENCES ng3_layered_construction (id);
-- --------------------------------------------------------------------
-- ng3_qualified_attribute
-- --------------------------------------------------------------------
ALTER TABLE ng3_qualified_attribute ADD CONSTRAINT ng3_qatt_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_qualified_attribute ADD CONSTRAINT ng3_qatt_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id);
ALTER TABLE ng3_qualified_attribute ADD CONSTRAINT ng3_qatt_bdg_part_fk FOREIGN KEY (building_partition_id) REFERENCES ng3_building_partition (id);
-- --------------------------------------------------------------------
-- ng3_refurbishment_measure
-- --------------------------------------------------------------------
ALTER TABLE ng3_refurbishment_measure ADD CONSTRAINT ng3_refurb_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_refurbishment_measure ADD CONSTRAINT ng3_refurb_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id) ON DELETE SET NULL;
ALTER TABLE ng3_refurbishment_measure ADD CONSTRAINT ng3_refurb_bdg_part_fk FOREIGN KEY (building_partition_id) REFERENCES ng3_building_partition (id) ON DELETE SET NULL;
-- --------------------------------------------------------------------
-- ng3_resource
-- --------------------------------------------------------------------
ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_ts_fk FOREIGN KEY (time_series_id) REFERENCES ng3_time_series (id) ON DELETE SET NULL;
ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_schedule -- ng3_device_operation
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_schedule ADD CONSTRAINT ng3_sched_fk FOREIGN KEY (id) REFERENCES cityobject (id); ALTER TABLE ng3_device_operation ADD CONSTRAINT ng3_dev_opr_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_schedule ADD CONSTRAINT ng3_sched_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id); ALTER TABLE ng3_device_operation ADD CONSTRAINT ng3_dev_opr_ng3_sched_fk FOREIGN KEY (schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
ALTER TABLE ng3_schedule ADD CONSTRAINT ng3_sched_ts_fk FOREIGN KEY (time_series_id) REFERENCES ng3_time_series (id) ON DELETE SET NULL; ALTER TABLE ng3_device_operation ADD CONSTRAINT ng3_dev_opr_ng3_dev_fk FOREIGN KEY (device_id) REFERENCES ng3_device (id) ON DELETE SET NULL;
ALTER TABLE ng3_schedule ADD CONSTRAINT ng3_sched_lib_fk FOREIGN KEY (library_id) REFERENCES ng3_library (id) ON DELETE SET NULL;
-- --------------------------------------------------------------------
-- ng3_schedule_component
-- --------------------------------------------------------------------
ALTER TABLE ng3_schedule_component ADD CONSTRAINT ng3_sched_comp_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_schedule_component ADD CONSTRAINT ng3_sched_comp_sched_fk1 FOREIGN KEY (parent_schedule_id) REFERENCES ng3_schedule (id);
ALTER TABLE ng3_schedule_component ADD CONSTRAINT ng3_sched_comp_sched_fk2 FOREIGN KEY (schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_solar_collector -- ng3_solar_collector
...@@ -819,22 +868,15 @@ ALTER TABLE ng3_solar_collector ADD CONSTRAINT ng3_sol_coll_lod3_fk FOREIGN KEY ...@@ -819,22 +868,15 @@ ALTER TABLE ng3_solar_collector ADD CONSTRAINT ng3_sol_coll_lod3_fk FOREIGN KEY
ALTER TABLE ng3_storage_device ADD CONSTRAINT ng3_sto_dev_fk FOREIGN KEY (id) REFERENCES ng3_device (id); ALTER TABLE ng3_storage_device ADD CONSTRAINT ng3_sto_dev_fk FOREIGN KEY (id) REFERENCES ng3_device (id);
ALTER TABLE ng3_storage_device ADD CONSTRAINT ng3_sto_dev_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id); ALTER TABLE ng3_storage_device ADD CONSTRAINT ng3_sto_dev_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
-- --------------------------------------------------------------------
-- ng3_suitability
-- --------------------------------------------------------------------
ALTER TABLE ng3_suitability ADD CONSTRAINT ng3_suit_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id);
ALTER TABLE ng3_suitability ADD CONSTRAINT ng3_suit_sched_fk FOREIGN KEY (schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_them_surf_to_thermal_zone -- ng3_layered_construction
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
ALTER TABLE ng3_them_surf_to_thermal_zone ADD CONSTRAINT ng3_thm_surf_to_tz_fk2 FOREIGN KEY (thermal_zone_id) REFERENCES ng3_building_partition (id); ALTER TABLE ng3_layered_construction ADD CONSTRAINT ng3_lcns_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_them_surf_to_thermal_zone ADD CONSTRAINT ng3_thm_surf_to_tz_fk1 FOREIGN KEY (thematic_surface_id) REFERENCES thematic_surface (id) ON DELETE CASCADE; ALTER TABLE ng3_layered_construction ADD CONSTRAINT ng3_lcns_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_layered_construction ADD CONSTRAINT ng3_lcns_ng3_lcns_fk FOREIGN KEY (layered_constr_id) REFERENCES ng3_layered_construction (id) ON DELETE SET NULL;
ALTER TABLE ng3_layered_construction ADD CONSTRAINT ng3_lcns_ng3_lib_fk FOREIGN KEY (library_id) REFERENCES ng3_library (id);
-- --------------------------------------------------------------------
-- ng3_thematic_surface
-- --------------------------------------------------------------------
ALTER TABLE ng3_thematic_surface ADD CONSTRAINT ng3_them_surf_fk FOREIGN KEY (id) REFERENCES thematic_surface (id);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_time_series -- ng3_time_series
...@@ -842,207 +884,123 @@ ALTER TABLE ng3_thematic_surface ADD CONSTRAINT ng3_them_surf_fk FOREIGN KEY (id ...@@ -842,207 +884,123 @@ ALTER TABLE ng3_thematic_surface ADD CONSTRAINT ng3_them_surf_fk FOREIGN KEY (id
ALTER TABLE ng3_time_series ADD CONSTRAINT ng3_ts_fk FOREIGN KEY (id) REFERENCES cityobject (id); ALTER TABLE ng3_time_series ADD CONSTRAINT ng3_ts_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_time_series ADD CONSTRAINT ng3_ts_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id); ALTER TABLE ng3_time_series ADD CONSTRAINT ng3_ts_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
-- --------------------------------------------------------------------
-- ng3_urban_function_area
-- --------------------------------------------------------------------
ALTER TABLE ng3_urban_function_area ADD CONSTRAINT ng3_ufa_fk FOREIGN KEY (id) REFERENCES cityobjectgroup (id);
-- --------------------------------------------------------------------
-- ng3_utl_ntw_connection
-- --------------------------------------------------------------------
ALTER TABLE ng3_utl_ntw_connection ADD CONSTRAINT ng3_utl_ntw_con_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_utl_ntw_connection ADD CONSTRAINT ng3_utl_ntw_con_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id) ON DELETE SET NULL;
-- --------------------------------------------------------------------
-- ng3_weather_data
-- --------------------------------------------------------------------
ALTER TABLE ng3_weather_data ADD CONSTRAINT ng3_wth_data_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_weather_data ADD CONSTRAINT ng3_wth_data_ts_fk FOREIGN KEY (time_series_id) REFERENCES ng3_time_series (id) ON DELETE SET NULL;
ALTER TABLE ng3_weather_data ADD CONSTRAINT ng3_wth_data_ng3_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id) ON DELETE SET NULL;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create Indexes *************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_address_to_building_unit -- ng3_schedule
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_address_to_bdgu_fk1x ON ng3_address_to_building_unit USING btree (address_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_schedule ADD CONSTRAINT ng3_sched_fk FOREIGN KEY (id) REFERENCES cityobject (id);
CREATE INDEX ng3_address_to_bdgu_fk2x ON ng3_address_to_building_unit USING btree (building_unit_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_schedule ADD CONSTRAINT ng3_sched_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_schedule ADD CONSTRAINT ng3_sched_ng3_ts_fk FOREIGN KEY (time_series_id) REFERENCES ng3_time_series (id) ON DELETE SET NULL;
ALTER TABLE ng3_schedule ADD CONSTRAINT ng3_sched_ng3_lib_fk FOREIGN KEY (library_id) REFERENCES ng3_library (id);
-- --------------------------------------------------------------------
-- ng3_building
-- --------------------------------------------------------------------
-- no indices needed
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_building_partition -- ng3_schedule_component
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_bdgp_oc_fkx ON ng3_building_partition USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_schedule_component ADD CONSTRAINT ng3_sched_comp_fk FOREIGN KEY (id) REFERENCES cityobject (id);
CREATE INDEX ng3_bdgp_sched_fk1x ON ng3_building_partition USING btree (cooling_schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_schedule_component ADD CONSTRAINT ng3_sched_comp_ng3_sched_fk1 FOREIGN KEY (parent_schedule_id) REFERENCES ng3_schedule (id);
CREATE INDEX ng3_bdgp_sched_fk2x ON ng3_building_partition USING btree (heating_schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_schedule_component ADD CONSTRAINT ng3_sched_comp_ng3_sched_fk2 FOREIGN KEY (schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
CREATE INDEX ng3_bdgp_sched_fk3x ON ng3_building_partition USING btree (ventilation_schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_bdgp_uz_fkx ON ng3_building_partition USING btree (usage_zone_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_bdgp_tz_fkx ON ng3_building_partition USING btree (thermal_zone_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_bdgp_bdg_fkx ON ng3_building_partition USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_bdgp_solid1_fkx ON ng3_building_partition USING btree (lod1_solid_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_bdgp_solid2_fkx ON ng3_building_partition USING btree (lod2_solid_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_bdgp_solid3_fkx ON ng3_building_partition USING btree (lod3_solid_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_cityobject
-- --------------------------------------------------------------------
CREATE INDEX ng3_cto_ref_point_spx ON ng3_cityobject USING gist (ref_point);
CREATE INDEX ng3_cto_lcns_fkx ON ng3_cityobject USING btree (layered_construction_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_ctyobj_relation -- ng3_sensor_data
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_cto_rel_fk1x ON ng3_ctyobj_relation USING btree (ng3_cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_sensor_data ADD CONSTRAINT ng3_sns_data_fk FOREIGN KEY (id) REFERENCES cityobject (id);
CREATE INDEX ng3_cto_rel_fk2x ON ng3_ctyobj_relation USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_sensor_data ADD CONSTRAINT ng3_sns_data_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_sensor_data ADD CONSTRAINT ng3_sns_data_ng3_ts_fk FOREIGN KEY (time_series_id) REFERENCES ng3_time_series (id) ON DELETE SET NULL;
ALTER TABLE ng3_sensor_data ADD CONSTRAINT ng3_sns_data_ng3_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id);
-- --------------------------------------------------------------------
-- ng3_device
-- --------------------------------------------------------------------
CREATE INDEX ng3_dev_oc_fkx ON ng3_device USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_dev_opt_fkx ON ng3_device USING btree (transmittance_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_dev_cto_fkx ON ng3_device USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_device_operation -- ng3_resource
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_dev_opr_sched_fkx ON ng3_device_operation USING btree (schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_fk FOREIGN KEY (id) REFERENCES ng3_cityobject (id);
CREATE INDEX ng3_dev_opr_dev_fkx ON ng3_device_operation USING btree (device_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_ng3_ts_fk1 FOREIGN KEY (amount_time_series_id) REFERENCES ng3_time_series (id) ON DELETE SET NULL;
ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_ng3_ts_fk2 FOREIGN KEY (costs_time_series_id) REFERENCES ng3_time_series (id) ON DELETE SET NULL;
ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_ng3_ts_fk3 FOREIGN KEY (yields_time_series_id) REFERENCES ng3_time_series (id) ON DELETE SET NULL;
ALTER TABLE ng3_resource ADD CONSTRAINT ng3_res_ng3_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id);
-- --------------------------------------------------------------------
-- ng3_energy_perf_cert
-- --------------------------------------------------------------------
CREATE INDEX ng3_epc_bdg_fkx ON ng3_energy_perf_cert USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_epc_bdg_part_fkx ON ng3_energy_perf_cert USING btree (building_partition_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_layer -- ng3_utl_ntw_connection
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_lyr_mat_fkx ON ng3_layer USING btree (material_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_utl_ntw_connection ADD CONSTRAINT ng3_utl_ntw_con_fk FOREIGN KEY (id) REFERENCES ng3_cityobject (id);
CREATE INDEX ng3_lyr_lcns_fkx ON ng3_layer USING btree (layered_construction_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_utl_ntw_connection ADD CONSTRAINT ng3_utl_ntw_con_ng3_cto_fk FOREIGN KEY (cityobject_id) REFERENCES ng3_cityobject (id);
-- --------------------------------------------------------------------
-- ng3_layered_constr
-- --------------------------------------------------------------------
CREATE INDEX ng3_lcns_oc_fkx ON ng3_layered_construction USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_lcns_lcns_fkx ON ng3_layered_construction USING btree (layered_construction_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_lcns_lib_fkx ON ng3_layered_construction USING btree (library_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_library -- ng3_library
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_lib_oc_fkx ON ng3_library USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_library ADD CONSTRAINT ng3_lib_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_library ADD CONSTRAINT ng3_lib_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
-- --------------------------------------------------------------------
-- ng3_material
-- --------------------------------------------------------------------
CREATE INDEX ng3_mat_oc_fkx ON ng3_material USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_mat_lib_fkx ON ng3_material USING btree (library_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_occupants -- ng3_address_to_building_unit
-- --------------------------------------------------------------------
CREATE INDEX ng3_occ_sched_fkx ON ng3_occupants USING btree (schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_occ_ng3_bdgp_fkx ON ng3_occupants USING btree (building_partition_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_opening ALTER TABLE ng3_address_to_building_unit ADD CONSTRAINT ng3_addr_to_bdgu_fk1 FOREIGN KEY (address_id) REFERENCES address (id) ON DELETE CASCADE;
-- -------------------------------------------------------------------- ALTER TABLE ng3_address_to_building_unit ADD CONSTRAINT ng3_addr_to_bdgu_fk2 FOREIGN KEY (space_id) REFERENCES ng3_space (id) ON DELETE CASCADE;
-- no indices needed
-- --------------------------------------------------------------------
-- ng3_optical_property
-- --------------------------------------------------------------------
CREATE INDEX ng3_optpty_oc_fkx ON ng3_optical_property USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_optpty_lcns_fkx ON ng3_optical_property USING btree (layered_construction_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_qualified_attribute -- ng3_urban_function_area
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_qual_attr_oc_fkx ON ng3_qualified_attribute USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_urban_function_area ADD CONSTRAINT ng3_ufa_fk FOREIGN KEY (id) REFERENCES cityobjectgroup (id);
CREATE INDEX ng3_qual_attr_bdg_fkx ON ng3_qualified_attribute USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_qual_attr_bdg_part_fkx ON ng3_qualified_attribute USING btree (building_partition_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_qual_attr_type_idx ON ng3_qualified_attribute USING btree (type ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_refurbishment_measure
-- --------------------------------------------------------------------
CREATE INDEX ng3_ref_meas_bdg_fkx ON ng3_refurbishment_measure USING btree (building_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_ref_meas_bdg_part_fkx ON ng3_refurbishment_measure USING btree (building_partition_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_resource -- ng3_energy_perf_cert
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_res_oc_fkx ON ng3_resource USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_energy_perf_cert ADD CONSTRAINT ng3_epc_fk FOREIGN KEY (id) REFERENCES ng3_cityobject (id);
CREATE INDEX ng3_res_ts_fkx ON ng3_resource USING btree (time_series_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_energy_perf_cert ADD CONSTRAINT ng3_epc_ng3_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id);
CREATE INDEX ng3_res_cto_fkx ON ng3_resource USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_energy_perf_cert ADD CONSTRAINT ng3_epc_ng3_spc_fk FOREIGN KEY (space_id) REFERENCES ng3_space (id);
-- --------------------------------------------------------------------
-- ng3_schedule
-- --------------------------------------------------------------------
CREATE INDEX ng3_sched_oc_fkx ON ng3_schedule USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sched_ts_fkx ON ng3_schedule USING btree (time_series_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sched_lib_fkx ON ng3_schedule USING btree (library_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_schedule_component -- ng3_refurbishment_measure
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_sched_comp_sched_fk1x ON ng3_schedule_component USING btree (parent_schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_refurbishment_measure ADD CONSTRAINT ng3_refurb_fk FOREIGN KEY (id) REFERENCES ng3_cityobject (id);
CREATE INDEX ng3_sched_comp_sched_fk2x ON ng3_schedule_component USING btree (schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_refurbishment_measure ADD CONSTRAINT ng3_refurb_ng3_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id);
ALTER TABLE ng3_refurbishment_measure ADD CONSTRAINT ng3_refurb_ng3_spc_fk FOREIGN KEY (space_id) REFERENCES ng3_space (id);
-- --------------------------------------------------------------------
-- ng3_solar_collector
-- --------------------------------------------------------------------
CREATE INDEX ng3_sol_col_oc_fkx ON ng3_solar_collector USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sol_col_lod2_fkx ON ng3_solar_collector USING btree (lod2_multi_surface_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_sol_col_lod3_fkx ON ng3_solar_collector USING btree (lod2_multi_surface_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_storage_device -- ng3_occupants
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_sto_dev_oc_fkx ON ng3_storage_device USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_occupants ADD CONSTRAINT ng3_occ_fk FOREIGN KEY (id) REFERENCES ng3_cityobject (id);
ALTER TABLE ng3_occupants ADD CONSTRAINT ng3_occ_ng3_sched_fk FOREIGN KEY (schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
ALTER TABLE ng3_occupants ADD CONSTRAINT ng3_occ_ng3_spc_fk FOREIGN KEY (space_id) REFERENCES ng3_space (id);
ALTER TABLE ng3_occupants ADD CONSTRAINT ng3_occ_ng3_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id);
-- --------------------------------------------------------------------
-- ng3_suitability
-- --------------------------------------------------------------------
CREATE INDEX ng3_suit_cto_fkx ON ng3_suitability USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_suit_sched_fkx ON ng3_suitability USING btree (schedule_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
CREATE INDEX ng3_suit_reas_fkx ON ng3_suitability USING btree (reason ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_them_surf_to_thermal_zone -- ng3_space
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_thm_surf_to_tz_fk1x ON ng3_them_surf_to_thermal_zone USING btree (thematic_surface_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_fk FOREIGN KEY (id) REFERENCES cityobject (id);
CREATE INDEX ng3_thm_surf_to_tz_fk2x ON ng3_them_surf_to_thermal_zone USING btree (thermal_zone_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_ng3_bdg_fk FOREIGN KEY (building_id) REFERENCES ng3_building (id);
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_ng3_zn_fk FOREIGN KEY (space_id) REFERENCES ng3_space (id);
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_ng3_bdgu_fk FOREIGN KEY (building_unit_id) REFERENCES ng3_space (id) ON DELETE SET NULL;
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_ng3_sched_fk1 FOREIGN KEY (cool_schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_ng3_sched_fk2 FOREIGN KEY (heat_schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_ng3_sched_fk3 FOREIGN KEY (mech_vent_schedule_id) REFERENCES ng3_schedule (id) ON DELETE SET NULL;
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_lod1_fk FOREIGN KEY (lod1_solid_id) REFERENCES surface_geometry (id);
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_lod2_fk FOREIGN KEY (lod2_solid_id) REFERENCES surface_geometry (id);
ALTER TABLE ng3_space ADD CONSTRAINT ng3_spc_lod3_fk FOREIGN KEY (lod3_solid_id) REFERENCES surface_geometry (id);
-- --------------------------------------------------------------------
-- ng3_thematic_surface
-- --------------------------------------------------------------------
-- no indices needed
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_time_series -- ng3_zone_thematic_surface
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
CREATE INDEX ng3_ts_oc_fkx ON ng3_time_series USING btree (objectclass_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_zone_thematic_surface ADD CONSTRAINT ng3_zn_thm_surf_fk FOREIGN KEY (id) REFERENCES cityobject (id);
ALTER TABLE ng3_zone_thematic_surface ADD CONSTRAINT ng3_zn_thm_surf_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
ALTER TABLE ng3_zone_thematic_surface ADD CONSTRAINT ng3_zn_thm_surf_n3g_zn_fk FOREIGN KEY (space_id) REFERENCES ng3_space (id);
-- --------------------------------------------------------------------
-- ng3_urban_function_area
-- --------------------------------------------------------------------
-- no indices needed
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_utl_ntw_connection -- ng3_zone_opening
-- --------------------------------------------------------------------
CREATE INDEX ng3_utl_ntw_conn_cto_fkx ON ng3_utl_ntw_connection USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- -------------------------------------------------------------------- -- --------------------------------------------------------------------
-- ng3_weather_data ALTER TABLE ng3_zone_opening ADD CONSTRAINT ng3_zn_opn_fk FOREIGN KEY (id) REFERENCES cityobject (id);
-- -------------------------------------------------------------------- ALTER TABLE ng3_zone_opening ADD CONSTRAINT ng3_zn_opn_oc_fk FOREIGN KEY (objectclass_id) REFERENCES objectclass (id);
CREATE INDEX ng3_wht_data_ts_fkx ON ng3_weather_data USING btree (time_series_id ASC NULLS LAST) WITH (FILLFACTOR = 90); ALTER TABLE ng3_zone_opening ADD CONSTRAINT ng3_zn_opn_ng3_zn_thm_surf_fk FOREIGN KEY (zone_them_surf_id) REFERENCES ng3_zone_thematic_surface (id);
CREATE INDEX ng3_wht_data_cto_fkx ON ng3_weather_data USING btree (cityobject_id ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --
-- CityGML Energy ADE 3.0 (beta 7) -- CityGML Energy ADE 3.0 (beta 8)
-- --
-- Last update: 2025-10-14 -- Last update: 2025-12-15
-- --
-- This DDL script uninstalls the 3DCityDB schema for the Energy ADE. It must be run -- This DDL script uninstalls the 3DCityDB schema for the Energy ADE. It must be run
-- from within the ADE Manager plugin of the 3DCityDB Importer/Exporter. -- from within the ADE Manager plugin of the 3DCityDB Importer/Exporter.
...@@ -25,94 +25,94 @@ ...@@ -25,94 +25,94 @@
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop foreign keys ********************************** -- *********************************** Drop foreign keys **********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ALTER TABLE ng3_address_to_building_unit DROP CONSTRAINT ng3_addr_to_bdgu_fk1; --ALTER TABLE ng3_address_to_building_unit DROP CONSTRAINT ng3_addr_to_bdgu_fk1;
ALTER TABLE ng3_address_to_building_unit DROP CONSTRAINT ng3_addr_to_bdgu_fk2; --ALTER TABLE ng3_address_to_building_unit DROP CONSTRAINT ng3_addr_to_bdgu_fk2;
ALTER TABLE ng3_building DROP CONSTRAINT ng3_bdg_fk; --ALTER TABLE ng3_building DROP CONSTRAINT ng3_bdg_fk;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_bdg_fk; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_bdg_fk;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_fk; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_fk;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod1_fk; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod1_fk;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod2_fk; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod2_fk;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod3_fk; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod3_fk;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_oc_fk; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_oc_fk;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk1; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk1;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk2; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk2;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk3; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk3;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_tz_fk; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_tz_fk;
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_uz_fk; --ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_uz_fk;
ALTER TABLE ng3_cityobject DROP CONSTRAINT ng3_cto_fk; --ALTER TABLE ng3_cityobject DROP CONSTRAINT ng3_cto_fk;
ALTER TABLE ng3_cityobject DROP CONSTRAINT ng3_cto_lcns_fk; --ALTER TABLE ng3_cityobject DROP CONSTRAINT ng3_cto_lcns_fk;
ALTER TABLE ng3_ctyobj_relation DROP CONSTRAINT ng3_cto_rel_fk1; --ALTER TABLE ng3_ctyobj_relation DROP CONSTRAINT ng3_cto_rel_fk1;
ALTER TABLE ng3_ctyobj_relation DROP CONSTRAINT ng3_cto_rel_fk2; --ALTER TABLE ng3_ctyobj_relation DROP CONSTRAINT ng3_cto_rel_fk2;
ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_fk; --ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_fk;
ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_ng3_cto_fk; --ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_ng3_cto_fk;
ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_oc_fk; --ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_oc_fk;
ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_opt_fk; --ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_opt_fk;
ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_fk; --ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_fk;
ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_dev_fk; --ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_dev_fk;
ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_sched_fk; --ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_sched_fk;
ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_fk; --ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_fk;
ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_bdg_fk; --ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_bdg_fk;
ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_bdg_part_fk; --ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_bdg_part_fk;
ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_fk; --ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_fk;
ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_lcns_fk; --ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_lcns_fk;
ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_mat_fk; --ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_mat_fk;
ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_fk; --ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_fk;
ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_lcns_fk; --ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_lcns_fk;
ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_oc_fk; --ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_oc_fk;
ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_lib_fk; --ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_lib_fk;
ALTER TABLE ng3_library DROP CONSTRAINT ng3_lib_fk; --ALTER TABLE ng3_library DROP CONSTRAINT ng3_lib_fk;
ALTER TABLE ng3_library DROP CONSTRAINT ng3_lib_oc_fk; --ALTER TABLE ng3_library DROP CONSTRAINT ng3_lib_oc_fk;
ALTER TABLE ng3_material DROP CONSTRAINT ng3_mat_fk; --ALTER TABLE ng3_material DROP CONSTRAINT ng3_mat_fk;
ALTER TABLE ng3_material DROP CONSTRAINT ng3_mat_lib_fk; --ALTER TABLE ng3_material DROP CONSTRAINT ng3_mat_lib_fk;
ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_fk; --ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_fk;
ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_ng3_bdgp_fk; --ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_ng3_bdgp_fk;
ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_sched_fk; --ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_sched_fk;
ALTER TABLE ng3_opening DROP CONSTRAINT ng3_opn_fk; --ALTER TABLE ng3_opening DROP CONSTRAINT ng3_opn_fk;
ALTER TABLE ng3_optical_property DROP CONSTRAINT ng3_optpty_lcns_fk; --ALTER TABLE ng3_optical_property DROP CONSTRAINT ng3_optpty_lcns_fk;
ALTER TABLE ng3_optical_property DROP CONSTRAINT ng3_optpty_oc_fk; --ALTER TABLE ng3_optical_property DROP CONSTRAINT ng3_optpty_oc_fk;
ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_oc_fk; --ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_oc_fk;
ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_bdg_fk; --ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_bdg_fk;
ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_bdg_part_fk; --ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_bdg_part_fk;
ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_fk; --ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_fk;
ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_bdg_fk; --ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_bdg_fk;
ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_bdg_part_fk; --ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_bdg_part_fk;
ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_fk; --ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_fk;
ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_oc_fk; --ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_oc_fk;
ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_ts_fk; --ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_ts_fk;
ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_cto_fk; --ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_cto_fk;
ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_fk; --ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_fk;
ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_oc_fk; --ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_oc_fk;
ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_ts_fk; --ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_ts_fk;
ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_lib_fk; --ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_lib_fk;
ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_fk; --ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_fk;
ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_sched_fk1; --ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_sched_fk1;
ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_sched_fk2; --ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_sched_fk2;
ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_fk; --ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_fk;
ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_oc_fk; --ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_oc_fk;
ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_lod2_fk; --ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_lod2_fk;
ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_lod3_fk; --ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_lod3_fk;
ALTER TABLE ng3_storage_device DROP CONSTRAINT ng3_sto_dev_fk; --ALTER TABLE ng3_storage_device DROP CONSTRAINT ng3_sto_dev_fk;
ALTER TABLE ng3_storage_device DROP CONSTRAINT ng3_sto_dev_oc_fk; --ALTER TABLE ng3_storage_device DROP CONSTRAINT ng3_sto_dev_oc_fk;
ALTER TABLE ng3_suitability DROP CONSTRAINT ng3_suit_cto_fk; --ALTER TABLE ng3_suitability DROP CONSTRAINT ng3_suit_cto_fk;
ALTER TABLE ng3_suitability DROP CONSTRAINT ng3_suit_sched_fk; --ALTER TABLE ng3_suitability DROP CONSTRAINT ng3_suit_sched_fk;
ALTER TABLE ng3_them_surf_to_thermal_zone DROP CONSTRAINT ng3_thm_surf_to_tz_fk1; --ALTER TABLE ng3_them_surf_to_thermal_zone DROP CONSTRAINT ng3_thm_surf_to_tz_fk1;
ALTER TABLE ng3_them_surf_to_thermal_zone DROP CONSTRAINT ng3_thm_surf_to_tz_fk2; --ALTER TABLE ng3_them_surf_to_thermal_zone DROP CONSTRAINT ng3_thm_surf_to_tz_fk2;
ALTER TABLE ng3_thematic_surface DROP CONSTRAINT ng3_them_surf_fk; --ALTER TABLE ng3_thematic_surface DROP CONSTRAINT ng3_them_surf_fk;
ALTER TABLE ng3_time_series DROP CONSTRAINT ng3_ts_fk; --ALTER TABLE ng3_time_series DROP CONSTRAINT ng3_ts_fk;
ALTER TABLE ng3_time_series DROP CONSTRAINT ng3_ts_oc_fk; --ALTER TABLE ng3_time_series DROP CONSTRAINT ng3_ts_oc_fk;
ALTER TABLE ng3_urban_function_area DROP CONSTRAINT ng3_ufa_fk; --ALTER TABLE ng3_urban_function_area DROP CONSTRAINT ng3_ufa_fk;
ALTER TABLE ng3_utl_ntw_connection DROP CONSTRAINT ng3_utl_ntw_con_cto_fk; --ALTER TABLE ng3_utl_ntw_connection DROP CONSTRAINT ng3_utl_ntw_con_cto_fk;
ALTER TABLE ng3_utl_ntw_connection DROP CONSTRAINT ng3_utl_ntw_con_fk; --ALTER TABLE ng3_utl_ntw_connection DROP CONSTRAINT ng3_utl_ntw_con_fk;
ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_fk; --ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_fk;
ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_ng3_cto_fk; --ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_ng3_cto_fk;
ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_ts_fk; --ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_ts_fk;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop tables *************************************** -- *********************************** Drop tables ***************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DROP TABLE ng3_address_to_building_unit CASCADE; DROP TABLE ng3_address_to_building_unit CASCADE;
DROP TABLE ng3_building CASCADE; DROP TABLE ng3_building CASCADE;
DROP TABLE ng3_building_partition CASCADE; DROP TABLE ng3_space CASCADE;
DROP TABLE ng3_cityobject CASCADE; DROP TABLE ng3_cityobject CASCADE;
DROP TABLE ng3_ctyobj_relation CASCADE; DROP TABLE ng3_ctyobj_relation CASCADE;
DROP TABLE ng3_device CASCADE; DROP TABLE ng3_device CASCADE;
...@@ -133,13 +133,13 @@ DROP TABLE ng3_schedule_component CASCADE; ...@@ -133,13 +133,13 @@ DROP TABLE ng3_schedule_component CASCADE;
DROP TABLE ng3_solar_collector CASCADE; DROP TABLE ng3_solar_collector CASCADE;
DROP TABLE ng3_storage_device CASCADE; DROP TABLE ng3_storage_device CASCADE;
DROP TABLE ng3_suitability CASCADE; DROP TABLE ng3_suitability CASCADE;
DROP TABLE ng3_them_surf_to_thermal_zone CASCADE;
DROP TABLE ng3_thematic_surface CASCADE; DROP TABLE ng3_thematic_surface CASCADE;
DROP TABLE ng3_time_series CASCADE; DROP TABLE ng3_time_series CASCADE;
DROP TABLE ng3_urban_function_area CASCADE; DROP TABLE ng3_urban_function_area CASCADE;
DROP TABLE ng3_utl_ntw_connection CASCADE; DROP TABLE ng3_utl_ntw_connection CASCADE;
DROP TABLE ng3_weather_data CASCADE; DROP TABLE ng3_sensor_data CASCADE;
DROP TABLE ng3_zone_opening CASCADE;
DROP TABLE ng3_zone_thematic_surface CASCADE;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop Sequences ************************************* -- *********************************** Drop Sequences *************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
**************************************************************************************** ****************************************************************************************
**************************************************************************************** ****************************************************************************************
CityGML Energy ADE 3.0 (beta 7) CityGML Energy ADE 3.0 (beta 8)
Last update: 2025-10-14 Last update: 2025-12-15
This schema mapping file was first automatically generated using the ADE Manager This schema mapping file was first automatically generated using the ADE Manager
of the 3DCityDB Importer/Exporter and successively manually edited and restructured. of the 3DCityDB Importer/Exporter and successively manually edited and restructured.
...@@ -27,7 +27,7 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -27,7 +27,7 @@ https://3d.bk.tudelft.nl/gagugiaro/
<schemaMapping xmlns="http://www.3dcitydb.org/database/schema/1.0"> <schemaMapping xmlns="http://www.3dcitydb.org/database/schema/1.0">
<metadata> <metadata>
<name>Energy ADE</name> <name>Energy ADE</name>
<version>3.0 beta 7 (2025-10-14)</version> <version>3.0 beta 8 (2025-12-15)</version>
<description>Database schema for the 3DCityDB 4.x</description> <description>Database schema for the 3DCityDB 4.x</description>
<dbPrefix>ng3</dbPrefix> <dbPrefix>ng3</dbPrefix>
</metadata> </metadata>
...@@ -37,44 +37,56 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -37,44 +37,56 @@ https://3d.bk.tudelft.nl/gagugiaro/
</schema> </schema>
</applicationSchemas> </applicationSchemas>
<!-- Mapping of the complex types --> <!-- Mapping of complex types -->
<complexTypes> <complexTypes>
<!-- Abstract Optical Property --> <!-- Abstract Optical Property -->
<complexType abstract="true" id="ng3_AbstractOpticalProperty_Type" table="ng3_optical_property" objectClassId="11001" path="AbstractOpticalProperty" schema="ng3"> <complexType abstract="true" id="ng3_AbstractOpticalProperty_Type" table="ng3_optical_property" objectClassId="11001" path="AbstractOpticalProperty" schema="ng3">
<complexAttribute minOccurs="1" maxOccurs="1" path="fraction" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="fraction" schema="ng3">
<attribute column="fraction" type="double" path="." schema="ng3"/> <attribute column="fraction" type="double" path="." schema="ng3"/>
<attribute column="fraction_uom" type="string" path="@uom" schema="gml"/> <attribute column="fraction_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
</complexType> </complexType>
<!-- Absorptance-->
<complexType id="ng3_AbsorptanceType" table="ng3_optical_property" objectClassId="11002" path="Emissivity" schema="ng3">
<extension base="ng3_AbstractOpticalProperty_Type"/>
<attribute minOccurs="1" maxOccurs="1" column="wavelength_range" type="string" path="wavelengthRange" schema="ng3"/>
</complexType>
<!-- Emissivity--> <!-- Emissivity-->
<complexType id="ng3_EmissivityType" table="ng3_optical_property" objectClassId="11002" path="Emissivity" schema="ng3"> <complexType id="ng3_EmissivityType" table="ng3_optical_property" objectClassId="11003" path="Emissivity" schema="ng3">
<extension base="ng3_AbstractOpticalProperty_Type"/> <extension base="ng3_AbstractOpticalProperty_Type"/>
<attribute minOccurs="1" maxOccurs="1" column="surface" type="string" path="surface" schema="ng3"/> <attribute minOccurs="1" maxOccurs="1" column="surface" type="string" path="surface" schema="ng3"/>
</complexType> </complexType>
<!-- Reflectance --> <!-- Reflectance -->
<complexType id="ng3_ReflectanceType" table="ng3_optical_property" objectClassId="11003" path="Reflectance" schema="ng3"> <complexType id="ng3_ReflectanceType" table="ng3_optical_property" objectClassId="11004" path="Reflectance" schema="ng3">
<extension base="ng3_AbstractOpticalProperty_Type"/> <extension base="ng3_AbstractOpticalProperty_Type"/>
<attribute minOccurs="1" maxOccurs="1" column="surface" type="string" path="surface" schema="ng3"/> <attribute minOccurs="1" maxOccurs="1" column="surface" type="string" path="surface" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="wavelength_range" type="string" path="wavelengthRange" schema="ng3"/> <attribute minOccurs="1" maxOccurs="1" column="wavelength_range" type="string" path="wavelengthRange" schema="ng3"/>
</complexType> </complexType>
<!-- Transmittance --> <!-- Transmittance -->
<complexType id="ng3_TransmittanceType" table="ng3_optical_property" objectClassId="11004" path="Transmittance" schema="ng3"> <complexType id="ng3_TransmittanceType" table="ng3_optical_property" objectClassId="11005" path="Transmittance" schema="ng3">
<extension base="ng3_AbstractOpticalProperty_Type"/> <extension base="ng3_AbstractOpticalProperty_Type"/>
<attribute minOccurs="1" maxOccurs="1" column="wavelength_range" type="string" path="wavelengthRange" schema="ng3"/> <attribute minOccurs="1" maxOccurs="1" column="wavelength_range" type="string" path="wavelengthRange" schema="ng3"/>
</complexType> </complexType>
<!-- Abstract Qualified Attribute (height, area, volume) --> <!-- Abstract Qualified Attribute (height, area, volume) -->
<complexType abstract="true" id="ng3_AbstractQualifiedAttributeType" table="ng3_qualified_attribute" objectClassId="11005" path="AbstractQualifiedAttribute" schema="ng3"> <complexType abstract="true" id="ng3_AbstractQualifiedAttributeType" table="ng3_qualified_attribute" objectClassId="11011" path="AbstractQualifiedAttribute" schema="ng3">
<attribute maxOccurs="1" column="description" type="string" path="description" schema="ng3"/> <attribute maxOccurs="1" column="description" type="string" path="description" schema="ng3"/>
<attribute maxOccurs="1" column="source" type="string" path="description" schema="ng3"/> <attribute maxOccurs="1" column="source" type="string" path="description" schema="ng3"/>
</complexType> </complexType>
<!-- Qualified Area --> <!-- Qualified Area -->
<complexType id="ng3_QualifiedAreaType" table="ng3_qualified_attribute" objectClassId="11006" path="QualifiedArea" schema="ng3"> <complexType id="ng3_QualifiedAreaType" table="ng3_qualified_attribute" objectClassId="11012" path="QualifiedArea" schema="ng3">
<extension base="ng3_AbstractQualifiedAttributeType"/> <extension base="ng3_AbstractQualifiedAttributeType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
...@@ -86,8 +98,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -86,8 +98,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</complexType> </complexType>
<!-- Qualified Height --> <!-- Qualified Height -->
<complexType id="ng3_QualifiedHeightType" table="ng3_qualified_attribute" objectClassId="11007" path="QualifiedHeight" schema="ng3"> <complexType id="ng3_QualifiedHeightType" table="ng3_qualified_attribute" objectClassId="11013" path="QualifiedHeight" schema="ng3">
<extension base="ng3_AbstractQualifiedAttributeType"/> <extension base="ng3_AbstractQualifiedAttributeType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
...@@ -99,8 +112,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -99,8 +112,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</complexType> </complexType>
<!-- Qualified Volume --> <!-- Qualified Volume -->
<complexType id="ng3_QualifiedVolumeType" table="ng3_qualified_attribute" objectClassId="11008" path="QualifiedVolume" schema="ng3"> <complexType id="ng3_QualifiedVolumeType" table="ng3_qualified_attribute" objectClassId="11014" path="QualifiedVolume" schema="ng3">
<extension base="ng3_AbstractQualifiedAttributeType"/> <extension base="ng3_AbstractQualifiedAttributeType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
...@@ -112,8 +126,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -112,8 +126,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</complexType> </complexType>
<!-- CityObjectRelation --> <!-- CityObjectRelation -->
<complexType id="ng3_CityObjectRelationType" table="ng3_ctyobj_relation" objectClassId="11009" path="CityObjectRelation" schema="ng3"> <complexType id="ng3_CityObjectRelationType" table="ng3_ctyobj_relation" objectClassId="11020" path="CityObjectRelation" schema="ng3">
<complexAttribute minOccurs="1" maxOccurs="1" path="relationType" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="relationType" schema="ng3">
<attribute column="relation_type" type="string" path="." schema="ng3"/> <attribute column="relation_type" type="string" path="." schema="ng3"/>
<attribute column="relation_type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="relation_type_codespace" type="string" path="@codespace" schema="gml"/>
...@@ -125,8 +140,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -125,8 +140,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</featureProperty> </featureProperty>
</complexType> </complexType>
<!-- Suitability --> <!-- Suitability -->
<complexType id="ng3_SuitabilityType" table="ng3_suitability" objectClassId="11010" path="Suitability" schema="ng3"> <complexType id="ng3_SuitabilityType" table="ng3_suitability" objectClassId="11030" path="Suitability" schema="ng3">
<complexAttribute minOccurs="1" maxOccurs="1" path="reason" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="reason" schema="ng3">
<attribute column="reason_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="reason_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="reason" type="string" path="." schema="ng3"/> <attribute column="reason" type="string" path="." schema="ng3"/>
...@@ -143,14 +159,41 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -143,14 +159,41 @@ https://3d.bk.tudelft.nl/gagugiaro/
</featureProperty> </featureProperty>
</complexType> </complexType>
<!-- Atomic Schedule Value (union) -->
<complexType id="ng3_AtomicScheduleValueType" table="ng3_schedule" objectClassId="11040" path="AtomicScheduleValue" schema="ng3">
<complexAttribute minOccurs="1" maxOccurs="1" path="constantValue" schema="ng3">
<attribute column="constant_value" type="double" path="." schema="ng3"/>
<attribute column="constant_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<featureProperty target="ng3_AbstractTimeSeriesType" minOccurs="1" maxOccurs="1" path="timeDependentValues" schema="ng3" relationType="composition">
<join table="ng3_time_series" fromColumn="time_series_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</complexType>
</complexTypes> </complexTypes>
<!-- Features and new CityObjects --> <!-- Features and new CityObjects -->
<featureTypes> <featureTypes>
<!-- ***************************** -->
<!-- Core Module: Feature -->
<!-- ***************************** -->
<!-- Abstract ADE Feature -->
<featureType abstract="true" id="ng3_AbstractADEFeatureType" table="cityobject" objectClassId="11051" path="AbstractADEFeature" schema="ng3">
<extension base="AbstractCityObjectType"/>
<attribute column="creationdate" type="timestamp" maxOccurs="1" path="creationDate" schema="ng3"/>
<attribute column="terminationdate" type="timestamp" maxOccurs="1" path="terminationDate" schema="ng3"/>
<complexAttribute type="ExternalReferenceType" path="externalReference" schema="ng3"/>
</featureType>
<!-- Abstract Time Series --> <!-- Abstract Time Series -->
<featureType abstract="true" id="ng3_AbstractTimeSeriesType" table="ng3_time_series" objectClassId="11020" path="AbstractTimeSeries" schema="ng3"> <featureType abstract="true" id="ng3_AbstractTimeSeriesType" table="ng3_time_series" objectClassId="11052" path="AbstractTimeSeries" schema="ng3">
<extension base="AbstractFeatureType"> <extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
<complexAttribute maxOccurs="1" path="acquisitionMethod" schema="ng3"> <complexAttribute maxOccurs="1" path="acquisitionMethod" schema="ng3">
...@@ -161,8 +204,262 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -161,8 +204,262 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute maxOccurs="1" column="source" type="string" path="source" schema="ng3"/> <attribute maxOccurs="1" column="source" type="string" path="source" schema="ng3"/>
</featureType> </featureType>
<!-- Abstract Schedule -->
<featureType abstract="true" id="ng3_AbstractScheduleType" table="ng3_schedule" objectClassId="11053" path="AbstractSchedule" schema="ng3">
<extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="start_time" type="timestamp" path="startTime" schema="ng3"/>
<attribute maxOccurs="1" column="start_day" type="integer" path="startDay" schema="ng3"/>
<attribute maxOccurs="1" column="start_month" type="integer" path="startMonth" schema="ng3"/>
<attribute maxOccurs="1" column="start_year" type="integer" path="startYear" schema="ng3"/>
<complexAttribute maxOccurs="1" path="temporalExtent" schema="ng3">
<attribute column="time_interval" type="double" path="." schema="ng3"/>
<attribute column="time_interval_unit" type="string" path="@unit" schema="gml"/>
<!-- <attribute column="time_interval_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="time_interval_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
</featureType>
<!-- Sensor Data -->
<featureType id="ng3_SensorDataType" table="ng3_sensor_data" objectClassId="11054" path="SensorData" schema="ng3">
<extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="valueType" schema="ng3">
<attribute column="value_type" type="string" path="." schema="ng3"/>
<attribute column="value_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="yearlyValue" schema="ng3">
<attribute column="yearly_value" type="double" path="." schema="ng3"/>
<attribute column="yearly_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<featureProperty maxOccurs="1" target="ng3_AbstractTimeSeriesType" path="timeDependentValues" schema="ng3" relationType="composition">
<join table="ng3_time_series" fromColumn="time_series_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
<geometryProperty maxOccurs="1" inlineColumn="position" type="Point" path="position" schema="ng3"/>
</featureType>
<!-- Device Operation -->
<featureType id="ng3_DeviceOperationType" table="ng3_device_operation" objectClassId="11055" path="DeviceOperation" schema="ng3">
<extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="yearly_global_efficiency" type="double" path="yearlyGlobalEfficiency" schema="ng3"/>
<featureProperty maxOccurs="1" target="ng3_AbstractScheduleType" path="schedule" schema="ng3" relationType="aggregation">
<join table="ng3_schedule" fromColumn="schedule_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- Abstract Layered Construction -->
<featureType abstract="true" id="ng3_AbstractLayeredConstructionType" table="ng3_layered_construction" objectClassId="11056" path="AbstractLayeredConstruction" schema="ng3">
<extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
</featureType>
<!-- Abstract Feature With Life Span -->
<featureType abstract="true" id="ng3_AbstractFeatureWithLifeSpanType" table="ng3_cityobject" objectClassId="11061" path="AbstractFeatureWithLifeSpan" schema="ng3">
<extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute maxOccurs="1" path="permanentIdentifier" schema="ng3">
<attribute column="perm_identifier" type="string" path="." schema="ng3"/>
<attribute column="perm_identifier_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute column="valid_from" type="timestamp" maxOccurs="1" path="validFrom" schema="ng3"/>
<attribute column="valid_to" type="timestamp" maxOccurs="1" path="validTo" schema="ng3"/>
</featureType>
<!-- Utility Network Connection -->
<featureType id="ng3_UtilityNetworkConnectionType" table="ng3_utl_ntw_connection" objectClassId="11062" path="UtilityNetworkConnection" schema="ng3">
<extension base="ng3_AbstractFeatureWithLifeSpanType">
<join table="ng3_cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="networkType" schema="ng3">
<attribute column="network_type" type="string" path="." schema="ng3"/>
<attribute column="network_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute minOccurs="1" maxOccurs="1" column="connection_status" type="string" path="connectionStatus" schema="ng3"/>
<complexAttribute maxOccurs="1" path="functionInNetwork" schema="ng3">
<attribute column="function_in_network" type="string" path="." schema="ng3"/>
<attribute column="function_in_network_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="usageInNetwork" schema="ng3">
<attribute column="usage_in_network" type="string" path="." schema="ng3"/>
<attribute column="usage_in_network_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="network_id" type="string" path="networkID" schema="ng3"/>
<attribute maxOccurs="1" column="network_node_id" type="string" path="networkNodeID" schema="ng3"/>
</featureType>
<!-- Abstract Resource -->
<featureType abstract="true" id="ng3_AbstractResourceType" table="ng3_resource" objectClassId="11063" path="AbstractResource" schema="ng3">
<extension base="ng3_AbstractFeatureWithLifeSpanType">
<join table="ng3_cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<attribute minOccurs="1" maxOccurs="1" column="status" type="string" path="status" schema="ng3"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="operationType" schema="ng3">
<attribute column="operation_type" type="string" path="." schema="ng3"/>
<attribute column="operation_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="amountType" schema="ng3">
<attribute column="amount_type" type="string" path="." schema="ng3"/>
<attribute column="amount_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="amount" schema="ng3">
<attribute column="amount" type="double" path="." schema="ng3"/>
<attribute column="amount_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<attribute minOccurs="1" maxOccurs="1" column="is_amount_normalized" type="boolean" path="isAmountNormalized" schema="ng3"/>
<complexAttribute maxOccurs="1" path="normalizationValue" schema="ng3">
<attribute column="normalization_value" type="double" path="." schema="ng3"/>
<attribute column="normalization_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<attribute column="normalization_param" type="string" maxOccurs="1" path="normalizationParameter" schema="ng3"/>
<complexAttribute maxOccurs="1" path="referencePeriod" schema="ng3">
<attribute column="ref_period" type="string" path="." schema="ng3"/>
<attribute column="ref_period_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="co2Equivalent" schema="ng3">
<attribute column="co2_equivalent" type="double" path="." schema="ng3"/>
<attribute column="co2_equivalent_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="year" type="integer" path="year" schema="ng3"/>
<complexAttribute maxOccurs="1" path="costsMoney" schema="ng3">
<attribute column="costs_money" type="double" path="." schema="ng3"/>
<attribute column="co2_equivalent_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="yieldsMoney" schema="ng3">
<attribute column="yields_money" type="double" path="." schema="ng3"/>
<attribute column="yields_money_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<featureProperty target="ng3_AbstractTimeSeriesType" maxOccurs="1" path="timeDependentAmount" schema="ng3" relationType="composition">
<join table="ng3_time_series" fromColumn="amount_time_series_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
<featureProperty target="ng3_AbstractTimeSeriesType" maxOccurs="1" path="timeDependentCosts" schema="ng3" relationType="composition">
<join table="ng3_time_series" fromColumn="costs_time_series_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
<featureProperty target="ng3_AbstractTimeSeriesType" maxOccurs="1" path="timeDependentYields" schema="ng3" relationType="composition">
<join table="ng3_time_series" fromColumn="yields_time_series_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- ***************************** -->
<!-- Core Module: CityObjects -->
<!-- ***************************** -->
<!-- Abstract CityObject Space -->
<featureType abstract="true" id="ng3_AbstractCityObjectSpaceType" table="ng3_space" objectClassId="11071" path="AbstractCityObjectSpace" schema="ng3">
<extension base="AbstractCityObjectType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexProperty refType="ng3_QualifiedAreaType" path="area" schema="ng3">
<join table="ng3_qualified_attribute" fromColumn="id" toColumn="space_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<complexProperty refType="ng3_QualifiedVolumeType" path="volume" schema="ng3">
<join table="ng3_qualified_attribute" fromColumn="id" toColumn="space_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<geometryProperty maxOccurs="1" lod="1" refColumn="lod1_solid_id" type="AbstractSolid" path="lod1Solid" schema="ng3"/>
<geometryProperty maxOccurs="1" lod="2" refColumn="lod2_solid_id" type="AbstractSolid" path="lod2Solid" schema="ng3"/>
<geometryProperty maxOccurs="1" lod="3" refColumn="lod3_solid_id" type="AbstractSolid" path="lod3Solid" schema="ng3"/>
</featureType>
<!-- Abstract Device -->
<featureType abstract="true" id="ng3_AbstractDeviceType" table="ng3_device" objectClassId="11072" path="AbstractDevice" schema="ng3">
<extension base="AbstractCityObjectType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<attribute maxOccurs="1" column="model" type="string" path="model" schema="ng3"/>
<attribute maxOccurs="1" column="year_of_manufacture" type="integer" path="yearOfManufacture" schema="ng3"/>
<attribute maxOccurs="1" column="num_of_devices" type="integer" path="numberOfDevices" schema="ng3"/>
<complexAttribute maxOccurs="1" path="installedPower" schema="ng3">
<attribute column="installed_power" type="double" path="." schema="ng3"/>
<attribute column="installed_power_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="nominalEfficiency" schema="ng3">
<attribute column="nominal_efficiency" type="double" path="." schema="ng3"/>
<attribute column="nominal_efficiency_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="efficiency_indicator" type="string" path="efficiencyIndicator" schema="ng3"/>
<complexAttribute maxOccurs="1" path="heatDissipation" schema="ng3">
<attribute column="heat_diss" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationConvectiveFraction" schema="ng3">
<attribute column="heat_diss_conv" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_conv_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationLatentFraction" schema="ng3">
<attribute column="heat_diss_lat" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_lat_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationRadiantFraction" schema="ng3">
<attribute column="heat_diss_rad" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_rad_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<featureProperty target="ng3_DeviceOperationType" path="deviceOperation" schema="ng3" relationType="aggregation">
<join table="ng3_device_operation" fromColumn="id" toColumn="device_id" toRole="child"/>
</featureProperty>
</featureType>
<!-- Abstract Library -->
<featureType abstract="true" id="ng3_AbstractLibraryType" table="ng3_library" objectClassId="11073" path="AbstractLibrary" schema="ng3">
<extension base="AbstractCityObjectType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute maxOccurs="1" path="type" schema="ng3">
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="type" type="string" path="." schema="ng3"/>
</complexAttribute>
<attribute maxOccurs="1" column="source" type="string" path="source" schema="ng3"/>
<attribute maxOccurs="1" column="author" type="string" path="author" schema="ng3"/>
</featureType>
<!-- ***************************** -->
<!-- Time Series Module -->
<!-- ***************************** -->
<!-- Regular Time Series --> <!-- Regular Time Series -->
<featureType id="ng3_RegularTimeSeriesType" table="ng3_time_series" objectClassId="11021" path="RegularTimeSeries" schema="ng3"> <featureType id="ng3_RegularTimeSeriesType" table="ng3_time_series" objectClassId="11081" path="RegularTimeSeries" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/> <extension base="ng3_AbstractTimeSeriesType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="timeInterval" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="timeInterval" schema="ng3">
<attribute column="time_interval" type="double" path="." schema="ng3"/> <attribute column="time_interval" type="double" path="." schema="ng3"/>
...@@ -182,8 +479,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -182,8 +479,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</featureType> </featureType>
<!-- Regular Time Series File --> <!-- Regular Time Series File -->
<featureType id="ng3_RegularTimeSeriesFileType" table="ng3_time_series" objectClassId="11022" path="RegularTimeSeriesFile" schema="ng3"> <featureType id="ng3_RegularTimeSeriesFileType" table="ng3_time_series" objectClassId="11082" path="RegularTimeSeriesFile" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/> <extension base="ng3_AbstractTimeSeriesType"/>
<attribute minOccurs="1" maxOccurs="1" column="uom" type="string" path="uom" schema="ng3"/> <attribute minOccurs="1" maxOccurs="1" column="uom" type="string" path="uom" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="file_uri" type="string" path="file" schema="ng3"/> <attribute minOccurs="1" maxOccurs="1" column="file_uri" type="string" path="file" schema="ng3"/>
...@@ -206,8 +504,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -206,8 +504,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexProperty> </complexProperty>
</featureType> </featureType>
<!-- Typical Values Time Series --> <!-- Typical Values Time Series -->
<featureType id="ng3_TypicalValuesTimeSeriesType" table="ng3_time_series" objectClassId="11023" path="TypicalValuesTimeSeries" schema="ng3"> <featureType id="ng3_TypicalValuesTimeSeriesType" table="ng3_time_series" objectClassId="11083" path="TypicalValuesTimeSeries" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/> <extension base="ng3_AbstractTimeSeriesType"/>
<attribute maxOccurs="1" column="start_time" type="timestamp" path="startTime" schema="ng3"/> <attribute maxOccurs="1" column="start_time" type="timestamp" path="startTime" schema="ng3"/>
<attribute maxOccurs="1" column="start_day" type="integer" path="startDay" schema="ng3"/> <attribute maxOccurs="1" column="start_day" type="integer" path="startDay" schema="ng3"/>
...@@ -230,8 +529,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -230,8 +529,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</featureType> </featureType>
<!-- Typical Values Time Series File --> <!-- Typical Values Time Series File -->
<featureType id="ng3_TypicalValuesTimeSeriesFileType" table="ng3_time_series" objectClassId="11024" path="TypicalValuesTimeSeriesFile" schema="ng3"> <featureType id="ng3_TypicalValuesTimeSeriesFileType" table="ng3_time_series" objectClassId="11084" path="TypicalValuesTimeSeriesFile" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/> <extension base="ng3_AbstractTimeSeriesType"/>
<attribute maxOccurs="1" column="start_time" type="timestamp" path="startTime" schema="ng3"/> <attribute maxOccurs="1" column="start_time" type="timestamp" path="startTime" schema="ng3"/>
<attribute maxOccurs="1" column="start_day" type="integer" path="startDay" schema="ng3"/> <attribute maxOccurs="1" column="start_day" type="integer" path="startDay" schema="ng3"/>
...@@ -257,14 +557,87 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -257,14 +557,87 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute maxOccurs="1" column="value_column_number" type="integer" path="valueColumnNumber" schema="ng3"/> <attribute maxOccurs="1" column="value_column_number" type="integer" path="valueColumnNumber" schema="ng3"/>
</featureType> </featureType>
<!-- Sensor Connection -->
<featureType id="ng3_SensorConnectionType" table="ng3_time_series" objectClassId="11025" path="SensorConnection" schema="ng3"> <!-- Monthly Time Series -->
<featureType id="ng3_MonthlyTimeSeriesType" table="ng3_time_series" objectClassId="11085" path="MonthlyTimeSeries" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/> <extension base="ng3_AbstractTimeSeriesType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="temporalExtent" schema="ng3"> <complexProperty minOccurs="1" maxOccurs="1" path="temporalExtent" schema="ng3">
<attribute column="temporal_extent" type="double" path="." schema="ng3"/> <type path="TimePeriod" schema="ng3">
<attribute column="temporal_extent_unit" type="string" path="@unit" schema="gml"/> <attribute minOccurs="1" maxOccurs="1" column="period_begin" type="timestamp" path="beginPosition" schema="ng3"/>
<!-- <attribute column="temporal_extent_radix" type="integer" path="@radix" schema="gml"/> --> <attribute minOccurs="1" maxOccurs="1" column="period_end" type="timestamp" path="endPosition" schema="ng3"/>
<!-- <attribute column="temporal_extent_factor" type="integer" path="@factor" schema="gml"/> --> </type>
</complexProperty>
<complexAttribute minOccurs="1" maxOccurs="1" path="values" schema="ng3">
<attribute column="values_list" type="clob" path="." schema="ng3"/>
<attribute column="values_list_uom" type="string" path="@uom" schema="ng3"/>
</complexAttribute>
</featureType>
<!-- Monthly Time Series File -->
<featureType id="ng3_MonthlyTimeSeriesFileType" table="ng3_time_series" objectClassId="11086" path="MonthlyTimeSeriesFile" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/>
<attribute minOccurs="1" maxOccurs="1" column="uom" type="string" path="uom" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="file_uri" type="string" path="file" schema="ng3"/>
<attribute maxOccurs="1" column="num_of_header_lines" type="integer" path="numberOfHeaderLines" schema="ng3"/>
<attribute maxOccurs="1" column="field_separator" type="string" path="fieldSeparator" schema="ng3"/>
<attribute maxOccurs="1" column="record_separator" type="string" path="recordSeparator" schema="ng3"/>
<attribute maxOccurs="1" column="decimal_symbol" type="string" path="decimalSymbol" schema="ng3"/>
<attribute maxOccurs="1" column="value_column_number" type="integer" path="valueColumnNumber" schema="ng3"/>
<complexProperty minOccurs="1" maxOccurs="1" path="temporalExtent" schema="ng3">
<type path="TimePeriod" schema="ng3">
<attribute minOccurs="1" maxOccurs="1" column="period_begin" type="timestamp" path="beginPosition" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="period_end" type="timestamp" path="endPosition" schema="ng3"/>
</type>
</complexProperty>
</featureType>
<!-- Typical Values Time Series -->
<featureType id="ng3_TypicalValuesMonthlyTimeSeriesType" table="ng3_time_series" objectClassId="11087" path="TypicalValuesMonthlyTimeSeries" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/>
<attribute maxOccurs="1" column="start_month" type="integer" path="startMonth" schema="ng3"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="temporalExtent" schema="ng3">
<attribute column="temporal_extent" type="double" path="." schema="ng3"/>
<attribute column="temporal_extent_unit" type="string" path="@unit" schema="gml"/>
<!-- <attribute column="temporal_extent_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="temporal_extent_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="values" schema="ng3">
<attribute column="values_list" type="clob" path="." schema="ng3"/>
<attribute column="values_list_uom" type="string" path="@uom" schema="ng3"/>
</complexAttribute>
</featureType>
<!-- Typical Values Time Series File -->
<featureType id="ng3_TypicalValuesMonthlyTimeSeriesFileType" table="ng3_time_series" objectClassId="11088" path="TypicalValuesMonthlyTimeSeriesFile" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/>
<attribute maxOccurs="1" column="start_month" type="integer" path="startMonth" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="uom" type="string" path="uom" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="file_uri" type="string" path="file" schema="ng3"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="temporalExtent" schema="ng3">
<attribute column="temporal_extent" type="double" path="." schema="ng3"/>
<attribute column="temporal_extent_unit" type="string" path="@unit" schema="gml"/>
<!-- <attribute column="temporal_extent_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="temporal_extent_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
<attribute maxOccurs="1" column="num_of_header_lines" type="integer" path="numberOfHeaderLines" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="field_separator" type="string" path="fieldSeparator" schema="ng3"/>
<attribute maxOccurs="1" column="record_separator" type="string" path="recordSeparator" schema="ng3"/>
<attribute maxOccurs="1" column="decimal_symbol" type="string" path="decimalSymbol" schema="ng3"/>
<attribute maxOccurs="1" column="value_column_number" type="integer" path="valueColumnNumber" schema="ng3"/>
</featureType>
<!-- Sensor Connection -->
<featureType id="ng3_SensorConnectionType" table="ng3_time_series" objectClassId="11089" path="SensorConnection" schema="ng3">
<extension base="ng3_AbstractTimeSeriesType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="temporalExtent" schema="ng3">
<attribute column="temporal_extent" type="double" path="." schema="ng3"/>
<attribute column="temporal_extent_unit" type="string" path="@unit" schema="gml"/>
<!-- <attribute column="temporal_extent_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="temporal_extent_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute> </complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="connectionType" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="connectionType" schema="ng3">
<attribute column="connection_type" type="string" path="." schema="ng3"/> <attribute column="connection_type" type="string" path="." schema="ng3"/>
...@@ -287,47 +660,19 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -287,47 +660,19 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute maxOccurs="1" column="link_to_sensor_description" type="string" path="linkToSensorDescription" schema="ng3"/> <attribute maxOccurs="1" column="link_to_sensor_description" type="string" path="linkToSensorDescription" schema="ng3"/>
</featureType> </featureType>
<!-- Abstract Schedule --> <!-- ***************************** -->
<featureType abstract="true" id="ng3_AbstractScheduleType" table="ng3_schedule" objectClassId="11030" path="AbstractSchedule" schema="ng3"> <!-- Schedule Module -->
<extension base="AbstractFeatureType"> <!-- ***************************** -->
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute maxOccurs="1" path="libraryCode" schema="ng3">
<attribute column="library_code" type="string" path="." schema="ng3"/>
<attribute column="library_code_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="start_time" type="timestamp" path="startTime" schema="ng3"/>
<attribute maxOccurs="1" column="start_day" type="integer" path="startDay" schema="ng3"/>
<attribute maxOccurs="1" column="start_month" type="integer" path="startMonth" schema="ng3"/>
<attribute maxOccurs="1" column="start_year" type="integer" path="startYear" schema="ng3"/>
<complexAttribute maxOccurs="1" path="temporalExtent" schema="ng3">
<attribute column="time_interval" type="double" path="." schema="ng3"/>
<attribute column="time_interval_unit" type="string" path="@unit" schema="gml"/>
<!-- <attribute column="time_interval_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="time_interval_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
</featureType>
<!-- Atomic Schedule --> <!-- Atomic Schedule -->
<featureType id="ng3_AtomicScheduleType" table="ng3_schedule" objectClassId="11031" path="AtomicSchedule" schema="ng3"> <featureType id="ng3_AtomicScheduleType" table="ng3_schedule" objectClassId="11091" path="AtomicSchedule" schema="ng3">
<extension base="ng3_AbstractScheduleType"/> <extension base="ng3_AbstractScheduleType"/>
<complexAttribute minOccurs="0" maxOccurs="1" path="constantValue" schema="ng3"> <complexProperty minOccurs="1" maxOccurs="1" refType="ng3_AtomicScheduleValueType" path="value" schema="ng3"/>
<attribute column="constant_value" type="double" path="." schema="ng3"/>
<attribute column="constant_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<featureProperty minOccurs="0" maxOccurs="1" target="ng3_AbstractTimeSeriesType" path="timeSeries" schema="ng3" relationType="composition">
<join table="ng3_time_series" fromColumn="time_series_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType> </featureType>
<!-- Dual Value Schedule --> <!-- Dual Value Schedule -->
<featureType id="ng3_DualValueScheduleType" table="ng3_schedule" objectClassId="11032" path="DualValueSchedule" schema="ng3"> <featureType id="ng3_DualValueScheduleType" table="ng3_schedule" objectClassId="11092" path="DualValueSchedule" schema="ng3">
<extension base="ng3_AbstractScheduleType"/> <extension base="ng3_AbstractScheduleType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="idleValue" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="idleValue" schema="ng3">
<attribute column="idle_value" type="double" path="." schema="ng3"/> <attribute column="idle_value" type="double" path="." schema="ng3"/>
...@@ -341,19 +686,10 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -341,19 +686,10 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute minOccurs="1" maxOccurs="1" column="end_usage_time" type="timestamp" path="endUsageTime" schema="ng3"/> <attribute minOccurs="1" maxOccurs="1" column="end_usage_time" type="timestamp" path="endUsageTime" schema="ng3"/>
</featureType> </featureType>
<!-- Composite Schedule -->
<featureType id="ng3_CompositeScheduleType" table="ng3_schedule" objectClassId="11033" path="CompositeSchedule" schema="ng3">
<extension base="ng3_AbstractScheduleType"/>
<featureProperty minOccurs="1" target="ng3_ScheduleComponentType" path="scheduleComponent" schema="ng3" relationType="composition">
<join table="ng3_schedule_component" fromColumn="id" toColumn="parent_schedule_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- Schedule Component --> <!-- Schedule Component -->
<featureType id="ng3_ScheduleComponentType" table="ng3_schedule_component" objectClassId="11034" path="ScheduleComponent" schema="ng3"> <featureType id="ng3_ScheduleComponentType" table="ng3_schedule_component" objectClassId="11094" path="ScheduleComponent" schema="ng3">
<extension base="AbstractFeatureType"> <extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
...@@ -374,180 +710,224 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -374,180 +710,224 @@ https://3d.bk.tudelft.nl/gagugiaro/
</featureProperty> </featureProperty>
</featureType> </featureType>
<!-- Energy Performance Certificate -->
<featureType id="ng3_EnergyPerformanceCertificateType" table="ng3_energy_perf_cert" objectClassId="11040" path="EnergyPerformanceCertificate" schema="ng3"> <!-- Composite Schedule -->
<extension base="AbstractFeatureType"> <featureType id="ng3_CompositeScheduleType" table="ng3_schedule" objectClassId="11093" path="CompositeSchedule" schema="ng3">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <extension base="ng3_AbstractScheduleType"/>
</extension> <featureProperty minOccurs="1" target="ng3_ScheduleComponentType" path="scheduleComponent" schema="ng3" relationType="composition">
<join table="ng3_schedule_component" fromColumn="id" toColumn="parent_schedule_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- Schedule Library -->
<featureType topLevel="true" id="ng3_ScheduleLibraryType" table="ng3_library" objectClassId="11095" path="ScheduleLibrary" schema="ng3">
<extension base="ng3_AbstractLibraryType"/>
<featureProperty target="ng3_AbstractScheduleType" path="libraryMember" schema="ng3" relationType="composition">
<join table="ng3_schedule" fromColumn="id" toColumn="library_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- ***************************** -->
<!-- Resources Module -->
<!-- ***************************** -->
<!-- Construction Material -->
<featureType id="ng3_ConstructionMaterialType" table="ng3_resource" objectClassId="11101" path="ConstructionMaterial" schema="ng3">
<extension base="ng3_AbstractResourceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="value" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3">
<attribute column="value" type="double" path="." schema="ng3"/> <attribute column="enduse" type="string" path="." schema="ng3"/>
<attribute column="value_uom" type="string" path="@uom" schema="gml"/> <attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute minOccurs="1" maxOccurs="1" column="label" type="string" path="label" schema="ng3"/>
<attribute maxOccurs="1" column="issue_date" type="date" path="issueDate" schema="ng3"/>
<attribute maxOccurs="1" column="expiration_date" type="date" path="expirationDate" schema="ng3"/>
<attribute maxOccurs="1" column="cert_method" type="string" path="certificationMethod" schema="ng3"/>
<attribute maxOccurs="1" column="cert_uri" type="string" path="certificationURI" schema="ng3"/>
</featureType> </featureType>
<!-- Refurbishment Measure -->
<featureType id="ng3_RefurbishmentMeasureType" table="ng3_refurbishment_measure" objectClassId="11041" path="RefurbishmentMeasure" schema="ng3"> <!-- Energy -->
<extension base="AbstractFeatureType"> <featureType id="ng3_EnergyType" table="ng3_resource" objectClassId="11102" path="Energy" schema="ng3">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <extension base="ng3_AbstractResourceType"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute minOccurs="0" maxOccurs="1" column="start_date" type="date" path="startDate" schema="ng3"/> <complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3">
<attribute minOccurs="1" maxOccurs="1" column="end_date" type="date" path="endDate" schema="ng3"/> <attribute column="enduse" type="string" path="." schema="ng3"/>
<complexAttribute maxOccurs="1" path="libraryCode" schema="ng3"> <attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="library_code" type="string" path="." schema="ng3"/> </complexAttribute>
<attribute column="library_code_codespace" type="string" path="@codespace" schema="gml"/> <complexAttribute maxOccurs="1" path="energyCarrier" schema="ng3">
<attribute column="energy_carrier" type="string" path="." schema="ng3"/>
<attribute column="energy_carrier_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="maximumLoad" schema="ng3">
<attribute column="maximum_load" type="double" path="." schema="ng3"/>
<attribute column="maximum_load_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="source" schema="ng3">
<attribute column="source" type="string" path="." schema="ng3"/>
<attribute column="source_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
</featureType> </featureType>
<!-- Utility Network Connection -->
<featureType id="ng3_UtilityNetworkConnectionType" table="ng3_utl_ntw_connection" objectClassId="11042" path="UtilityNetworkConnection" schema="ng3"> <!-- Food -->
<extension base="AbstractFeatureType"> <featureType id="ng3_FoodType" table="ng3_resource" objectClassId="11103" path="Food" schema="ng3">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <extension base="ng3_AbstractResourceType"/>
</extension> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<complexAttribute minOccurs="1" maxOccurs="1" path="networkType" schema="ng3"> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="network_type" type="string" path="." schema="ng3"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="network_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute minOccurs="1" maxOccurs="1" column="connection_status" type="string" path="connectionStatus" schema="ng3"/> <complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3">
<complexAttribute maxOccurs="1" path="functionInNetwork" schema="ng3"> <attribute column="enduse" type="string" path="." schema="ng3"/>
<attribute column="function_in_network" type="string" path="." schema="ng3"/> <attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="function_in_network_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="usageInNetwork" schema="ng3"> </featureType>
<attribute column="usage_in_network" type="string" path="." schema="ng3"/>
<attribute column="usage_in_network_codespace" type="string" path="@codespace" schema="gml"/>
<!-- Other Resource -->
<featureType id="ng3_OtherResourceType" table="ng3_resource" objectClassId="11104" path="OtherResource" schema="ng3">
<extension base="ng3_AbstractResourceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3">
<attribute column="enduse" type="string" path="." schema="ng3"/>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute maxOccurs="1" column="network_id" type="string" path="networkID" schema="ng3"/>
<attribute maxOccurs="1" column="network_node_id" type="string" path="networkNodeID" schema="ng3"/>
</featureType> </featureType>
<!-- Weather Data -->
<featureType id="ng3_WeatherDataType" table="ng3_weather_data" objectClassId="11043" path="WeatherData" schema="ng3"> <!-- Urban Space -->
<extension base="AbstractFeatureType"> <featureType id="ng3_UrbanSpaceType" table="ng3_resource" objectClassId="11105" path="UrbanSpace" schema="ng3">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <extension base="ng3_AbstractResourceType"/>
</extension> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<complexAttribute maxOccurs="1" path="libraryCode" schema="ng3"> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="library_code" type="string" path="." schema="ng3"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="library_code_codespace" type="string" path="@codespace" schema="gml"/> </complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3">
<attribute column="enduse" type="string" path="." schema="ng3"/>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
</featureType>
<!-- Waste -->
<featureType id="ng3_WasteType" table="ng3_resource" objectClassId="11106" path="Waste" schema="ng3">
<extension base="ng3_AbstractResourceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="valueType" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3">
<attribute column="value_type" type="string" path="." schema="ng3"/> <attribute column="enduse" type="string" path="." schema="ng3"/>
<attribute column="value_type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="yearlyValue" schema="ng3"> <attribute maxOccurs="1" column="is_dangerous" type="boolean" path="isDangerous" schema="ng3"/>
<attribute column="yearly_value" type="double" path="." schema="ng3"/> <attribute maxOccurs="1" column="is_recyclable" type="boolean" path="isRecyclable" schema="ng3"/>
<attribute column="yearly_value_uom" type="string" path="@uom" schema="gml"/> </featureType>
<!-- Water -->
<featureType id="ng3_WaterType" table="ng3_resource" objectClassId="11107" path="Water" schema="ng3">
<extension base="ng3_AbstractResourceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3">
<attribute column="enduse" type="string" path="." schema="ng3"/>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<featureProperty maxOccurs="1" target="ng3_AbstractTimeSeriesType" path="timeSeries" schema="ng3" relationType="composition">
<join table="ng3_time_series" fromColumn="time_series_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
<geometryProperty maxOccurs="1" inlineColumn="position" type="Point" path="position" schema="ng3"/>
</featureType> </featureType>
<!-- Abstract Layered Construction --> <!-- ******************************** -->
<featureType abstract="true" id="ng3_AbstractLayeredConstructionType" table="ng3_layered_construction" objectClassId="11050" path="AbstractLayeredConstruction" schema="ng3"> <!-- Material and Construction Module -->
<extension base="AbstractFeatureType"> <!-- ******************************** -->
<!-- Abstract Material -->
<featureType abstract="true" id="ng3_AbstractMaterialType" table="ng3_material" objectClassId="11111" path="AbstractMaterial" schema="ng3">
<extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
</featureType> </featureType>
<!-- Layered Construction -->
<featureType id="ng3_LayeredConstructionType" table="ng3_layered_construction" objectClassId="11051" path="LayeredConstruction" schema="ng3"> <!-- Gas -->
<extension base="ng3_AbstractLayeredConstructionType"/> <featureType id="ng3_GasType" table="ng3_material" objectClassId="11112" path="Gas" schema="ng3">
<complexAttribute maxOccurs="1" path="libraryCode" schema="ng3"> <extension base="ng3_AbstractMaterialType"/>
<attribute column="library_code" type="string" path="." schema="ng3"/> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="library_code_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="uValue" schema="ng3"> <attribute maxOccurs="1" column="is_ventilated" type="boolean" path="isVentilated" schema="ng3"/>
<attribute column="u_value" type="double" path="." schema="ng3"/> <complexAttribute maxOccurs="1" path="rValue" schema="ng3">
<attribute column="u_value_uom" type="string" path="@uom" schema="gml"/> <attribute column="r_value" type="double" path="." schema="ng3"/>
<attribute column="r_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="gValue" schema="ng3"> </featureType>
<attribute column="g_value" type="double" path="." schema="ng3"/>
<attribute column="g_value_uom" type="string" path="@uom" schema="gml"/>
<!-- Liquid -->
<featureType id="ng3_LiquidType" table="ng3_material" objectClassId="11113" path="Liquid" schema="ng3">
<extension base="ng3_AbstractMaterialType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="type" type="string" path="." schema="ng3"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="glazingRatio" schema="ng3"> <complexAttribute maxOccurs="1" path="thermalConductivity" schema="ng3">
<attribute column="glazing_ratio" type="double" path="." schema="ng3"/> <attribute column="thm_conductivity" type="double" path="." schema="ng3"/>
<attribute column="glazing_ratio_uom" type="string" path="@uom" schema="gml"/> <attribute column="thm_conductivity_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="density" schema="ng3">
<attribute column="density" type="double" path="." schema="ng3"/>
<attribute column="density_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="specificHeatCapacity" schema="ng3">
<attribute column="spec_heat_capacity" type="double" path="." schema="ng3"/>
<attribute column="spec_heat_capacity_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="viscosity" schema="ng3">
<attribute column="viscosity" type="double" path="." schema="ng3"/>
<attribute column="viscosity_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
</featureType>
<!-- Solid Material -->
<featureType id="ng3_SolidMaterialType" table="ng3_material" objectClassId="11114" path="SolidMaterial" schema="ng3">
<extension base="ng3_AbstractMaterialType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute minOccurs="1" maxOccurs="1" column="is_transparent" type="boolean" path="isTransparent" schema="ng3"/>
<complexProperty refType="ng3_AbsorptanceType" path="absorptance" schema="ng3">
<join table="ng3_optical_property" fromColumn="id" toColumn="material_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<complexProperty refType="ng3_EmissivityType" path="emissivity" schema="ng3"> <complexProperty refType="ng3_EmissivityType" path="emissivity" schema="ng3">
<join table="ng3_optical_property" fromColumn="id" toColumn="layered_construction_id" toRole="child"> <join table="ng3_optical_property" fromColumn="id" toColumn="material_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</complexProperty> </complexProperty>
<complexProperty refType="ng3_ReflectanceType" path="reflectance" schema="ng3"> <complexProperty refType="ng3_ReflectanceType" path="reflectance" schema="ng3">
<join table="ng3_optical_property" fromColumn="id" toColumn="layered_construction_id" toRole="child"> <join table="ng3_optical_property" fromColumn="id" toColumn="material_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</complexProperty> </complexProperty>
<complexProperty refType="ng3_TransmittanceType" path="transmittance" schema="ng3"> <complexProperty refType="ng3_TransmittanceType" path="transmittance" schema="ng3">
<join table="ng3_optical_property" fromColumn="id" toColumn="layered_construction_id" toRole="child"> <join table="ng3_optical_property" fromColumn="id" toColumn="material_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</complexProperty> </complexProperty>
<featureProperty target="ng3_LayerType" path="layer" schema="ng3" relationType="composition">
<join table="ng3_layer" fromColumn="id" toColumn="layered_construction_id" toRole="child"/>
</featureProperty>
</featureType>
<!-- Reverse Layered Construction -->
<featureType id="ng3_ReverseLayeredConstructionType" table="ng3_layered_construction" objectClassId="11052" path="ReverseLayeredConstruction" schema="ng3">
<extension base="ng3_AbstractLayeredConstructionType"/>
<featureProperty minOccurs="1" maxOccurs="1" target="ng3_LayeredConstructionType" path="baseLayeredConstruction" schema="ng3" relationType="association">
<join table="ng3_layered_construction" fromColumn="layered_construction_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- Layer -->
<featureType id="ng3_LayerType" table="ng3_layer" objectClassId="11053" path="Layer" schema="ng3">
<extension base="AbstractFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="thickness" schema="ng3">
<attribute column="thickness" type="double" path="." schema="ng3"/>
<attribute column="thickness_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<featureProperty minOccurs="1" maxOccurs="1" target="ng3_AbstractMaterialType" path="material" schema="ng3" relationType="aggregation">
<join table="ng3_material" fromColumn="material_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- Abstract Material -->
<featureType abstract="true" id="ng3_AbstractMaterialType" table="ng3_material" objectClassId="11054" path="AbstractMaterial" schema="ng3">
<extension base="AbstractFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute maxOccurs="1" path="libraryCode" schema="ng3">
<attribute column="library_code" type="string" path="." schema="ng3"/>
<attribute column="library_code_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
</featureType>
<!-- Solid Material -->
<featureType id="ng3_SolidMaterialType" table="ng3_material" objectClassId="11055" path="SolidMaterial" schema="ng3">
<extension base="ng3_AbstractMaterialType"/>
<complexAttribute maxOccurs="1" path="thermalConductivity" schema="ng3"> <complexAttribute maxOccurs="1" path="thermalConductivity" schema="ng3">
<attribute column="thm_conductivity" type="double" path="." schema="ng3"/> <attribute column="thm_conductivity" type="double" path="." schema="ng3"/>
<attribute column="thm_conductivity_uom" type="string" path="@uom" schema="gml"/> <attribute column="thm_conductivity_uom" type="string" path="@uom" schema="gml"/>
...@@ -578,270 +958,333 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -578,270 +958,333 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</featureType> </featureType>
<!-- Gas -->
<featureType id="ng3_GasType" table="ng3_material" objectClassId="11056" path="Gas" schema="ng3">
<extension base="ng3_AbstractMaterialType"/>
<attribute maxOccurs="1" column="is_ventilated" type="boolean" path="isVentilated" schema="ng3"/>
<complexAttribute maxOccurs="1" path="rValue" schema="ng3">
<attribute column="r_value" type="double" path="." schema="ng3"/>
<attribute column="r_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
</featureType>
<!-- AbstractResource --> <!-- Layer -->
<featureType abstract="true" id="ng3_AbstractResourceType" table="ng3_resource" objectClassId="11070" path="AbstractResource" schema="ng3"> <featureType id="ng3_LayerType" table="ng3_layer" objectClassId="11115" path="Layer" schema="ng3">
<extension base="AbstractFeatureType"> <extension base="ng3_AbstractADEFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
<attribute minOccurs="1" maxOccurs="1" column="status" type="string" path="status" schema="ng3"/> <complexAttribute minOccurs="1" maxOccurs="1" path="thickness" schema="ng3">
<complexAttribute minOccurs="1" maxOccurs="1" path="operationType" schema="ng3"> <attribute column="thickness" type="double" path="." schema="ng3"/>
<attribute column="operation_type" type="string" path="." schema="ng3"/> <attribute column="thickness_uom" type="string" path="@uom" schema="gml"/>
<attribute column="operation_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="amountType" schema="ng3">
<attribute column="amount_type" type="string" path="." schema="ng3"/>
<attribute column="amount_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="amount" schema="ng3">
<attribute column="amount" type="double" path="." schema="ng3"/>
<attribute column="amount_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<featureProperty maxOccurs="1" target="ng3_AbstractTimeSeriesType" path="timeDependentAmount" schema="ng3" relationType="composition"> <featureProperty minOccurs="1" maxOccurs="1" target="ng3_AbstractMaterialType" path="material" schema="ng3" relationType="aggregation">
<join table="ng3_time_series" fromColumn="time_series_id" toColumn="id" toRole="parent"> <join table="ng3_material" fromColumn="material_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
<attribute minOccurs="1" maxOccurs="1" column="is_amount_normalized" type="boolean" path="isAmountNormalized" schema="ng3"/>
<complexAttribute maxOccurs="1" path="normalizationValue" schema="ng3">
<attribute column="normalization_value" type="double" path="." schema="ng3"/>
<attribute column="normalization_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<attribute column="normalization_param" type="string" maxOccurs="1" path="normalizationParameter" schema="ng3"/>
<complexAttribute maxOccurs="1" path="co2Equivalent" schema="ng3">
<attribute column="co2_equivalent" type="double" path="." schema="ng3"/>
<attribute column="co2_equivalent_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="year" type="integer" path="year" schema="ng3"/>
<complexAttribute maxOccurs="1" path="costsMoney" schema="ng3">
<attribute column="costs_money" type="double" path="." schema="ng3"/>
<attribute column="co2_equivalent_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="yieldsMoney" schema="ng3">
<attribute column="yields_money" type="double" path="." schema="ng3"/>
<attribute column="yields_money_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
</featureType> </featureType>
<!-- Resources: Construction Material -->
<featureType id="ng3_ConstructionMaterialType" table="ng3_resource" objectClassId="11071" path="ConstructionMaterial" schema="ng3">
<extension base="ng3_AbstractResourceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3">
<attribute column="enduse" type="string" path="." schema="ng3"/>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
</featureType>
<!-- Resources: Energy --> <!-- Layered Construction -->
<featureType id="ng3_EnergyType" table="ng3_resource" objectClassId="11072" path="Energy" schema="ng3"> <featureType id="ng3_LayeredConstructionType" table="ng3_layered_construction" objectClassId="11116" path="LayeredConstruction" schema="ng3">
<extension base="ng3_AbstractResourceType"/> <extension base="ng3_AbstractLayeredConstructionType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3"> <complexAttribute maxOccurs="1" path="uValue" schema="ng3">
<attribute column="enduse" type="string" path="." schema="ng3"/> <attribute column="u_value" type="double" path="." schema="ng3"/>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="u_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="energyCarrier" schema="ng3"> <complexAttribute maxOccurs="1" path="gValue" schema="ng3">
<attribute column="energy_carrier" type="string" path="." schema="ng3"/> <attribute column="g_value" type="double" path="." schema="ng3"/>
<attribute column="energy_carrier_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="g_value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="maximumLoad" schema="ng3"> <complexAttribute maxOccurs="1" path="glazingRatio" schema="ng3">
<attribute column="maximum_load" type="double" path="." schema="ng3"/> <attribute column="glazing_ratio" type="double" path="." schema="ng3"/>
<attribute column="maximum_load_uom" type="string" path="@uom" schema="gml"/> <attribute column="glazing_ratio_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="source" schema="ng3"> <complexProperty refType="ng3_AbsorptanceType" path="absorptance" schema="ng3">
<attribute column="source" type="string" path="." schema="ng3"/> <join table="ng3_optical_property" fromColumn="id" toColumn="layered_constr_id" toRole="child">
<attribute column="source_codespace" type="string" path="@codespace" schema="gml"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<complexProperty refType="ng3_EmissivityType" path="emissivity" schema="ng3">
<join table="ng3_optical_property" fromColumn="id" toColumn="layered_constr_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<complexProperty refType="ng3_ReflectanceType" path="reflectance" schema="ng3">
<join table="ng3_optical_property" fromColumn="id" toColumn="layered_constr_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<complexProperty refType="ng3_TransmittanceType" path="transmittance" schema="ng3">
<join table="ng3_optical_property" fromColumn="id" toColumn="layered_constr_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<complexAttribute maxOccurs="1" path="insideConvectionCoefficient" schema="ng3">
<attribute column="inside_conv_coeff" type="double" path="." schema="ng3"/>
<attribute column="inside_conv_coeff_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="outsideConvectionCoefficient" schema="ng3">
<attribute column="outside_conv_coeff" type="double" path="." schema="ng3"/>
<attribute column="outside_conv_coeff_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<featureProperty target="ng3_LayerType" path="layer" schema="ng3" relationType="composition">
<join table="ng3_layer" fromColumn="id" toColumn="layered_constr_id" toRole="child"/>
</featureProperty>
</featureType> </featureType>
<!-- Resources: Food -->
<featureType id="ng3_FoodType" table="ng3_resource" objectClassId="11073" path="Food" schema="ng3"> <!-- Reverse Layered Construction -->
<extension base="ng3_AbstractResourceType"/> <featureType id="ng3_ReverseLayeredConstructionType" table="ng3_layered_construction" objectClassId="11117" path="ReverseLayeredConstruction" schema="ng3">
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <extension base="ng3_AbstractLayeredConstructionType"/>
<attribute column="type" type="string" path="." schema="ng3"/> <featureProperty minOccurs="1" maxOccurs="1" target="ng3_LayeredConstructionType" path="baseLayeredConstruction" schema="ng3" relationType="association">
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <join table="ng3_layered_construction" fromColumn="layered_constr_id" toColumn="id" toRole="parent">
</complexAttribute> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3"> </join>
<attribute column="enduse" type="string" path="." schema="ng3"/> </featureProperty>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
</featureType> </featureType>
<!-- Resources: Other Resource -->
<featureType id="ng3_OtherResourceType" table="ng3_resource" objectClassId="11074" path="OtherResource" schema="ng3"> <!-- Material Library -->
<extension base="ng3_AbstractResourceType"/> <featureType topLevel="true" id="ng3_MaterialLibraryType" table="ng3_library" objectClassId="11118" path="MaterialLibrary" schema="ng3">
<extension base="ng3_AbstractLibraryType"/>
<featureProperty target="ng3_AbstractMaterialType" path="libraryMember" schema="ng3" relationType="composition">
<join table="ng3_material" fromColumn="id" toColumn="library_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- Layered Construction Library -->
<featureType topLevel="true" id="ng3_LayeredConstructionLibraryType" table="ng3_library" objectClassId="11119" path="LayeredConstructionLibrary" schema="ng3">
<extension base="ng3_AbstractLibraryType"/>
<featureProperty target="ng3_AbstractLayeredConstructionType" path="libraryMember" schema="ng3" relationType="composition">
<join table="ng3_layered_construction" fromColumn="id" toColumn="library_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- ******************************** -->
<!-- Building module -->
<!-- ******************************** -->
<!-- Energy Performance Certificate -->
<featureType id="ng3_EnergyPerformanceCertificateType" table="ng3_energy_perf_cert" objectClassId="11020" path="EnergyPerformanceCertificate" schema="ng3">
<extension base="ng3_AbstractFeatureWithLifeSpanType">
<join table="ng3_cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3"> <complexAttribute maxOccurs="1" path="value" schema="ng3">
<attribute column="enduse" type="string" path="." schema="ng3"/> <attribute column="value" type="double" path="." schema="ng3"/>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="value_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute minOccurs="1" maxOccurs="1" column="label" type="string" path="label" schema="ng3"/>
<attribute maxOccurs="1" column="cert_method" type="string" path="certificationMethod" schema="ng3"/>
</featureType> </featureType>
<!-- Resources: Urban Space -->
<featureType id="ng3_UrbanSpaceType" table="ng3_resource" objectClassId="11075" path="UrbanSpace" schema="ng3"> <!-- Refurbishment Measure -->
<extension base="ng3_AbstractResourceType"/> <featureType id="ng3_RefurbishmentMeasureType" table="ng3_refurbishment_measure" objectClassId="11121" path="RefurbishmentMeasure" schema="ng3">
<extension base="ng3_AbstractFeatureWithLifeSpanType">
<join table="ng3_cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="status" schema="ng3">
<attribute column="enduse" type="string" path="." schema="ng3"/> <attribute column="status" type="string" path="." schema="ng3"/>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="status_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute column="start_date" type="date" maxOccurs="1" path="refurbishmentStartDate" schema="ng3"/>
<attribute column="end_date" type="date" maxOccurs="1" path="refurbishmentEndDate" schema="ng3"/>
</featureType> </featureType>
<!-- Resources: Waste -->
<featureType id="ng3_WasteType" table="ng3_resource" objectClassId="11076" path="Waste" schema="ng3"> <!-- Occupants -->
<extension base="ng3_AbstractResourceType"/> <featureType id="ng3_OccupantsType" table="ng3_occupants" objectClassId="11122" path="Occupants" schema="ng3">
<extension base="ng3_AbstractFeatureWithLifeSpanType">
<join table="ng3_cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3"> <attribute maxOccurs="1" column="num_of_occupants" type="integer" path="numberOfOccupants" schema="ng3"/>
<attribute column="enduse" type="string" path="." schema="ng3"/> <complexAttribute maxOccurs="1" path="heatDissipation" schema="ng3">
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="heat_diss" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute maxOccurs="1" column="is_dangerous" type="boolean" path="isDangerous" schema="ng3"/> <complexAttribute maxOccurs="1" path="heatDissipationConvectiveFraction" schema="ng3">
<attribute maxOccurs="1" column="is_recyclable" type="boolean" path="isRecyclable" schema="ng3"/> <attribute column="heat_diss_conv" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_conv_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationLatentFraction" schema="ng3">
<attribute column="heat_diss_lat" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_lat_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationRadiantFraction" schema="ng3">
<attribute column="heat_diss_rad" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_rad_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="averageDietType" schema="ng3">
<attribute column="avg_diet_type" type="string" path="." schema="ng3"/>
<attribute column="avg_diet_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="averageIncomeLevel" schema="ng3">
<attribute column="avg_income_level" type="string" path="." schema="ng3"/>
<attribute column="avg_income_level_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="averageInstructionLevel" schema="ng3">
<attribute column="avg_instr_level" type="string" path="." schema="ng3"/>
<attribute column="avg_instr_level_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<featureProperty maxOccurs="1" target="ng3_AbstractScheduleType" path="occupancyRate" schema="ng3" relationType="aggregation">
<join table="ng3_schedule" fromColumn="schedule_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType> </featureType>
<!-- Resources: Water -->
<featureType id="ng3_WaterType" table="ng3_resource" objectClassId="11077" path="Water" schema="ng3"> <!-- Abstract Building Space -->
<extension base="ng3_AbstractResourceType"/> <featureType abstract="true" id="ng3_AbstractBuildingSpaceType" table="ng3_space" objectClassId="11123" path="AbstractBuildingSpace" schema="ng3">
<extension base="ng3_AbstractCityObjectSpaceType"/>
<featureProperty target="ng3_OccupantsType" path="occupiedBy" schema="ng3" relationType="aggregation">
<join table="ng3_occupants" fromColumn="id" toColumn="space_id" toRole="child"/>
</featureProperty>
</featureType>
<!-- Building Unit -->
<featureType id="ng3_BuildingUnitType" table="ng3_space" objectClassId="11124" path="BuildingUnit" schema="ng3">
<extension base="ng3_AbstractBuildingSpaceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute minOccurs="1" maxOccurs="1" path="endUse" schema="ng3"> <attribute maxOccurs="1" column="num_of_rooms" type="integer" path="numberOfRooms" schema="ng3"/>
<attribute column="enduse" type="string" path="." schema="ng3"/> <attribute maxOccurs="1" column="owner_name" type="string" path="ownerName" schema="ng3"/>
<attribute column="enduse_codespace" type="string" path="@codespace" schema="gml"/> <complexAttribute maxOccurs="1" path="ownershipType" schema="ng3">
<attribute column="ownership_type" type="string" path="." schema="ng3"/>
<attribute column="ownership_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<featureProperty target="AddressType" path="address" schema="ng3" relationType="association">
<joinTable table="ng3_address_to_building_unit">
<join table="ng3_space" fromColumn="space_id" toColumn="id" toRole="parent"/>
<inverseJoin table="address" fromColumn="address_id" toColumn="id" toRole="parent"/>
</joinTable>
</featureProperty>
<featureProperty target="ng3_EnergyPerformanceCertificateType" path="energyPerformanceCertificate" schema="ng3" relationType="composition">
<join table="ng3_energy_perf_cert" fromColumn="id" toColumn="space_id" toRole="child"/>
</featureProperty>
<featureProperty target="ng3_RefurbishmentMeasureType" path="refurbishmentMeasure" schema="ng3" relationType="composition">
<join table="ng3_refurbishment_measure" fromColumn="id" toColumn="space_id" toRole="child"/>
</featureProperty>
</featureType> </featureType>
<!-- Abstract Building Partition -->
<featureType abstract="true" id="ng3_AbstractBuildingPartitionType" table="ng3_building_partition" objectClassId="11080" path="AbstractBuildingPartition" schema="ng3"> <!-- Abstract Zone Opening -->
<extension base="AbstractCityObjectType"> <featureType abstract="true" id="ng3_AbstractZoneOpeningType" table="ng3_zone_opening" objectClassId="11131" path="AbstractZoneOpening" schema="ng3">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <extension base="AbstractOpeningType">
<join table="opening" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
<complexProperty refType="ng3_QualifiedAreaType" path="area" schema="ng3">
<join table="ng3_qualified_attribute" fromColumn="id" toColumn="building_partition_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<complexProperty refType="ng3_QualifiedVolumeType" path="volume" schema="ng3">
<join table="ng3_qualified_attribute" fromColumn="id" toColumn="building_partition_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</complexProperty>
<geometryProperty maxOccurs="1" lod="1" refColumn="lod1_solid_id" type="AbstractSolid" path="lod1Solid" schema="ng3"/>
<geometryProperty maxOccurs="1" lod="2" refColumn="lod2_solid_id" type="AbstractSolid" path="lod2Solid" schema="ng3"/>
<geometryProperty maxOccurs="1" lod="3" refColumn="lod3_solid_id" type="AbstractSolid" path="lod3Solid" schema="ng3"/>
</featureType> </featureType>
<!-- Abstract Thermal Zone -->
<featureType abstract="true" id="ng3_AbstractThermalZoneType" table="ng3_building_partition" objectClassId="11045" path="AbstractThermalZone" schema="ng3"> <!-- Abstract Zone Door -->
<extension base="ng3_AbstractBuildingPartitionType"/> <featureType id="ng3_ZoneDoorType" table="ng3_zone_opening" objectClassId="11132" path="ZoneDoor" schema="ng3">
<featureProperty target="ng3_AbstractUsageZoneType" path="usageZone" schema="ng3" relationType="association"> <extension base="ng3_AbstractZoneOpeningType"/>
<join table="ng3_building_partition" fromColumn="id" toColumn="thermal_zone_id" toRole="child"> </featureType>
<!-- Abstract Zone Window -->
<featureType id="ng3_ZoneWindowType" table="ng3_zone_opening" objectClassId="11133" path="ZoneWindow" schema="ng3">
<extension base="ng3_AbstractZoneOpeningType"/>
</featureType>
<!-- Abstract Zone Boundary Surface -->
<featureType abstract="true" id="ng3_AbstractZoneBoundarySurfaceType" table="ng3_zone_thematic_surface" objectClassId="11141" path="AbstractZoneBoundarySurface" schema="ng3">
<extension base="AbstractBoundarySurfaceType">
<join table="thematic_surface" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<featureProperty target="ng3_AbstractZoneOpeningType" path="zoneOpening" schema="ng3" relationType="composition">
<join table="ng3_zone_opening" fromColumn="id" toColumn="zone_them_surf_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
</featureType> </featureType>
<!-- Thermal Zone -->
<featureType id="ng3_ThermalZoneType" table="ng3_building_partition" objectClassId="11081" path="ThermalZone" schema="ng3">
<extension base="ng3_AbstractThermalZoneType"/>
<complexAttribute maxOccurs="1" path="heatCapacity" schema="ng3">
<attribute column="heat_capacity" type="double" path="." schema="ng3"/>
<attribute column="heat_capacity_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="infiltrationRate" schema="ng3">
<attribute column="infiltration_rate" type="double" path="." schema="ng3"/>
<attribute column="infiltration_rate_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<attribute minOccurs="1" maxOccurs="1" column="is_cooled" type="boolean" path="isCooled" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="is_heated" type="boolean" path="isHeated" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="coincides_with_lod2_hull" type="boolean" path="coincidesWithLod2Hull" schema="ng3"/>
<attribute minOccurs="1" maxOccurs="1" column="coincides_with_lod3_hull" type="boolean" path="coincidesWithLod3Hull" schema="ng3"/>
<featureProperty target="AbstractBoundarySurfaceType" path="thermalBoundary" schema="ng3" relationType="composition">
<joinTable table="ng3_them_surf_to_thermal_zone">
<join table="ng3_building_partition" fromColumn="thermal_zone_id" toColumn="id" toRole="parent"/>
<inverseJoin table="thematic_surface" fromColumn="thematic_surface_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</inverseJoin>
</joinTable>
</featureProperty>
<!-- To be tested: Improved version that does not require the association table -->
<!--
<featureProperty target="AbstractBoundarySurfaceType" path="thermalBoundary" schema="ng3">
<joinTable table="ng3_thematic_surface">
<join table="ng3_building_partition" fromColumn="id" toColumn="thermal_zone_id" toRole="parent"/>
<inverseJoin table="thematic_surface" fromColumn="id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</inverseJoin>
</joinTable>
</featureProperty>
-->
</featureType>
<!-- Attic Floor Surface --> <!-- Zone Attic Floor Surface -->
<featureType id="ng3_AtticFloorSurfaceType" table="thematic_surface" objectClassId="11082" path="AtticFloorSurface" schema="ng3"> <featureType id="ng3_AtticFloorSurfaceType" table="ng3_zone_thematic_surface" objectClassId="11142" path="AtticFloorSurface" schema="ng3">
<extension base="AbstractBoundarySurfaceType"/> <extension base="ng3_AbstractZoneBoundarySurfaceType"/>
</featureType> </featureType>
<!-- Basement Ceiling Surface --> <!-- Zone Basement Ceiling Surface -->
<featureType id="ng3_BasementCeilingSurfaceType" table="thematic_surface" objectClassId="11083" path="BasementCeilingSurface" schema="ng3"> <featureType id="ng3_BasementCeilingSurfaceType" table="ng3_zone_thematic_surface" objectClassId="11143" path="BasementCeilingSurface" schema="ng3">
<extension base="AbstractBoundarySurfaceType"/> <extension base="ng3_AbstractZoneBoundarySurfaceType"/>
</featureType>
<!-- Zone Closure Surface -->
<featureType id="ng3_ZoneClosureSurfaceType" table="ng3_zone_thematic_surface" objectClassId="11144" path="ZoneClosureSurface" schema="ng3">
<extension base="ng3_AbstractZoneBoundarySurfaceType"/>
</featureType>
<!-- Zone Exterior Wall Surface -->
<featureType id="ng3_ZoneExteriorWallSurfaceType" table="ng3_zone_thematic_surface" objectClassId="11145" path="ZoneExteriorWallSurface" schema="ng3">
<extension base="ng3_AbstractZoneBoundarySurfaceType"/>
</featureType>
<!-- Zone Ground Surface -->
<featureType id="ng3_ZoneGroundSurfaceType" table="ng3_zone_thematic_surface" objectClassId="11146" path="ZoneGroundSurface" schema="ng3">
<extension base="ng3_AbstractZoneBoundarySurfaceType"/>
</featureType> </featureType>
<!-- Intermediate Floor Surface -->
<featureType id="ng3_IntermediateFloorSurfaceType" table="thematic_surface" objectClassId="11084" path="IntermediateFloorSurface" schema="ng3"> <!-- Zone Intermediate Floor Surface -->
<extension base="AbstractBoundarySurfaceType"/> <featureType id="ng3_IntermediateFloorSurfaceType" table="ng3_zone_thematic_surface" objectClassId="11147" path="IntermediateFloorSurface" schema="ng3">
<extension base="ng3_AbstractZoneBoundarySurfaceType"/>
</featureType> </featureType>
<!-- Party Wall Surface -->
<featureType id="ng3_PartyWallSurfaceType" table="thematic_surface" objectClassId="11085" path="PartyWallSurface" schema="ng3"> <!-- Zone Roof Surface -->
<extension base="AbstractBoundarySurfaceType"/> <featureType id="ng3_ZoneRoofSurfaceType" table="ng3_zone_thematic_surface" objectClassId="11148" path="ZoneRoofSurface" schema="ng3">
<extension base="ng3_AbstractZoneBoundarySurfaceType"/>
</featureType> </featureType>
<!-- Abstract Usage Zone -->
<featureType abstract="true" id="ng3_AbstractUsageZoneType" table="ng3_building_partition" objectClassId="11090" path="AbstractUsageZone" schema="ng3"> <!-- Zone Underground Wall Surface -->
<extension base="ng3_AbstractBuildingPartitionType"/> <featureType id="ng3_ZoneUndergroundWallSurfaceType" table="ng3_zone_thematic_surface" objectClassId="11149" path="ZoneUndergroundWallSurface" schema="ng3">
<featureProperty target="ng3_AbstractBuildingUnitType" path="buildingUnit" schema="ng3" relationType="association"> <extension base="ng3_AbstractZoneBoundarySurfaceType"/>
<join table="ng3_building_partition" fromColumn="id" toColumn="usage_zone_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType> </featureType>
<!-- Usage Zone -->
<featureType id="ng3_UsageZoneType" table="ng3_building_partition" objectClassId="11091" path="UsageZone" schema="ng3"> <!-- Abstract Zone -->
<extension base="ng3_AbstractUsageZoneType"/> <featureType abstract="true" id="ng3_AbstractZoneType" table="ng3_space" objectClassId="11151" path="AbstractZone" schema="ng3">
<extension base="ng3_AbstractBuildingSpaceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute column="is_primary" type="boolean" maxOccurs="1" path="isPrimary" schema="ng3"/> <attribute maxOccurs="1" column="is_cooled" type="boolean" path="isCooled" schema="ng3"/>
<attribute column="num_of_building_units" type="integer" maxOccurs="1" path="numberOfBuildingUnits" schema="ng3"/> <attribute maxOccurs="1" column="is_heated" type="boolean" path="isHeated" schema="ng3"/>
<attribute maxOccurs="1" column="is_mech_ventilated" type="boolean" path="isMechanicallyVentilated" schema="ng3"/>
<complexAttribute maxOccurs="1" path="infiltrationRate" schema="ng3">
<attribute column="infiltration_rate" type="double" path="." schema="ng3"/>
<attribute column="infiltration_rate_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatCapacity" schema="ng3">
<attribute column="heat_capacity" type="double" path="." schema="ng3"/>
<attribute column="heat_capacity_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="internalHeatGains" schema="ng3"> <complexAttribute maxOccurs="1" path="internalHeatGains" schema="ng3">
<attribute column="int_heat_gains" type="double" path="." schema="ng3"/> <attribute column="int_heat_gains" type="double" path="." schema="ng3"/>
<attribute column="int_heat_gains_uom" type="string" path="@uom" schema="gml"/> <attribute column="int_heat_gains_uom" type="string" path="@uom" schema="gml"/>
...@@ -858,184 +1301,81 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -858,184 +1301,81 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute column="int_heat_gains_rad" type="double" path="." schema="ng3"/> <attribute column="int_heat_gains_rad" type="double" path="." schema="ng3"/>
<attribute column="int_heat_gains_rad_uom" type="string" path="@uom" schema="gml"/> <attribute column="int_heat_gains_rad_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<featureProperty maxOccurs="1" target="ng3_AbstractScheduleType" path="coolingSchedule" schema="ng3" relationType="aggregation"> <attribute minOccurs="1" maxOccurs="1" column="coincides_with_lod2_hull" type="boolean" path="coincidesWithLod2Hull" schema="ng3"/>
<join table="ng3_schedule" fromColumn="cooling_schedule_id" toColumn="id" toRole="parent"> <attribute minOccurs="1" maxOccurs="1" column="coincides_with_lod3_hull" type="boolean" path="coincidesWithLod3Hull" schema="ng3"/>
<featureProperty target="ng3_AbstractScheduleType" maxOccurs="1" path="heatingSchedule" schema="ng3" relationType="aggregation">
<join table="ng3_schedule" fromColumn="heat_schedule_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
<featureProperty maxOccurs="1" target="ng3_AbstractScheduleType" path="heatingSchedule" schema="ng3" relationType="aggregation"> <featureProperty target="ng3_AbstractScheduleType" maxOccurs="1" path="coolingSchedule" schema="ng3" relationType="aggregation">
<join table="ng3_schedule" fromColumn="heating_schedule_id" toColumn="id" toRole="parent"> <join table="ng3_schedule" fromColumn="cool_schedule_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
<featureProperty maxOccurs="1" target="ng3_AbstractScheduleType" path="ventilationSchedule" schema="ng3" relationType="aggregation"> <featureProperty target="ng3_AbstractScheduleType" maxOccurs="1" path="mechanicalVentilationSchedule" schema="ng3" relationType="aggregation">
<join table="ng3_schedule" fromColumn="ventilation_schedule_id" toColumn="id" toRole="parent"> <join table="ng3_schedule" fromColumn="mech_vent_schedule_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
<featureProperty target="ng3_OccupantsType" path="occupiedBy" schema="ng3" relationType="aggregation"> <featureProperty target="ng3_BuildingUnitType" path="buildingUnit" schema="ng3" relationType="association">
<join table="ng3_occupants" fromColumn="id" toColumn="building_partition_id" toRole="child"/> <join table="ng3_space" fromColumn="id" toColumn="building_unit_id" toRole="child"/>
</featureProperty>
</featureType>
<!-- Abstract Building Unit -->
<featureType abstract="true" id="ng3_AbstractBuildingUnitType" table="ng3_building_partition" objectClassId="11092" path="AbstractBuildingUnit" schema="ng3">
<extension base="ng3_AbstractBuildingPartitionType"/>
</featureType>
<!-- Building Unit -->
<featureType id="ng3_BuildingUnitType" table="ng3_building_partition" objectClassId="11093" path="BuildingUnit" schema="ng3">
<extension base="ng3_AbstractBuildingUnitType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="num_of_rooms" type="integer" path="numberOfRooms" schema="ng3"/>
<attribute maxOccurs="1" column="owner_name" type="string" path="ownerName" schema="ng3"/>
<complexAttribute maxOccurs="1" path="ownershipType" schema="ng3">
<attribute column="ownership_type" type="string" path="." schema="ng3"/>
<attribute column="ownership_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<featureProperty target="AddressType" path="address" schema="ng3" relationType="association">
<joinTable table="ng3_address_to_building_unit">
<join table="ng3_building_partition" fromColumn="building_unit_id" toColumn="id" toRole="parent"/>
<inverseJoin table="address" fromColumn="address_id" toColumn="id" toRole="parent"/>
</joinTable>
</featureProperty>
<featureProperty target="ng3_EnergyPerformanceCertificateType" path="energyPerformanceCertificate" schema="ng3" relationType="composition">
<join table="ng3_energy_perf_cert" fromColumn="id" toColumn="building_partition_id" toRole="child"/>
</featureProperty>
<featureProperty target="ng3_RefurbishmentMeasureType" path="refurbishmentMeasure" schema="ng3" relationType="composition">
<join table="ng3_refurbishment_measure" fromColumn="id" toColumn="building_partition_id" toRole="child"/>
</featureProperty>
<featureProperty target="ng3_OccupantsType" path="occupiedBy" schema="ng3" relationType="aggregation">
<join table="ng3_occupants" fromColumn="id" toColumn="building_partition_id" toRole="child"/>
</featureProperty> </featureProperty>
</featureType> <featureProperty target="ng3_AbstractZoneBoundarySurfaceType" path="zoneBoundary" schema="ng3" relationType="composition">
<join table="ng3_zone_thematic_surface" fromColumn="id" toColumn="space_id" toRole="child">
<!-- Occupants -->
<featureType id="ng3_OccupantsType" table="ng3_occupants" objectClassId="11094" path="Occupants" schema="ng3">
<extension base="AbstractFeatureType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="type" type="string" path="." schema="ng3"/>
</complexAttribute>
<attribute maxOccurs="1" column="num_of_occupants" type="integer" path="numberOfOccupants" schema="ng3"/>
<complexAttribute maxOccurs="1" path="heatDissipation" schema="ng3">
<attribute column="heat_diss" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationConvectiveFraction" schema="ng3">
<attribute column="heat_diss_conv" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_conv_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationLatentFraction" schema="ng3">
<attribute column="heat_diss_lat" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_lat_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationRadiantFraction" schema="ng3">
<attribute column="heat_diss_rad" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_rad_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="averageDietType" schema="ng3">
<attribute column="avg_diet_type" type="string" path="." schema="ng3"/>
<attribute column="avg_diet_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="averageIncomeLevel" schema="ng3">
<attribute column="avg_income_level" type="string" path="." schema="ng3"/>
<attribute column="avg_income_level_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="averageInstructionLevel" schema="ng3">
<attribute column="avg_instr_level" type="string" path="." schema="ng3"/>
<attribute column="avg_instr_level_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<featureProperty maxOccurs="1" target="ng3_AbstractScheduleType" path="occupancyRate" schema="ng3" relationType="aggregation">
<join table="ng3_schedule" fromColumn="schedule_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
</featureType> </featureType>
<!-- Device Operation -->
<featureType id="ng3_DeviceOperationType" table="ng3_device_operation" objectClassId="11100" path="DeviceOperation" schema="ng3"> <!-- Zone -->
<extension base="AbstractFeatureType"> <featureType id="ng3_ZoneType" table="ng3_space" objectClassId="11152" path="Zone" schema="ng3">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <extension base="ng3_AbstractZoneType"/>
</extension> <featureProperty target="ng3_ZonePartType" path="zonePart" schema="ng3">
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <join table="ng3_space" fromColumn="id" toColumn="space_id" toRole="child">
<attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="yearly_global_efficiency" type="double" path="yearlyGlobalEfficiency" schema="ng3"/>
<featureProperty maxOccurs="1" target="ng3_AbstractScheduleType" path="schedule" schema="ng3" relationType="aggregation">
<join table="ng3_schedule" fromColumn="schedule_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
</featureType> </featureType>
<!-- Abstract Device -->
<featureType abstract="true" id="ng3_AbstractDeviceType" table="ng3_device" objectClassId="11101" path="AbstractDevice" schema="ng3"> <!-- Zone Part -->
<extension base="AbstractCityObjectType"> <featureType id="ng3_ZonePartType" table="ng3_space" objectClassId="11153" path="ZonePart" schema="ng3">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/> <extension base="ng3_AbstractZoneType"/>
</extension>
<attribute maxOccurs="1" column="model" type="string" path="model" schema="ng3"/>
<attribute maxOccurs="1" column="year_of_manufacture" type="integer" path="yearOfManufacture" schema="ng3"/>
<attribute maxOccurs="1" column="num_of_devices" type="integer" path="numberOfDevices" schema="ng3"/>
<complexAttribute maxOccurs="1" path="installedPower" schema="ng3">
<attribute column="installed_power" type="double" path="." schema="ng3"/>
<attribute column="installed_power_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="nominalEfficiency" schema="ng3">
<attribute column="nominal_efficiency" type="double" path="." schema="ng3"/>
<attribute column="nominal_efficiency_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="efficiency_indicator" type="string" path="efficiencyIndicator" schema="ng3"/>
<complexAttribute maxOccurs="1" path="heatDissipation" schema="ng3">
<attribute column="heat_diss" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationConvectiveFraction" schema="ng3">
<attribute column="heat_diss_conv" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_conv_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationLatentFraction" schema="ng3">
<attribute column="heat_diss_lat" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_lat_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="heatDissipationRadiantFraction" schema="ng3">
<attribute column="heat_diss_rad" type="double" path="." schema="ng3"/>
<attribute column="heat_diss_rad_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<featureProperty target="ng3_DeviceOperationType" path="deviceOperation" schema="ng3" relationType="aggregation">
<join table="ng3_device_operation" fromColumn="id" toColumn="device_id" toRole="child"/>
</featureProperty>
</featureType> </featureType>
<!-- ******************************** -->
<!-- Devices module -->
<!-- ******************************** -->
<!-- Boiler --> <!-- Boiler -->
<featureType id="ng3_BoilerType" table="ng3_device" objectClassId="11102" path="Boiler" schema="ng3"> <featureType id="ng3_BoilerType" table="ng3_device" objectClassId="11161" path="Boiler" schema="ng3">
<extension base="ng3_AbstractDeviceType"/> <extension base="ng3_AbstractDeviceType"/>
<attribute column="has_condensation" type="boolean" minOccurs="1" maxOccurs="1" path="hasCondensation" schema="ng3"/> <attribute column="has_condensation" type="boolean" minOccurs="1" maxOccurs="1" path="hasCondensation" schema="ng3"/>
</featureType> </featureType>
<!-- Generic Device --> <!-- Generic Device -->
<featureType id="ng3_GenericDeviceType" table="ng3_device" objectClassId="11103" path="GenericDevice" schema="ng3"> <featureType id="ng3_GenericDeviceType" table="ng3_device" objectClassId="11162" path="GenericDevice" schema="ng3">
<extension base="ng3_AbstractDeviceType"/> <extension base="ng3_AbstractDeviceType"/>
</featureType> </featureType>
<!-- Generic Electrical Device --> <!-- Generic Electrical Device -->
<featureType id="ng3_GenericElectricalDeviceType" table="ng3_device" objectClassId="11104" path="GenericElectricalDevice" schema="ng3"> <featureType id="ng3_GenericElectricalDeviceType" table="ng3_device" objectClassId="11163" path="GenericElectricalDevice" schema="ng3">
<extension base="ng3_AbstractDeviceType"/> <extension base="ng3_AbstractDeviceType"/>
</featureType> </featureType>
<!-- Lighting Device --> <!-- Lighting Device -->
<featureType id="ng3_LightingDeviceType" table="ng3_device" objectClassId="11105" path="LightingDevice" schema="ng3"> <featureType id="ng3_LightingDeviceType" table="ng3_device" objectClassId="11164" path="LightingDevice" schema="ng3">
<extension base="ng3_AbstractDeviceType"/> <extension base="ng3_AbstractDeviceType"/>
</featureType> </featureType>
<!-- Heat Pump --> <!-- Heat Pump -->
<featureType id="ng3_HeatPumpType" table="ng3_device" objectClassId="11106" path="HeatPump" schema="ng3"> <featureType id="ng3_HeatPumpType" table="ng3_device" objectClassId="11165" path="HeatPump" schema="ng3">
<extension base="ng3_AbstractDeviceType"/> <extension base="ng3_AbstractDeviceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="heatSource" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="heatSource" schema="ng3">
<attribute column="heat_source" type="string" path="." schema="ng3"/> <attribute column="heat_source" type="string" path="." schema="ng3"/>
...@@ -1051,8 +1391,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1051,8 +1391,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</featureType> </featureType>
<!-- Movable Shading Device --> <!-- Movable Shading Device -->
<featureType id="ng3_MovableShadingDeviceType" table="ng3_device" objectClassId="11107" path="MovableShadingDevice" schema="ng3"> <featureType id="ng3_MovableShadingDeviceType" table="ng3_device" objectClassId="11166" path="MovableShadingDevice" schema="ng3">
<extension base="ng3_AbstractDeviceType"/> <extension base="ng3_AbstractDeviceType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="type" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
...@@ -1070,8 +1411,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1070,8 +1411,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexProperty> </complexProperty>
</featureType> </featureType>
<!-- Electrical Storage Device --> <!-- Electrical Storage Device -->
<featureType id="ng3_ElectricalStorageDeviceType" table="ng3_storage_device" objectClassId="11108" path="ElectricalStorageDevice" schema="ng3"> <featureType id="ng3_ElectricalStorageDeviceType" table="ng3_storage_device" objectClassId="11167" path="ElectricalStorageDevice" schema="ng3">
<extension base="ng3_AbstractDeviceType"> <extension base="ng3_AbstractDeviceType">
<join table="ng3_device" fromColumn="id" toColumn="id" toRole="parent"/> <join table="ng3_device" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
...@@ -1085,8 +1427,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1085,8 +1427,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</featureType> </featureType>
<!-- Thermal Storage Device --> <!-- Thermal Storage Device -->
<featureType id="ng3_ThermalStorageDeviceType" table="ng3_storage_device" objectClassId="11109" path="ThermalStorageDevice" schema="ng3"> <featureType id="ng3_ThermalStorageDeviceType" table="ng3_storage_device" objectClassId="11168" path="ThermalStorageDevice" schema="ng3">
<extension base="ng3_AbstractDeviceType"> <extension base="ng3_AbstractDeviceType">
<join table="ng3_device" fromColumn="id" toColumn="id" toRole="parent"/> <join table="ng3_device" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
...@@ -1108,8 +1451,15 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1108,8 +1451,15 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</featureType> </featureType>
<!-- Generic Storage Device -->
<featureType id="ng3_GenericStorageDeviceType" table="ng3_storage_device" objectClassId="11169" path="GenericStorageDevice" schema="ng3">
<extension base="ng3_AbstractDeviceType"/>
</featureType>
<!-- Abstract Solar Collector --> <!-- Abstract Solar Collector -->
<featureType abstract="true" id="ng3_AbstractSolarCollectorType" table="ng3_solar_collector" objectClassId="11110" path="AbstractSolarCollector" schema="ng3"> <featureType abstract="true" id="ng3_AbstractSolarCollectorType" table="ng3_solar_collector" objectClassId="11170" path="AbstractSolarCollector" schema="ng3">
<extension base="ng3_AbstractDeviceType"> <extension base="ng3_AbstractDeviceType">
<join table="ng3_device" fromColumn="id" toColumn="id" toRole="parent"/> <join table="ng3_device" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
...@@ -1133,13 +1483,15 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1133,13 +1483,15 @@ https://3d.bk.tudelft.nl/gagugiaro/
<geometryProperty maxOccurs="1" lod="3" refColumn="lod3_multi_surface_id" type="MultiSurface" path="lod3MultiSurface" schema="ng3"/> <geometryProperty maxOccurs="1" lod="3" refColumn="lod3_multi_surface_id" type="MultiSurface" path="lod3MultiSurface" schema="ng3"/>
</featureType> </featureType>
<!-- Generic Solar Collector --> <!-- Generic Solar Collector -->
<featureType id="ng3_GenericSolarCollectorType" table="ng3_solar_collector" objectClassId="11111" path="GenericSolarCollector" schema="ng3"> <featureType id="ng3_GenericSolarCollectorType" table="ng3_solar_collector" objectClassId="11171" path="GenericSolarCollector" schema="ng3">
<extension base="ng3_AbstractSolarCollectorType"/> <extension base="ng3_AbstractSolarCollectorType"/>
</featureType> </featureType>
<!-- Photovoltaic Collector --> <!-- Photovoltaic Collector -->
<featureType id="ng3_PhotovoltaicCollectorType" table="ng3_solar_collector" objectClassId="11112" path="PhotovoltaicCollector" schema="ng3"> <featureType id="ng3_PhotovoltaicCollectorType" table="ng3_solar_collector" objectClassId="11172" path="PhotovoltaicCollector" schema="ng3">
<extension base="ng3_AbstractSolarCollectorType"/> <extension base="ng3_AbstractSolarCollectorType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="cellType" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="cellType" schema="ng3">
<attribute column="cell_type" type="string" path="." schema="ng3"/> <attribute column="cell_type" type="string" path="." schema="ng3"/>
...@@ -1147,8 +1499,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1147,8 +1499,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute> </complexAttribute>
</featureType> </featureType>
<!-- Solar Thermal Collector --> <!-- Solar Thermal Collector -->
<featureType id="ng3_SolarThermalCollectorType" table="ng3_solar_collector" objectClassId="11113" path="SolarThermalCollector" schema="ng3"> <featureType id="ng3_SolarThermalCollectorType" table="ng3_solar_collector" objectClassId="11173" path="SolarThermalCollector" schema="ng3">
<extension base="ng3_AbstractSolarCollectorType"/> <extension base="ng3_AbstractSolarCollectorType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="collectorType" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="collectorType" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
...@@ -1162,8 +1515,9 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1162,8 +1515,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute maxOccurs="1" column="quad_heat_loss_coeff" type="double" path="quadraticHeatLossCoefficient" schema="ng3"/> <attribute maxOccurs="1" column="quad_heat_loss_coeff" type="double" path="quadraticHeatLossCoefficient" schema="ng3"/>
</featureType> </featureType>
<!-- Photovoltaic Thermal Collector --> <!-- Photovoltaic Thermal Collector -->
<featureType id="ng3_PhotovoltaicThermalCollectorType" table="ng3_solar_collector" objectClassId="11114" path="PhotovoltaicThermalCollector" schema="ng3"> <featureType id="ng3_PhotovoltaicThermalCollectorType" table="ng3_solar_collector" objectClassId="11174" path="PhotovoltaicThermalCollector" schema="ng3">
<extension base="ng3_AbstractSolarCollectorType"/> <extension base="ng3_AbstractSolarCollectorType"/>
<complexAttribute minOccurs="1" maxOccurs="1" path="collectorType" schema="ng3"> <complexAttribute minOccurs="1" maxOccurs="1" path="collectorType" schema="ng3">
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
...@@ -1181,8 +1535,12 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1181,8 +1535,12 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute maxOccurs="1" column="quad_heat_loss_coeff" type="double" path="quadraticHeatLossCoefficient" schema="ng3"/> <attribute maxOccurs="1" column="quad_heat_loss_coeff" type="double" path="quadraticHeatLossCoefficient" schema="ng3"/>
</featureType> </featureType>
<!-- ******************************** -->
<!-- Urban Function Area module -->
<!-- ******************************** -->
<!-- Urban Function Area --> <!-- Urban Function Area -->
<featureType id="ng3_UrbanFunctionAreaType" table="ng3_urban_function_area" objectClassId="11120" topLevel="true" path="UrbanFunctionArea" schema="ng3"> <featureType topLevel="true" id="ng3_UrbanFunctionAreaType" table="ng3_urban_function_area" objectClassId="12001" path="UrbanFunctionArea" schema="ng3">
<extension base="CityObjectGroupType"> <extension base="CityObjectGroupType">
<join table="cityobjectgroup" fromColumn="id" toColumn="id" toRole="parent"/> <join table="cityobjectgroup" fromColumn="id" toColumn="id" toRole="parent"/>
</extension> </extension>
...@@ -1194,54 +1552,24 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1194,54 +1552,24 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute column="code" type="string" path="." schema="ng3"/> <attribute column="code" type="string" path="." schema="ng3"/>
<attribute column="code_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="code_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
</featureType> <complexAttribute maxOccurs="1" path="area" schema="ng3">
<attribute column="area" type="double" path="." schema="ng3"/>
<!-- Weather Station --> <attribute column="area_uom" type="string" path="@uom" schema="gml"/>
<featureType id="ng3_WeatherStationType" table="cityobject" objectClassId="11130" topLevel="true" path="WeatherStation" schema="ng3">
<extension base="AbstractCityObjectType"/>
</featureType>
<!-- Abstract Library -->
<featureType abstract="true" id="ng3_AbstractLibraryType" table="ng3_library" objectClassId="11140" path="AbstractLibrary" schema="ng3">
<extension base="AbstractCityObjectType">
<join table="cityobject" fromColumn="id" toColumn="id" toRole="parent"/>
</extension>
<complexAttribute maxOccurs="1" path="type" schema="ng3">
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
<attribute column="type" type="string" path="." schema="ng3"/>
</complexAttribute> </complexAttribute>
<attribute maxOccurs="1" column="source" type="string" path="source" schema="ng3"/>
<attribute maxOccurs="1" column="author" type="string" path="author" schema="ng3"/>
</featureType> </featureType>
<!-- Layered Construction Library --> <!-- ******************************** -->
<featureType id="ng3_LayeredConstructionLibraryType" table="ng3_library" objectClassId="11141" topLevel="true" path="LayeredConstructionLibrary" schema="ng3"> <!-- Weather Station module -->
<extension base="ng3_AbstractLibraryType"/> <!-- ******************************** -->
<featureProperty target="ng3_AbstractLayeredConstructionType" path="libraryMember" schema="ng3" relationType="composition">
<join table="ng3_layered_construction" fromColumn="id" toColumn="library_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType>
<!-- Material Library --> <!-- Weather Data -->
<featureType id="ng3_MaterialLibraryType" table="ng3_library" objectClassId="11142" topLevel="true" path="MaterialLibrary" schema="ng3"> <featureType id="ng3_WeatherDataType" table="ng3_sensordata" objectClassId="12011" path="WeatherData" schema="ng3">
<extension base="ng3_AbstractLibraryType"/> <extension base="ng3_SensorDataType"/>
<featureProperty target="ng3_AbstractMaterialType" path="libraryMember" schema="ng3" relationType="composition">
<join table="ng3_material" fromColumn="id" toColumn="library_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType> </featureType>
<!-- Schedule Library --> <!-- Weather Station -->
<featureType id="ng3_ScheduleLibraryType" table="ng3_library" objectClassId="11143" topLevel="true" path="ScheduleLibrary" schema="ng3"> <featureType topLevel="true" id="ng3_WeatherStationType" table="cityobject" objectClassId="12012" path="WeatherStation" schema="ng3">
<extension base="ng3_AbstractLibraryType"/> <extension base="AbstractCityObjectType"/>
<featureProperty target="ng3_AbstractScheduleType" path="libraryMember" schema="ng3" relationType="composition">
<join table="ng3_schedule" fromColumn="id" toColumn="library_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
</featureType> </featureType>
</featureTypes> </featureTypes>
...@@ -1252,14 +1580,25 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1252,14 +1580,25 @@ https://3d.bk.tudelft.nl/gagugiaro/
<!-- ADE _CityObject --> <!-- ADE _CityObject -->
<propertyInjection table="ng3_cityobject" defaultBase="AbstractCityObjectType"> <propertyInjection table="ng3_cityobject" defaultBase="AbstractCityObjectType">
<join table="ng3_cityobject" fromColumn="id" toColumn="id" toRole="child"/> <join table="ng3_cityobject" fromColumn="id" toColumn="id" toRole="child"/>
<complexAttribute maxOccurs="1" path="permanentIdentifier" schema="ng3">
<attribute column="perm_identifier" type="string" path="." schema="ng3"/>
<attribute column="perm_identifier_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<attribute maxOccurs="1" column="validfrom" type="timestamp" path="validFrom" schema="ng3"/>
<attribute maxOccurs="1" column="validto" type="timestamp" path="validTo" schema="ng3"/>
<complexProperty refType="ng3_CityObjectRelationType" path="relatedTo" schema="ng3"> <complexProperty refType="ng3_CityObjectRelationType" path="relatedTo" schema="ng3">
<join table="ng3_ctyobj_relation" fromColumn="id" toColumn="ng3_cityobject_id" toRole="child"/> <join table="ng3_ctyobj_relation" fromColumn="id" toColumn="ng3_cityobject_id" toRole="child"/>
</complexProperty> </complexProperty>
<featureProperty target="ng3_UtilityNetworkConnectionType" path="utilityNetworkConnection" schema="ng3" relationType="composition"> <featureProperty target="ng3_UtilityNetworkConnectionType" path="utilityNetworkConnection" schema="ng3" relationType="composition">
<join table="ng3_utl_ntw_connection" fromColumn="id" toColumn="cityobject_id" toRole="child"/> <join table="ng3_utl_ntw_connection" fromColumn="id" toColumn="cityobject_id" toRole="child"/>
</featureProperty> </featureProperty>
<featureProperty maxOccurs="1" target="ng3_AbstractLayeredConstructionType" path="layeredConstruction" schema="ng3" relationType="association"> <!-- could be "aggregation" --> <featureProperty maxOccurs="1" target="ng3_AbstractLayeredConstructionType" path="layeredConstruction" schema="ng3" relationType="composition">
<join table="ng3_layered_construction" fromColumn="layered_construction_id" toColumn="id" toRole="parent"> <join table="ng3_layered_construction" fromColumn="layered_constr_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty>
<featureProperty maxOccurs="1" target="ng3_AbstractLayeredConstructionType" path="librarylayeredConstruction" schema="ng3" relationType="aggregation">
<join table="ng3_layered_construction" fromColumn="lib_layered_constr_id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
...@@ -1276,12 +1615,13 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1276,12 +1615,13 @@ https://3d.bk.tudelft.nl/gagugiaro/
<complexProperty refType="ng3_SuitabilityType" path="suitability" schema="ng3"> <complexProperty refType="ng3_SuitabilityType" path="suitability" schema="ng3">
<join table="ng3_suitability" fromColumn="id" toColumn="cityobject_id" toRole="child"/> <join table="ng3_suitability" fromColumn="id" toColumn="cityobject_id" toRole="child"/>
</complexProperty> </complexProperty>
<featureProperty target="ng3_WeatherDataType" path="weatherData" schema="ng3" relationType="composition"> <featureProperty target="ng3_SensorDataType" path="sensorData" schema="ng3" relationType="composition">
<join table="ng3_weather_data" fromColumn="id" toColumn="cityobject_id" toRole="child"/> <join table="ng3_sensor_data" fromColumn="id" toColumn="cityobject_id" toRole="child"/>
</featureProperty> </featureProperty>
<geometryProperty inlineColumn="ref_point" type="Point" path="referencePoint" schema="ng3"/> <geometryProperty inlineColumn="ref_point" type="Point" path="referencePoint" schema="ng3"/>
</propertyInjection> </propertyInjection>
<!-- ADE Building --> <!-- ADE Building -->
<propertyInjection table="ng3_building" defaultBase="AbstractBuildingType"> <propertyInjection table="ng3_building" defaultBase="AbstractBuildingType">
<join table="ng3_building" fromColumn="id" toColumn="id" toRole="child"/> <join table="ng3_building" fromColumn="id" toColumn="id" toRole="child"/>
...@@ -1289,6 +1629,11 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1289,6 +1629,11 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute column="type" type="string" path="." schema="ng3"/> <attribute column="type" type="string" path="." schema="ng3"/>
<attribute column="type_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute maxOccurs="1" column="owner_name" type="string" path="bdgOwnerName" schema="ng3"/>
<complexAttribute maxOccurs="1" path="bdgOwnershipType" schema="ng3">
<attribute column="ownership_type" type="string" path="." schema="ng3"/>
<attribute column="ownership_type_codespace" type="string" path="@codespace" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="bdgConstructionWeight" schema="ng3"> <complexAttribute maxOccurs="1" path="bdgConstructionWeight" schema="ng3">
<attribute column="constr_weight" type="string" path="." schema="ng3"/> <attribute column="constr_weight" type="string" path="." schema="ng3"/>
<attribute column="constr_weight_codespace" type="string" path="@codespace" schema="gml"/> <attribute column="constr_weight_codespace" type="string" path="@codespace" schema="gml"/>
...@@ -1311,49 +1656,37 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1311,49 +1656,37 @@ https://3d.bk.tudelft.nl/gagugiaro/
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</complexProperty> </complexProperty>
<featureProperty target="ng3_RefurbishmentMeasureType" path="refurbishmentMeasure" schema="ng3" relationType="composition">
<join table="ng3_refurbishment_measure" fromColumn="id" toColumn="building_id" toRole="child"/>
</featureProperty>
<featureProperty target="ng3_EnergyPerformanceCertificateType" path="energyPerformanceCertificate" schema="ng3" relationType="composition"> <featureProperty target="ng3_EnergyPerformanceCertificateType" path="energyPerformanceCertificate" schema="ng3" relationType="composition">
<join table="ng3_energy_perf_cert" fromColumn="id" toColumn="building_id" toRole="child"/> <join table="ng3_energy_perf_cert" fromColumn="id" toColumn="building_id" toRole="child"/>
</featureProperty> </featureProperty>
<featureProperty target="ng3_AbstractBuildingUnitType" path="buildingUnit" schema="ng3" relationType="composition"> <featureProperty target="ng3_RefurbishmentMeasureType" path="refurbishmentMeasure" schema="ng3" relationType="composition">
<join table="ng3_building_partition" fromColumn="id" toColumn="building_id" toRole="child"> <join table="ng3_refurbishment_measure" fromColumn="id" toColumn="building_id" toRole="child"/>
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join>
</featureProperty> </featureProperty>
<featureProperty target="ng3_AbstractThermalZoneType" path="thermalZone" schema="ng3" relationType="composition"> <featureProperty target="ng3_BuildingUnitType" path="buildingUnit" schema="ng3" relationType="composition">
<join table="ng3_building_partition" fromColumn="id" toColumn="building_id" toRole="child"> <join table="ng3_space" fromColumn="id" toColumn="building_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
<featureProperty target="ng3_AbstractUsageZoneType" path="usageZone" schema="ng3" relationType="composition"> <featureProperty target="ng3_AbstractZoneType" path="zone" schema="ng3" relationType="composition">
<join table="ng3_building_partition" fromColumn="id" toColumn="building_id" toRole="child"> <join table="ng3_space" fromColumn="id" toColumn="building_id" toRole="child">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/> <condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</join> </join>
</featureProperty> </featureProperty>
</propertyInjection> </propertyInjection>
<!-- (Building) ADE _BoundarySurface --> <!-- (Building) ADE _BoundarySurface -->
<propertyInjection table="ng3_thematic_surface" defaultBase="AbstractBoundarySurfaceType"> <propertyInjection table="ng3_thematic_surface" defaultBase="AbstractBoundarySurfaceType">
<join table="ng3_thematic_surface" fromColumn="id" toColumn="id" toRole="child"/> <join table="ng3_thematic_surface" fromColumn="id" toColumn="id" toRole="child"/>
<complexAttribute maxOccurs="1" path="bdgBdrySurfAzimuth" schema="ng3"> <attribute maxOccurs="1" column="is_shared" type="boolean" path="bdgBdrySurfIsAdiabatic" schema="ng3"/>
<attribute column="azimuth" type="double" path="." schema="ng3"/> <complexAttribute maxOccurs="1" path="bdgBdrySurfThickness" schema="ng3">
<attribute column="azimuth_uom" type="string" path="@uom" schema="gml"/> <attribute column="thickness" type="double" path="." schema="ng3"/>
</complexAttribute> <attribute column="thickness_uom" type="string" path="@uom" schema="gml"/>
<complexAttribute maxOccurs="1" path="bdgBdrySurfGroundViewFactor" schema="ng3">
<attribute column="ground_view_factor" type="double" path="." schema="ng3"/>
<attribute column="ground_view_factor_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfHeatCapacity" schema="ng3">
<attribute column="heat_capacity" type="double" path="." schema="ng3"/>
<attribute column="heat_capacity_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfInclination" schema="ng3"> <complexAttribute maxOccurs="1" path="bdgBdrySurfTotalSurfaceArea" schema="ng3">
<attribute column="inclination" type="double" path="." schema="ng3"/> <attribute column="total_surf_area" type="double" path="." schema="ng3"/>
<attribute column="inclination_uom" type="string" path="@uom" schema="gml"/> <attribute column="total_surf_area_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<attribute maxOccurs="1" column="is_adiabatic" type="boolean" path="bdgBdrySurfIsAdiabatic" schema="ng3"/>
<complexAttribute maxOccurs="1" path="bdgBdrySurfOpaqueSurfaceArea" schema="ng3"> <complexAttribute maxOccurs="1" path="bdgBdrySurfOpaqueSurfaceArea" schema="ng3">
<attribute column="opaque_surf_area" type="double" path="." schema="ng3"/> <attribute column="opaque_surf_area" type="double" path="." schema="ng3"/>
<attribute column="opaque_surf_area_uom" type="string" path="@uom" schema="gml"/> <attribute column="opaque_surf_area_uom" type="string" path="@uom" schema="gml"/>
...@@ -1362,20 +1695,29 @@ https://3d.bk.tudelft.nl/gagugiaro/ ...@@ -1362,20 +1695,29 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute column="open_to_surf_ration" type="double" path="." schema="ng3"/> <attribute column="open_to_surf_ration" type="double" path="." schema="ng3"/>
<attribute column="open_to_surf_ration_uom" type="string" path="@uom" schema="gml"/> <attribute column="open_to_surf_ration_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfAzimuth" schema="ng3">
<attribute column="azimuth" type="double" path="." schema="ng3"/>
<attribute column="azimuth_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfInclination" schema="ng3">
<attribute column="inclination" type="double" path="." schema="ng3"/>
<attribute column="inclination_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfHeatCapacity" schema="ng3">
<attribute column="heat_capacity" type="double" path="." schema="ng3"/>
<attribute column="heat_capacity_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfGroundViewFactor" schema="ng3">
<attribute column="ground_view_factor" type="double" path="." schema="ng3"/>
<attribute column="ground_view_factor_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfSkyViewFactor" schema="ng3"> <complexAttribute maxOccurs="1" path="bdgBdrySurfSkyViewFactor" schema="ng3">
<attribute column="sky_view_factor" type="double" path="." schema="ng3"/> <attribute column="sky_view_factor" type="double" path="." schema="ng3"/>
<attribute column="sky_view_factor_uom" type="string" path="@uom" schema="gml"/> <attribute column="sky_view_factor_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute> </complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfThickness" schema="ng3">
<attribute column="thickness" type="double" path="." schema="ng3"/>
<attribute column="thickness_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
<complexAttribute maxOccurs="1" path="bdgBdrySurfTotalSurfaceArea" schema="ng3">
<attribute column="total_surf_area" type="double" path="." schema="ng3"/>
<attribute column="total_surf_area_uom" type="string" path="@uom" schema="gml"/>
</complexAttribute>
</propertyInjection> </propertyInjection>
<!-- (Building) ADE _Opening --> <!-- (Building) ADE _Opening -->
<propertyInjection table="ng3_opening" defaultBase="AbstractOpeningType"> <propertyInjection table="ng3_opening" defaultBase="AbstractOpeningType">
<join table="ng3_opening" fromColumn="id" toColumn="id" toRole="child"/> <join table="ng3_opening" fromColumn="id" toColumn="id" toRole="child"/>
......
...@@ -10,7 +10,7 @@ import org.citydb.core.query.filter.projection.ProjectionFilter; ...@@ -10,7 +10,7 @@ import org.citydb.core.query.filter.projection.ProjectionFilter;
import org.citygml4j.ade.energy3.model.core.*; import org.citygml4j.ade.energy3.model.core.*;
import org.citygml4j.ade.energy3.model.module.EnergyADEModule; import org.citygml4j.ade.energy3.model.module.EnergyADEModule;
import org.citygml4j.model.citygml.building.AbstractBuilding; import org.citygml4j.model.citygml.building.AbstractBuilding;
import org.sig3d.citygml.energyADE3beta7.ThermalStatusValueType; import org.sig3d.citygml.energyADE3beta8.ThermalStatusValueType;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
......
...@@ -25,7 +25,7 @@ public class CityObjectPropertiesExporter implements ADEExporter { ...@@ -25,7 +25,7 @@ public class CityObjectPropertiesExporter implements ADEExporter {
private final CityGMLExportHelper helper; private final CityGMLExportHelper helper;
private final ExportManager manager; private final ExportManager manager;
private final Connection connection; private final Connection connection;
private WeatherDataExporter weatherDataExporter; //private WeatherDataExporter weatherDataExporter;
private ResourceExporter resourceExporter; private ResourceExporter resourceExporter;
private String module; private String module;
...@@ -41,7 +41,7 @@ public class CityObjectPropertiesExporter implements ADEExporter { ...@@ -41,7 +41,7 @@ public class CityObjectPropertiesExporter implements ADEExporter {
module = EnergyADEModule.v3_0.getNamespaceURI(); module = EnergyADEModule.v3_0.getNamespaceURI();
ps = connection.prepareStatement(select); ps = connection.prepareStatement(select);
weatherDataExporter = manager.getExporter(WeatherDataExporter.class); // weatherDataExporter = manager.getExporter(WeatherDataExporter.class);
resourceExporter = manager.getExporter(ResourceExporter.class); resourceExporter = manager.getExporter(ResourceExporter.class);
} }
...@@ -52,12 +52,12 @@ public class CityObjectPropertiesExporter implements ADEExporter { ...@@ -52,12 +52,12 @@ public class CityObjectPropertiesExporter implements ADEExporter {
Collection<AbstractCityObject> result = new ArrayList<>(); Collection<AbstractCityObject> result = new ArrayList<>();
while (rs.next()) { while (rs.next()) {
Object pointObj = rs.getObject(2); Object pointObj = rs.getObject(2);
if (projectionFilter.containsProperty("weatherData", module)) { // if (projectionFilter.containsProperty("weatherData", module)) {
for (WeatherData weatherData : weatherDataExporter.doExport(objectId)) { // for (WeatherData weatherData : weatherDataExporter.doExport(objectId)) {
WeatherDataProperty property = new WeatherDataProperty(weatherData); // WeatherDataProperty property = new WeatherDataProperty(weatherData);
cityObject.addGenericApplicationPropertyOfCityObject(property); // cityObject.addGenericApplicationPropertyOfCityObject(property);
} // }
} // }
if (projectionFilter.containsProperty("resource", module)) { if (projectionFilter.containsProperty("resource", module)) {
for (AbstractResource resource : resourceExporter.doExport(objectId)) { for (AbstractResource resource : resourceExporter.doExport(objectId)) {
......
...@@ -48,8 +48,8 @@ public class ExportManager implements ADEExportManager { ...@@ -48,8 +48,8 @@ public class ExportManager implements ADEExportManager {
public void exportObject(ADEModelObject object, long objectId, AbstractObjectType<?> objectType, ProjectionFilter projectionFilter) throws CityGMLExportException, SQLException { public void exportObject(ADEModelObject object, long objectId, AbstractObjectType<?> objectType, ProjectionFilter projectionFilter) throws CityGMLExportException, SQLException {
if (object instanceof WeatherStation) if (object instanceof WeatherStation)
getExporter(WeatherStationExporter.class).doExport((WeatherStation) object, objectId, objectType, projectionFilter); getExporter(WeatherStationExporter.class).doExport((WeatherStation) object, objectId, objectType, projectionFilter);
else if (object instanceof WeatherData) // else if (object instanceof WeatherData)
getExporter(WeatherDataExporter.class).doExport(objectId); // getExporter(WeatherDataExporter.class).doExport(objectId);
else if (object instanceof UrbanFunctionArea) else if (object instanceof UrbanFunctionArea)
getExporter(UrbanFunctionAreaExporter.class).doExport((UrbanFunctionArea) object, objectId, objectType, projectionFilter); getExporter(UrbanFunctionAreaExporter.class).doExport((UrbanFunctionArea) object, objectId, objectType, projectionFilter);
else if (object instanceof AbstractTimeSeries) else if (object instanceof AbstractTimeSeries)
...@@ -96,8 +96,8 @@ public class ExportManager implements ADEExportManager { ...@@ -96,8 +96,8 @@ public class ExportManager implements ADEExportManager {
exporter = new WeatherStationExporter(connection, helper, this); exporter = new WeatherStationExporter(connection, helper, this);
else if (type == ResourceExporter.class) else if (type == ResourceExporter.class)
exporter = new ResourceExporter(connection, helper, this); exporter = new ResourceExporter(connection, helper, this);
else if (type == WeatherDataExporter.class) // else if (type == WeatherDataExporter.class)
exporter = new WeatherDataExporter(connection, helper, this); // exporter = new WeatherDataExporter(connection, helper, this);
else if (type == CityObjectPropertiesExporter.class) else if (type == CityObjectPropertiesExporter.class)
exporter = new CityObjectPropertiesExporter(connection, helper, this); exporter = new CityObjectPropertiesExporter(connection, helper, this);
else if (type == BuildingPropertiesExporter.class) else if (type == BuildingPropertiesExporter.class)
......
...@@ -10,7 +10,7 @@ import org.citygml4j.ade.energy3.model.core.AbstractResource; ...@@ -10,7 +10,7 @@ import org.citygml4j.ade.energy3.model.core.AbstractResource;
import org.citygml4j.ade.energy3.model.supportingClasses.*; import org.citygml4j.ade.energy3.model.supportingClasses.*;
import org.citygml4j.model.gml.basicTypes.Code; import org.citygml4j.model.gml.basicTypes.Code;
import org.citygml4j.model.gml.basicTypes.Measure; import org.citygml4j.model.gml.basicTypes.Measure;
import org.sig3d.citygml.energyADE3beta7.ResourceStatusValueType; import org.sig3d.citygml.energyADE3beta8.ResourceStatusValueType;
import java.sql.*; import java.sql.*;
import java.util.ArrayList; import java.util.ArrayList;
......
package de.stuttgart.hft.ade.energy3.exporter; //package de.stuttgart.hft.ade.energy3.exporter;
//
import de.stuttgart.hft.ade.energy3.schema.ADETable; //import de.stuttgart.hft.ade.energy3.schema.ADETable;
import org.citydb.config.geometry.GeometryObject; //import org.citydb.config.geometry.GeometryObject;
import org.citydb.core.ade.exporter.ADEExporter; //import org.citydb.core.ade.exporter.ADEExporter;
import org.citydb.core.ade.exporter.CityGMLExportHelper; //import org.citydb.core.ade.exporter.CityGMLExportHelper;
import org.citydb.core.database.schema.mapping.ObjectType; //import org.citydb.core.database.schema.mapping.ObjectType;
import org.citydb.core.operation.exporter.CityGMLExportException; //import org.citydb.core.operation.exporter.CityGMLExportException;
import org.citydb.core.operation.exporter.database.content.GMLConverter; //import org.citydb.core.operation.exporter.database.content.GMLConverter;
import org.citydb.core.query.filter.projection.CombinedProjectionFilter; //import org.citydb.core.query.filter.projection.CombinedProjectionFilter;
import org.citydb.core.query.filter.projection.ProjectionFilter; //import org.citydb.core.query.filter.projection.ProjectionFilter;
import org.citydb.sqlbuilder.expression.PlaceHolder; //import org.citydb.sqlbuilder.expression.PlaceHolder;
import org.citydb.sqlbuilder.schema.Table; //import org.citydb.sqlbuilder.schema.Table;
import org.citydb.sqlbuilder.select.Select; //import org.citydb.sqlbuilder.select.Select;
import org.citydb.sqlbuilder.select.operator.comparison.ComparisonFactory; //import org.citydb.sqlbuilder.select.operator.comparison.ComparisonFactory;
import org.citygml4j.ade.energy3.model.core.ReferencePointProperty; //import org.citygml4j.ade.energy3.model.core.ReferencePointProperty;
import org.citygml4j.ade.energy3.model.core.WeatherData; //import org.citygml4j.ade.energy3.model.core.WeatherData;
import org.citygml4j.ade.energy3.model.module.EnergyADEModule; //import org.citygml4j.ade.energy3.model.module.EnergyADEModule;
import org.citygml4j.ade.energy3.model.supportingClasses.AbstractTimeSeries; //import org.citygml4j.ade.energy3.model.supportingClasses.AbstractTimeSeries;
import org.citygml4j.ade.energy3.model.supportingClasses.AbstractTimeSeriesProperty; //import org.citygml4j.ade.energy3.model.supportingClasses.AbstractTimeSeriesProperty;
import org.citygml4j.model.gml.basicTypes.Code; //import org.citygml4j.model.gml.basicTypes.Code;
import org.citygml4j.model.gml.basicTypes.Measure; //import org.citygml4j.model.gml.basicTypes.Measure;
import org.citygml4j.model.gml.geometry.primitives.Point; //import org.citygml4j.model.gml.geometry.primitives.Point;
import org.citygml4j.model.gml.geometry.primitives.PointProperty; //import org.citygml4j.model.gml.geometry.primitives.PointProperty;
//
import java.sql.Connection; //import java.sql.Connection;
import java.sql.PreparedStatement; //import java.sql.PreparedStatement;
import java.sql.ResultSet; //import java.sql.ResultSet;
import java.sql.SQLException; //import java.sql.SQLException;
import java.util.ArrayList; //import java.util.ArrayList;
import java.util.Collection; //import java.util.Collection;
//
public class WeatherDataExporter implements ADEExporter { //public class WeatherDataExporter implements ADEExporter {
//
private final CityGMLExportHelper helper; // private final CityGMLExportHelper helper;
private final int objectClassId; // private final int objectClassId;
//
private PreparedStatement ps; // private PreparedStatement ps;
private TimeSeriesExporter timeSeriesExporter; // private TimeSeriesExporter timeSeriesExporter;
private GMLConverter gmlConverter; // private GMLConverter gmlConverter;
private String module; // private String module;
//
public WeatherDataExporter(Connection connection, CityGMLExportHelper helper, ExportManager manager) throws CityGMLExportException, SQLException { // public WeatherDataExporter(Connection connection, CityGMLExportHelper helper, ExportManager manager) throws CityGMLExportException, SQLException {
this.helper = helper; // this.helper = helper;
objectClassId = manager.getObjectMapper().getObjectClassId(WeatherData.class); // objectClassId = manager.getObjectMapper().getObjectClassId(WeatherData.class);
//
String tableName = manager.getSchemaMapper().getTableName(ADETable.WEATHER_DATA); // //String tableName = manager.getSchemaMapper().getTableName(ADETable.WEATHER_DATA);
CombinedProjectionFilter projectionFilter = helper.getCombinedProjectionFilter(tableName); //// CombinedProjectionFilter projectionFilter = helper.getCombinedProjectionFilter(tableName);
module = EnergyADEModule.v3_0.getNamespaceURI(); //// module = EnergyADEModule.v3_0.getNamespaceURI();
////
Table table = new Table(helper.getTableNameWithSchema(tableName)); //// Table table = new Table(helper.getTableNameWithSchema(tableName));
//
Select select = new Select().addProjection( // Select select = new Select().addProjection(
table.getColumn("id"), // table.getColumn("id"),
table.getColumn("type"), // table.getColumn("type"),
table.getColumn("type_codespace"), // table.getColumn("type_codespace"),
table.getColumn("value_type"), // table.getColumn("value_type"),
table.getColumn("value_type_codespace"), // table.getColumn("value_type_codespace"),
table.getColumn("yearly_value"), // table.getColumn("yearly_value"),
table.getColumn("yearly_value_uom"), // table.getColumn("yearly_value_uom"),
table.getColumn("library_code"), // table.getColumn("library_code"),
table.getColumn("library_code_codespace"), // table.getColumn("library_code_codespace"),
table.getColumn("time_series_id"), // table.getColumn("time_series_id"),
table.getColumn("cityobject_id") // table.getColumn("cityobject_id")
); // );
//
if (projectionFilter.containsProperty("position", module)) // if (projectionFilter.containsProperty("position", module))
select.addProjection(table.getColumn("position")); // select.addProjection(table.getColumn("position"));
//
select.addSelection(ComparisonFactory.equalTo(table.getColumn("cityobject_id"), new PlaceHolder<>())); // select.addSelection(ComparisonFactory.equalTo(table.getColumn("cityobject_id"), new PlaceHolder<>()));
//
ps = connection.prepareStatement(select.toString()); // ps = connection.prepareStatement(select.toString());
//
timeSeriesExporter = manager.getExporter(TimeSeriesExporter.class); // timeSeriesExporter = manager.getExporter(TimeSeriesExporter.class);
gmlConverter = helper.getGMLConverter(); // gmlConverter = helper.getGMLConverter();
} // }
//
public Collection<WeatherData> doExport(long parentId) throws CityGMLExportException, SQLException { // public Collection<WeatherData> doExport(long parentId) throws CityGMLExportException, SQLException {
ps.setLong(1, parentId); // ps.setLong(1, parentId);
//
try (ResultSet rs = ps.executeQuery()) { // try (ResultSet rs = ps.executeQuery()) {
Collection<WeatherData> result = new ArrayList<>(); // Collection<WeatherData> result = new ArrayList<>();
//
while (rs.next()) { // while (rs.next()) {
long weatherDataId = rs.getLong(1); // long weatherDataId = rs.getLong(1);
//
WeatherData weatherData = helper.createObject(weatherDataId, objectClassId, WeatherData.class); // WeatherData weatherData = helper.createObject(weatherDataId, objectClassId, WeatherData.class);
if (weatherData == null) { // if (weatherData == null) {
helper.logOrThrowErrorMessage("Failed to instantiate " + helper.getObjectSignature(objectClassId, weatherDataId) + " as weather data object."); // helper.logOrThrowErrorMessage("Failed to instantiate " + helper.getObjectSignature(objectClassId, weatherDataId) + " as weather data object.");
continue; // continue;
} // }
//
ObjectType objectType = helper.getObjectType(objectClassId); // ObjectType objectType = helper.getObjectType(objectClassId);
ProjectionFilter projectionFilter = helper.getProjectionFilter(objectType); // ProjectionFilter projectionFilter = helper.getProjectionFilter(objectType);
//
weatherData.setId(String.valueOf(weatherDataId)); // weatherData.setId(String.valueOf(weatherDataId));
//
// Set type // // Set type
String typeValue = rs.getString(2); // String typeValue = rs.getString(2);
String typeCodeSpace = rs.getString(3); // String typeCodeSpace = rs.getString(3);
if (typeValue != null || typeCodeSpace != null) { // if (typeValue != null || typeCodeSpace != null) {
Code type = new Code(); // Code type = new Code();
type.setValue(typeValue); // type.setValue(typeValue);
type.setCodeSpace(typeCodeSpace); // type.setCodeSpace(typeCodeSpace);
type.setParent(weatherData); // type.setParent(weatherData);
weatherData.setType(type); // weatherData.setType(type);
} // }
//
// Set value type // // Set value type
String valueTypeValue = rs.getString(4); // String valueTypeValue = rs.getString(4);
String valueTypeCodeSpace = rs.getString(5); // String valueTypeCodeSpace = rs.getString(5);
if (valueTypeValue != null || valueTypeCodeSpace != null) { // if (valueTypeValue != null || valueTypeCodeSpace != null) {
Code valueType = new Code(); // Code valueType = new Code();
valueType.setValue(valueTypeValue); // valueType.setValue(valueTypeValue);
valueType.setCodeSpace(valueTypeCodeSpace); // valueType.setCodeSpace(valueTypeCodeSpace);
valueType.setParent(weatherData); // valueType.setParent(weatherData);
weatherData.setValueType(valueType); // weatherData.setValueType(valueType);
} // }
//
// Set yearly value and UOM // // Set yearly value and UOM
double yearlyValue = rs.getDouble(6); // double yearlyValue = rs.getDouble(6);
if (!rs.wasNull()) { // if (!rs.wasNull()) {
Measure yearlyMeasure = new Measure(); // Measure yearlyMeasure = new Measure();
yearlyMeasure.setValue(yearlyValue); // yearlyMeasure.setValue(yearlyValue);
String yearlyValueUom = rs.getString(7); // String yearlyValueUom = rs.getString(7);
if (yearlyValueUom != null) { // if (yearlyValueUom != null) {
yearlyMeasure.setUom(yearlyValueUom); // yearlyMeasure.setUom(yearlyValueUom);
} // }
yearlyMeasure.setParent(weatherData); // yearlyMeasure.setParent(weatherData);
weatherData.setYearlyValue(yearlyMeasure); // weatherData.setYearlyValue(yearlyMeasure);
} // }
//
// Set library code // // Set library code
String libraryCodeValue = rs.getString(8); // String libraryCodeValue = rs.getString(8);
String libraryCodeSpace = rs.getString(9); // String libraryCodeSpace = rs.getString(9);
if (libraryCodeValue != null || libraryCodeSpace != null) { // if (libraryCodeValue != null || libraryCodeSpace != null) {
Code libraryCode = new Code(); // Code libraryCode = new Code();
libraryCode.setValue(libraryCodeValue); // libraryCode.setValue(libraryCodeValue);
libraryCode.setCodeSpace(libraryCodeSpace); // libraryCode.setCodeSpace(libraryCodeSpace);
libraryCode.setParent(weatherData); // libraryCode.setParent(weatherData);
weatherData.setLibraryCode(libraryCode); // weatherData.setLibraryCode(libraryCode);
} // }
//
// Set time series // // Set time series
long timeSeriesId = rs.getLong(10); // long timeSeriesId = rs.getLong(10);
if (!rs.wasNull()) { // if (!rs.wasNull()) {
Collection<AbstractTimeSeries> timeSeries = timeSeriesExporter.doExport(timeSeriesId); // Collection<AbstractTimeSeries> timeSeries = timeSeriesExporter.doExport(timeSeriesId);
if (timeSeries != null && !timeSeries.isEmpty()) { // if (timeSeries != null && !timeSeries.isEmpty()) {
AbstractTimeSeries firstSeries = timeSeries.iterator().next(); // AbstractTimeSeries firstSeries = timeSeries.iterator().next();
weatherData.setTimeDependentValues(new AbstractTimeSeriesProperty(firstSeries)); // weatherData.setTimeDependentValues(new AbstractTimeSeriesProperty(firstSeries));
} // }
} // }
//
// Set position (if requested) // // Set position (if requested)
if (projectionFilter.containsProperty("position", module)) { // if (projectionFilter.containsProperty("position", module)) {
Object pointObj = rs.getObject("position"); // Object pointObj = rs.getObject("position");
if (pointObj != null) { // if (pointObj != null) {
try { // try {
GeometryObject point = helper.getDatabaseAdapter().getGeometryConverter().getPoint(pointObj); // GeometryObject point = helper.getDatabaseAdapter().getGeometryConverter().getPoint(pointObj);
if (point != null) { // if (point != null) {
Point gmlPoint = gmlConverter.getPoint(point); // Point gmlPoint = gmlConverter.getPoint(point);
PointProperty pointProperty = new PointProperty(gmlPoint); // PointProperty pointProperty = new PointProperty(gmlPoint);
ReferencePointProperty refPointProp = new ReferencePointProperty(pointProperty); // ReferencePointProperty refPointProp = new ReferencePointProperty(pointProperty);
weatherData.setPosition(refPointProp); // weatherData.setPosition(refPointProp);
} // }
} catch (Exception e) { // } catch (Exception e) {
// Skip invalid geometry to continue export // // Skip invalid geometry to continue export
} // }
} // }
} // }
//
result.add(weatherData); // result.add(weatherData);
} // }
//
return result; // return result;
} // }
} // }
//
@Override // @Override
public void close() throws CityGMLExportException, SQLException { // public void close() throws CityGMLExportException, SQLException {
ps.close(); // ps.close();
} // }
} //}
\ No newline at end of file \ No newline at end of file
...@@ -25,7 +25,7 @@ public class WeatherStationExporter implements ADEExporter { ...@@ -25,7 +25,7 @@ public class WeatherStationExporter implements ADEExporter {
private PreparedStatement ps; private PreparedStatement ps;
private TimeSeriesExporter timeSeriesExporter; private TimeSeriesExporter timeSeriesExporter;
private WeatherDataExporter weatherDataExporter; //private WeatherDataExporter weatherDataExporter;
private GMLConverter gmlConverter; private GMLConverter gmlConverter;
private String module; private String module;
...@@ -42,7 +42,7 @@ public class WeatherStationExporter implements ADEExporter { ...@@ -42,7 +42,7 @@ public class WeatherStationExporter implements ADEExporter {
ps = connection.prepareStatement(select.toString()); ps = connection.prepareStatement(select.toString());
timeSeriesExporter = manager.getExporter(TimeSeriesExporter.class); timeSeriesExporter = manager.getExporter(TimeSeriesExporter.class);
weatherDataExporter = manager.getExporter(WeatherDataExporter.class); //weatherDataExporter = manager.getExporter(WeatherDataExporter.class);
gmlConverter = helper.getGMLConverter(); gmlConverter = helper.getGMLConverter();
} }
......
...@@ -10,10 +10,10 @@ import org.citydb.core.database.schema.mapping.SchemaMapping; ...@@ -10,10 +10,10 @@ import org.citydb.core.database.schema.mapping.SchemaMapping;
import org.citydb.core.operation.importer.CityGMLImportException; import org.citydb.core.operation.importer.CityGMLImportException;
import org.citydb.core.operation.importer.util.GeometryConverter; import org.citydb.core.operation.importer.util.GeometryConverter;
import org.citydb.core.registry.ObjectRegistry; import org.citydb.core.registry.ObjectRegistry;
import org.sig3d.citygml.energyADE3beta7.AbstractQualifiedAttributeType; import org.sig3d.citygml.energyADE3beta8.AbstractQualifiedAttributeType;
import org.sig3d.citygml.energyADE3beta7.QualifiedAreaType; import org.sig3d.citygml.energyADE3beta8.QualifiedAreaType;
import org.sig3d.citygml.energyADE3beta7.QualifiedHeightType; import org.sig3d.citygml.energyADE3beta8.QualifiedHeightType;
import org.sig3d.citygml.energyADE3beta7.QualifiedVolumeType; import org.sig3d.citygml.energyADE3beta8.QualifiedVolumeType;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
......
...@@ -11,9 +11,9 @@ import org.citydb.core.operation.importer.CityGMLImportException; ...@@ -11,9 +11,9 @@ import org.citydb.core.operation.importer.CityGMLImportException;
import org.citydb.core.operation.importer.util.GeometryConverter; import org.citydb.core.operation.importer.util.GeometryConverter;
import org.citygml4j.ade.energy3.model.core.*; import org.citygml4j.ade.energy3.model.core.*;
import org.citygml4j.model.citygml.building.AbstractBuilding; import org.citygml4j.model.citygml.building.AbstractBuilding;
import org.sig3d.citygml.energyADE3beta7.QualifiedAreaType; import org.sig3d.citygml.energyADE3beta8.QualifiedAreaType;
import org.sig3d.citygml.energyADE3beta7.QualifiedHeightType; import org.sig3d.citygml.energyADE3beta8.QualifiedHeightType;
import org.sig3d.citygml.energyADE3beta7.QualifiedVolumeType; import org.sig3d.citygml.energyADE3beta8.QualifiedVolumeType;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
......
...@@ -31,10 +31,10 @@ public class WeatherDataImporter implements ADEImporter { ...@@ -31,10 +31,10 @@ public class WeatherDataImporter implements ADEImporter {
this.connection = connection; this.connection = connection;
this.helper = helper; this.helper = helper;
ps = connection.prepareStatement("insert into " + // ps = connection.prepareStatement("insert into " +
helper.getTableNameWithSchema(manager.getSchemaMapper().getTableName(ADETable.WEATHER_DATA)) + " " + // helper.getTableNameWithSchema(manager.getSchemaMapper().getTableName(ADETable.WEATHER_DATA)) + " " +
"(id, type, type_codespace, value_type, value_type_codespace, yearly_value, yearly_value_uom, library_code, library_code_codespace, time_series_id, cityObject_id, position) " + // "(id, type, type_codespace, value_type, value_type_codespace, yearly_value, yearly_value_uom, library_code, library_code_codespace, time_series_id, cityObject_id, position) " +
"values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); // "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
geometryConverter = helper.getGeometryConverter(); geometryConverter = helper.getGeometryConverter();
} }
......
...@@ -6,7 +6,7 @@ import org.citydb.core.ade.importer.ADEImporter; ...@@ -6,7 +6,7 @@ import org.citydb.core.ade.importer.ADEImporter;
public enum ADETable { public enum ADETable {
ADDRESS_TO_BUILDING_UNIT(null), ADDRESS_TO_BUILDING_UNIT(null),
BUILDING(BuildingPropertiesImporter.class), BUILDING(BuildingPropertiesImporter.class),
BUILDING_PARTITION(null), //BUILDING_PARTITION(null),
CITYOBJECT(CityObjectPropertiesImporter.class), CITYOBJECT(CityObjectPropertiesImporter.class),
CTYOBJ_RELATION(null), CTYOBJ_RELATION(null),
DEVICE(AbstractDeviceImporter.class), DEVICE(AbstractDeviceImporter.class),
...@@ -15,9 +15,9 @@ public enum ADETable { ...@@ -15,9 +15,9 @@ public enum ADETable {
//FACILITIES(null), //FACILITIES(null),
//HEAT_EXCHANGE_TYPE(null), //HEAT_EXCHANGE_TYPE(null),
//IMAGE_TEXTURE(null), //IMAGE_TEXTURE(null),
LAYER(null),
LAYERED_CONSTRUCTION(null), LAYERED_CONSTRUCTION(null),
//LAYER_COMPONENT(null), //LAYER_COMPONENT(null),
LAYER(null),
LIBRARY(null), LIBRARY(null),
MATERIAL(null), MATERIAL(null),
OCCUPANTS(null), OCCUPANTS(null),
...@@ -25,12 +25,14 @@ public enum ADETable { ...@@ -25,12 +25,14 @@ public enum ADETable {
OPTICAL_PROPERTY(null), OPTICAL_PROPERTY(null),
//PERIOD_OF_YEAR(null), //PERIOD_OF_YEAR(null),
QUALIFIED_ATTRIBUTE(AbstractQualifiedAttributeImporter.class), QUALIFIED_ATTRIBUTE(AbstractQualifiedAttributeImporter.class),
RESOURCE(ResourceImporter.class),
REFURBISHMENT_MEASURE(RefurbishmentMeasureImporter.class), REFURBISHMENT_MEASURE(RefurbishmentMeasureImporter.class),
RESOURCE(ResourceImporter.class),
SCHEDULE(null), SCHEDULE(null),
SCHEDULE_COMPONENT(null), SCHEDULE_COMPONENT(null),
SENSOR_DATA (null),
//SYSTEM_OPERATION(null), //SYSTEM_OPERATION(null),
SOLAR_COLLECTOR(null), SOLAR_COLLECTOR(null),
SPACE(null),
//STORAGE_SYSTEM(null), //STORAGE_SYSTEM(null),
STORAGE_DEVICE(null), STORAGE_DEVICE(null),
//SENSOR_CONNECTION(null), //SENSOR_CONNECTION(null),
...@@ -38,14 +40,16 @@ public enum ADETable { ...@@ -38,14 +40,16 @@ public enum ADETable {
SUITABILITY(null), SUITABILITY(null),
//THERMAL_BOUNDARY(null), //THERMAL_BOUNDARY(null),
//THERMAL_OPENING(null), //THERMAL_OPENING(null),
THEM_SURF_TO_THERMAL_ZONE(null), //THEM_SURF_TO_THERMAL_ZONE(null),
THEMATIC_SURFACE(null), THEMATIC_SURFACE(null),
//THERMAL_ZONE(null), //THERMAL_ZONE(null),
TIME_SERIES(TimeSeriesImporter.class), TIME_SERIES(TimeSeriesImporter.class),
URBAN_FUNCTION_AREA(UrbanFunctionAreaImporter.class), URBAN_FUNCTION_AREA(UrbanFunctionAreaImporter.class),
//USAGE_ZONE(null), //USAGE_ZONE(null),
UTL_NTW_CONNECTION(UtilityNetworkConnectionImporter.class), UTL_NTW_CONNECTION(UtilityNetworkConnectionImporter.class),
WEATHER_DATA(WeatherDataImporter.class); //WEATHER_DATA(WeatherDataImporter.class);
ZONE_OPENING(null),
ZONE_THEMATIC_SURFACE(null);
private Class<? extends ADEImporter> importerClass; private Class<? extends ADEImporter> importerClass;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment