Skip to content

Commit

Permalink
Update Shacl2ShEx.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr authored Mar 26, 2024
1 parent 59a6f8c commit 53bbe7e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ object Shacl2ShEx extends LazyLogging {
case class PredicateInverse(pred: IRI, inverse: Option[Boolean])

private def getMinComponent(components: List[shacl.Component]): Result[Option[Int]] = {
ok(option(components.collect { case shacl.MinCount(m) => m }.headOption.getOrElse(0)))
ok(Some(components.collect { case shacl.MinCount(m) => m }.headOption.getOrElse(0)))
}

private def getMaxComponent(components: List[shacl.Component]): Result[Option[shex.Max]] = {
ok(components.collect { case shacl.MaxCount(m) => shex.IntMax(m) }.headOption)
ok(Some(components.collect { case shacl.MaxCount(m) => shex.IntMax(m) }.headOption.getOrElse(shex.Star)))
}

// TODO: Conversion of components like BlankNodeOrIRI is ignored by now
Expand Down

0 comments on commit 53bbe7e

Please sign in to comment.