use shacl_ast::node_kind::NodeKind;
use std::fmt::Display;
/// sh:nodeKind specifies a condition to be satisfied by the RDF node kind of
/// each value node.
///
/// https://www.w3.org/TR/shacl/#NodeKindConstraintComponent
#[derive(Debug, Clone)]
pub struct Nodekind {
node_kind: NodeKind,
}
impl Nodekind {
pub fn new(node_kind: NodeKind) -> Self {
Nodekind { node_kind }
}
pub fn node_kind(&self) -> &NodeKind {
&self.node_kind
}
}
impl Display for Nodekind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NodeKind: {:?}", self.node_kind())
}
}