// Generated by cimgen — do not edit by hand.
#![allow(clippy::all, dead_code, unused)]
use cimdecoder::CimDataset;
use crate::Violation;
use crate::helpers::*;
pub fn validate_p61970_600_2_equipment_ap_con_simple_shacl(dataset: &CimDataset) -> Vec<Violation> {
let mut v = Vec::new();
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_converter_dc_ter_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_terminal_bus_nam_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_sho_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_nam_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_ene_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_converter_dc_ter_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_dc_base_terminal_dc_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_dc_base_terminal_dc_n_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_converter_dc_ter_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_terminal_bus_nam_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_terminal_sequenc_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_des_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_m_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_converter_dc_ter_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_ac_line_segment_bch_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_conducting_equipment_base_voltag_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_ac_line_segment_gch_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_conductor_length_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_equipment_normally_in_service_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_ac_line_segment_r_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_ac_line_segment_x_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_equipment_equipment_container_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_conducting_equipment_base_voltag_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_operational_limit_operational_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_energy_iden_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_operational_limit_operational_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_operational_limit_operational_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_active_power_limit_normal_val_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_operational_limit_operational_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_name_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_descripti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_operational_limit_operation_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_short_nam_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_operational_limit_operation_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_m_rid_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_operational_limit_operation_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_energy_id_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_apparent_power_limit_normal_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_operational_limit_operation_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_rated_s_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_conducting_equipment_base_v_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_short_nam_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_descripti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_generating_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_equipment_equipment_contain_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_conducting_equipment_base_v_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_equipment_normally_in_servi_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_regulating_cond_eq_regulati_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_m_rid_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_asynchronous_machine_nomina_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_asynchronous_machine_nomina_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_rated_powe_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_name_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_rated_u_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_energy_id_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_base_voltage_nominal_voltage_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_description_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_equipment_normally_in_service_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_equipment_equipment_container_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_power_electronics_unit_max_p_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_battery_unit_rated_e_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_description_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_power_electronics_unit_min_p_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_energy_ident_code_eic_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bay_bay_voltage_level_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bay_bay_voltage_level_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_from_end_name_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_is_direct_current_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_is_excluded_from_a_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_to_end_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_to_end_iso_code_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_connectivity_node_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_energy_ident_co_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_connectivity_node_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_from_end_name_tso_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_from_end_iso_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_to_end_name_tso_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_conducting_equipment_base_voltage_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_switch_retained_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_switch_normal_open_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_conducting_equipment_base_voltage_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_energy_ident_code_eic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_switch_rated_current_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_bus_name_marker_reporting_group_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_bus_name_marker_reporting_group_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_bus_name_marker_priority_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_equipment_equipment_container_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_conducting_equipment_base_voltage_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_conducting_equipment_base_voltage_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_energy_ident_co_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_equipment_normally_in_service_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_energy_ident_code_e_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_clamp_ac_line_segment_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_conducting_equipment_base_voltage_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_energy_ident_code_eic_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_conducting_equipment_base_voltage_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_clamp_length_from_terminal1_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_clamp_ac_line_segment_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_energy_iden_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_m_rid_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_energy_id_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_descripti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_short_nam_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_name_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_conform_load_load_group_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_equipment_normally_in_service_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_load_response_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_qfixed_pct_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_pfixed_pct_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_pfixed_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_description_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_qfixed_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_equipment_equipment_container_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_load_response_has_v_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_conducting_equipment_base_voltage_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_conducting_equipment_base_voltage_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_conform_load_load_group_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_load_group_sub_load_area_has_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_energy_iden_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_load_group_sub_load_area_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_name_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_conform_load_schedule_conf_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_regular_interval_schedule_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_st_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_conform_load_schedule_conf_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_energy_i_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_season_day_type_schedule_d_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_va_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_descript_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_season_day_type_schedule_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_season_day_type_schedule_s_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_regular_interval_schedule_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_va_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_short_na_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_va_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_m_rid_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_va_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_st_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_regular_interval_schedule_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_season_day_type_schedule_d_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_short_name_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_connectivity_node_connectivity_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_connectivity_node_connectivity_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_control_area_energy_area_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_control_area_type_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_description_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_control_area_type_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_control_area_energy_area_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_e_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_control_area_genera_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_control_area_genera_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_control_area_genera_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_d_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_control_area_genera_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_pcc_terminal_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_switching_loss_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_number_of_valves_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_base_s_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_max_alpha_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_min_p_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_min_alpha_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_max_idc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_equipment_equipment_container_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_pcc_terminal_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_rated_udc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_description_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_min_gamma_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_min_idc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_equipment_normally_in_service_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_rated_idc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_idle_loss_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_conducting_equipment_base_voltage_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_resistive_loss_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_max_gamma_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_conducting_equipment_base_voltage_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_valve_u0_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_min_udc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_max_udc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_max_p_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_operational_limit_operational_limi_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_operational_limit_operational_limi_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_short_name_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_energy_ident_cod_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_operational_limit_operational_limi_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_operational_limit_operational_limi_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_current_limit_normal_value_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_energy_ide_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_descriptio_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_equipment_equipment_containe_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_equipment_normally_in_servic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_m_rid_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_auxiliary_equipment_terminal_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_auxiliary_equipment_terminal_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_y1value_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_y2value_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_xvalue_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_curve_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_curve_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_conducting_equipment_base_voltage_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_energy_ident_code_eic_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_cut_ac_line_segment_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_switch_retained_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_cut_length_from_terminal1_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_conducting_equipment_base_voltage_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_switch_normal_open_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_cut_ac_line_segment_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_switch_rated_current_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_energy_ident_code_e_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_dc_conducting_equipment_rated_udc_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_dc_conducting_equipment_rated_udc_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_energy_ident_code_ei_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_energy_ident_code_e_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_dc_conducting_equipment_rated_udc_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_dc_converter_unit_substation_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_dc_converter_unit_operation_mo_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_dc_converter_unit_substation_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_dc_converter_unit_operation_mo_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_short_name_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_equipment_equipment_container_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_dc_conducting_equipment_rated_ud_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_equipment_normally_in_service_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_dc_ground_inductance_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_dc_conducting_equipment_rated_udc_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_dc_ground_r_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_energy_ident_code_ei_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_dc_line_region_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_dc_line_region_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_energy_ident_code_eic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_line_segment_length_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_equipment_normally_in_service_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_line_segment_capacitance_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_line_segment_resistance_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_conducting_equipment_rated_ud_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_line_segment_inductance_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_equipment_equipment_container_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_energy_ident_code_eic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_dc_node_dc_equipment_container_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_dc_node_dc_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_dc_series_device_resistance_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_equipment_normally_in_service_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_dc_series_device_inductance_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_dc_conducting_equipment_rated_u_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_short_name_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_equipment_equipment_container_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_description_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_dc_shunt_resistance_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_dc_conducting_equipment_rated_udc_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_energy_ident_code_eic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_dc_shunt_capacitance_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_dc_conducting_equipment_rated_udc_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_energy_ident_code_ei_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_acdc_terminal_bus_name_marker_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_dc_terminal_dc_conducting_equipment_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_dc_base_terminal_dc_node_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_acdc_terminal_bus_name_marker_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_acdc_terminal_sequence_number_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_dc_base_terminal_dc_node_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_dc_terminal_dc_conducting_equipment_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_energy_ident_code_eic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_conducting_equipme_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_equipment_aggregat_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_equipment_equipmen_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_retained_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_normal_open_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_equipment_normally_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_rated_curre_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_conducting_equipme_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_conducting_equipment_base_voltage_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_switch_retained_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_equipment_equipment_container_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_switch_rated_current_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_description_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_equipment_normally_in_service_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_switch_normal_open_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_conducting_equipment_base_voltage_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_conducting_equipment_base_voltag_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_conducting_equipment_base_voltag_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_qfixed_pct_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_equipment_equipment_container_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_qfixed_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_pfixed_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_load_response_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_load_response_ha_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_equipment_normally_in_service_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_pfixed_pct_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_name_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_m_rid_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_descrip_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_short_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_short_name_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_conducting_equipment_base_voltage_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_equipment_normally_in_service_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_energy_scheduling_ty_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_p_max_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_energy_scheduling_ty_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_energy_ident_cod_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_conducting_equipment_base_voltage_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_p_min_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_equipment_equipment_container_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_nominal_voltage_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cut_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_equipment_equipment_contai_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_equipment_equipment_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_equipment_equipmen_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_equipment_equipment_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equipment_equipment_contain_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_equipment_equipment_conta_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_equipment_equipment_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_equipment_equipment_contai_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_equipment_equipment_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_equipment_equipment_containe_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_equipment_equipment_containe_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_equipment_equipment_cont_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_equipment_equipment_con_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_equipment_equipment_contain_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_equipment_equipment_containe_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_equipment_equipment_contain_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_equipment_equipment_contai_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_equipment_equipment_cont_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_equipment_equipment_containe_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_equipment_equipment_container_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_branch_x21_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_branch_r_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_conducting_equipment_base_volt_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_short_name_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_equipment_equivalen_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_branch_r21_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_conducting_equipment_base_volt_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_branch_x_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equipment_equipment_container_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_equipment_equivalen_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equipment_normally_in_service_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_reacti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_equipment_equiva_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_equipment_equiva_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_conducting_equipment_base_v_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equipment_normally_in_servi_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_m_rid_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equipment_equipment_contain_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_descripti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_name_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_min_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_reacti_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_regula_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_min_q_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_conducting_equipment_base_v_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_max_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_max_q_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_energy_id_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_short_nam_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_energy_iden_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_conducting_equipment_base_volta_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equivalent_equipment_equivalent_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equipment_normally_in_service_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_conducting_equipment_base_volta_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_description_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equivalent_shunt_b_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equipment_equipment_container_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_short_name_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equivalent_shunt_g_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equivalent_equipment_equivalent_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_m_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_equipment_normally_in_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_regulating_cond_eq_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_nam_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_conducting_equipment_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_des_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_conducting_equipment_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_ene_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_equipment_aggregate_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_equipment_equipment_c_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_sho_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_auxiliary_equipment_terminal_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_equipment_equipment_container_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_auxiliary_equipment_terminal_has_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_equipment_normally_in_service_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_fossil_fuel_fossil_fuel_type_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_fossil_fuel_fossil_fuel_type_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_fossil_fuel_thermal_generating_unit_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_fossil_fuel_thermal_generating_unit_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_switch_normal_open_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_conducting_equipment_base_voltage_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_switch_retained_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_switch_rated_current_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_energy_ident_code_eic_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_conducting_equipment_base_voltage_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_gen_control_sour_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_min_operating_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_governor_scd_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_equipment_normally_in_service_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_rated_net_max_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_total_efficiency_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_gen_control_sour_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_short_pf_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_equipment_equipment_container_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_long_pf_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_startup_cost_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_max_operating_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_rated_gross_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_variable_cost_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_startup_time_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_rated_gross_min_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_maximum_allowabl_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_nominal_p_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_energy_ide_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_descriptio_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_m_rid_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_gross_to_net_act_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_y2unit_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_curve_styl_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_x_unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_curve_styl_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_y2unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_y1unit_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_y1unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_x_unit_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_gross_to_net_act_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_energy_ident_code_eic_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_conducting_equipment_base_voltage_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_conducting_equipment_base_voltage_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_conducting_equipment_base_vo_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_m_rid_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_switch_retained_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_energy_ide_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_descriptio_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_switch_normal_open_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_equipment_normally_in_servic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_equipment_equipment_containe_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_switch_rated_current_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_conducting_equipment_base_vo_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_equipment_equipment_containe_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_m_rid_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_equipment_normally_in_servic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_energy_ide_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_conducting_equipment_base_vo_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_conducting_equipment_base_vo_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_descriptio_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_maximum_al_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_total_effi_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_ener_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_turb_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_max_operat_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_name_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_startup_co_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_descript_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_startup_ti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_m_rid_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_hydr_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_ener_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_rated_gros_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_rated_gros_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_long_pf_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_drop_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_equipment_equipment_contai_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_short_pf_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_rated_net_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_gen_contro_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_equipment_normally_in_serv_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_energy_i_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_hydr_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_min_operat_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_nominal_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_governor_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_variable_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_gen_contro_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_short_na_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_turb_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_hydro_power_plant_hydro_plant_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_short_name_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_hydro_power_plant_hydro_plant_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_hydro_pump_hydro_power_plant_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_energy_ident_code_e_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_hydro_pump_rotating_machine_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_hydro_pump_hydro_power_plant_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_hydro_pump_rotating_machine_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_switch_normal_open_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_energy_ident_code_eic_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_switch_rated_current_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_switch_retained_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_conducting_equipment_base_voltage_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_conducting_equipment_base_voltage_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_conducting_equipment_base_voltage_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_conducting_equipment_base_voltage_has_v_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_energy_ident_code_eic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_line_line_region_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_energy_ident_code_eic_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_line_line_region_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_energ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_norma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_maxim_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_nom_u_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_equipment_equipment_con_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_linear_shunt_compensato_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_equipment_aggregate_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_volta_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_linear_shunt_compensato_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_short_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_equipment_normally_in_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_a_vr_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_conducting_equipment_ba_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_groun_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_conducting_equipment_ba_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_descr_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_m_rid_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_regulating_cond_eq_regu_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_energy_ident_code_ei_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_equipment_equipment_container_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_switch_rated_current_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_conducting_equipment_base_volt_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_switch_normal_open_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_conducting_equipment_base_volt_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_short_name_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_switch_retained_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_equipment_normally_in_service_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_d_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_e_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_6(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_7(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_8(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_9(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_10(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_11(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_short_name_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_pfixed_pct_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_load_response_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_qfixed_pct_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_equipment_equipment_container_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_equipment_normally_in_service_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_load_response_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_non_conform_load_load_group_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_pfixed_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_conducting_equipment_base_volta_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_description_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_conducting_equipment_base_volta_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_non_conform_load_load_group_has_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_qfixed_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_short_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_m_rid_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_descrip_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_load_group_sub_load_area_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_name_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_load_group_sub_load_area_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_regular_interval_sched_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_season_day_type_schedu_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_non_conform_load_sched_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_regular_interval_sched_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_regular_interval_sched_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_shor_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_season_day_type_schedu_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_season_day_type_schedu_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_desc_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_non_conform_load_sched_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_m_ri_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_season_day_type_schedu_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_ener_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_6(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_na_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_regulating_cond_eq_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_conducting_equipment_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_vo_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_gr_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_sh_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_equipment_normally_i_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_de_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_conducting_equipment_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_equipment_aggregate_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_equipment_equipment_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_no_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_en_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_a_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_no_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_min_oper_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_short_pf_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_m_rid_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_nominal_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_short_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_equipment_equipment_cont_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_name_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_rated_gr_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_rated_ne_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_gen_cont_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_gen_cont_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_maximum_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_equipment_normally_in_se_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_startup_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_long_pf_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_variable_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_max_oper_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_total_ef_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_governor_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_rated_gr_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_equipment_aggregate_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_startup_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_descri_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_descript_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_name_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_short_na_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_energy_i_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_operational_limit_set_equi_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_m_rid_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_operational_limit_set_term_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_operational_limit_set_equi_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_operational_limit_set_term_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_name_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_di_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_is_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_di_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_short_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_descrip_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_ac_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_ki_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_m_rid_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_ki_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_short_name_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_conducting_equipment_base_voltage_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_equipment_equipment_container_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_energy_ident_cod_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_conducting_equipment_base_voltage_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_equipment_normally_in_service_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_ltc_f_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_neutr_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_neutr_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_high_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_low_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_tap_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_tap_c_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_6(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_norma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_neutral_u_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_neutral_ste_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_tap_changer_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_low_step_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_m_rid_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_descr_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_ltc_flag_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_high_step_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_linea_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_trans_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_short_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_linea_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_energ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_tap_changer_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_normal_step_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_trans_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_linea_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_tap_ch_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_neutra_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_tap_ch_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_high_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_ltc_fl_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_normal_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_neutra_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_low_st_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_name_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_short_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_descri_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_m_rid_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_phase_tap_changer_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_phase_tap_changer_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_phase_tap_changer_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_6(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_m_ri_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_ltc_flag_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_low_step_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_normal_ste_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_tap_change_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_phase_tap_changer_tabu_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_phase_tap_changer_tran_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_neutral_u_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_phase_tap_changer_tran_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_neutral_st_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_high_step_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_desc_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_tap_change_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_phase_tap_changer_tabu_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_shor_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_ener_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_equipment_equipment_container_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_power_electronics_unit_min_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_energy_iden_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_power_electronics_unit_max_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_equipment_normally_in_service_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_auxiliary_equipment_terminal_ha_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_auxiliary_equipment_terminal_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_description_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_equipment_equipment_container_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_short_name_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_equipment_normally_in_service_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_equipment_equipment_contai_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_equipment_normally_in_serv_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_m_rid_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_energy_i_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_short_na_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_name_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_auxiliary_equipment_termin_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_descript_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_auxiliary_equipment_termin_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_conducting_equipmen_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_e_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_conducting_equipmen_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_equipment_normally_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_regulating_cond_eq_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_equipment_equipment_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_d_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_equipment_aggregate_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_6(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_sh_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_power_electronics_un_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_equipment_equipment_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_de_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_equipment_normally_i_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_na_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_en_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_power_electronics_un_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_equipment_aggregate_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_equipment_normally_in_service_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_conducting_equipment_base_volt_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_equipment_equipment_container_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_short_name_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_conducting_equipment_base_volt_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_powe_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_energy_i_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_b_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_terminal_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_base_volta_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_descript_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_powe_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_rate_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_x_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_r_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_m_rid_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_base_volta_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_rate_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_terminal_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_conn_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_end_number_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_name_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_conn_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_g_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_short_na_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_short_name_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_ltc_flag_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_transformer_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_neutral_step_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_high_step_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_tap_changer_contro_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_step_voltage_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_ratio_tap_ch_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_low_step_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_transformer_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_neutral_u_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_tap_changer_contro_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_ratio_tap_ch_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_normal_step_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_descri_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_m_rid_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_short_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_name_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_ratio_tap_changer_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_ratio_tap_changer_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_6(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_curve_style_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_m_ri_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_desc_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_y1unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_ener_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_y2unit_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_y2unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_y1unit_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_x_unit_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_x_unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_shor_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_curve_style_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_interval_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_value2_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_value1_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_sequence_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_interval_s_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_regulating_cond_eq_r_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_regulating_cond_eq_regulati_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_regulating_cond_eq_regu_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_regulating_cond_eq_re_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_regulating_cond_eq_regulatin_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_regulating_cond_eq_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_regulating_cond_eq_regula_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_regulating_control_terminal_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_regulating_control_terminal_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_regulating_control_mode_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_energy_iden_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_regulating_control_mode_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_season_day_type_schedule_sea_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_valu_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_valu_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regular_interval_schedule_ti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_energy_ide_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regular_interval_schedule_en_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_descriptio_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regulation_schedule_regulati_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_star_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_season_day_type_schedule_day_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_season_day_type_schedule_day_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regular_interval_schedule_en_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_star_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_valu_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_m_rid_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_valu_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_season_day_type_schedule_sea_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regulation_schedule_regulati_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_generating_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_generating_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_season_start_date_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_energy_ident_code_eic_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_season_end_date_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_season_start_date_datatype(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_season_season_end_date_datatype(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_equipment_normally_in_service_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_conducting_equipment_base_vol_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_conducting_equipment_base_vol_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_equipment_equipment_container_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_energy_iden_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_series_compensator_x_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_series_compensator_r_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_startup_co_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_maximum_al_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_nominal_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_solar_generating_unit_sola_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_energy_i_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_short_pf_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_descript_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_gen_contro_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_total_effi_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_name_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_variable_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_max_operat_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_m_rid_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_equipment_normally_in_serv_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_rated_gros_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_governor_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_rated_net_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_long_pf_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_short_na_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_gen_contro_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_solar_generating_unit_sola_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_equipment_equipment_contai_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_min_operat_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_rated_gros_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_startup_ti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_description_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_energy_ident_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_short_name_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_equipment_aggregate_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_short_n_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_name_re_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_conducting_equipment_base_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_descrip_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_regulating_cond_eq_regula_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_equipment_equipment_conta_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_conducting_equipment_base_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_equipment_normally_in_ser_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_vo_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_sl_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_in_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_m_rid_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_s_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_ca_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_equipment_normally_in_service_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_energy_ident_co_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_load_response_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_pfixed_pct_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_pfixed_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_conducting_equipment_base_voltage_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_qfixed_pct_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_equipment_equipment_container_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_conducting_equipment_base_voltage_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_qfixed_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_load_response_has_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_descri_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_short_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_sub_geographical_region_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_m_rid_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_sub_geographical_region_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_name_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_energy_ident_cod_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_short_name_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_sub_load_area_load_area_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_sub_load_area_load_area_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_substation_substation_region_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_substation_substation_region_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_energy_ident_code_e_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_energy_ident_co_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_equipment_normally_in_service_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_auxiliary_equipment_terminal_has_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_auxiliary_equipment_terminal_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_equipment_equipment_container_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_energy_ident_code_eic_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_conducting_equipment_base_voltage_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_conducting_equipment_base_voltage_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_switch_normal_open_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_switch_rated_current_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_switch_retained_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_start_ti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_start_ti_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_short_name_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_season_day_type_schedule_day_typ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_switch_schedule_switch_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_value2un_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_value1un_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_description_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_value2un_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_season_day_type_schedule_season_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_regular_interval_schedule_time_s_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_regular_interval_schedule_end_ti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_season_day_type_schedule_day_typ_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_value1un_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_regular_interval_schedule_end_ti_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_energy_ident_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_season_day_type_schedule_season_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_switch_schedule_switch_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_equipment_equipment_containe_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_conducting_equipment_base_vo_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_rated_power_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_initial_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_generating_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_rated_s_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_conducting_equipment_base_vo_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_q_percen_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_rated_u_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_max_q_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_m_rid_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_equipment_normally_in_servic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_regulating_cond_eq_regulatin_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_type_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_min_q_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_initial_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_type_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_descriptio_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_energy_ide_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_regulating_control_terminal_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_regulating_control_mode_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_m_rid_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_regulating_control_mode_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_regulating_control_terminal_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_energy_ide_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_descriptio_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_season_day_type_schedule_season_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_regular_interval_schedule_time_step_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_season_day_type_schedule_day_type_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_value1unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_season_day_type_schedule_season_has_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_start_time_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_regular_interval_schedule_end_time_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_start_time_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_season_day_type_schedule_day_type_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_description_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_value1unit_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_value2unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_regular_interval_schedule_end_time_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_value2unit_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_tap_schedule_tap_changer_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_tap_schedule_tap_changer_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_phases_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_acdc_terminal_sequence_number_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_conducting_equipment_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_connectivity_node_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_connectivity_node_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_phases_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_acdc_terminal_bus_name_marker_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_energy_ident_code_eic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_acdc_terminal_bus_name_marker_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_conducting_equipment_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_governor_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_gen_cont_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_variable_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_equipment_aggregate_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_equipment_normally_in_se_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_equipment_equipment_cont_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_energy_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_descri_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_total_ef_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_long_pf_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_startup_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_rated_gr_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_short_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_short_pf_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_startup_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_name_r_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_rated_ne_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_maximum_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_gen_cont_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_m_rid_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_min_oper_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_max_oper_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_nominal_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_5(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_rated_gr_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_6(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_energy_ident_code_eic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_terminal_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_control_area_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_positive_flow_in_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_control_area_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_terminal_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_base_voltage_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_substation_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_low_voltage_limit_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_high_voltage_limit_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_substation_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_base_voltage_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_short_name_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_energy_ident_cod_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_energy_ident_cod_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_description_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_voltage_limit_normal_value_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_operational_limit_operational_limi_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_short_name_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_operational_limit_operational_limi_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_operational_limit_operational_limi_etc_3(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_operational_limit_operational_limi_etc_4(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_curve_style_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_y2unit_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_y1unit_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_y1unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_descriptio_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_y2unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_x_unit_in(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_curve_style_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_short_name_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_energy_ide_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_x_unit_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_m_rid_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_min_udc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_max_p_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_equipment_equipment_container_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_switching_loss_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_vs_converter_max_modulation_index_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_min_p_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_equipment_normally_in_service_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_conducting_equipment_base_voltage_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_number_of_valves_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_pcc_terminal_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_base_s_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_description_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_idle_loss_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_conducting_equipment_base_voltage_h_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_vs_converter_capability_curve_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_valve_u0_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_pcc_terminal_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_rated_udc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_energy_ident_code_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_vs_converter_capability_curve_has_v_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_resistive_loss_max_c_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_max_udc_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_auxiliary_equipment_terminal_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_auxiliary_equipment_terminal_has_value(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_equipment_equipment_container_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_description_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_energy_ident_code_ei_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_equipment_normally_in_service_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_short_name_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_rated_net_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_maximum_all_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_min_operati_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_equipment_equipment_contain_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_nominal_p_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_name_requ_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_m_rid_req_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_short_pf_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_equipment_normally_in_servi_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_total_effic_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_gen_control_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_wind_generating_unit_wind_g_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_wind_generating_unit_wind_p_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_energy_id_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_descripti_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_short_nam_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_gen_control_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_startup_cos_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_governor_sc_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_max_operati_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_long_pf_max_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_startup_tim_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_wind_generating_unit_wind_g_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_variable_co_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_rated_gross_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_wind_generating_unit_wind_p_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_rated_gross_etc_2(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_equipment_aggregate_max_count(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_name_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_description_m_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_m_rid_required(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_short_name_ma_etc(dataset));
v.extend(check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_energy_ident_etc(dataset));
v
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_converter_dc_ter_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["DCPolarityKind.middle", "DCPolarityKind.positive", "DCPolarityKind.negative"];
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
if obj.polarity.is_none() { continue; }
if !ALLOWED.contains(&obj.polarity.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverterDCTerminal.polarity-datatype".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "ACDCConverterDCTerminal.polarity".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverterDCTerminal.polarity-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_terminal_bus_nam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCTerminal.BusNameMarker") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.BusNameMarker-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "ACDCTerminal.BusNameMarker".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.BusNameMarker-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_sho_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_nam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_ene_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_converter_dc_ter_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
if obj.polarity.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverterDCTerminal.polarity-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "ACDCConverterDCTerminal.polarity".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverterDCTerminal.polarity-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_dc_base_terminal_dc_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("DCBaseTerminal.DCNode") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCBaseTerminal.DCNode-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "DCBaseTerminal.DCNode".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "DCBaseTerminal.DCNode-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_dc_base_terminal_dc_n_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.dc_node.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DCNode"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCBaseTerminal.DCNode-valueType".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "DCBaseTerminal.DCNode".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:DCNode".to_string(),
severity: "sh:Violation".to_string(),
name: "DCBaseTerminal.DCNode-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_converter_dc_ter_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
if obj.dc_conducting_equipment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverterDCTerminal.DCConductingEquipment-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "ACDCConverterDCTerminal.DCConductingEquipment".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverterDCTerminal.DCConductingEquipment-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_terminal_bus_nam_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.bus_name_marker.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BusNameMarker"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.BusNameMarker-valueType".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "ACDCTerminal.BusNameMarker".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BusNameMarker".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.BusNameMarker-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_terminal_sequenc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.sequence_number.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.sequenceNumber-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "ACDCTerminal.sequenceNumber".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.sequenceNumber-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_des_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_identified_object_m_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_converter_dc_ter_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.dc_conducting_equipment.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["CsConverter", "VsConverter"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverterDCTerminal.DCConductingEquipment-valueType".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "ACDCConverterDCTerminal.DCConductingEquipment".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverterDCTerminal.DCConductingEquipment-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACLineSegment>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_ac_line_segment_bch_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACLineSegment>() {
Some(o) => o, None => continue,
};
if obj.bch.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACLineSegment.bch-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "ACLineSegment.bch".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACLineSegment.bch-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_conducting_equipment_base_voltag_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACLineSegment>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "ACLineSegment".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACLineSegment>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_ac_line_segment_gch_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACLineSegment.gch") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACLineSegment.gch-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "ACLineSegment.gch".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACLineSegment.gch-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_conductor_length_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Conductor.length") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Conductor.length-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "Conductor.length".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Conductor.length-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_equipment_normally_in_service_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_ac_line_segment_r_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACLineSegment>() {
Some(o) => o, None => continue,
};
if obj.r.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACLineSegment.r-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "ACLineSegment.r".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACLineSegment.r-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_ac_line_segment_x_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACLineSegment>() {
Some(o) => o, None => continue,
};
if obj.x.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACLineSegment.x-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "ACLineSegment.x".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACLineSegment.x-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_equipment_equipment_container_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_conducting_equipment_base_voltag_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ACLineSegment".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ActivePowerLimit>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_operational_limit_operational_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ActivePowerLimit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.operational_limit_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["OperationalLimitType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitType-valueType".to_string(),
class: "ActivePowerLimit".to_string(),
property: "OperationalLimit.OperationalLimitType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:OperationalLimitType".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_energy_iden_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_operational_limit_operational_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ActivePowerLimit>() {
Some(o) => o, None => continue,
};
if obj.base.operational_limit_set.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitSet-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "OperationalLimit.OperationalLimitSet".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitSet-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_operational_limit_operational_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ActivePowerLimit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.operational_limit_set.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["OperationalLimitSet"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitSet-valueType".to_string(),
class: "ActivePowerLimit".to_string(),
property: "OperationalLimit.OperationalLimitSet".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:OperationalLimitSet".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitSet-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ActivePowerLimit>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_active_power_limit_normal_val_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ActivePowerLimit>() {
Some(o) => o, None => continue,
};
if obj.normal_value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ActivePowerLimit.normalValue-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "ActivePowerLimit.normalValue".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ActivePowerLimit.normalValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_active_power_limit_operational_limit_operational_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ActivePowerLimit>() {
Some(o) => o, None => continue,
};
if obj.base.operational_limit_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitType-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "OperationalLimit.OperationalLimitType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_name_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ApparentPowerLimit>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_descripti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_operational_limit_operation_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ApparentPowerLimit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.operational_limit_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["OperationalLimitType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitType-valueType".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "OperationalLimit.OperationalLimitType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:OperationalLimitType".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_short_nam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_operational_limit_operation_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ApparentPowerLimit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.operational_limit_set.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["OperationalLimitSet"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitSet-valueType".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "OperationalLimit.OperationalLimitSet".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:OperationalLimitSet".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitSet-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_m_rid_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ApparentPowerLimit>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_operational_limit_operation_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ApparentPowerLimit>() {
Some(o) => o, None => continue,
};
if obj.base.operational_limit_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitType-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "OperationalLimit.OperationalLimitType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_identified_object_energy_id_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_apparent_power_limit_normal_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ApparentPowerLimit>() {
Some(o) => o, None => continue,
};
if obj.normal_value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ApparentPowerLimit.normalValue-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "ApparentPowerLimit.normalValue".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ApparentPowerLimit.normalValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_apparent_power_limit_operational_limit_operation_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ApparentPowerLimit>() {
Some(o) => o, None => continue,
};
if obj.base.operational_limit_set.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitSet-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "OperationalLimit.OperationalLimitSet".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitSet-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_rated_s_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RotatingMachine.ratedS") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.ratedS-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RotatingMachine.ratedS".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.ratedS-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_conducting_equipment_base_v_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "AsynchronousMachine".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_short_nam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_descripti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_generating_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RotatingMachine.GeneratingUnit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.GeneratingUnit-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RotatingMachine.GeneratingUnit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.GeneratingUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_equipment_equipment_contain_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_conducting_equipment_base_v_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_equipment_normally_in_servi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_regulating_cond_eq_regulati_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingCondEq.RegulatingControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_m_rid_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_asynchronous_machine_nomina_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("AsynchronousMachine.nominalFrequency") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AsynchronousMachine.nominalFrequency-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "AsynchronousMachine.nominalFrequency".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "AsynchronousMachine.nominalFrequency-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_asynchronous_machine_nomina_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("AsynchronousMachine.nominalSpeed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AsynchronousMachine.nominalSpeed-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "AsynchronousMachine.nominalSpeed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "AsynchronousMachine.nominalSpeed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_rated_powe_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RotatingMachine.ratedPowerFactor") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.ratedPowerFactor-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RotatingMachine.ratedPowerFactor".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.ratedPowerFactor-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_name_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_rated_u_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RotatingMachine.ratedU") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.ratedU-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RotatingMachine.ratedU".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.ratedU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_identified_object_energy_id_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_base_voltage_nominal_voltage_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BaseVoltage").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BaseVoltage>() {
Some(o) => o, None => continue,
};
if obj.nominal_voltage.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BaseVoltage.nominalVoltage-cardinality".to_string(),
class: "BaseVoltage".to_string(),
property: "BaseVoltage.nominalVoltage".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BaseVoltage.nominalVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_description_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BaseVoltage").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "BaseVoltage".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BaseVoltage").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "BaseVoltage".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BaseVoltage").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BaseVoltage>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "BaseVoltage".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BaseVoltage").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "BaseVoltage".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_base_voltage_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BaseVoltage").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BaseVoltage>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "BaseVoltage".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_equipment_normally_in_service_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_equipment_equipment_container_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_power_electronics_unit_max_p_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsUnit.maxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsUnit.maxP-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "PowerElectronicsUnit.maxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsUnit.maxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_battery_unit_rated_e_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BatteryUnit>() {
Some(o) => o, None => continue,
};
if obj.rated_e.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BatteryUnit.ratedE-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "BatteryUnit.ratedE".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BatteryUnit.ratedE-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BatteryUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_description_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BatteryUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_power_electronics_unit_min_p_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsUnit.minP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsUnit.minP-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "PowerElectronicsUnit.minP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsUnit.minP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Bay").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Bay>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Bay".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Bay").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Bay>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Bay".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_energy_ident_code_eic_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Bay").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Bay".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bay_bay_voltage_level_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Bay").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Bay>() {
Some(o) => o, None => continue,
};
if obj.voltage_level.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Bay.VoltageLevel-cardinality".to_string(),
class: "Bay".to_string(),
property: "Bay.VoltageLevel".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "Bay.VoltageLevel-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bay_bay_voltage_level_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Bay").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Bay>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.voltage_level.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Bay.VoltageLevel-valueType".to_string(),
class: "Bay".to_string(),
property: "Bay.VoltageLevel".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:VoltageLevel".to_string(),
severity: "sh:Violation".to_string(),
name: "Bay.VoltageLevel-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Bay").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Bay".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bay_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Bay").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Bay".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_from_end_name_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.from_end_name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.fromEndName-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.fromEndName".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.fromEndName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_is_direct_current_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BoundaryPoint.isDirectCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.isDirectCurrent-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.isDirectCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.isDirectCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_is_excluded_from_a_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BoundaryPoint.isExcludedFromAreaInterchange") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.isExcludedFromAreaInterchange-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.isExcludedFromAreaInterchange".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.isExcludedFromAreaInterchange-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_to_end_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.to_end_name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.toEndName-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.toEndName".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.toEndName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_to_end_iso_code_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.to_end_iso_code.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.toEndIsoCode-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.toEndIsoCode".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.toEndIsoCode-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_connectivity_node_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.connectivity_node.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ConnectivityNode"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.ConnectivityNode-valueType".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.ConnectivityNode".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ConnectivityNode".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.ConnectivityNode-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_energy_ident_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_connectivity_node_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.connectivity_node.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.ConnectivityNode-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.ConnectivityNode".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.ConnectivityNode-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_from_end_name_tso_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.from_end_name_tso.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.fromEndNameTso-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.fromEndNameTso".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.fromEndNameTso-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_from_end_iso_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.from_end_iso_code.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.fromEndIsoCode-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.fromEndIsoCode".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.fromEndIsoCode-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_boundary_point_boundary_point_to_end_name_tso_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BoundaryPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BoundaryPoint>() {
Some(o) => o, None => continue,
};
if obj.to_end_name_tso.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BoundaryPoint.toEndNameTso-cardinality".to_string(),
class: "BoundaryPoint".to_string(),
property: "BoundaryPoint.toEndNameTso".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BoundaryPoint.toEndNameTso-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Breaker".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_conducting_equipment_base_voltage_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Breaker".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Breaker".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_switch_retained_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Breaker".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_switch_normal_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_conducting_equipment_base_voltage_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Breaker".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_energy_ident_code_eic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Breaker".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Breaker".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_switch_rated_current_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_bus_name_marker_reporting_group_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusNameMarker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BusNameMarker.ReportingGroup") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BusNameMarker.ReportingGroup-cardinality".to_string(),
class: "BusNameMarker".to_string(),
property: "BusNameMarker.ReportingGroup".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BusNameMarker.ReportingGroup-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusNameMarker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "BusNameMarker".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_bus_name_marker_reporting_group_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusNameMarker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BusNameMarker>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.reporting_group.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ReportingGroup"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BusNameMarker.ReportingGroup-valueType".to_string(),
class: "BusNameMarker".to_string(),
property: "BusNameMarker.ReportingGroup".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ReportingGroup".to_string(),
severity: "sh:Violation".to_string(),
name: "BusNameMarker.ReportingGroup-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusNameMarker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BusNameMarker>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "BusNameMarker".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusNameMarker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BusNameMarker>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "BusNameMarker".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusNameMarker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "BusNameMarker".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_bus_name_marker_priority_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusNameMarker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BusNameMarker.priority") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BusNameMarker.priority-cardinality".to_string(),
class: "BusNameMarker".to_string(),
property: "BusNameMarker.priority".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BusNameMarker.priority-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_bus_name_marker_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusNameMarker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "BusNameMarker".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_equipment_equipment_container_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_conducting_equipment_base_voltage_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BusbarSection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "BusbarSection".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_conducting_equipment_base_voltage_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BusbarSection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_energy_ident_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_equipment_normally_in_service_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BusbarSection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "BusbarSection".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CAESPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "CAESPlant".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CAESPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CAESPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "CAESPlant".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CAESPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "CAESPlant".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CAESPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CAESPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "CAESPlant".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_caes_plant_identified_object_energy_ident_code_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CAESPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "CAESPlant".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Clamp".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Clamp".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Clamp>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Clamp".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Clamp".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Clamp>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Clamp".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_clamp_ac_line_segment_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Clamp>() {
Some(o) => o, None => continue,
};
if obj.ac_line_segment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Clamp.ACLineSegment-cardinality".to_string(),
class: "Clamp".to_string(),
property: "Clamp.ACLineSegment".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "Clamp.ACLineSegment-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_conducting_equipment_base_voltage_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Clamp>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Clamp".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_energy_ident_code_eic_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Clamp".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_conducting_equipment_base_voltage_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Clamp".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Clamp".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_clamp_length_from_terminal1_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Clamp.lengthFromTerminal1") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Clamp.lengthFromTerminal1-cardinality".to_string(),
class: "Clamp".to_string(),
property: "Clamp.lengthFromTerminal1".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Clamp.lengthFromTerminal1-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_clamp_ac_line_segment_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Clamp>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.ac_line_segment.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ACLineSegment"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Clamp.ACLineSegment-valueType".to_string(),
class: "Clamp".to_string(),
property: "Clamp.ACLineSegment".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ACLineSegment".to_string(),
severity: "sh:Violation".to_string(),
name: "Clamp.ACLineSegment-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Clamp".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_energy_iden_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CogenerationPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "CogenerationPlant".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CogenerationPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "CogenerationPlant".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CogenerationPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CogenerationPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "CogenerationPlant".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CogenerationPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "CogenerationPlant".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cogeneration_plant_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CogenerationPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CogenerationPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "CogenerationPlant".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_m_rid_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CombinedCyclePlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CombinedCyclePlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "CombinedCyclePlant".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_energy_id_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CombinedCyclePlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "CombinedCyclePlant".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_descripti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CombinedCyclePlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "CombinedCyclePlant".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_short_nam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CombinedCyclePlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "CombinedCyclePlant".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_combined_cycle_plant_identified_object_name_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CombinedCyclePlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CombinedCyclePlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "CombinedCyclePlant".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_conform_load_load_group_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.load_group.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ConformLoadGroup"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConformLoad.LoadGroup-valueType".to_string(),
class: "ConformLoad".to_string(),
property: "ConformLoad.LoadGroup".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ConformLoadGroup".to_string(),
severity: "sh:Violation".to_string(),
name: "ConformLoad.LoadGroup-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_equipment_normally_in_service_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_load_response_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.LoadResponse") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.LoadResponse-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "EnergyConsumer.LoadResponse".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.LoadResponse-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_qfixed_pct_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.qfixedPct") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.qfixedPct-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "EnergyConsumer.qfixedPct".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.qfixedPct-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_pfixed_pct_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.pfixedPct") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.pfixedPct-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "EnergyConsumer.pfixedPct".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.pfixedPct-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_pfixed_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.pfixed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.pfixed-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "EnergyConsumer.pfixed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.pfixed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_identified_object_description_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_qfixed_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.qfixed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.qfixed-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "EnergyConsumer.qfixed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.qfixed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_equipment_equipment_container_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_energy_consumer_load_response_has_v_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.load_response.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["LoadResponseCharacteristic"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.LoadResponse-valueType".to_string(),
class: "ConformLoad".to_string(),
property: "EnergyConsumer.LoadResponse".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:LoadResponseCharacteristic".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.LoadResponse-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_conducting_equipment_base_voltage_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "ConformLoad".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_conducting_equipment_base_voltage_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_conform_load_load_group_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
if obj.load_group.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConformLoad.LoadGroup-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "ConformLoad.LoadGroup".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "ConformLoad.LoadGroup-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadGroup>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ConformLoadGroup".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_load_group_sub_load_area_has_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadGroup>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.sub_load_area.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["SubLoadArea"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadGroup.SubLoadArea-valueType".to_string(),
class: "ConformLoadGroup".to_string(),
property: "LoadGroup.SubLoadArea".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:SubLoadArea".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadGroup.SubLoadArea-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ConformLoadGroup".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_energy_iden_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ConformLoadGroup".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadGroup>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ConformLoadGroup".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ConformLoadGroup".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_group_load_group_sub_load_area_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadGroup>() {
Some(o) => o, None => continue,
};
if obj.base.sub_load_area.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadGroup.SubLoadArea-cardinality".to_string(),
class: "ConformLoadGroup".to_string(),
property: "LoadGroup.SubLoadArea".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadGroup.SubLoadArea-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_name_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_conform_load_schedule_conf_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.conform_load_group.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConformLoadSchedule.ConformLoadGroup-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "ConformLoadSchedule.ConformLoadGroup".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "ConformLoadSchedule.ConformLoadGroup-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_regular_interval_schedule_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_st_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.base.start_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-datatype".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_conform_load_schedule_conf_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.conform_load_group.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ConformLoadGroup"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConformLoadSchedule.ConformLoadGroup-valueType".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "ConformLoadSchedule.ConformLoadGroup".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ConformLoadGroup".to_string(),
severity: "sh:Violation".to_string(),
name: "ConformLoadSchedule.ConformLoadGroup-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_energy_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_season_day_type_schedule_d_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.day_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_va_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_descript_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_season_day_type_schedule_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.season.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_season_day_type_schedule_s_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.season.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Season"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-valueType".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Season".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_regular_interval_schedule_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.time_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.timeStep-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "RegularIntervalSchedule.timeStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.timeStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_va_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value1unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-datatype".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_short_na_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_va_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value2unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value2unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-datatype".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_identified_object_m_rid_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_va_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BasicIntervalSchedule.value2Unit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_basic_interval_schedule_st_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-cardinality".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_regular_interval_schedule_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.end_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-datatype".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_schedule_season_day_type_schedule_d_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoadSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.day_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DayType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-valueType".to_string(),
class: "ConformLoadSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:DayType".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConnectivityNode").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ConnectivityNode".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_short_name_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConnectivityNode").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ConnectivityNode".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConnectivityNode").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConnectivityNode>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ConnectivityNode".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConnectivityNode").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ConnectivityNode".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConnectivityNode").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConnectivityNode>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ConnectivityNode".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_connectivity_node_connectivity_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConnectivityNode").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConnectivityNode>() {
Some(o) => o, None => continue,
};
if obj.connectivity_node_container.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConnectivityNode.ConnectivityNodeContainer-cardinality".to_string(),
class: "ConnectivityNode".to_string(),
property: "ConnectivityNode.ConnectivityNodeContainer".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "ConnectivityNode.ConnectivityNodeContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_connectivity_node_connectivity_node_connectivity_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConnectivityNode").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConnectivityNode>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.connectivity_node_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["EquivalentNetwork", "VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConnectivityNode.ConnectivityNodeContainer-valueType".to_string(),
class: "ConnectivityNode".to_string(),
property: "ConnectivityNode.ConnectivityNodeContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "ConnectivityNode.ConnectivityNodeContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_control_area_energy_area_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlArea>() {
Some(o) => o, None => continue,
};
if obj.energy_area.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ControlArea.EnergyArea-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "ControlArea.EnergyArea".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlArea.EnergyArea-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_control_area_type_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["ControlAreaTypeKind.Interchange", "ControlAreaTypeKind.AGC", "ControlAreaTypeKind.Forecast"];
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlArea>() {
Some(o) => o, None => continue,
};
if obj.type_.is_none() { continue; }
if !ALLOWED.contains(&obj.type_.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ControlArea.type-datatype".to_string(),
class: "ControlArea".to_string(),
property: "ControlArea.type".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlArea.type-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_description_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_control_area_type_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlArea>() {
Some(o) => o, None => continue,
};
if obj.type_.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ControlArea.type-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "ControlArea.type".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlArea.type-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlArea>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlArea>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_control_area_energy_area_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlArea>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.energy_area.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["LoadArea", "SubLoadArea"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ControlArea.EnergyArea-valueType".to_string(),
class: "ControlArea".to_string(),
property: "ControlArea.EnergyArea".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlArea.EnergyArea-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_control_area_genera_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlAreaGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.generating_unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ControlAreaGeneratingUnit.GeneratingUnit-cardinality".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "ControlAreaGeneratingUnit.GeneratingUnit".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlAreaGeneratingUnit.GeneratingUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_control_area_genera_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlAreaGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.control_area.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ControlAreaGeneratingUnit.ControlArea-cardinality".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "ControlAreaGeneratingUnit.ControlArea".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlAreaGeneratingUnit.ControlArea-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_control_area_genera_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlAreaGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.control_area.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ControlArea"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ControlAreaGeneratingUnit.ControlArea-valueType".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "ControlAreaGeneratingUnit.ControlArea".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ControlArea".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlAreaGeneratingUnit.ControlArea-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_d_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlAreaGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_identified_object_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlAreaGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_control_area_generating_unit_control_area_genera_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlAreaGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlAreaGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.generating_unit.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["GeneratingUnit", "SolarGeneratingUnit", "ThermalGeneratingUnit", "WindGeneratingUnit", "NuclearGeneratingUnit", "HydroGeneratingUnit"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ControlAreaGeneratingUnit.GeneratingUnit-valueType".to_string(),
class: "ControlAreaGeneratingUnit".to_string(),
property: "ControlAreaGeneratingUnit.GeneratingUnit".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlAreaGeneratingUnit.GeneratingUnit-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_pcc_terminal_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.pcc_terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.PccTerminal-valueType".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.PccTerminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.PccTerminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_switching_loss_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.switchingLoss") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.switchingLoss-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.switchingLoss".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.switchingLoss-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_number_of_valves_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.numberOfValves") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.numberOfValves-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.numberOfValves".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.numberOfValves-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_base_s_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.baseS") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.baseS-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.baseS".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.baseS-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_max_alpha_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.maxAlpha") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CsConverter.maxAlpha-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.maxAlpha".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.maxAlpha-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_min_p_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.minP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.minP-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.minP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.minP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_min_alpha_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.minAlpha") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CsConverter.minAlpha-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.minAlpha".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.minAlpha-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_max_idc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.maxIdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CsConverter.maxIdc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.maxIdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.maxIdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_equipment_equipment_container_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_pcc_terminal_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.PccTerminal") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.PccTerminal-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.PccTerminal".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.PccTerminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_rated_udc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.ratedUdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.ratedUdc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.ratedUdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_description_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_min_gamma_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.minGamma") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CsConverter.minGamma-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.minGamma".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.minGamma-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_min_idc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.minIdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CsConverter.minIdc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.minIdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.minIdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_equipment_normally_in_service_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_rated_idc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.ratedIdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CsConverter.ratedIdc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.ratedIdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.ratedIdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_idle_loss_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.idleLoss") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.idleLoss-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.idleLoss".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.idleLoss-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_conducting_equipment_base_voltage_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "CsConverter".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_resistive_loss_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.resistiveLoss") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.resistiveLoss-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.resistiveLoss".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.resistiveLoss-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_cs_converter_max_gamma_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.maxGamma") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CsConverter.maxGamma-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.maxGamma".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.maxGamma-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_conducting_equipment_base_voltage_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_valve_u0_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.valveU0") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.valveU0-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.valveU0".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.valveU0-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_min_udc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.minUdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.minUdc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.minUdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.minUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_max_udc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.maxUdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.maxUdc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.maxUdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.maxUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_acdc_converter_max_p_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.maxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.maxP-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.maxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.maxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_operational_limit_operational_limi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentLimit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.operational_limit_set.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["OperationalLimitSet"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitSet-valueType".to_string(),
class: "CurrentLimit".to_string(),
property: "OperationalLimit.OperationalLimitSet".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:OperationalLimitSet".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitSet-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_operational_limit_operational_limi_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentLimit>() {
Some(o) => o, None => continue,
};
if obj.base.operational_limit_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitType-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "OperationalLimit.OperationalLimitType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_short_name_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_energy_ident_cod_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentLimit>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_operational_limit_operational_limi_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentLimit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.operational_limit_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["OperationalLimitType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitType-valueType".to_string(),
class: "CurrentLimit".to_string(),
property: "OperationalLimit.OperationalLimitType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:OperationalLimitType".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_operational_limit_operational_limi_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentLimit>() {
Some(o) => o, None => continue,
};
if obj.base.operational_limit_set.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitSet-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "OperationalLimit.OperationalLimitSet".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitSet-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_current_limit_normal_value_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentLimit>() {
Some(o) => o, None => continue,
};
if obj.normal_value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CurrentLimit.normalValue-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "CurrentLimit.normalValue".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "CurrentLimit.normalValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_limit_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentLimit>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_energy_ide_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_descriptio_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_equipment_equipment_containe_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentTransformer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_equipment_normally_in_servic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_identified_object_m_rid_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentTransformer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_auxiliary_equipment_terminal_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentTransformer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-valueType".to_string(),
class: "CurrentTransformer".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_auxiliary_equipment_terminal_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentTransformer>() {
Some(o) => o, None => continue,
};
if obj.base.base.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-cardinality".to_string(),
class: "CurrentTransformer".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_y1value_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurveData").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurveData>() {
Some(o) => o, None => continue,
};
if obj.y1value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CurveData.y1value-cardinality".to_string(),
class: "CurveData".to_string(),
property: "CurveData.y1value".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "CurveData.y1value-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_y2value_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurveData").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CurveData.y2value") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CurveData.y2value-cardinality".to_string(),
class: "CurveData".to_string(),
property: "CurveData.y2value".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CurveData.y2value-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_xvalue_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurveData").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurveData>() {
Some(o) => o, None => continue,
};
if obj.xvalue.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CurveData.xvalue-cardinality".to_string(),
class: "CurveData".to_string(),
property: "CurveData.xvalue".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "CurveData.xvalue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_curve_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurveData").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurveData>() {
Some(o) => o, None => continue,
};
if obj.curve.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CurveData.Curve-cardinality".to_string(),
class: "CurveData".to_string(),
property: "CurveData.Curve".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "CurveData.Curve-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_curve_data_curve_data_curve_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurveData").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurveData>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.curve.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VsCapabilityCurve", "ReactiveCapabilityCurve", "GrossToNetActivePowerCurve"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:CurveData.Curve-valueType".to_string(),
class: "CurveData".to_string(),
property: "CurveData.Curve".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "CurveData.Curve-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Cut>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Cut".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Cut".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_conducting_equipment_base_voltage_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Cut".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Cut".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_energy_ident_code_eic_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Cut".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_cut_ac_line_segment_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Cut>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.ac_line_segment.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ACLineSegment"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Cut.ACLineSegment-valueType".to_string(),
class: "Cut".to_string(),
property: "Cut.ACLineSegment".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ACLineSegment".to_string(),
severity: "sh:Violation".to_string(),
name: "Cut.ACLineSegment-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_switch_retained_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Cut>() {
Some(o) => o, None => continue,
};
if obj.base.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "Cut".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_cut_length_from_terminal1_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Cut.lengthFromTerminal1") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Cut.lengthFromTerminal1-cardinality".to_string(),
class: "Cut".to_string(),
property: "Cut.lengthFromTerminal1".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Cut.lengthFromTerminal1-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Cut".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Cut>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Cut".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_conducting_equipment_base_voltage_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Cut>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Cut".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_switch_normal_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Cut>() {
Some(o) => o, None => continue,
};
if obj.base.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "Cut".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_cut_ac_line_segment_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Cut>() {
Some(o) => o, None => continue,
};
if obj.ac_line_segment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Cut.ACLineSegment-cardinality".to_string(),
class: "Cut".to_string(),
property: "Cut.ACLineSegment".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "Cut.ACLineSegment-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_switch_rated_current_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "Cut".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Cut".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Cut".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_energy_ident_code_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_dc_conducting_equipment_rated_udc_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCBreaker".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_dc_conducting_equipment_rated_udc_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCBusbar>() {
Some(o) => o, None => continue,
};
if obj.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_energy_ident_code_ei_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCBusbar>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCBusbar>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCBusbar".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_energy_ident_code_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCChopper>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCChopper>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_dc_conducting_equipment_rated_udc_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCChopper>() {
Some(o) => o, None => continue,
};
if obj.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCChopper".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCConverterUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCConverterUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_dc_converter_unit_substation_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("DCConverterUnit.Substation") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConverterUnit.Substation-cardinality".to_string(),
class: "DCConverterUnit".to_string(),
property: "DCConverterUnit.Substation".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConverterUnit.Substation-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_dc_converter_unit_operation_mo_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["DCConverterOperatingModeKind.bipolar", "DCConverterOperatingModeKind.monopolarGroundReturn", "DCConverterOperatingModeKind.monopolarMetallicReturn"];
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCConverterUnit>() {
Some(o) => o, None => continue,
};
if obj.operation_mode.is_none() { continue; }
if !ALLOWED.contains(&obj.operation_mode.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConverterUnit.operationMode-datatype".to_string(),
class: "DCConverterUnit".to_string(),
property: "DCConverterUnit.operationMode".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConverterUnit.operationMode-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_dc_converter_unit_substation_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCConverterUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.substation.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Substation"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConverterUnit.Substation-valueType".to_string(),
class: "DCConverterUnit".to_string(),
property: "DCConverterUnit.Substation".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Substation".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConverterUnit.Substation-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCConverterUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCConverterUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCConverterUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCConverterUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_dc_converter_unit_operation_mo_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCConverterUnit>() {
Some(o) => o, None => continue,
};
if obj.operation_mode.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConverterUnit.operationMode-cardinality".to_string(),
class: "DCConverterUnit".to_string(),
property: "DCConverterUnit.operationMode".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConverterUnit.operationMode-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_converter_unit_identified_object_short_name_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCConverterUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCConverterUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_equipment_equipment_container_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_dc_conducting_equipment_rated_ud_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_equipment_normally_in_service_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCDisconnector".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCGround".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_dc_ground_inductance_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("DCGround.inductance") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCGround.inductance-cardinality".to_string(),
class: "DCGround".to_string(),
property: "DCGround.inductance".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "DCGround.inductance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCGround".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCGround".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_dc_conducting_equipment_rated_udc_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCGround>() {
Some(o) => o, None => continue,
};
if obj.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCGround".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_dc_ground_r_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("DCGround.r") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCGround.r-cardinality".to_string(),
class: "DCGround".to_string(),
property: "DCGround.r".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "DCGround.r-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCGround".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCGround".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCGround>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCGround".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCGround>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCGround".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_identified_object_energy_ident_code_ei_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCGround".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_dc_line_region_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.region.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["SubGeographicalRegion"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCLine.Region-valueType".to_string(),
class: "DCLine".to_string(),
property: "DCLine.Region".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:SubGeographicalRegion".to_string(),
severity: "sh:Violation".to_string(),
name: "DCLine.Region-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCLine".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLine>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCLine".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCLine".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLine>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCLine".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_dc_line_region_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("DCLine.Region") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCLine.Region-cardinality".to_string(),
class: "DCLine".to_string(),
property: "DCLine.Region".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "DCLine.Region-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_identified_object_energy_ident_code_eic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCLine".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_line_segment_length_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("DCLineSegment.length") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCLineSegment.length-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "DCLineSegment.length".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "DCLineSegment.length-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_equipment_normally_in_service_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLineSegment>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_line_segment_capacitance_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLineSegment>() {
Some(o) => o, None => continue,
};
if obj.capacitance.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCLineSegment.capacitance-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "DCLineSegment.capacitance".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCLineSegment.capacitance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_line_segment_resistance_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLineSegment>() {
Some(o) => o, None => continue,
};
if obj.resistance.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCLineSegment.resistance-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "DCLineSegment.resistance".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCLineSegment.resistance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLineSegment>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_conducting_equipment_rated_ud_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLineSegment>() {
Some(o) => o, None => continue,
};
if obj.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_dc_line_segment_inductance_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLineSegment>() {
Some(o) => o, None => continue,
};
if obj.inductance.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCLineSegment.inductance-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "DCLineSegment.inductance".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCLineSegment.inductance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_equipment_equipment_container_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCLineSegment".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCNode").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCNode>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCNode".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCNode").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCNode".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_energy_ident_code_eic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCNode").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCNode".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCNode").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCNode".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCNode").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCNode>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCNode".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_dc_node_dc_equipment_container_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCNode").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCNode>() {
Some(o) => o, None => continue,
};
if obj.dc_equipment_container.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCNode.DCEquipmentContainer-cardinality".to_string(),
class: "DCNode".to_string(),
property: "DCNode.DCEquipmentContainer".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "DCNode.DCEquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_node_dc_node_dc_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCNode").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCNode>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.dc_equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCNode.DCEquipmentContainer-valueType".to_string(),
class: "DCNode".to_string(),
property: "DCNode.DCEquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "DCNode.DCEquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_dc_series_device_resistance_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSeriesDevice>() {
Some(o) => o, None => continue,
};
if obj.resistance.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCSeriesDevice.resistance-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "DCSeriesDevice.resistance".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCSeriesDevice.resistance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_equipment_normally_in_service_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_dc_series_device_inductance_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSeriesDevice>() {
Some(o) => o, None => continue,
};
if obj.inductance.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCSeriesDevice.inductance-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "DCSeriesDevice.inductance".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCSeriesDevice.inductance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_dc_conducting_equipment_rated_u_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSeriesDevice>() {
Some(o) => o, None => continue,
};
if obj.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSeriesDevice>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_short_name_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_equipment_equipment_container_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSeriesDevice>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_identified_object_description_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCSeriesDevice".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCShunt>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCShunt>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_dc_shunt_resistance_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCShunt>() {
Some(o) => o, None => continue,
};
if obj.resistance.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCShunt.resistance-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "DCShunt.resistance".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCShunt.resistance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_dc_conducting_equipment_rated_udc_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCShunt>() {
Some(o) => o, None => continue,
};
if obj.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_energy_ident_code_eic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_dc_shunt_capacitance_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCShunt>() {
Some(o) => o, None => continue,
};
if obj.capacitance.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCShunt.capacitance-cardinality".to_string(),
class: "DCShunt".to_string(),
property: "DCShunt.capacitance".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCShunt.capacitance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_dc_conducting_equipment_rated_udc_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.rated_udc.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCConductingEquipment.ratedUdc-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "DCConductingEquipment.ratedUdc".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "DCConductingEquipment.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_energy_ident_code_ei_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCSwitch".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_acdc_terminal_bus_name_marker_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCTerminal.BusNameMarker") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.BusNameMarker-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "ACDCTerminal.BusNameMarker".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.BusNameMarker-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_dc_terminal_dc_conducting_equipment_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCTerminal>() {
Some(o) => o, None => continue,
};
if obj.dc_conducting_equipment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCTerminal.DCConductingEquipment-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "DCTerminal.DCConductingEquipment".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "DCTerminal.DCConductingEquipment-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCTerminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_dc_base_terminal_dc_node_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCTerminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.dc_node.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DCNode"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCBaseTerminal.DCNode-valueType".to_string(),
class: "DCTerminal".to_string(),
property: "DCBaseTerminal.DCNode".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:DCNode".to_string(),
severity: "sh:Violation".to_string(),
name: "DCBaseTerminal.DCNode-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_acdc_terminal_bus_name_marker_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCTerminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.bus_name_marker.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BusNameMarker"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.BusNameMarker-valueType".to_string(),
class: "DCTerminal".to_string(),
property: "ACDCTerminal.BusNameMarker".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BusNameMarker".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.BusNameMarker-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCTerminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_acdc_terminal_sequence_number_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCTerminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.sequence_number.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.sequenceNumber-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "ACDCTerminal.sequenceNumber".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.sequenceNumber-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_dc_base_terminal_dc_node_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("DCBaseTerminal.DCNode") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCBaseTerminal.DCNode-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "DCBaseTerminal.DCNode".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "DCBaseTerminal.DCNode-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_terminal_dc_terminal_dc_conducting_equipment_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCTerminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.dc_conducting_equipment.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DCSeriesDevice", "DCGround", "DCSwitch", "DCShunt", "DCBusbar", "DCLineSegment", "DCChopper", "DCDisconnector", "DCBreaker", "Equipment"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:DCTerminal.DCConductingEquipment-valueType".to_string(),
class: "DCTerminal".to_string(),
property: "DCTerminal.DCConductingEquipment".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "DCTerminal.DCConductingEquipment-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DayType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DayType".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DayType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DayType".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DayType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DayType>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DayType".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DayType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DayType>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DayType".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_day_type_identified_object_energy_ident_code_eic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DayType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DayType".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_conducting_equipme_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_equipment_aggregat_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_equipment_equipmen_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_retained_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_normal_open_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_equipment_normally_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_rated_curre_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_identified_object_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_conducting_equipme_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_conducting_equipment_base_voltage_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_switch_retained_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
if obj.base.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_equipment_equipment_container_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_switch_rated_current_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_description_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_equipment_normally_in_service_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_switch_normal_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
if obj.base.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_conducting_equipment_base_voltage_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Disconnector".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_conducting_equipment_base_voltag_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergyConsumer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "EnergyConsumer".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_conducting_equipment_base_voltag_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_qfixed_pct_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.qfixedPct") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.qfixedPct-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "EnergyConsumer.qfixedPct".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.qfixedPct-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_equipment_equipment_container_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergyConsumer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_qfixed_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.qfixed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.qfixed-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "EnergyConsumer.qfixed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.qfixed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_pfixed_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.pfixed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.pfixed-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "EnergyConsumer.pfixed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.pfixed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_load_response_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.LoadResponse") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.LoadResponse-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "EnergyConsumer.LoadResponse".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.LoadResponse-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_load_response_ha_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergyConsumer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.load_response.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["LoadResponseCharacteristic"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.LoadResponse-valueType".to_string(),
class: "EnergyConsumer".to_string(),
property: "EnergyConsumer.LoadResponse".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:LoadResponseCharacteristic".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.LoadResponse-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_equipment_normally_in_service_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergyConsumer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_energy_consumer_pfixed_pct_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.pfixedPct") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.pfixedPct-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "EnergyConsumer.pfixedPct".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.pfixedPct-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_name_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySchedulingType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySchedulingType>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "EnergySchedulingType".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySchedulingType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "EnergySchedulingType".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_m_rid_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySchedulingType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySchedulingType>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "EnergySchedulingType".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_descrip_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySchedulingType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "EnergySchedulingType".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_scheduling_type_identified_object_short_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySchedulingType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "EnergySchedulingType".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_short_name_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_conducting_equipment_base_voltage_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySource>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "EnergySource".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySource>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_equipment_normally_in_service_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_energy_scheduling_ty_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySource>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.energy_scheduling_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["EnergySchedulingType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergySource.EnergySchedulingType-valueType".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.EnergySchedulingType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:EnergySchedulingType".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.EnergySchedulingType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_p_max_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergySource.pMax") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergySource.pMax-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.pMax".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.pMax-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_energy_scheduling_ty_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergySource.EnergySchedulingType") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergySource.EnergySchedulingType-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.EnergySchedulingType".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.EnergySchedulingType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_energy_ident_cod_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_conducting_equipment_base_voltage_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_p_min_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergySource.pMin") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergySource.pMin-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.pMin".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.pMin-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_equipment_equipment_container_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_energy_source_nominal_voltage_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergySource.nominalVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergySource.nominalVoltage-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.nominalVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.nominalVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySource>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Junction>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Junction".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cut_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Cut").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Cut>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Cut".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StationSupply>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "StationSupply".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_shunt_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCShunt>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCShunt".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_equipment_equipment_contai_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PotentialTransformer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "PotentialTransformer".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_ground_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCGround").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCGround>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCGround".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_series_device_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSeriesDevice").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSeriesDevice>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCSeriesDevice".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_equipment_equipment_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPump>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "HydroPump".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ac_line_segment_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACLineSegment>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "ACLineSegment".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Fuse".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "PowerTransformer".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_cs_converter_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "CsConverter".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_battery_unit_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BatteryUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "BatteryUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_busbar_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBusbar").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCBusbar>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCBusbar".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnecting_circuit_breaker_equipment_equipmen_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_disconnector_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Disconnector".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_disconnector_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCDisconnector>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCDisconnector".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_breaker_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Breaker".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_equipment_equipment_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_switch_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCSwitch>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCSwitch".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_source_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySource>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "EnergySource".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PostLineSensor>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "PostLineSensor".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equipment_equipment_contain_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "EquivalentInjection".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "VsConverter".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_equipment_equipment_conta_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "StaticVarCompensator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_equipment_equipment_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_equipment_equipment_contai_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Switch".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_equipment_equipment_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsWindUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_breaker_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCBreaker>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCBreaker".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentShunt>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "EquivalentShunt".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "NonConformLoad".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SurgeArrester>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "SurgeArrester".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "GeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_current_transformer_equipment_equipment_containe_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentTransformer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "CurrentTransformer".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_equipment_equipment_containe_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "SynchronousMachine".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_chopper_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCChopper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCChopper>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCChopper".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_dc_line_segment_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCLineSegment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCLineSegment>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "DCLineSegment".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_equipment_equipment_cont_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NuclearGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SeriesCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "SeriesCompensator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_equipment_equipment_con_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WaveTrap>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "WaveTrap".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FaultIndicator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "FaultIndicator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_equipment_equipment_contain_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_equipment_equipment_containe_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "GroundDisconnector".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Jumper".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_equipment_equipment_contain_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "AsynchronousMachine".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Ground>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Ground".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_energy_consumer_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergyConsumer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "EnergyConsumer".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_conform_load_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "ConformLoad".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentBranch>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "EquivalentBranch".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_equipment_equipment_contai_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhotoVoltaicUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PetersenCoil>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "PetersenCoil".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_clamp_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Clamp").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Clamp>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "Clamp".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_equipment_equipment_cont_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_equipment_equipment_containe_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundingImpedance>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "GroundingImpedance".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_busbar_section_equipment_equipment_container_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BusbarSection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BusbarSection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.equipment_container.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VoltageLevel", "Line", "Substation", "Bay", "DCConverterUnit", "DCLine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-valueType".to_string(),
class: "BusbarSection".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_branch_x21_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentBranch.x21") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentBranch.x21-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "EquivalentBranch.x21".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentBranch.x21-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_branch_r_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentBranch>() {
Some(o) => o, None => continue,
};
if obj.r.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentBranch.r-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "EquivalentBranch.r".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentBranch.r-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_conducting_equipment_base_volt_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_short_name_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_equipment_equivalen_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentEquipment.EquivalentNetwork") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentEquipment.EquivalentNetwork-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "EquivalentEquipment.EquivalentNetwork".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentEquipment.EquivalentNetwork-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_branch_r21_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentBranch.r21") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentBranch.r21-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "EquivalentBranch.r21".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentBranch.r21-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_conducting_equipment_base_volt_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentBranch>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "EquivalentBranch".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_branch_x_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentBranch>() {
Some(o) => o, None => continue,
};
if obj.x.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentBranch.x-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "EquivalentBranch.x".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentBranch.x-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equipment_equipment_container_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equivalent_equipment_equivalen_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentBranch>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.equivalent_network.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["EquivalentNetwork"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentEquipment.EquivalentNetwork-valueType".to_string(),
class: "EquivalentBranch".to_string(),
property: "EquivalentEquipment.EquivalentNetwork".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:EquivalentNetwork".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentEquipment.EquivalentNetwork-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentBranch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentBranch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_equipment_normally_in_service_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_branch_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentBranch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "EquivalentBranch".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_reacti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.reactive_capability_curve.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ReactiveCapabilityCurve"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentInjection.ReactiveCapabilityCurve-valueType".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.ReactiveCapabilityCurve".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ReactiveCapabilityCurve".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.ReactiveCapabilityCurve-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_equipment_equiva_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentEquipment.EquivalentNetwork") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentEquipment.EquivalentNetwork-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentEquipment.EquivalentNetwork".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentEquipment.EquivalentNetwork-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_equipment_equiva_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.equivalent_network.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["EquivalentNetwork"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentEquipment.EquivalentNetwork-valueType".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentEquipment.EquivalentNetwork".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:EquivalentNetwork".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentEquipment.EquivalentNetwork-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_conducting_equipment_base_v_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equipment_normally_in_servi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_m_rid_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equipment_equipment_contain_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_descripti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_name_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_min_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentInjection.minP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentInjection.minP-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.minP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.minP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_reacti_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentInjection.ReactiveCapabilityCurve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentInjection.ReactiveCapabilityCurve-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.ReactiveCapabilityCurve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.ReactiveCapabilityCurve-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_regula_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
if obj.regulation_capability.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentInjection.regulationCapability-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.regulationCapability".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.regulationCapability-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_min_q_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentInjection.minQ") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentInjection.minQ-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.minQ".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.minQ-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_conducting_equipment_base_v_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "EquivalentInjection".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_max_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentInjection.maxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentInjection.maxP-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.maxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.maxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_equivalent_injection_max_q_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentInjection.maxQ") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentInjection.maxQ-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.maxQ".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.maxQ-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_energy_id_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_injection_identified_object_short_nam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentNetwork").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "EquivalentNetwork".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentNetwork").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentNetwork>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "EquivalentNetwork".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentNetwork").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "EquivalentNetwork".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentNetwork").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentNetwork>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "EquivalentNetwork".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_network_identified_object_energy_iden_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentNetwork").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "EquivalentNetwork".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_conducting_equipment_base_volta_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentShunt>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "EquivalentShunt".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equivalent_equipment_equivalent_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentEquipment.EquivalentNetwork") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentEquipment.EquivalentNetwork-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "EquivalentEquipment.EquivalentNetwork".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentEquipment.EquivalentNetwork-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equipment_normally_in_service_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_conducting_equipment_base_volta_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_description_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equivalent_shunt_b_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentShunt>() {
Some(o) => o, None => continue,
};
if obj.b.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentShunt.b-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "EquivalentShunt.b".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentShunt.b-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentShunt>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equipment_equipment_container_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_short_name_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentShunt>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equivalent_shunt_g_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentShunt>() {
Some(o) => o, None => continue,
};
if obj.g.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentShunt.g-cardinality".to_string(),
class: "EquivalentShunt".to_string(),
property: "EquivalentShunt.g".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentShunt.g-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_equivalent_shunt_equivalent_equipment_equivalent_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentShunt").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentShunt>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.equivalent_network.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["EquivalentNetwork"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EquivalentEquipment.EquivalentNetwork-valueType".to_string(),
class: "EquivalentShunt".to_string(),
property: "EquivalentEquipment.EquivalentNetwork".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:EquivalentNetwork".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentEquipment.EquivalentNetwork-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.max_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ExternalNetworkInjection.maxP-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ExternalNetworkInjection.maxP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ExternalNetworkInjection.maxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_m_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_equipment_normally_in_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_regulating_cond_eq_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingCondEq.RegulatingControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.max_q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ExternalNetworkInjection.maxQ-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ExternalNetworkInjection.maxQ".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ExternalNetworkInjection.maxQ-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_nam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_conducting_equipment_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.min_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ExternalNetworkInjection.minP-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ExternalNetworkInjection.minP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ExternalNetworkInjection.minP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_des_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.min_q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ExternalNetworkInjection.minQ-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ExternalNetworkInjection.minQ".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ExternalNetworkInjection.minQ-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_conducting_equipment_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_ene_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_equipment_aggregate_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_external_network_inje_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.governor_scd.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ExternalNetworkInjection.governorSCD-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ExternalNetworkInjection.governorSCD".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ExternalNetworkInjection.governorSCD-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_equipment_equipment_c_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_identified_object_sho_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_auxiliary_equipment_terminal_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FaultIndicator>() {
Some(o) => o, None => continue,
};
if obj.base.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_equipment_equipment_container_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_auxiliary_equipment_terminal_has_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FaultIndicator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-valueType".to_string(),
class: "FaultIndicator".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FaultIndicator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FaultIndicator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_equipment_normally_in_service_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fault_indicator_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FaultIndicator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "FaultIndicator".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FossilFuel>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "FossilFuel".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "FossilFuel".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FossilFuel>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "FossilFuel".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_fossil_fuel_fossil_fuel_type_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FossilFuel>() {
Some(o) => o, None => continue,
};
if obj.fossil_fuel_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:FossilFuel.fossilFuelType-cardinality".to_string(),
class: "FossilFuel".to_string(),
property: "FossilFuel.fossilFuelType".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "FossilFuel.fossilFuelType-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_fossil_fuel_fossil_fuel_type_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["FuelType.coalDerivedGas", "FuelType.lignite", "FuelType.peat", "FuelType.coal", "FuelType.hardCoal", "FuelType.oilShale", "FuelType.oil", "FuelType.gas", "FuelType.brownCoalLignite", "FuelType.other"];
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FossilFuel>() {
Some(o) => o, None => continue,
};
if obj.fossil_fuel_type.is_none() { continue; }
if !ALLOWED.contains(&obj.fossil_fuel_type.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:FossilFuel.fossilFuelType-datatype".to_string(),
class: "FossilFuel".to_string(),
property: "FossilFuel.fossilFuelType".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "FossilFuel.fossilFuelType-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_fossil_fuel_thermal_generating_unit_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FossilFuel>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.thermal_generating_unit.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ThermalGeneratingUnit"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:FossilFuel.ThermalGeneratingUnit-valueType".to_string(),
class: "FossilFuel".to_string(),
property: "FossilFuel.ThermalGeneratingUnit".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ThermalGeneratingUnit".to_string(),
severity: "sh:Violation".to_string(),
name: "FossilFuel.ThermalGeneratingUnit-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_fossil_fuel_thermal_generating_unit_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::FossilFuel>() {
Some(o) => o, None => continue,
};
if obj.thermal_generating_unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:FossilFuel.ThermalGeneratingUnit-cardinality".to_string(),
class: "FossilFuel".to_string(),
property: "FossilFuel.ThermalGeneratingUnit".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "FossilFuel.ThermalGeneratingUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "FossilFuel".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fossil_fuel_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("FossilFuel").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "FossilFuel".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Fuse".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Fuse".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Fuse".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_switch_normal_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
if obj.base.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Fuse".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_conducting_equipment_base_voltage_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Fuse".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_switch_retained_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
if obj.base.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_switch_rated_current_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_identified_object_energy_ident_code_eic_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Fuse".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_fuse_conducting_equipment_base_voltage_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Fuse".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_gen_control_sour_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["GeneratorControlSource.onAGC", "GeneratorControlSource.offAGC", "GeneratorControlSource.plantControl", "GeneratorControlSource.unavailable"];
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.gen_control_source.is_none() { continue; }
if !ALLOWED.contains(&obj.gen_control_source.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-datatype".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_min_operating_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.min_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.minOperatingP-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.minOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.minOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_governor_scd_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.governorSCD") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.governorSCD-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.governorSCD".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.governorSCD-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_equipment_normally_in_service_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_rated_net_max_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedNetMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.ratedNetMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_total_efficiency_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.totalEfficiency") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.totalEfficiency-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.totalEfficiency".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.totalEfficiency-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_gen_control_sour_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.genControlSource") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_short_pf_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.shortPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.shortPF-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.shortPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.shortPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_equipment_equipment_container_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_long_pf_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.longPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.longPF-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.longPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.longPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_startup_cost_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupCost-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.startupCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_max_operating_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.max_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maxOperatingP-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.maxOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maxOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_rated_gross_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_variable_cost_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.variableCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.variableCost-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.variableCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.variableCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_startup_time_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupTime") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupTime-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.startupTime".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_rated_gross_min_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMinP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMinP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_maximum_allowabl_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.maximumAllowableSpinningReserve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.maximumAllowableSpinningReserve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_generating_unit_generating_unit_nominal_p_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.nominalP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.nominalP-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.nominalP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.nominalP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_energy_ide_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeographicalRegion").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "GeographicalRegion".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_descriptio_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeographicalRegion").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "GeographicalRegion".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeographicalRegion").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "GeographicalRegion".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_m_rid_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeographicalRegion").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeographicalRegion>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "GeographicalRegion".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_geographical_region_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeographicalRegion").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeographicalRegion>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "GeographicalRegion".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_gross_to_net_act_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.generating_unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GrossToNetActivePowerCurve.GeneratingUnit-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "GrossToNetActivePowerCurve.GeneratingUnit".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "GrossToNetActivePowerCurve.GeneratingUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_y2unit_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Curve.y2Unit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y2Unit-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "Curve.y2Unit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y2Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_curve_styl_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.curve_style.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.curveStyle-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "Curve.curveStyle".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.curveStyle-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_x_unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.x_unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.x_unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.xUnit-datatype".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "Curve.xUnit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.xUnit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_curve_styl_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["CurveStyle.straightLineYValues", "CurveStyle.constantYValue"];
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.curve_style.is_none() { continue; }
if !ALLOWED.contains(&obj.base.curve_style.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.curveStyle-datatype".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "Curve.curveStyle".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.curveStyle-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_y2unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y2unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.y2unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y2Unit-datatype".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "Curve.y2Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y2Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_y1unit_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y1unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y1Unit-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "Curve.y1Unit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y1Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_y1unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y1unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.y1unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y1Unit-datatype".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "Curve.y1Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y1Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_identified_objec_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_curve_x_unit_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
if obj.base.x_unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.xUnit-cardinality".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "Curve.xUnit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.xUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_gross_to_net_active_power_curve_gross_to_net_act_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GrossToNetActivePowerCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GrossToNetActivePowerCurve>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.generating_unit.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["GeneratingUnit", "SolarGeneratingUnit", "ThermalGeneratingUnit", "WindGeneratingUnit", "NuclearGeneratingUnit", "HydroGeneratingUnit"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GrossToNetActivePowerCurve.GeneratingUnit-valueType".to_string(),
class: "GrossToNetActivePowerCurve".to_string(),
property: "GrossToNetActivePowerCurve.GeneratingUnit".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "GrossToNetActivePowerCurve.GeneratingUnit-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_energy_ident_code_eic_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Ground".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Ground>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Ground".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Ground".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Ground".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Ground".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_conducting_equipment_base_voltage_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Ground".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Ground>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Ground".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Ground".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Ground".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_conducting_equipment_base_voltage_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Ground").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Ground>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Ground".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_conducting_equipment_base_vo_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "GroundDisconnector".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_m_rid_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_switch_retained_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_energy_ide_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_descriptio_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_switch_normal_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_equipment_normally_in_servic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_equipment_equipment_containe_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_switch_rated_current_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ground_disconnector_conducting_equipment_base_vo_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_equipment_equipment_containe_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_m_rid_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundingImpedance>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_equipment_normally_in_servic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundingImpedance>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_energy_ide_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_conducting_equipment_base_vo_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_conducting_equipment_base_vo_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundingImpedance>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "GroundingImpedance".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_grounding_impedance_identified_object_descriptio_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundingImpedance").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "GroundingImpedance".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_maximum_al_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.maximumAllowableSpinningReserve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.maximumAllowableSpinningReserve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_total_effi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.totalEfficiency") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.totalEfficiency-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.totalEfficiency".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.totalEfficiency-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_ener_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["HydroEnergyConversionKind.pumpAndGenerator", "HydroEnergyConversionKind.generator"];
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.energy_conversion_capability.is_none() { continue; }
if !ALLOWED.contains(&obj.energy_conversion_capability.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroGeneratingUnit.energyConversionCapability-datatype".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "HydroGeneratingUnit.energyConversionCapability".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroGeneratingUnit.energyConversionCapability-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_turb_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["HydroTurbineKind.pelton", "HydroTurbineKind.francis", "HydroTurbineKind.kaplan"];
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.turbine_type.is_none() { continue; }
if !ALLOWED.contains(&obj.turbine_type.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroGeneratingUnit.turbineType-datatype".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "HydroGeneratingUnit.turbineType".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroGeneratingUnit.turbineType-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_max_operat_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.max_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maxOperatingP-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.maxOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maxOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_name_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_startup_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupCost-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.startupCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_descript_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_startup_ti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupTime") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupTime-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.startupTime".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_m_rid_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_hydr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("HydroGeneratingUnit.HydroPowerPlant") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroGeneratingUnit.HydroPowerPlant-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "HydroGeneratingUnit.HydroPowerPlant".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroGeneratingUnit.HydroPowerPlant-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_ener_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("HydroGeneratingUnit.energyConversionCapability") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroGeneratingUnit.energyConversionCapability-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "HydroGeneratingUnit.energyConversionCapability".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroGeneratingUnit.energyConversionCapability-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_rated_gros_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_rated_gros_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMinP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMinP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_long_pf_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.longPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.longPF-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.longPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.longPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_drop_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("HydroGeneratingUnit.dropHeight") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroGeneratingUnit.dropHeight-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "HydroGeneratingUnit.dropHeight".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroGeneratingUnit.dropHeight-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_equipment_equipment_contai_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_short_pf_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.shortPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.shortPF-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.shortPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.shortPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_rated_net_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedNetMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedNetMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_gen_contro_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.genControlSource") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_equipment_normally_in_serv_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_energy_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_hydr_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.hydro_power_plant.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["HydroPowerPlant"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroGeneratingUnit.HydroPowerPlant-valueType".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "HydroGeneratingUnit.HydroPowerPlant".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:HydroPowerPlant".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroGeneratingUnit.HydroPowerPlant-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_min_operat_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.min_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.minOperatingP-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.minOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.minOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_nominal_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.nominalP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.nominalP-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.nominalP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.nominalP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_governor_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.governorSCD") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.governorSCD-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.governorSCD".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.governorSCD-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_variable_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.variableCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.variableCost-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.variableCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.variableCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_generating_unit_gen_contro_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["GeneratorControlSource.onAGC", "GeneratorControlSource.offAGC", "GeneratorControlSource.plantControl", "GeneratorControlSource.unavailable"];
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.gen_control_source.is_none() { continue; }
if !ALLOWED.contains(&obj.base.gen_control_source.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-datatype".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_identified_object_short_na_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_generating_unit_hydro_generating_unit_turb_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("HydroGeneratingUnit.turbineType") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroGeneratingUnit.turbineType-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "HydroGeneratingUnit.turbineType".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroGeneratingUnit.turbineType-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_hydro_power_plant_hydro_plant_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["HydroPlantStorageKind.runOfRiver", "HydroPlantStorageKind.storage", "HydroPlantStorageKind.pumpedStorage"];
for mrid in dataset.by_type.get("HydroPowerPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPowerPlant>() {
Some(o) => o, None => continue,
};
if obj.hydro_plant_storage_type.is_none() { continue; }
if !ALLOWED.contains(&obj.hydro_plant_storage_type.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroPowerPlant.hydroPlantStorageType-datatype".to_string(),
class: "HydroPowerPlant".to_string(),
property: "HydroPowerPlant.hydroPlantStorageType".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroPowerPlant.hydroPlantStorageType-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPowerPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPowerPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "HydroPowerPlant".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPowerPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPowerPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "HydroPowerPlant".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "HydroPowerPlant".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "HydroPowerPlant".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_identified_object_short_name_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "HydroPowerPlant".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_power_plant_hydro_power_plant_hydro_plant_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPowerPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPowerPlant>() {
Some(o) => o, None => continue,
};
if obj.hydro_plant_storage_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroPowerPlant.hydroPlantStorageType-cardinality".to_string(),
class: "HydroPowerPlant".to_string(),
property: "HydroPowerPlant.hydroPlantStorageType".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroPowerPlant.hydroPlantStorageType-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPump>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_hydro_pump_hydro_power_plant_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("HydroPump.HydroPowerPlant") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroPump.HydroPowerPlant-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "HydroPump.HydroPowerPlant".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroPump.HydroPowerPlant-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_energy_ident_code_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_hydro_pump_rotating_machine_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPump>() {
Some(o) => o, None => continue,
};
if obj.rotating_machine.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroPump.RotatingMachine-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "HydroPump.RotatingMachine".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroPump.RotatingMachine-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_hydro_pump_hydro_power_plant_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPump>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.hydro_power_plant.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["HydroPowerPlant"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroPump.HydroPowerPlant-valueType".to_string(),
class: "HydroPump".to_string(),
property: "HydroPump.HydroPowerPlant".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:HydroPowerPlant".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroPump.HydroPowerPlant-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPump>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "HydroPump".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_hydro_pump_hydro_pump_rotating_machine_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroPump").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroPump>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.rotating_machine.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["SynchronousMachine", "AsynchronousMachine"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:HydroPump.RotatingMachine-valueType".to_string(),
class: "HydroPump".to_string(),
property: "HydroPump.RotatingMachine".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "HydroPump.RotatingMachine-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Jumper".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Jumper".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_switch_normal_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
if obj.base.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_energy_ident_code_eic_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Jumper".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_switch_rated_current_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Jumper".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_switch_retained_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
if obj.base.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Jumper".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_conducting_equipment_base_voltage_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Jumper".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_jumper_conducting_equipment_base_voltage_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Jumper".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Junction".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Junction".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Junction>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Junction".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_conducting_equipment_base_voltage_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Junction".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_conducting_equipment_base_voltage_has_v_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Junction>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Junction".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Junction".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_energy_ident_code_eic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Junction".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Junction".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Junction".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_junction_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Junction").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Junction>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Junction".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Line").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Line>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Line".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_line_line_region_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Line").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Line.Region") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Line.Region-cardinality".to_string(),
class: "Line".to_string(),
property: "Line.Region".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Line.Region-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Line").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Line>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Line".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Line").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Line".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Line").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Line".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_line_identified_object_energy_ident_code_eic_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Line").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Line".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_line_line_region_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Line").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Line>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.region.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["SubGeographicalRegion"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Line.Region-valueType".to_string(),
class: "Line".to_string(),
property: "Line.Region".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:SubGeographicalRegion".to_string(),
severity: "sh:Violation".to_string(),
name: "Line.Region-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_energ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_norma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.normal_sections.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.normalSections-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ShuntCompensator.normalSections".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.normalSections-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_maxim_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.maximum_sections.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.maximumSections-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ShuntCompensator.maximumSections".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.maximumSections-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_nom_u_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.nom_u.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.nomU-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ShuntCompensator.nomU".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.nomU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_equipment_equipment_con_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_linear_shunt_compensato_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.b_per_section.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LinearShuntCompensator.bPerSection-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "LinearShuntCompensator.bPerSection".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "LinearShuntCompensator.bPerSection-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_equipment_aggregate_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_volta_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ShuntCompensator.voltageSensitivity") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.voltageSensitivity-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ShuntCompensator.voltageSensitivity".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.voltageSensitivity-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_linear_shunt_compensato_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.g_per_section.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LinearShuntCompensator.gPerSection-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "LinearShuntCompensator.gPerSection".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "LinearShuntCompensator.gPerSection-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_short_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_equipment_normally_in_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_a_vr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ShuntCompensator.aVRDelay") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.aVRDelay-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ShuntCompensator.aVRDelay".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.aVRDelay-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_conducting_equipment_ba_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_shunt_compensator_groun_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ShuntCompensator.grounded") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.grounded-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ShuntCompensator.grounded".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.grounded-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_conducting_equipment_ba_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_descr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_identified_object_m_rid_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_regulating_cond_eq_regu_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingCondEq.RegulatingControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_energy_ident_code_ei_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "LoadArea".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "LoadArea".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "LoadArea".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadArea>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "LoadArea".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_area_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadArea>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "LoadArea".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_equipment_equipment_container_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_switch_rated_current_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_conducting_equipment_base_volt_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_switch_normal_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_conducting_equipment_base_volt_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_short_name_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_switch_retained_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_equipment_normally_in_service_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_break_switch_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.pVoltageExponent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.pVoltageExponent-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.pVoltageExponent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.pVoltageExponent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.qVoltageExponent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.qVoltageExponent-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.qVoltageExponent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.qVoltageExponent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.pConstantPower") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.pConstantPower-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.pConstantPower".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.pConstantPower-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_d_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.qConstantCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.qConstantCurrent-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.qConstantCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.qConstantCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.qConstantImpedance") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.qConstantImpedance-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.qConstantImpedance".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.qConstantImpedance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadResponseCharacteristic>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.pFrequencyExponent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.pFrequencyExponent-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.pFrequencyExponent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.pFrequencyExponent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_7(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.pConstantCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.pConstantCurrent-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.pConstantCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.pConstantCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_8(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.pConstantImpedance") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.pConstantImpedance-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.pConstantImpedance".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.pConstantImpedance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_9(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.qFrequencyExponent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.qFrequencyExponent-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.qFrequencyExponent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.qFrequencyExponent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_10(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("LoadResponseCharacteristic.qConstantPower") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.qConstantPower-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.qConstantPower".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.qConstantPower-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_load_response_chara_etc_11(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadResponseCharacteristic>() {
Some(o) => o, None => continue,
};
if obj.exponent_model.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadResponseCharacteristic.exponentModel-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "LoadResponseCharacteristic.exponentModel".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadResponseCharacteristic.exponentModel-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_load_response_characteristic_identified_object_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadResponseCharacteristic").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadResponseCharacteristic>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "LoadResponseCharacteristic".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_short_name_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_pfixed_pct_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.pfixedPct") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.pfixedPct-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "EnergyConsumer.pfixedPct".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.pfixedPct-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_load_response_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.load_response.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["LoadResponseCharacteristic"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.LoadResponse-valueType".to_string(),
class: "NonConformLoad".to_string(),
property: "EnergyConsumer.LoadResponse".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:LoadResponseCharacteristic".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.LoadResponse-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_qfixed_pct_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.qfixedPct") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.qfixedPct-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "EnergyConsumer.qfixedPct".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.qfixedPct-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_equipment_equipment_container_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_equipment_normally_in_service_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_load_response_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.LoadResponse") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.LoadResponse-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "EnergyConsumer.LoadResponse".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.LoadResponse-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_non_conform_load_load_group_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
if obj.load_group.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonConformLoad.LoadGroup-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "NonConformLoad.LoadGroup".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "NonConformLoad.LoadGroup-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_pfixed_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.pfixed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.pfixed-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "EnergyConsumer.pfixed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.pfixed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_conducting_equipment_base_volta_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "NonConformLoad".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_description_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_conducting_equipment_base_volta_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_non_conform_load_load_group_has_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.load_group.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["NonConformLoadGroup"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonConformLoad.LoadGroup-valueType".to_string(),
class: "NonConformLoad".to_string(),
property: "NonConformLoad.LoadGroup".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:NonConformLoadGroup".to_string(),
severity: "sh:Violation".to_string(),
name: "NonConformLoad.LoadGroup-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_energy_consumer_qfixed_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.qfixed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.qfixed-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "EnergyConsumer.qfixed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.qfixed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_short_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "NonConformLoadGroup".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_m_rid_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadGroup>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "NonConformLoadGroup".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_descrip_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "NonConformLoadGroup".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_load_group_sub_load_area_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadGroup>() {
Some(o) => o, None => continue,
};
if obj.base.sub_load_area.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadGroup.SubLoadArea-cardinality".to_string(),
class: "NonConformLoadGroup".to_string(),
property: "LoadGroup.SubLoadArea".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadGroup.SubLoadArea-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_name_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadGroup>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "NonConformLoadGroup".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "NonConformLoadGroup".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_group_load_group_sub_load_area_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadGroup>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.sub_load_area.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["SubLoadArea"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:LoadGroup.SubLoadArea-valueType".to_string(),
class: "NonConformLoadGroup".to_string(),
property: "LoadGroup.SubLoadArea".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:SubLoadArea".to_string(),
severity: "sh:Violation".to_string(),
name: "LoadGroup.SubLoadArea-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_regular_interval_sched_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BasicIntervalSchedule.value2Unit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_season_day_type_schedu_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.season.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Season"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-valueType".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Season".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value1unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-datatype".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_non_conform_load_sched_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.non_conform_load_group.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["NonConformLoadGroup"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonConformLoadSchedule.NonConformLoadGroup-valueType".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "NonConformLoadSchedule.NonConformLoadGroup".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:NonConformLoadGroup".to_string(),
severity: "sh:Violation".to_string(),
name: "NonConformLoadSchedule.NonConformLoadGroup-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_regular_interval_sched_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.time_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.timeStep-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "RegularIntervalSchedule.timeStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.timeStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_regular_interval_sched_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.end_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-datatype".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_shor_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_season_day_type_schedu_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.season.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_season_day_type_schedu_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.day_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_desc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_non_conform_load_sched_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.non_conform_load_group.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonConformLoadSchedule.NonConformLoadGroup-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "NonConformLoadSchedule.NonConformLoadGroup".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "NonConformLoadSchedule.NonConformLoadGroup-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_m_ri_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_season_day_type_schedu_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.day_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DayType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-valueType".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:DayType".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_identified_object_ener_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-cardinality".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value2unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value2unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-datatype".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_non_conform_load_schedule_basic_interval_schedul_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoadSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoadSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.base.start_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-datatype".to_string(),
class: "NonConformLoadSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_na_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_regulating_cond_eq_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingCondEq.RegulatingControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.maximum_sections.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.maximumSections-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ShuntCompensator.maximumSections".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.maximumSections-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_conducting_equipment_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_vo_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ShuntCompensator.voltageSensitivity") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.voltageSensitivity-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ShuntCompensator.voltageSensitivity".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.voltageSensitivity-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_gr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ShuntCompensator.grounded") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.grounded-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ShuntCompensator.grounded".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.grounded-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_sh_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_equipment_normally_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_de_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_conducting_equipment_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_equipment_aggregate_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_equipment_equipment_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_no_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.normal_sections.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.normalSections-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ShuntCompensator.normalSections".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.normalSections-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_identified_object_en_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_a_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ShuntCompensator.aVRDelay") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.aVRDelay-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ShuntCompensator.aVRDelay".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.aVRDelay-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_compensator_no_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.nom_u.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ShuntCompensator.nomU-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ShuntCompensator.nomU".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.nomU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensatorPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensatorPoint>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.nonlinear_shunt_compensator.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["NonlinearShuntCompensator"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator-valueType".to_string(),
class: "NonlinearShuntCompensatorPoint".to_string(),
property: "NonlinearShuntCompensatorPoint.NonlinearShuntCompensator".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:NonlinearShuntCompensator".to_string(),
severity: "sh:Violation".to_string(),
name: "NonlinearShuntCompensatorPoint.NonlinearShuntCompensator-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensatorPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensatorPoint>() {
Some(o) => o, None => continue,
};
if obj.g.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonlinearShuntCompensatorPoint.g-cardinality".to_string(),
class: "NonlinearShuntCompensatorPoint".to_string(),
property: "NonlinearShuntCompensatorPoint.g".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "NonlinearShuntCompensatorPoint.g-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensatorPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensatorPoint>() {
Some(o) => o, None => continue,
};
if obj.section_number.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonlinearShuntCompensatorPoint.sectionNumber-cardinality".to_string(),
class: "NonlinearShuntCompensatorPoint".to_string(),
property: "NonlinearShuntCompensatorPoint.sectionNumber".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "NonlinearShuntCompensatorPoint.sectionNumber-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensatorPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensatorPoint>() {
Some(o) => o, None => continue,
};
if obj.b.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonlinearShuntCompensatorPoint.b-cardinality".to_string(),
class: "NonlinearShuntCompensatorPoint".to_string(),
property: "NonlinearShuntCompensatorPoint.b".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "NonlinearShuntCompensatorPoint.b-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_point_nonlinear_shun_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensatorPoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensatorPoint>() {
Some(o) => o, None => continue,
};
if obj.nonlinear_shunt_compensator.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator-cardinality".to_string(),
class: "NonlinearShuntCompensatorPoint".to_string(),
property: "NonlinearShuntCompensatorPoint.NonlinearShuntCompensator".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "NonlinearShuntCompensatorPoint.NonlinearShuntCompensator-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_min_oper_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NuclearGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.min_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.minOperatingP-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.minOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.minOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_short_pf_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.shortPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.shortPF-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.shortPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.shortPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_m_rid_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NuclearGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_nominal_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.nominalP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.nominalP-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.nominalP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.nominalP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_short_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_equipment_equipment_cont_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_name_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NuclearGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_rated_gr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_rated_ne_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedNetMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedNetMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_gen_cont_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.genControlSource") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_gen_cont_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["GeneratorControlSource.onAGC", "GeneratorControlSource.offAGC", "GeneratorControlSource.plantControl", "GeneratorControlSource.unavailable"];
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NuclearGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.gen_control_source.is_none() { continue; }
if !ALLOWED.contains(&obj.base.gen_control_source.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-datatype".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_maximum_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.maximumAllowableSpinningReserve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.maximumAllowableSpinningReserve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_equipment_normally_in_se_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_startup_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupCost-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.startupCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_long_pf_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.longPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.longPF-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.longPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.longPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_variable_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.variableCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.variableCost-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.variableCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.variableCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_max_oper_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NuclearGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.max_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maxOperatingP-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.maxOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maxOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_total_ef_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.totalEfficiency") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.totalEfficiency-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.totalEfficiency".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.totalEfficiency-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_governor_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.governorSCD") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.governorSCD-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.governorSCD".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.governorSCD-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_rated_gr_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMinP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMinP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_equipment_aggregate_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_generating_unit_startup_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupTime") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupTime-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.startupTime".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nuclear_generating_unit_identified_object_descri_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_descript_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "OperationalLimitSet".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_name_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitSet>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "OperationalLimitSet".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_short_na_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "OperationalLimitSet".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_energy_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "OperationalLimitSet".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_operational_limit_set_equi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("OperationalLimitSet.Equipment") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitSet.Equipment-cardinality".to_string(),
class: "OperationalLimitSet".to_string(),
property: "OperationalLimitSet.Equipment".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitSet.Equipment-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_identified_object_m_rid_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitSet>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "OperationalLimitSet".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_operational_limit_set_term_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitSet>() {
Some(o) => o, None => continue,
};
if obj.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitSet.Terminal-cardinality".to_string(),
class: "OperationalLimitSet".to_string(),
property: "OperationalLimitSet.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitSet.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_operational_limit_set_equi_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitSet>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.equipment.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["HydroPump", "GeneratingUnit", "SurgeArrester", "WaveTrap", "FaultIndicator", "Clamp", "SeriesCompensator", "Switch", "Ground", "PowerTransformer", "DCSeriesDevice", "DCGround", "DCSwitch", "DCShunt", "DCBusbar", "DCLineSegment", "DCChopper", "PowerElectronicsWindUnit", "BatteryUnit", "PhotoVoltaicUnit", "SolarGeneratingUnit", "ThermalGeneratingUnit", "WindGeneratingUnit", "NuclearGeneratingUnit", "HydroGeneratingUnit", "PotentialTransformer", "PostLineSensor", "CurrentTransformer", "EnergySource", "EnergyConsumer", "GroundingImpedance", "PetersenCoil", "Junction", "BusbarSection", "EquivalentBranch", "EquivalentInjection", "EquivalentShunt", "Disconnector", "GroundDisconnector", "Fuse", "Jumper", "Cut", "ACLineSegment", "CsConverter", "VsConverter", "DCDisconnector", "DCBreaker", "StaticVarCompensator", "PowerElectronicsConnection", "ExternalNetworkInjection", "NonConformLoad", "StationSupply", "ConformLoad", "LoadBreakSwitch", "Breaker", "SynchronousMachine", "AsynchronousMachine", "LinearShuntCompensator", "NonlinearShuntCompensator", "DisconnectingCircuitBreaker"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitSet.Equipment-valueType".to_string(),
class: "OperationalLimitSet".to_string(),
property: "OperationalLimitSet.Equipment".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitSet.Equipment-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_set_operational_limit_set_term_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitSet").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitSet>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal", "ACDCConverterDCTerminal", "DCTerminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitSet.Terminal-valueType".to_string(),
class: "OperationalLimitSet".to_string(),
property: "OperationalLimitSet.Terminal".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitSet.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_name_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitType>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_di_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitType>() {
Some(o) => o, None => continue,
};
if obj.direction.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitType.direction-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "OperationalLimitType.direction".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitType.direction-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_is_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitType>() {
Some(o) => o, None => continue,
};
if obj.is_infinite_duration.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitType.isInfiniteDuration-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "OperationalLimitType.isInfiniteDuration".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitType.isInfiniteDuration-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_di_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["OperationalLimitDirectionKind.high", "OperationalLimitDirectionKind.low", "OperationalLimitDirectionKind.absoluteValue"];
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitType>() {
Some(o) => o, None => continue,
};
if obj.direction.is_none() { continue; }
if !ALLOWED.contains(&obj.direction.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitType.direction-datatype".to_string(),
class: "OperationalLimitType".to_string(),
property: "OperationalLimitType.direction".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitType.direction-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_short_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_descrip_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_ac_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("OperationalLimitType.acceptableDuration") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitType.acceptableDuration-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "OperationalLimitType.acceptableDuration".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitType.acceptableDuration-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_ki_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["LimitKind.operationalVoltageLimit", "LimitKind.tc", "LimitKind.tct", "LimitKind.warningVoltage", "LimitKind.lowVoltage", "LimitKind.patl", "LimitKind.patlt", "LimitKind.alarmVoltage", "LimitKind.stability", "LimitKind.highVoltage", "LimitKind.tatl"];
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitType>() {
Some(o) => o, None => continue,
};
if obj.kind.is_none() { continue; }
if !ALLOWED.contains(&obj.kind.as_ref().map_or("", |r| r.mrid.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitType.kind-datatype".to_string(),
class: "OperationalLimitType".to_string(),
property: "OperationalLimitType.kind".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitType.kind-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_m_rid_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitType>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_operational_limit_type_operational_limit_type_ki_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("OperationalLimitType").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::OperationalLimitType>() {
Some(o) => o, None => continue,
};
if obj.kind.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimitType.kind-cardinality".to_string(),
class: "OperationalLimitType".to_string(),
property: "OperationalLimitType.kind".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimitType.kind-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PetersenCoil>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_short_name_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_conducting_equipment_base_voltage_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_equipment_equipment_container_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_energy_ident_cod_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_conducting_equipment_base_voltage_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PetersenCoil>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "PetersenCoil".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PetersenCoil>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_petersen_coil_equipment_normally_in_service_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PetersenCoil").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "PetersenCoil".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_ltc_f_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.ltc_flag.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.ltcFlag-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.ltcFlag".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.ltcFlag-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_neutr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.neutral_u.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralU-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.neutralU".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.transformer_end.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PowerTransformerEnd"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChanger.TransformerEnd-valueType".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "PhaseTapChanger.TransformerEnd".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:PowerTransformerEnd".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChanger.TransformerEnd-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_neutr_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.neutral_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralStep-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.neutralStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.winding_connection_angle.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerAsymmetrical.windingConnectionAngle-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "PhaseTapChangerAsymmetrical.windingConnectionAngle".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerAsymmetrical.windingConnectionAngle-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_high_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.high_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.highStep-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.highStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.highStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_low_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.low_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.lowStep-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.lowStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.lowStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_tap_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.tap_changer_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-valueType".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:TapChangerControl".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_identified_object_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_tap_c_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChanger.TapChangerControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.x_min.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerNonLinear.xMin-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "PhaseTapChangerNonLinear.xMin".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerNonLinear.xMin-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.transformer_end.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChanger.TransformerEnd-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "PhaseTapChanger.TransformerEnd".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChanger.TransformerEnd-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.voltage_step_increment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerNonLinear.voltageStepIncrement-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "PhaseTapChangerNonLinear.voltageStepIncrement".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerNonLinear.voltageStepIncrement-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_phase_tap_changer_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.x_max.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerNonLinear.xMax-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "PhaseTapChangerNonLinear.xMax".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerNonLinear.xMax-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_changer_norma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.normal_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.normalStep-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.normalStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.normalStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_neutral_u_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.neutral_u.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralU-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.neutralU".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_neutral_ste_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.neutral_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralStep-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.neutralStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_tap_changer_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.tap_changer_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-valueType".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:TapChangerControl".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_low_step_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.low_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.lowStep-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.lowStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.lowStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_m_rid_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_descr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_ltc_flag_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.ltc_flag.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.ltcFlag-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.ltcFlag".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.ltcFlag-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_high_step_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.high_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.highStep-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.highStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.highStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_linea_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.x_max.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerLinear.xMax-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "PhaseTapChangerLinear.xMax".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerLinear.xMax-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_trans_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.transformer_end.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PowerTransformerEnd"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChanger.TransformerEnd-valueType".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "PhaseTapChanger.TransformerEnd".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:PowerTransformerEnd".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChanger.TransformerEnd-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_short_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_linea_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.x_min.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerLinear.xMin-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "PhaseTapChangerLinear.xMin".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerLinear.xMin-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_energ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_tap_changer_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChanger.TapChangerControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_identified_object_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_normal_step_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.normal_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.normalStep-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.normalStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.normalStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_trans_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.transformer_end.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChanger.TransformerEnd-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "PhaseTapChanger.TransformerEnd".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChanger.TransformerEnd-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_linear_phase_tap_changer_linea_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.step_phase_shift_increment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerLinear.stepPhaseShiftIncrement-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "PhaseTapChangerLinear.stepPhaseShiftIncrement".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerLinear.stepPhaseShiftIncrement-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_tap_ch_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.tap_changer_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-valueType".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:TapChangerControl".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_neutra_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.neutral_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralStep-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.neutralStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_tap_ch_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChanger.TapChangerControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_high_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.high_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.highStep-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.highStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.highStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.transformer_end.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChanger.TransformerEnd-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "PhaseTapChanger.TransformerEnd".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChanger.TransformerEnd-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_ltc_fl_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.ltc_flag.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.ltcFlag-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.ltcFlag".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.ltcFlag-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_normal_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.normal_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.normalStep-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.normalStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.normalStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.x_min.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerNonLinear.xMin-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "PhaseTapChangerNonLinear.xMin".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerNonLinear.xMin-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.voltage_step_increment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerNonLinear.voltageStepIncrement-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "PhaseTapChangerNonLinear.voltageStepIncrement".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerNonLinear.voltageStepIncrement-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.transformer_end.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PowerTransformerEnd"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChanger.TransformerEnd-valueType".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "PhaseTapChanger.TransformerEnd".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:PowerTransformerEnd".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChanger.TransformerEnd-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_identified_object_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_neutra_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.neutral_u.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralU-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.neutralU".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_changer_low_st_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.low_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.lowStep-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.lowStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.lowStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_symmetrical_phase_tap_changer_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.x_max.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerNonLinear.xMax-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "PhaseTapChangerNonLinear.xMax".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerNonLinear.xMax-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_name_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTable").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTable>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PhaseTapChangerTable".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTable").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PhaseTapChangerTable".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_short_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTable").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PhaseTapChangerTable".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_descri_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTable").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PhaseTapChangerTable".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_identified_object_m_rid_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTable").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTable>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PhaseTapChangerTable".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTablePoint>() {
Some(o) => o, None => continue,
};
if obj.base.step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.step-cardinality".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.step".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.step-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.ratio") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.ratio-cardinality".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.ratio".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.ratio-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_phase_tap_changer_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTablePoint>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.phase_tap_changer_table.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PhaseTapChangerTable"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerTablePoint.PhaseTapChangerTable-valueType".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "PhaseTapChangerTablePoint.PhaseTapChangerTable".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:PhaseTapChangerTable".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerTablePoint.PhaseTapChangerTable-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.g") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.g-cardinality".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.g".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.g-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.x") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.x-cardinality".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.x".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.x-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_phase_tap_changer_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTablePoint>() {
Some(o) => o, None => continue,
};
if obj.phase_tap_changer_table.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerTablePoint.PhaseTapChangerTable-cardinality".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "PhaseTapChangerTablePoint.PhaseTapChangerTable".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerTablePoint.PhaseTapChangerTable-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.r") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.r-cardinality".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.r".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.r-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_phase_tap_changer_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTablePoint>() {
Some(o) => o, None => continue,
};
if obj.angle.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerTablePoint.angle-cardinality".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "PhaseTapChangerTablePoint.angle".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerTablePoint.angle-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_table_point_tap_changer_table_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.b") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.b-cardinality".to_string(),
class: "PhaseTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.b".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.b-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_m_ri_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_ltc_flag_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.ltc_flag.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.ltcFlag-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.ltcFlag".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.ltcFlag-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_low_step_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.low_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.lowStep-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.lowStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.lowStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_normal_ste_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.normal_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.normalStep-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.normalStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.normalStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_tap_change_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChanger.TapChangerControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_phase_tap_changer_tabu_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.phase_tap_changer_table.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerTabular.PhaseTapChangerTable-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "PhaseTapChangerTabular.PhaseTapChangerTable".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerTabular.PhaseTapChangerTable-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_phase_tap_changer_tran_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.transformer_end.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChanger.TransformerEnd-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "PhaseTapChanger.TransformerEnd".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChanger.TransformerEnd-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_neutral_u_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.neutral_u.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralU-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.neutralU".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_phase_tap_changer_tran_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.transformer_end.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PowerTransformerEnd"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChanger.TransformerEnd-valueType".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "PhaseTapChanger.TransformerEnd".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:PowerTransformerEnd".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChanger.TransformerEnd-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_neutral_st_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.neutral_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralStep-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.neutralStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_high_step_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.high_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.highStep-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.highStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.highStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_desc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_tap_changer_tap_change_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.tap_changer_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-valueType".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:TapChangerControl".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_phase_tap_changer_tabu_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.phase_tap_changer_table.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PhaseTapChangerTable"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PhaseTapChangerTabular.PhaseTapChangerTable-valueType".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "PhaseTapChangerTabular.PhaseTapChangerTable".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:PhaseTapChangerTable".to_string(),
severity: "sh:Violation".to_string(),
name: "PhaseTapChangerTabular.PhaseTapChangerTable-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_shor_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_phase_tap_changer_tabular_identified_object_ener_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_equipment_equipment_container_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_power_electronics_unit_min_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsUnit.minP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsUnit.minP-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "PowerElectronicsUnit.minP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsUnit.minP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_energy_iden_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_power_electronics_unit_max_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsUnit.maxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsUnit.maxP-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "PowerElectronicsUnit.maxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsUnit.maxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_equipment_normally_in_service_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhotoVoltaicUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhotoVoltaicUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_photo_voltaic_unit_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhotoVoltaicUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "PhotoVoltaicUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PostLineSensor>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_auxiliary_equipment_terminal_ha_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PostLineSensor>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-valueType".to_string(),
class: "PostLineSensor".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_auxiliary_equipment_terminal_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PostLineSensor>() {
Some(o) => o, None => continue,
};
if obj.base.base.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_description_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_equipment_equipment_container_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PostLineSensor>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_identified_object_short_name_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_post_line_sensor_equipment_normally_in_service_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PostLineSensor").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "PostLineSensor".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_equipment_equipment_contai_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_equipment_normally_in_serv_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_m_rid_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PotentialTransformer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_energy_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_short_na_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_name_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PotentialTransformer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_auxiliary_equipment_termin_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PotentialTransformer>() {
Some(o) => o, None => continue,
};
if obj.base.base.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_identified_object_descript_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "PotentialTransformer".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_potential_transformer_auxiliary_equipment_termin_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PotentialTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PotentialTransformer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-valueType".to_string(),
class: "PotentialTransformer".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_conducting_equipmen_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsConnection.minQ") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsConnection.minQ-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "PowerElectronicsConnection.minQ".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsConnection.minQ-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_conducting_equipmen_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsConnection.maxQ") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsConnection.maxQ-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "PowerElectronicsConnection.maxQ".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsConnection.maxQ-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_equipment_normally_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_regulating_cond_eq_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingCondEq.RegulatingControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_equipment_equipment_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_d_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsConnection.ratedU") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsConnection.ratedU-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "PowerElectronicsConnection.ratedU".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsConnection.ratedU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_equipment_aggregate_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsConnection.ratedS") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsConnection.ratedS-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "PowerElectronicsConnection.ratedS".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsConnection.ratedS-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsConnection.PowerElectronicsUnit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsConnection.PowerElectronicsUnit-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "PowerElectronicsConnection.PowerElectronicsUnit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsConnection.PowerElectronicsUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_identified_object_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_power_electronics_c_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.power_electronics_unit.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PowerElectronicsWindUnit", "BatteryUnit", "PhotoVoltaicUnit"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsConnection.PowerElectronicsUnit-valueType".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "PowerElectronicsConnection.PowerElectronicsUnit".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsConnection.PowerElectronicsUnit-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_sh_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_power_electronics_un_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsUnit.maxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsUnit.maxP-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "PowerElectronicsUnit.maxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsUnit.maxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_equipment_equipment_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_de_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_equipment_normally_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsWindUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_na_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsWindUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_identified_object_en_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_power_electronics_un_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerElectronicsUnit.minP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerElectronicsUnit.minP-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "PowerElectronicsUnit.minP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsUnit.minP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_wind_unit_equipment_aggregate_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsWindUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "PowerElectronicsWindUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_equipment_normally_in_service_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_conducting_equipment_base_volt_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformer>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "PowerTransformer".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_equipment_equipment_container_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_short_name_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_conducting_equipment_base_volt_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformer").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "PowerTransformer".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_powe_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.power_transformer.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PowerTransformer", "Equipment"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.PowerTransformer-valueType".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.PowerTransformer".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:PowerTransformer".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.PowerTransformer-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_energy_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_b_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.b.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.b-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.b".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.b-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_terminal_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TransformerEnd.Terminal-valueType".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "TransformerEnd.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "TransformerEnd.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_base_volta_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TransformerEnd.BaseVoltage-valueType".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "TransformerEnd.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "TransformerEnd.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_descript_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_powe_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.power_transformer.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.PowerTransformer-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.PowerTransformer".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.PowerTransformer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_rate_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.rated_u.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.ratedU-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.ratedU".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.ratedU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_x_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.x.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.x-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.x".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.x-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_r_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.r.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.r-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.r".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.r-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_m_rid_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_base_volta_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.base.base_voltage.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TransformerEnd.BaseVoltage-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "TransformerEnd.BaseVoltage".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "TransformerEnd.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_rate_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerTransformerEnd.ratedS") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.ratedS-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.ratedS".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.ratedS-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_terminal_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.base.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TransformerEnd.Terminal-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "TransformerEnd.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "TransformerEnd.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_conn_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerTransformerEnd.connectionKind") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.connectionKind-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.connectionKind".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.connectionKind-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_transformer_end_end_number_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.base.end_number.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TransformerEnd.endNumber-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "TransformerEnd.endNumber".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TransformerEnd.endNumber-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_name_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_conn_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["WindingConnection.Zn", "WindingConnection.Y", "WindingConnection.Z", "WindingConnection.A", "WindingConnection.D", "WindingConnection.I", "WindingConnection.Yn"];
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerTransformerEnd>() {
Some(o) => o, None => continue,
};
if obj.connection_kind.is_none() { continue; }
if !ALLOWED.contains(&obj.connection_kind.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.connectionKind-datatype".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.connectionKind".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.connectionKind-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_power_transformer_end_g_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("PowerTransformerEnd.g") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:PowerTransformerEnd.g-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "PowerTransformerEnd.g".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerTransformerEnd.g-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_transformer_end_identified_object_short_na_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerTransformerEnd").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "PowerTransformerEnd".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_short_name_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_ltc_flag_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.ltc_flag.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.ltcFlag-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.ltcFlag".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.ltcFlag-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_transformer_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.transformer_end.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["PowerTransformerEnd"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RatioTapChanger.TransformerEnd-valueType".to_string(),
class: "RatioTapChanger".to_string(),
property: "RatioTapChanger.TransformerEnd".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:PowerTransformerEnd".to_string(),
severity: "sh:Violation".to_string(),
name: "RatioTapChanger.TransformerEnd-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_neutral_step_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.neutral_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralStep-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.neutralStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_high_step_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.high_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.highStep-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.highStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.highStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_tap_changer_contro_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.tap_changer_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-valueType".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:TapChangerControl".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_step_voltage_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.step_voltage_increment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RatioTapChanger.stepVoltageIncrement-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "RatioTapChanger.stepVoltageIncrement".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RatioTapChanger.stepVoltageIncrement-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_ratio_tap_ch_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.ratio_tap_changer_table.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RatioTapChangerTable"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RatioTapChanger.RatioTapChangerTable-valueType".to_string(),
class: "RatioTapChanger".to_string(),
property: "RatioTapChanger.RatioTapChangerTable".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:RatioTapChangerTable".to_string(),
severity: "sh:Violation".to_string(),
name: "RatioTapChanger.RatioTapChangerTable-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_low_step_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.low_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.lowStep-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.lowStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.lowStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_transformer_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.transformer_end.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RatioTapChanger.TransformerEnd-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "RatioTapChanger.TransformerEnd".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "RatioTapChanger.TransformerEnd-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_neutral_u_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.neutral_u.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.neutralU-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.neutralU".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.neutralU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_tap_changer_contro_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChanger.TapChangerControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.TapChangerControl-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.TapChangerControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.TapChangerControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_ratio_tap_changer_ratio_tap_ch_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RatioTapChanger.RatioTapChangerTable") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RatioTapChanger.RatioTapChangerTable-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "RatioTapChanger.RatioTapChangerTable".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RatioTapChanger.RatioTapChangerTable-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_tap_changer_normal_step_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.normal_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChanger.normalStep-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.normalStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.normalStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_descri_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTable").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "RatioTapChangerTable".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_m_rid_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTable").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChangerTable>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "RatioTapChangerTable".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_short_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTable").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "RatioTapChangerTable".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_name_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTable").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChangerTable>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "RatioTapChangerTable".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTable").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "RatioTapChangerTable".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.x") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.x-cardinality".to_string(),
class: "RatioTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.x".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.x-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_ratio_tap_changer_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTablePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChangerTablePoint>() {
Some(o) => o, None => continue,
};
if obj.ratio_tap_changer_table.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RatioTapChangerTablePoint.RatioTapChangerTable-cardinality".to_string(),
class: "RatioTapChangerTablePoint".to_string(),
property: "RatioTapChangerTablePoint.RatioTapChangerTable".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "RatioTapChangerTablePoint.RatioTapChangerTable-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.ratio") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.ratio-cardinality".to_string(),
class: "RatioTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.ratio".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.ratio-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.b") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.b-cardinality".to_string(),
class: "RatioTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.b".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.b-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.g") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.g-cardinality".to_string(),
class: "RatioTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.g".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.g-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_ratio_tap_changer_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTablePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChangerTablePoint>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.ratio_tap_changer_table.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RatioTapChangerTable"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RatioTapChangerTablePoint.RatioTapChangerTable-valueType".to_string(),
class: "RatioTapChangerTablePoint".to_string(),
property: "RatioTapChangerTablePoint.RatioTapChangerTable".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:RatioTapChangerTable".to_string(),
severity: "sh:Violation".to_string(),
name: "RatioTapChangerTablePoint.RatioTapChangerTable-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTablePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("TapChangerTablePoint.r") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.r-cardinality".to_string(),
class: "RatioTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.r".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.r-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_ratio_tap_changer_table_point_tap_changer_table_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChangerTablePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChangerTablePoint>() {
Some(o) => o, None => continue,
};
if obj.base.step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapChangerTablePoint.step-cardinality".to_string(),
class: "RatioTapChangerTablePoint".to_string(),
property: "TapChangerTablePoint.step".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChangerTablePoint.step-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_curve_style_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.curve_style.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.curveStyle-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "Curve.curveStyle".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.curveStyle-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_m_ri_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_desc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_y1unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y1unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.y1unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y1Unit-datatype".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "Curve.y1Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y1Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_ener_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_y2unit_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Curve.y2Unit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y2Unit-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "Curve.y2Unit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y2Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_y2unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y2unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.y2unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y2Unit-datatype".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "Curve.y2Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y2Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_y1unit_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y1unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y1Unit-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "Curve.y1Unit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y1Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_x_unit_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.x_unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.xUnit-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "Curve.xUnit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.xUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_x_unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.x_unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.x_unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.xUnit-datatype".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "Curve.xUnit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.xUnit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_identified_object_shor_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reactive_capability_curve_curve_curve_style_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["CurveStyle.straightLineYValues", "CurveStyle.constantYValue"];
for mrid in dataset.by_type.get("ReactiveCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReactiveCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.curve_style.is_none() { continue; }
if !ALLOWED.contains(&obj.base.curve_style.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.curveStyle-datatype".to_string(),
class: "ReactiveCapabilityCurve".to_string(),
property: "Curve.curveStyle".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.curveStyle-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_interval_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegularTimePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegularTimePoint>() {
Some(o) => o, None => continue,
};
if obj.interval_schedule.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularTimePoint.IntervalSchedule-cardinality".to_string(),
class: "RegularTimePoint".to_string(),
property: "RegularTimePoint.IntervalSchedule".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularTimePoint.IntervalSchedule-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_value2_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegularTimePoint").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegularTimePoint.value2") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularTimePoint.value2-cardinality".to_string(),
class: "RegularTimePoint".to_string(),
property: "RegularTimePoint.value2".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularTimePoint.value2-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_value1_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegularTimePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegularTimePoint>() {
Some(o) => o, None => continue,
};
if obj.value1.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularTimePoint.value1-cardinality".to_string(),
class: "RegularTimePoint".to_string(),
property: "RegularTimePoint.value1".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularTimePoint.value1-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_sequence_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegularTimePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegularTimePoint>() {
Some(o) => o, None => continue,
};
if obj.sequence_number.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularTimePoint.sequenceNumber-cardinality".to_string(),
class: "RegularTimePoint".to_string(),
property: "RegularTimePoint.sequenceNumber".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularTimePoint.sequenceNumber-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regular_time_point_regular_time_point_interval_s_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegularTimePoint").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegularTimePoint>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.interval_schedule.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ConformLoadSchedule", "SwitchSchedule", "TapSchedule", "NonConformLoadSchedule", "RegulationSchedule"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularTimePoint.IntervalSchedule-valueType".to_string(),
class: "RegularTimePoint".to_string(),
property: "RegularTimePoint.IntervalSchedule".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularTimePoint.IntervalSchedule-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_nonlinear_shunt_compensator_regulating_cond_eq_r_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.regulating_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RegulatingControl", "TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-valueType".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_regulating_cond_eq_regulati_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.regulating_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RegulatingControl", "TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-valueType".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_linear_shunt_compensator_regulating_cond_eq_regu_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.regulating_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RegulatingControl", "TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-valueType".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_external_network_injection_regulating_cond_eq_re_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.regulating_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RegulatingControl", "TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-valueType".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_regulating_cond_eq_regulatin_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.regulating_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RegulatingControl", "TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-valueType".to_string(),
class: "SynchronousMachine".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_power_electronics_connection_regulating_cond_eq_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.regulating_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RegulatingControl", "TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-valueType".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_regulating_cond_eq_regula_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.regulating_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RegulatingControl", "TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-valueType".to_string(),
class: "StaticVarCompensator".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_regulating_control_terminal_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingControl.Terminal-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_regulating_control_terminal_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingControl.Terminal-valueType".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_regulating_control_mode_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["RegulatingControlModeKind.powerFactor", "RegulatingControlModeKind.activePower", "RegulatingControlModeKind.temperature", "RegulatingControlModeKind.reactivePower", "RegulatingControlModeKind.admittance", "RegulatingControlModeKind.currentFlow", "RegulatingControlModeKind.timeScheduled", "RegulatingControlModeKind.voltage"];
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.mode.is_none() { continue; }
if !ALLOWED.contains(&obj.mode.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingControl.mode-datatype".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.mode".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.mode-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_energy_iden_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulating_control_regulating_control_mode_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.mode.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingControl.mode-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.mode".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.mode-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_season_day_type_schedule_sea_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.season.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Season"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-valueType".to_string(),
class: "RegulationSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Season".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_valu_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_valu_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BasicIntervalSchedule.value2Unit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regular_interval_schedule_ti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.time_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.timeStep-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "RegularIntervalSchedule.timeStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.timeStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_energy_ide_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regular_interval_schedule_en_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_descriptio_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regulation_schedule_regulati_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.regulating_control.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulationSchedule.RegulatingControl-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "RegulationSchedule.RegulatingControl".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulationSchedule.RegulatingControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_star_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_season_day_type_schedule_day_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.day_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DayType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-valueType".to_string(),
class: "RegulationSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:DayType".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_season_day_type_schedule_day_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.day_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regular_interval_schedule_en_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.end_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-datatype".to_string(),
class: "RegulationSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_star_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.base.start_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-datatype".to_string(),
class: "RegulationSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_valu_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value1unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-datatype".to_string(),
class: "RegulationSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_identified_object_m_rid_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_basic_interval_schedule_valu_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value2unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value2unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-datatype".to_string(),
class: "RegulationSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_season_day_type_schedule_sea_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.season.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-cardinality".to_string(),
class: "RegulationSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_regulation_schedule_regulation_schedule_regulati_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulationSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulationSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.regulating_control.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RegulatingControl", "TapChangerControl"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulationSchedule.RegulatingControl-valueType".to_string(),
class: "RegulationSchedule".to_string(),
property: "RegulationSchedule.RegulatingControl".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulationSchedule.RegulatingControl-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReportingGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ReportingGroup".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReportingGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ReportingGroup".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReportingGroup").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ReportingGroup".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReportingGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReportingGroup>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ReportingGroup".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_reporting_group_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ReportingGroup").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ReportingGroup>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ReportingGroup".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_asynchronous_machine_rotating_machine_generating_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.generating_unit.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["GeneratingUnit", "SolarGeneratingUnit", "ThermalGeneratingUnit", "WindGeneratingUnit", "NuclearGeneratingUnit", "HydroGeneratingUnit"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.GeneratingUnit-valueType".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RotatingMachine.GeneratingUnit".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.GeneratingUnit-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_generating_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.generating_unit.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["GeneratingUnit", "SolarGeneratingUnit", "ThermalGeneratingUnit", "WindGeneratingUnit", "NuclearGeneratingUnit", "HydroGeneratingUnit"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.GeneratingUnit-valueType".to_string(),
class: "SynchronousMachine".to_string(),
property: "RotatingMachine.GeneratingUnit".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.GeneratingUnit-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_season_start_date_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Season>() {
Some(o) => o, None => continue,
};
if obj.start_date.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Season.startDate-cardinality".to_string(),
class: "Season".to_string(),
property: "Season.startDate".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Season.startDate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_energy_ident_code_eic_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Season".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Season".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_season_end_date_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Season>() {
Some(o) => o, None => continue,
};
if obj.end_date.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Season.endDate-cardinality".to_string(),
class: "Season".to_string(),
property: "Season.endDate".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Season.endDate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Season>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Season".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Season>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Season".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_season_start_date_datatype(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Season>() {
Some(o) => o, None => continue,
};
if obj.start_date.is_empty() { continue; }
if !is_xsd_gmonthday(&obj.start_date) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Season.startDate-datatype".to_string(),
class: "Season".to_string(),
property: "Season.startDate".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "Season.startDate-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Season".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_season_season_end_date_datatype(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Season").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Season>() {
Some(o) => o, None => continue,
};
if obj.end_date.is_empty() { continue; }
if !is_xsd_gmonthday(&obj.end_date) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Season.endDate-datatype".to_string(),
class: "Season".to_string(),
property: "Season.endDate".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "Season.endDate-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SeriesCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_equipment_normally_in_service_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_conducting_equipment_base_vol_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_conducting_equipment_base_vol_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SeriesCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "SeriesCompensator".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_equipment_equipment_container_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_energy_iden_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_series_compensator_x_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SeriesCompensator>() {
Some(o) => o, None => continue,
};
if obj.x.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeriesCompensator.x-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "SeriesCompensator.x".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "SeriesCompensator.x-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SeriesCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_series_compensator_series_compensator_r_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SeriesCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SeriesCompensator>() {
Some(o) => o, None => continue,
};
if obj.r.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeriesCompensator.r-cardinality".to_string(),
class: "SeriesCompensator".to_string(),
property: "SeriesCompensator.r".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "SeriesCompensator.r-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_startup_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupCost-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.startupCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_maximum_al_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.maximumAllowableSpinningReserve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.maximumAllowableSpinningReserve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_nominal_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.nominalP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.nominalP-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.nominalP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.nominalP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_solar_generating_unit_sola_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.solar_power_plant.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["SolarPowerPlant"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SolarGeneratingUnit.SolarPowerPlant-valueType".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "SolarGeneratingUnit.SolarPowerPlant".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: eu:SolarPowerPlant".to_string(),
severity: "sh:Violation".to_string(),
name: "SolarGeneratingUnit.SolarPowerPlant-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_energy_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_short_pf_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.shortPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.shortPF-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.shortPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.shortPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_descript_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_gen_contro_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["GeneratorControlSource.onAGC", "GeneratorControlSource.offAGC", "GeneratorControlSource.plantControl", "GeneratorControlSource.unavailable"];
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.gen_control_source.is_none() { continue; }
if !ALLOWED.contains(&obj.base.gen_control_source.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-datatype".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_total_effi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.totalEfficiency") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.totalEfficiency-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.totalEfficiency".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.totalEfficiency-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_name_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_variable_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.variableCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.variableCost-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.variableCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.variableCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_max_operat_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.max_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maxOperatingP-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.maxOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maxOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_m_rid_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_equipment_normally_in_serv_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_rated_gros_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_governor_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.governorSCD") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.governorSCD-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.governorSCD".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.governorSCD-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_rated_net_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedNetMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedNetMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_long_pf_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.longPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.longPF-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.longPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.longPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_identified_object_short_na_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_gen_contro_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.genControlSource") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_solar_generating_unit_sola_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("SolarGeneratingUnit.SolarPowerPlant") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SolarGeneratingUnit.SolarPowerPlant-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "SolarGeneratingUnit.SolarPowerPlant".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "SolarGeneratingUnit.SolarPowerPlant-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_equipment_equipment_contai_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_min_operat_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.min_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.minOperatingP-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.minOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.minOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_rated_gros_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMinP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMinP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_generating_unit_generating_unit_startup_ti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupTime") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupTime-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.startupTime".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_description_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "SolarPowerPlant".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarPowerPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarPowerPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "SolarPowerPlant".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "SolarPowerPlant".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarPowerPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarPowerPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "SolarPowerPlant".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_solar_power_plant_identified_object_short_name_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "SolarPowerPlant".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_equipment_aggregate_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_short_n_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_name_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_conducting_equipment_base_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("StaticVarCompensator.sVCControlMode") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:StaticVarCompensator.sVCControlMode-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "StaticVarCompensator.sVCControlMode".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "StaticVarCompensator.sVCControlMode-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_descrip_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_regulating_cond_eq_regula_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingCondEq.RegulatingControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_equipment_equipment_conta_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_conducting_equipment_base_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "StaticVarCompensator".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_equipment_normally_in_ser_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_vo_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("StaticVarCompensator.voltageSetPoint") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:StaticVarCompensator.voltageSetPoint-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "StaticVarCompensator.voltageSetPoint".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "StaticVarCompensator.voltageSetPoint-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_sl_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.slope.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:StaticVarCompensator.slope-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "StaticVarCompensator.slope".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "StaticVarCompensator.slope-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_in_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.inductive_rating.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:StaticVarCompensator.inductiveRating-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "StaticVarCompensator.inductiveRating".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "StaticVarCompensator.inductiveRating-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_identified_object_m_rid_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_s_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["SVCControlMode.voltage", "SVCControlMode.reactivePower"];
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.s_vc_control_mode.is_none() { continue; }
if !ALLOWED.contains(&obj.s_vc_control_mode.as_ref().map_or("", |r| r.mrid.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:StaticVarCompensator.sVCControlMode-datatype".to_string(),
class: "StaticVarCompensator".to_string(),
property: "StaticVarCompensator.sVCControlMode".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "StaticVarCompensator.sVCControlMode-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_static_var_compensator_static_var_compensator_ca_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.capacitive_rating.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:StaticVarCompensator.capacitiveRating-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "StaticVarCompensator.capacitiveRating".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "StaticVarCompensator.capacitiveRating-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_equipment_normally_in_service_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_energy_ident_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StationSupply>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_load_response_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.LoadResponse") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.LoadResponse-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "EnergyConsumer.LoadResponse".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.LoadResponse-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_pfixed_pct_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.pfixedPct") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.pfixedPct-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "EnergyConsumer.pfixedPct".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.pfixedPct-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_pfixed_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.pfixed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.pfixed-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "EnergyConsumer.pfixed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.pfixed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_conducting_equipment_base_voltage_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_qfixed_pct_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.qfixedPct") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.qfixedPct-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "EnergyConsumer.qfixedPct".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.qfixedPct-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StationSupply>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_equipment_equipment_container_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_conducting_equipment_base_voltage_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StationSupply>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "StationSupply".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_qfixed_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergyConsumer.qfixed") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.qfixed-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "EnergyConsumer.qfixed".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.qfixed-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_station_supply_energy_consumer_load_response_has_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StationSupply>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.load_response.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["LoadResponseCharacteristic"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:EnergyConsumer.LoadResponse-valueType".to_string(),
class: "StationSupply".to_string(),
property: "EnergyConsumer.LoadResponse".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:LoadResponseCharacteristic".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.LoadResponse-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_descri_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubGeographicalRegion").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "SubGeographicalRegion".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubGeographicalRegion").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "SubGeographicalRegion".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_short_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubGeographicalRegion").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "SubGeographicalRegion".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_sub_geographical_region_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubGeographicalRegion").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SubGeographicalRegion>() {
Some(o) => o, None => continue,
};
if obj.region.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SubGeographicalRegion.Region-cardinality".to_string(),
class: "SubGeographicalRegion".to_string(),
property: "SubGeographicalRegion.Region".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SubGeographicalRegion.Region-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_m_rid_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubGeographicalRegion").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SubGeographicalRegion>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "SubGeographicalRegion".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_sub_geographical_region_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubGeographicalRegion").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SubGeographicalRegion>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.region.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["GeographicalRegion"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SubGeographicalRegion.Region-valueType".to_string(),
class: "SubGeographicalRegion".to_string(),
property: "SubGeographicalRegion.Region".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:GeographicalRegion".to_string(),
severity: "sh:Violation".to_string(),
name: "SubGeographicalRegion.Region-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_geographical_region_identified_object_name_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubGeographicalRegion").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SubGeographicalRegion>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "SubGeographicalRegion".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubLoadArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "SubLoadArea".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_energy_ident_cod_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubLoadArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "SubLoadArea".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubLoadArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SubLoadArea>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "SubLoadArea".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_short_name_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubLoadArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "SubLoadArea".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubLoadArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SubLoadArea>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "SubLoadArea".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_sub_load_area_load_area_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubLoadArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SubLoadArea>() {
Some(o) => o, None => continue,
};
if obj.load_area.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SubLoadArea.LoadArea-cardinality".to_string(),
class: "SubLoadArea".to_string(),
property: "SubLoadArea.LoadArea".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SubLoadArea.LoadArea-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_sub_load_area_sub_load_area_load_area_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SubLoadArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SubLoadArea>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.load_area.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["LoadArea"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SubLoadArea.LoadArea-valueType".to_string(),
class: "SubLoadArea".to_string(),
property: "SubLoadArea.LoadArea".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:LoadArea".to_string(),
severity: "sh:Violation".to_string(),
name: "SubLoadArea.LoadArea-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Substation").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Substation".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Substation").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Substation>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Substation".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_substation_substation_region_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Substation").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Substation>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.region.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["SubGeographicalRegion"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Substation.Region-valueType".to_string(),
class: "Substation".to_string(),
property: "Substation.Region".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:SubGeographicalRegion".to_string(),
severity: "sh:Violation".to_string(),
name: "Substation.Region-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Substation").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Substation>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Substation".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_substation_substation_region_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Substation").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Substation>() {
Some(o) => o, None => continue,
};
if obj.region.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Substation.Region-cardinality".to_string(),
class: "Substation".to_string(),
property: "Substation.Region".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "Substation.Region-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_energy_ident_code_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Substation").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Substation".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_substation_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Substation").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Substation".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_energy_ident_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SurgeArrester>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_equipment_normally_in_service_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_auxiliary_equipment_terminal_has_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SurgeArrester>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-valueType".to_string(),
class: "SurgeArrester".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_auxiliary_equipment_terminal_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SurgeArrester>() {
Some(o) => o, None => continue,
};
if obj.base.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_equipment_equipment_container_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_surge_arrester_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SurgeArrester").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SurgeArrester>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "SurgeArrester".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_energy_ident_code_eic_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Switch".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_conducting_equipment_base_voltage_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "Switch".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Switch".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "Switch".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_conducting_equipment_base_voltage_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "Switch".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Switch".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_switch_normal_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
if obj.normal_open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.normalOpen-cardinality".to_string(),
class: "Switch".to_string(),
property: "Switch.normalOpen".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.normalOpen-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Switch".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Switch".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "Switch".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_switch_rated_current_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Switch.ratedCurrent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.ratedCurrent-cardinality".to_string(),
class: "Switch".to_string(),
property: "Switch.ratedCurrent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.ratedCurrent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_switch_retained_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
if obj.retained.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Switch.retained-cardinality".to_string(),
class: "Switch".to_string(),
property: "Switch.retained".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.retained-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "Switch".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_start_ti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.base.start_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-datatype".to_string(),
class: "SwitchSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_start_ti_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_short_name_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_season_day_type_schedule_day_typ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.day_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DayType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-valueType".to_string(),
class: "SwitchSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:DayType".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_switch_schedule_switch_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.switch.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SwitchSchedule.Switch-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "SwitchSchedule.Switch".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SwitchSchedule.Switch-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_value2un_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value2unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value2unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-datatype".to_string(),
class: "SwitchSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_value1un_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value1unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-datatype".to_string(),
class: "SwitchSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_description_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_value2un_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BasicIntervalSchedule.value2Unit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_season_day_type_schedule_season_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.season.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_regular_interval_schedule_time_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.time_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.timeStep-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "RegularIntervalSchedule.timeStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.timeStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_regular_interval_schedule_end_ti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.end_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-datatype".to_string(),
class: "SwitchSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_season_day_type_schedule_day_typ_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.day_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_basic_interval_schedule_value1un_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_regular_interval_schedule_end_ti_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_identified_object_energy_ident_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "SwitchSchedule".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_season_day_type_schedule_season_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.season.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Season"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-valueType".to_string(),
class: "SwitchSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Season".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_switch_schedule_switch_schedule_switch_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SwitchSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SwitchSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.switch.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Switch", "Disconnector", "GroundDisconnector", "Fuse", "Jumper", "Cut", "LoadBreakSwitch", "Breaker", "DisconnectingCircuitBreaker"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SwitchSchedule.Switch-valueType".to_string(),
class: "SwitchSchedule".to_string(),
property: "SwitchSchedule.Switch".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "SwitchSchedule.Switch-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_equipment_equipment_containe_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_conducting_equipment_base_vo_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "SynchronousMachine".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_rated_power_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RotatingMachine.ratedPowerFactor") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.ratedPowerFactor-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "RotatingMachine.ratedPowerFactor".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.ratedPowerFactor-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_initial_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("SynchronousMachine.InitialReactiveCapabilityCurve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SynchronousMachine.InitialReactiveCapabilityCurve-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.InitialReactiveCapabilityCurve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.InitialReactiveCapabilityCurve-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_generating_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RotatingMachine.GeneratingUnit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.GeneratingUnit-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "RotatingMachine.GeneratingUnit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.GeneratingUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_rated_s_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RotatingMachine.ratedS") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.ratedS-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "RotatingMachine.ratedS".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.ratedS-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_conducting_equipment_base_vo_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_q_percen_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("SynchronousMachine.qPercent") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SynchronousMachine.qPercent-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.qPercent".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.qPercent-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_rotating_machine_rated_u_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RotatingMachine.ratedU") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RotatingMachine.ratedU-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "RotatingMachine.ratedU".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.ratedU-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_max_q_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("SynchronousMachine.maxQ") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SynchronousMachine.maxQ-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.maxQ".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.maxQ-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_m_rid_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_equipment_normally_in_servic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_regulating_cond_eq_regulatin_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingCondEq.RegulatingControl") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingCondEq.RegulatingControl-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "RegulatingCondEq.RegulatingControl".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.RegulatingControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_type_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.type_.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SynchronousMachine.type-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.type".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.type-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_min_q_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("SynchronousMachine.minQ") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SynchronousMachine.minQ-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.minQ".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.minQ-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_initial_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.initial_reactive_capability_curve.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ReactiveCapabilityCurve"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SynchronousMachine.InitialReactiveCapabilityCurve-valueType".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.InitialReactiveCapabilityCurve".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ReactiveCapabilityCurve".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.InitialReactiveCapabilityCurve-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_synchronous_machine_type_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["SynchronousMachineKind.generatorOrCondenser", "SynchronousMachineKind.generator", "SynchronousMachineKind.motorOrCondenser", "SynchronousMachineKind.generatorOrCondenserOrMotor", "SynchronousMachineKind.generatorOrMotor", "SynchronousMachineKind.motor", "SynchronousMachineKind.condenser"];
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.type_.is_none() { continue; }
if !ALLOWED.contains(&obj.type_.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SynchronousMachine.type-datatype".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.type".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.type-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_descriptio_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_synchronous_machine_identified_object_energy_ide_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_regulating_control_terminal_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingControl.Terminal-valueType".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_regulating_control_mode_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["RegulatingControlModeKind.powerFactor", "RegulatingControlModeKind.activePower", "RegulatingControlModeKind.temperature", "RegulatingControlModeKind.reactivePower", "RegulatingControlModeKind.admittance", "RegulatingControlModeKind.currentFlow", "RegulatingControlModeKind.timeScheduled", "RegulatingControlModeKind.voltage"];
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.mode.is_none() { continue; }
if !ALLOWED.contains(&obj.base.mode.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingControl.mode-datatype".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.mode".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.mode-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_m_rid_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_regulating_control_mode_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.mode.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingControl.mode-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.mode".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.mode-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_regulating_control_terminal_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegulatingControl.Terminal-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_energy_ide_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_changer_control_identified_object_descriptio_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_season_day_type_schedule_season_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.season.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_regular_interval_schedule_time_step_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.time_step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.timeStep-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "RegularIntervalSchedule.timeStep".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.timeStep-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_season_day_type_schedule_day_type_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.day_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_value1unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value1unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-datatype".to_string(),
class: "TapSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_season_day_type_schedule_season_has_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.season.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Season"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.Season-valueType".to_string(),
class: "TapSchedule".to_string(),
property: "SeasonDayTypeSchedule.Season".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Season".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.Season-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_start_time_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.base.start_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-datatype".to_string(),
class: "TapSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_regular_interval_schedule_end_time_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_start_time_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.start_time.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.startTime-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "BasicIntervalSchedule.startTime".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.startTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_season_day_type_schedule_day_type_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.day_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["DayType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:SeasonDayTypeSchedule.DayType-valueType".to_string(),
class: "TapSchedule".to_string(),
property: "SeasonDayTypeSchedule.DayType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:DayType".to_string(),
severity: "sh:Violation".to_string(),
name: "SeasonDayTypeSchedule.DayType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_description_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_value1unit_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value1unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value1Unit-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "BasicIntervalSchedule.value1Unit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value1Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_value2unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.value2unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.base.base.value2unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-datatype".to_string(),
class: "TapSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_regular_interval_schedule_end_time_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.base.base.end_time.is_empty() { continue; }
if !is_xsd_datetime(&obj.base.base.end_time) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:RegularIntervalSchedule.endTime-datatype".to_string(),
class: "TapSchedule".to_string(),
property: "RegularIntervalSchedule.endTime".to_string(),
message: "The datatype is not literal or it violates the xsd datatype.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegularIntervalSchedule.endTime-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_basic_interval_schedule_value2unit_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("BasicIntervalSchedule.value2Unit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:BasicIntervalSchedule.value2Unit-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "BasicIntervalSchedule.value2Unit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "BasicIntervalSchedule.value2Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_tap_schedule_tap_changer_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
if obj.tap_changer.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapSchedule.TapChanger-cardinality".to_string(),
class: "TapSchedule".to_string(),
property: "TapSchedule.TapChanger".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "TapSchedule.TapChanger-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tap_schedule_tap_schedule_tap_changer_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapSchedule").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapSchedule>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.tap_changer.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["RatioTapChanger", "PhaseTapChangerLinear", "PhaseTapChangerTabular", "PhaseTapChangerSymmetrical", "PhaseTapChangerAsymmetrical"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TapSchedule.TapChanger-valueType".to_string(),
class: "TapSchedule".to_string(),
property: "TapSchedule.TapChanger".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "TapSchedule.TapChanger-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "Terminal".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_phases_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["PhaseCode.X", "PhaseCode.BC", "PhaseCode.BCN", "PhaseCode.ABN", "PhaseCode.s1N", "PhaseCode.XYN", "PhaseCode.s2", "PhaseCode.AN", "PhaseCode.none", "PhaseCode.s1", "PhaseCode.N", "PhaseCode.CN", "PhaseCode.XY", "PhaseCode.A", "PhaseCode.B", "PhaseCode.C", "PhaseCode.AB", "PhaseCode.AC", "PhaseCode.XN", "PhaseCode.s12N", "PhaseCode.ACN", "PhaseCode.s12", "PhaseCode.ABCN", "PhaseCode.s2N", "PhaseCode.ABC", "PhaseCode.BN"];
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
if obj.phases.is_none() { continue; }
if !ALLOWED.contains(&obj.phases.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Terminal.phases-datatype".to_string(),
class: "Terminal".to_string(),
property: "Terminal.phases".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Terminal.phases-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_acdc_terminal_sequence_number_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
if obj.base.sequence_number.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.sequenceNumber-cardinality".to_string(),
class: "Terminal".to_string(),
property: "ACDCTerminal.sequenceNumber".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.sequenceNumber-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_conducting_equipment_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
if obj.conducting_equipment.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Terminal.ConductingEquipment-cardinality".to_string(),
class: "Terminal".to_string(),
property: "Terminal.ConductingEquipment".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "Terminal.ConductingEquipment-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_connectivity_node_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.connectivity_node.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ConnectivityNode"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Terminal.ConnectivityNode-valueType".to_string(),
class: "Terminal".to_string(),
property: "Terminal.ConnectivityNode".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ConnectivityNode".to_string(),
severity: "sh:Violation".to_string(),
name: "Terminal.ConnectivityNode-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_connectivity_node_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Terminal.ConnectivityNode") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Terminal.ConnectivityNode-cardinality".to_string(),
class: "Terminal".to_string(),
property: "Terminal.ConnectivityNode".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Terminal.ConnectivityNode-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "Terminal".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "Terminal".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_phases_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Terminal.phases") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Terminal.phases-cardinality".to_string(),
class: "Terminal".to_string(),
property: "Terminal.phases".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Terminal.phases-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_acdc_terminal_bus_name_marker_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.bus_name_marker.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BusNameMarker"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.BusNameMarker-valueType".to_string(),
class: "Terminal".to_string(),
property: "ACDCTerminal.BusNameMarker".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BusNameMarker".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.BusNameMarker-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_energy_ident_code_eic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "Terminal".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Terminal".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_acdc_terminal_bus_name_marker_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCTerminal.BusNameMarker") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCTerminal.BusNameMarker-cardinality".to_string(),
class: "Terminal".to_string(),
property: "ACDCTerminal.BusNameMarker".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.BusNameMarker-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_terminal_terminal_conducting_equipment_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.conducting_equipment.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Clamp", "SeriesCompensator", "Switch", "Ground", "PowerTransformer", "EnergySource", "EnergyConsumer", "GroundingImpedance", "PetersenCoil", "Junction", "BusbarSection", "EquivalentBranch", "EquivalentInjection", "EquivalentShunt", "Disconnector", "GroundDisconnector", "Fuse", "Jumper", "Cut", "ACLineSegment", "CsConverter", "VsConverter", "StaticVarCompensator", "PowerElectronicsConnection", "ExternalNetworkInjection", "NonConformLoad", "StationSupply", "ConformLoad", "LoadBreakSwitch", "Breaker", "SynchronousMachine", "AsynchronousMachine", "LinearShuntCompensator", "NonlinearShuntCompensator", "DisconnectingCircuitBreaker", "Equipment"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Terminal.ConductingEquipment-valueType".to_string(),
class: "Terminal".to_string(),
property: "Terminal.ConductingEquipment".to_string(),
message: "One of the following occurs: 1) The value type is not IRI; 2) The value type is not the right class.".to_string(),
severity: "sh:Violation".to_string(),
name: "Terminal.ConductingEquipment-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_governor_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.governorSCD") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.governorSCD-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.governorSCD".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.governorSCD-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.cogeneration_plant.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["CogenerationPlant"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ThermalGeneratingUnit.CogenerationPlant-valueType".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "ThermalGeneratingUnit.CogenerationPlant".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:CogenerationPlant".to_string(),
severity: "sh:Violation".to_string(),
name: "ThermalGeneratingUnit.CogenerationPlant-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ThermalGeneratingUnit.CombinedCyclePlant") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ThermalGeneratingUnit.CombinedCyclePlant-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "ThermalGeneratingUnit.CombinedCyclePlant".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ThermalGeneratingUnit.CombinedCyclePlant-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_gen_cont_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.genControlSource") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_variable_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.variableCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.variableCost-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.variableCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.variableCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_equipment_aggregate_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_equipment_normally_in_se_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_equipment_equipment_cont_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_energy_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_descri_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_total_ef_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.totalEfficiency") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.totalEfficiency-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.totalEfficiency".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.totalEfficiency-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_long_pf_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.longPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.longPF-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.longPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.longPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_startup_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupTime") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupTime-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.startupTime".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_rated_gr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMinP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMinP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.caes_plant.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["CAESPlant"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ThermalGeneratingUnit.CAESPlant-valueType".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "ThermalGeneratingUnit.CAESPlant".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:CAESPlant".to_string(),
severity: "sh:Violation".to_string(),
name: "ThermalGeneratingUnit.CAESPlant-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_short_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_short_pf_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.shortPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.shortPF-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.shortPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.shortPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_startup_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupCost-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.startupCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_name_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_rated_ne_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedNetMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedNetMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.combined_cycle_plant.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["CombinedCyclePlant"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ThermalGeneratingUnit.CombinedCyclePlant-valueType".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "ThermalGeneratingUnit.CombinedCyclePlant".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:CombinedCyclePlant".to_string(),
severity: "sh:Violation".to_string(),
name: "ThermalGeneratingUnit.CombinedCyclePlant-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_maximum_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.maximumAllowableSpinningReserve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.maximumAllowableSpinningReserve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_gen_cont_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["GeneratorControlSource.onAGC", "GeneratorControlSource.offAGC", "GeneratorControlSource.plantControl", "GeneratorControlSource.unavailable"];
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.gen_control_source.is_none() { continue; }
if !ALLOWED.contains(&obj.base.gen_control_source.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-datatype".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_identified_object_m_rid_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_min_oper_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.min_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.minOperatingP-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.minOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.minOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_max_oper_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.max_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maxOperatingP-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.maxOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maxOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_nominal_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.nominalP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.nominalP-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.nominalP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.nominalP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ThermalGeneratingUnit.CAESPlant") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ThermalGeneratingUnit.CAESPlant-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "ThermalGeneratingUnit.CAESPlant".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ThermalGeneratingUnit.CAESPlant-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_generating_unit_rated_gr_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_thermal_generating_unit_thermal_generating_unit_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ThermalGeneratingUnit.CogenerationPlant") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ThermalGeneratingUnit.CogenerationPlant-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "ThermalGeneratingUnit.CogenerationPlant".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ThermalGeneratingUnit.CogenerationPlant-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_energy_ident_code_eic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "TieFlow".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_terminal_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TieFlow>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TieFlow.Terminal-valueType".to_string(),
class: "TieFlow".to_string(),
property: "TieFlow.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "TieFlow.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_control_area_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TieFlow>() {
Some(o) => o, None => continue,
};
if obj.control_area.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TieFlow.ControlArea-cardinality".to_string(),
class: "TieFlow".to_string(),
property: "TieFlow.ControlArea".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "TieFlow.ControlArea-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TieFlow>() {
Some(o) => o, None => continue,
};
if obj.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "TieFlow".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "TieFlow".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_positive_flow_in_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TieFlow>() {
Some(o) => o, None => continue,
};
if obj.positive_flow_in.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TieFlow.positiveFlowIn-cardinality".to_string(),
class: "TieFlow".to_string(),
property: "TieFlow.positiveFlowIn".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TieFlow.positiveFlowIn-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "TieFlow".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_control_area_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TieFlow>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.control_area.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["ControlArea"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TieFlow.ControlArea-valueType".to_string(),
class: "TieFlow".to_string(),
property: "TieFlow.ControlArea".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:ControlArea".to_string(),
severity: "sh:Violation".to_string(),
name: "TieFlow.ControlArea-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TieFlow>() {
Some(o) => o, None => continue,
};
if obj.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "TieFlow".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_tie_flow_tie_flow_terminal_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TieFlow").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TieFlow>() {
Some(o) => o, None => continue,
};
if obj.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:TieFlow.Terminal-cardinality".to_string(),
class: "TieFlow".to_string(),
property: "TieFlow.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "TieFlow.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_base_voltage_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLevel>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VoltageLevel.BaseVoltage-valueType".to_string(),
class: "VoltageLevel".to_string(),
property: "VoltageLevel.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "VoltageLevel.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_substation_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLevel>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.substation.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Substation"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VoltageLevel.Substation-valueType".to_string(),
class: "VoltageLevel".to_string(),
property: "VoltageLevel.Substation".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Substation".to_string(),
severity: "sh:Violation".to_string(),
name: "VoltageLevel.Substation-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLevel>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_low_voltage_limit_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VoltageLevel.lowVoltageLimit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VoltageLevel.lowVoltageLimit-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "VoltageLevel.lowVoltageLimit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VoltageLevel.lowVoltageLimit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_high_voltage_limit_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VoltageLevel.highVoltageLimit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VoltageLevel.highVoltageLimit-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "VoltageLevel.highVoltageLimit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VoltageLevel.highVoltageLimit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_substation_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLevel>() {
Some(o) => o, None => continue,
};
if obj.substation.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VoltageLevel.Substation-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "VoltageLevel.Substation".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "VoltageLevel.Substation-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_voltage_level_base_voltage_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLevel>() {
Some(o) => o, None => continue,
};
if obj.base_voltage.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VoltageLevel.BaseVoltage-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "VoltageLevel.BaseVoltage".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "VoltageLevel.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLevel>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_short_name_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_level_identified_object_energy_ident_cod_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLevel").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "VoltageLevel".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_energy_ident_cod_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLimit>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_description_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_voltage_limit_normal_value_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLimit>() {
Some(o) => o, None => continue,
};
if obj.normal_value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VoltageLimit.normalValue-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "VoltageLimit.normalValue".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "VoltageLimit.normalValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_operational_limit_operational_limi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLimit>() {
Some(o) => o, None => continue,
};
if obj.base.operational_limit_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitType-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "OperationalLimit.OperationalLimitType".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitType-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_short_name_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_operational_limit_operational_limi_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLimit>() {
Some(o) => o, None => continue,
};
if obj.base.operational_limit_set.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitSet-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "OperationalLimit.OperationalLimitSet".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitSet-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_operational_limit_operational_limi_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLimit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.operational_limit_type.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["OperationalLimitType"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitType-valueType".to_string(),
class: "VoltageLimit".to_string(),
property: "OperationalLimit.OperationalLimitType".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:OperationalLimitType".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitType-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLimit>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_voltage_limit_operational_limit_operational_limi_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLimit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.operational_limit_set.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["OperationalLimitSet"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:OperationalLimit.OperationalLimitSet-valueType".to_string(),
class: "VoltageLimit".to_string(),
property: "OperationalLimit.OperationalLimitSet".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:OperationalLimitSet".to_string(),
severity: "sh:Violation".to_string(),
name: "OperationalLimit.OperationalLimitSet-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_curve_style_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["CurveStyle.straightLineYValues", "CurveStyle.constantYValue"];
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.curve_style.is_none() { continue; }
if !ALLOWED.contains(&obj.base.curve_style.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.curveStyle-datatype".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "Curve.curveStyle".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.curveStyle-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_y2unit_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Curve.y2Unit") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y2Unit-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "Curve.y2Unit".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y2Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_y1unit_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y1unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y1Unit-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "Curve.y1Unit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y1Unit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_y1unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y1unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.y1unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y1Unit-datatype".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "Curve.y1Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y1Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_descriptio_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_y2unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.y2unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.y2unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.y2Unit-datatype".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "Curve.y2Unit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.y2Unit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_x_unit_in(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitSymbol.HPerm", "UnitSymbol.mol", "UnitSymbol.Wb", "UnitSymbol.cosPhi", "UnitSymbol.VA", "UnitSymbol.dBm", "UnitSymbol.Btu", "UnitSymbol.lm", "UnitSymbol.mPers2", "UnitSymbol.ha", "UnitSymbol.A2", "UnitSymbol.JPerkgK", "UnitSymbol.Nm", "UnitSymbol.As", "UnitSymbol.m2Pers", "UnitSymbol.d", "UnitSymbol.rad", "UnitSymbol.CPerm3", "UnitSymbol.VArh", "UnitSymbol.h", "UnitSymbol.lPerl", "UnitSymbol.HzPerHz", "UnitSymbol.mmHg", "UnitSymbol.CPerm2", "UnitSymbol.radPers2", "UnitSymbol.mPers", "UnitSymbol.anglemin", "UnitSymbol.APerm", "UnitSymbol.l", "UnitSymbol.lPerh", "UnitSymbol.WPers", "UnitSymbol.m", "UnitSymbol.VAr", "UnitSymbol.charPers", "UnitSymbol.m3Compensated", "UnitSymbol.Wh", "UnitSymbol.WPerm2", "UnitSymbol.molPerkg", "UnitSymbol.N", "UnitSymbol.sPers", "UnitSymbol.VPerV", "UnitSymbol.kgm2", "UnitSymbol.Oe", "UnitSymbol.Q", "UnitSymbol.V2h", "UnitSymbol.Qh", "UnitSymbol.NPerm", "UnitSymbol.VAh", "UnitSymbol.S", "UnitSymbol.ohm", "UnitSymbol.T", "UnitSymbol.lx", "UnitSymbol.lPers", "UnitSymbol.V", "UnitSymbol.Bq", "UnitSymbol.W", "UnitSymbol.GyPers", "UnitSymbol.Sv", "UnitSymbol.molPerm3", "UnitSymbol.degC", "UnitSymbol.JPermol", "UnitSymbol.sr", "UnitSymbol.Hz", "UnitSymbol.WPerA", "UnitSymbol.katPerm3", "UnitSymbol.Pas", "UnitSymbol.VPerVAr", "UnitSymbol.anglesec", "UnitSymbol.ft3", "UnitSymbol.molPermol", "UnitSymbol.JPers", "UnitSymbol.m3Uncompensated", "UnitSymbol.radPers", "UnitSymbol.SPerm", "UnitSymbol.bar", "UnitSymbol.kat", "UnitSymbol.rotPers", "UnitSymbol.A", "UnitSymbol.JPerm2", "UnitSymbol.kgPerJ", "UnitSymbol.JPerm3", "UnitSymbol.C", "UnitSymbol.WPersr", "UnitSymbol.kg", "UnitSymbol.therm", "UnitSymbol.Mx", "UnitSymbol.WPerW", "UnitSymbol.JPermolK", "UnitSymbol.cd", "UnitSymbol.WPerm2sr", "UnitSymbol.G", "UnitSymbol.F", "UnitSymbol.Vh", "UnitSymbol.H", "UnitSymbol.KPers", "UnitSymbol.PaPers", "UnitSymbol.VPerHz", "UnitSymbol.J", "UnitSymbol.m2", "UnitSymbol.m3Perh", "UnitSymbol.K", "UnitSymbol.m3", "UnitSymbol.dB", "UnitSymbol.FPerm", "UnitSymbol.A2s", "UnitSymbol.kn", "UnitSymbol.M", "UnitSymbol.onePerHz", "UnitSymbol.gPerg", "UnitSymbol.Ah", "UnitSymbol.mPerm3", "UnitSymbol.m3Perkg", "UnitSymbol.V2", "UnitSymbol.min", "UnitSymbol.Vs", "UnitSymbol.CPerkg", "UnitSymbol.JPerkg", "UnitSymbol.s", "UnitSymbol.tonne", "UnitSymbol.Pa", "UnitSymbol.none", "UnitSymbol.HzPers", "UnitSymbol.deg", "UnitSymbol.A2h", "UnitSymbol.onePerm", "UnitSymbol.JPerK", "UnitSymbol.character", "UnitSymbol.APerA", "UnitSymbol.ppm", "UnitSymbol.WPermK", "UnitSymbol.ohmPerm", "UnitSymbol.VPerm", "UnitSymbol.count", "UnitSymbol.m3Pers", "UnitSymbol.ohmm", "UnitSymbol.rev", "UnitSymbol.gal", "UnitSymbol.VPerVA", "UnitSymbol.Gy", "UnitSymbol.kgm", "UnitSymbol.kgPerm3"];
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.x_unit.is_none() { continue; }
if !ALLOWED.contains(&obj.base.x_unit.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.xUnit-datatype".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "Curve.xUnit".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.xUnit-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_curve_style_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.curve_style.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.curveStyle-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "Curve.curveStyle".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.curveStyle-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_short_name_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_energy_ide_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_curve_x_unit_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.x_unit.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Curve.xUnit-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "Curve.xUnit".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Curve.xUnit-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_capability_curve_identified_object_m_rid_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsCapabilityCurve").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsCapabilityCurve>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "VsCapabilityCurve".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_min_udc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.minUdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.minUdc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.minUdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.minUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_max_p_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.maxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.maxP-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.maxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.maxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_equipment_equipment_container_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_switching_loss_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.switchingLoss") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.switchingLoss-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.switchingLoss".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.switchingLoss-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_vs_converter_max_modulation_index_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.maxModulationIndex") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VsConverter.maxModulationIndex-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.maxModulationIndex".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.maxModulationIndex-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_min_p_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.minP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.minP-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.minP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.minP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_equipment_normally_in_service_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_conducting_equipment_base_voltage_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ConductingEquipment.BaseVoltage") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_number_of_valves_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.numberOfValves") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.numberOfValves-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.numberOfValves".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.numberOfValves-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_pcc_terminal_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.PccTerminal") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.PccTerminal-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.PccTerminal".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.PccTerminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_base_s_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.baseS") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.baseS-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.baseS".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.baseS-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_description_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_idle_loss_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.idleLoss") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.idleLoss-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.idleLoss".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.idleLoss-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_conducting_equipment_base_voltage_h_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.base.base_voltage.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["BaseVoltage"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ConductingEquipment.BaseVoltage-valueType".to_string(),
class: "VsConverter".to_string(),
property: "ConductingEquipment.BaseVoltage".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:BaseVoltage".to_string(),
severity: "sh:Violation".to_string(),
name: "ConductingEquipment.BaseVoltage-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_vs_converter_capability_curve_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.CapabilityCurve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VsConverter.CapabilityCurve-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.CapabilityCurve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.CapabilityCurve-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_valve_u0_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.valveU0") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.valveU0-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.valveU0".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.valveU0-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_pcc_terminal_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.pcc_terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.PccTerminal-valueType".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.PccTerminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.PccTerminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_rated_udc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.ratedUdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.ratedUdc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.ratedUdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.ratedUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_energy_ident_code_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_vs_converter_capability_curve_has_v_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.capability_curve.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["VsCapabilityCurve"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:VsConverter.CapabilityCurve-valueType".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.CapabilityCurve".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:VsCapabilityCurve".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.CapabilityCurve-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_resistive_loss_max_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.resistiveLoss") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.resistiveLoss-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.resistiveLoss".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.resistiveLoss-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_acdc_converter_max_udc_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.maxUdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:ACDCConverter.maxUdc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.maxUdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.maxUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_vs_converter_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WaveTrap>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_auxiliary_equipment_terminal_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WaveTrap>() {
Some(o) => o, None => continue,
};
if obj.base.terminal.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "Missing required association.".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_auxiliary_equipment_terminal_has_value(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WaveTrap>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.base.terminal.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["Terminal"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:AuxiliaryEquipment.Terminal-valueType".to_string(),
class: "WaveTrap".to_string(),
property: "AuxiliaryEquipment.Terminal".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: cim:Terminal".to_string(),
severity: "sh:Violation".to_string(),
name: "AuxiliaryEquipment.Terminal-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_equipment_equipment_container_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_description_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_energy_ident_code_ei_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_equipment_normally_in_service_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WaveTrap>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wave_trap_identified_object_short_name_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WaveTrap").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "WaveTrap".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_rated_net_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedNetMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedNetMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedNetMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_maximum_all_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.maximumAllowableSpinningReserve") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.maximumAllowableSpinningReserve".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maximumAllowableSpinningReserve-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_min_operati_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.min_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.minOperatingP-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.minOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.minOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_equipment_equipment_contain_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.EquipmentContainer") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.EquipmentContainer-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "Equipment.EquipmentContainer".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.EquipmentContainer-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_nominal_p_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.nominalP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.nominalP-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.nominalP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.nominalP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_name_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_m_rid_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_short_pf_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.shortPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.shortPF-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.shortPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.shortPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_equipment_normally_in_servi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.normallyInService") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.normallyInService-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "Equipment.normallyInService".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.normallyInService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_total_effic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.totalEfficiency") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.totalEfficiency-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.totalEfficiency".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.totalEfficiency-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_gen_control_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.genControlSource") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_wind_generating_unit_wind_g_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.wind_gen_unit_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:WindGeneratingUnit.windGenUnitType-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "WindGeneratingUnit.windGenUnitType".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "WindGeneratingUnit.windGenUnitType-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_wind_generating_unit_wind_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("WindGeneratingUnit.WindPowerPlant") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:WindGeneratingUnit.WindPowerPlant-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "WindGeneratingUnit.WindPowerPlant".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "WindGeneratingUnit.WindPowerPlant-cardinality".to_string(),
description: "This constraint validates the cardinality of the association at the used direction.".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_energy_id_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_descripti_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_identified_object_short_nam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_gen_control_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["GeneratorControlSource.onAGC", "GeneratorControlSource.offAGC", "GeneratorControlSource.plantControl", "GeneratorControlSource.unavailable"];
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.gen_control_source.is_none() { continue; }
if !ALLOWED.contains(&obj.base.gen_control_source.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.genControlSource-datatype".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.genControlSource".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.genControlSource-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_startup_cos_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupCost-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.startupCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_governor_sc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.governorSCD") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.governorSCD-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.governorSCD".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.governorSCD-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_max_operati_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.max_operating_p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.maxOperatingP-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.maxOperatingP".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.maxOperatingP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_long_pf_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.longPF") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.longPF-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.longPF".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.longPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_startup_tim_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.startupTime") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.startupTime-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.startupTime".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.startupTime-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_wind_generating_unit_wind_g_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["WindGenUnitKind.offshore", "WindGenUnitKind.onshore"];
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.wind_gen_unit_type.is_none() { continue; }
if !ALLOWED.contains(&obj.wind_gen_unit_type.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:WindGeneratingUnit.windGenUnitType-datatype".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "WindGeneratingUnit.windGenUnitType".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "WindGeneratingUnit.windGenUnitType-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_variable_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.variableCost") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.variableCost-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.variableCost".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.variableCost-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_rated_gross_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMaxP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMaxP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMaxP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_wind_generating_unit_wind_p_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
let ref_mrid = match obj.wind_power_plant.as_ref() {
Some(r) => r.mrid.trim_start_matches('#'), None => continue,
};
if let Some(ref_entry) = dataset.entries.get(ref_mrid) {
let allowed: &[&str] = &["WindPowerPlant"];
if !allowed.contains(&ref_entry.element.type_name()) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:WindGeneratingUnit.WindPowerPlant-valueType".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "WindGeneratingUnit.WindPowerPlant".to_string(),
message: "One of the following does not conform: 1) The value type shall be IRI; 2) The value type shall be an instance of the class: eu:WindPowerPlant".to_string(),
severity: "sh:Violation".to_string(),
name: "WindGeneratingUnit.WindPowerPlant-valueType".to_string(),
description: "This constraint validates the value type of the association at the used direction.".to_string(),
});
}
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_generating_unit_rated_gross_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("GeneratingUnit.ratedGrossMinP") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.ratedGrossMinP".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.ratedGrossMinP-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_generating_unit_equipment_aggregate_max_count(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("Equipment.aggregate") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "eq:Equipment.aggregate-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "Equipment.aggregate".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.aggregate-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_name_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindPowerPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindPowerPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.name.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.name-cardinality".to_string(),
class: "WindPowerPlant".to_string(),
property: "IdentifiedObject.name".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.name-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_description_m_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.description") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.description-cardinality".to_string(),
class: "WindPowerPlant".to_string(),
property: "IdentifiedObject.description".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.description-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_m_rid_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindPowerPlant").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindPowerPlant>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "WindPowerPlant".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_short_name_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.shortName") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.shortName-cardinality".to_string(),
class: "WindPowerPlant".to_string(),
property: "IdentifiedObject.shortName".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.shortName-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_equipment_ap_con_simple_shacl_wind_power_plant_identified_object_energy_ident_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindPowerPlant").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("IdentifiedObject.energyIdentCodeEic") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
class: "WindPowerPlant".to_string(),
property: "IdentifiedObject.energyIdentCodeEic".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.energyIdentCodeEic-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}