shapes_converter/shacl_to_shex/
shacl2shex_config.rsuse serde::{Deserialize, Serialize};
use shacl_validation::shacl_config::ShaclConfig;
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, Default)]
pub struct Shacl2ShExConfig {
pub starting_shapes_mode: Option<StartShapeMode>,
pub embed_bnodes: Option<bool>,
pub shacl: Option<ShaclConfig>,
pub add_target_class: Option<bool>,
}
impl Shacl2ShExConfig {
pub fn starting_shapes_mode(&self) -> StartShapeMode {
match &self.starting_shapes_mode {
None => StartShapeMode::default(),
Some(sm) => sm.clone(),
}
}
pub fn add_target_class(&self) -> bool {
match &self.add_target_class {
None => true,
Some(atc) => *atc,
}
}
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, Default)]
pub enum StartShapeMode {
#[default]
NonBNodes,
}