diff --git a/webapi/src/main/scala/org/knora/webapi/slice/shacl/domain/ShaclValidator.scala b/webapi/src/main/scala/org/knora/webapi/slice/shacl/domain/ShaclValidator.scala index 6d4d6cedc7..d7184aaf57 100644 --- a/webapi/src/main/scala/org/knora/webapi/slice/shacl/domain/ShaclValidator.scala +++ b/webapi/src/main/scala/org/knora/webapi/slice/shacl/domain/ShaclValidator.scala @@ -35,7 +35,7 @@ final case class ShaclValidator() { self => } yield report private def readModel(data: InputStream) = ZIO.attempt { - val model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM) + val model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RDFS_INF) model.read(data, null, FileUtils.langTurtle) model } diff --git a/webapi/src/test/scala/org/knora/webapi/slice/shacl/domain/ShaclValidatorSpec.scala b/webapi/src/test/scala/org/knora/webapi/slice/shacl/domain/ShaclValidatorSpec.scala index 5580adba49..c81e121aca 100644 --- a/webapi/src/test/scala/org/knora/webapi/slice/shacl/domain/ShaclValidatorSpec.scala +++ b/webapi/src/test/scala/org/knora/webapi/slice/shacl/domain/ShaclValidatorSpec.scala @@ -67,5 +67,18 @@ object ShaclValidatorSpec extends ZIOSpecDefault { reportResource <- shaclValidator(_.validate(validData, shapes, ValidationOptions.default)) } yield assertTrue(reportResource.hasProperty(SH.conforms, JenaDatatypes.TRUE)) }, + test("should do basic rdfs inferencing") { + val data = """ + |@prefix ex: . + |@prefix rdf: . + |@prefix rdfs: . + | + |ex:myProperty + | a rdf:Property. + |""".stripMargin + for { + reportResource <- shaclValidator(_.validate(data, "", ValidationOptions.default)) + } yield assertTrue(reportResource.hasProperty(SH.conforms, JenaDatatypes.TRUE)) + }, ).provide(ShaclValidator.layer) }