Skip to main content

Crate cimvalidation

Crate cimvalidation 

Source

Re-exports§

pub use violation::Violation;
pub use detect::detect_config;
pub use detect::detect_nc_profiles;

Modules§

bag
Validates a dataset against a crate::shapes table.
cgmes_profiles
cgmes_shapes
detect
helpers
nc_profiles
nc_shapes
shape_source
Where a family’s shape table comes from.
shapes
The shape table both families are validated against.
sparql
violation

Structs§

Config

Constants§

MERGED_PROFILE
The profile code of the shapes validate_nc_merged runs: the combined manifest’s keyword, as cimschema::shacl::resolve::MERGED_PROFILE assigns it. Repeated here because cimoxide-schema is optional; a test holds the two together.

Functions§

cgmes_profile_index
The CGMES profile index in force: md:Model.profile IRI → short code, and every short code, read from CGMES/PROF. Loaded together with the shapes, like nc_profile_index.
cgmes_shapes
The CGMES shape table in force: loaded from SHACL if the dynamic-shapes feature is on and a directory was supplied, otherwise the generated one.
combined_config
Build a combined Config by auto-detecting profiles/solved-state across all files, then applying explicit overrides (each None/default leaves the detected value).
nc_profile_index
The NC profile index in force. Loaded together with the shapes, since an index and a table from different releases would run the wrong rules.
nc_shapes
The NC shape table in force: loaded from SHACL if the dynamic-shapes feature is on and a directory was supplied, otherwise the generated one.
validate_crossprofile
Phase 2 — crossprofile: run crossprofile SHACL + cross-profile SPARQL on the merged dataset.
validate_crossprofile_shacl
The SHACL half of validate_crossprofile: every enabled profile’s cross-profile rules on the merged dataset, its not-solved (!NS, the NotSolvedMAS files) rules when cfg.not_solved — written for a model authority set, like the hand-written ones in sparql::mas_groups — and the rules for every profile when cfg.common.
validate_files
Run full two-phase validation: per-file local checks (header + per-profile SHACL/SPARQL) in parallel, then crossprofile checks on the merged dataset, then apply rule silencing.
validate_files_traced
validate_files, with each finding’s origin: the index into per_file of the file it was found in, or None for a finding on the merged dataset. An object several files write is reported against one of them, which cimlsp needs to put the finding there.
validate_header
Phase 1 — header: validate FullModel/DifferenceModel rules for a single file’s dataset.
validate_nc_merged
The NC rules that relate datasets: the Complex files only the combined manifest imports, as table shapes and hand-written rules, on the merged dataset. validate_crossprofile runs this when an NC profile is in play.
validate_nc_profile
Run one NC profile’s shapes against a dataset, and the hand-written rules of the files every NC profile imports (sparql::nc::validate_local).
validate_nc_profile_in
validate_nc_profile on one file of a set, as validate_profile_local_in.
validate_profile_local
Phase 1 — per-profile: run the local (non-crossprofile) SHACL rules and the SPARQL rules for one profile.
validate_profile_local_in
validate_profile_local on dataset, one of the files set validated together, as validate_files runs it. The rules still see dataset alone, except that an NC class check (sh:class, sh:in on a type) finds the type of a referenced object in whichever file of set holds it: a schedule’s unit, a remedial action’s equipment. Without the set those checks are silent on every association that leaves the file. CGMES’s per-profile value types are written for one file and stay so (bag::any_type).
validate_profile_shacl
The SHACL half of validate_profile_local for one CGMES profile: its local rules. Without the hand-written sparql rules or the cfg.profiles filter.

Type Aliases§

ProfileIndex
Profile IRI → short code, and every short code.