#[derive(Debug)]
pub struct Family {
pub id: &'static str,
pub type_prefix: &'static str,
pub default_schema: &'static str,
pub base_profile: Option<&'static str>,
pub extra_namespaces: &'static [(&'static str, &'static str)],
pub stereotype_first_wins: bool,
pub shacl_manifest: Option<&'static [(&'static str, &'static str)]>,
}
pub const CGMES: Family = Family {
id: "cgmes",
type_prefix: "",
default_schema:
"application-profiles-library/CGMES/RDFS/61970-600-2_*-AP-Voc-RDFS2020.rdf",
base_profile: Some("EQ"),
extra_namespaces: &[
("md", "http://iec.ch/TC57/61970-552/ModelDescription/1#"),
("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"),
],
stereotype_first_wins: false,
shacl_manifest: Some(crate::shacl::cgmes_manifest::MANIFEST),
};
pub const NC: Family = Family {
id: "nc",
type_prefix: "nc:",
default_schema: "application-profiles-library/NCP/RDFS/*-AP-Voc-RDFS2020.rdf",
base_profile: None,
extra_namespaces: &[("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#")],
stereotype_first_wins: true,
shacl_manifest: None,
};
pub const FAMILIES: &[&Family] = &[&CGMES, &NC];
pub fn by_id(id: &str) -> Option<&'static Family> {
FAMILIES.iter().copied().find(|f| f.id == id)
}