use std::fmt;
use snomed_core::sctid::SctId;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum SkippedConstruct {
ReflexiveProperty(SctId),
DataProperty(SctId),
ConcreteValue { attribute: SctId },
EmptyRoleChain(SctId),
UnmodeledAttributeShape { concept: SctId },
}
impl fmt::Display for SkippedConstruct {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
SkippedConstruct::ReflexiveProperty(id) => {
write!(f, "ReflexiveObjectProperty(:{id}) is not modeled")
}
SkippedConstruct::DataProperty(id) => {
write!(f, "SubDataPropertyOf involving :{id} is not modeled")
}
SkippedConstruct::ConcreteValue { attribute } => {
write!(
f,
"DataHasValue on attribute :{attribute} was dropped (concrete values aren't classified)"
)
}
SkippedConstruct::EmptyRoleChain(target) => {
write!(
f,
"an empty ObjectPropertyChain under :{target} implies nothing and was dropped"
)
}
SkippedConstruct::UnmodeledAttributeShape { concept } => {
write!(
f,
"a stated attribute of :{concept} has an unmodeled shape (not a plain concept filler) and was dropped from its necessary normal form"
)
}
}
}
}