New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add export of assets (DEV-2106) #2668
Conversation
Introduces: * KnoraProjectRepoInMemory an inmemory implementation for tests * ProjectExportService the service which will be responsible for importing and exporting project data * RestPermissionService a service containing the logic for checking persmissions and turning them into a authorization exception Moves: * function projectDataNamedGraphV2 function from StringFormatter to ProjectADMService companion object
Introduces: * KnoraProjectRepoInMemory an in-memory implementation for tests * ProjectExportService the service which will be responsible for importing and exporting project data * RestPermissionService a service containing the logic for checking permissions and turning them into a authorization exception Moves: * function projectDataNamedGraphV2 function from StringFormatter to ProjectADMService companion object
…ombiner implementation based on ZIO The CombiningRdfProcessor assumed that the first exported graph contained all the prefixes for all graphs. The old combineGraph method did not properly close all io streams in case a rdfFormatUtil.parseWithStreamProcessor call would produce a failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I added some comments, but all of them either questions/food-for-thiught-for-future-tasks or just details
webapi/src/main/scala/org/knora/webapi/slice/admin/domain/service/ProjectExportService.scala
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/slice/admin/domain/service/ProjectExportService.scala
Show resolved
Hide resolved
val projectGraph = ProjectADMService.projectDataNamedGraphV2(project) | ||
for { | ||
ontologyGraphs <- ontologyRepo.findOntologyGraphsByProject(project) | ||
query = findAllAssets(ontologyGraphs :+ InternalIri(KnoraBaseOntologyIri), projectGraph) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you add KnoraBase here, but no the other builtins (admin, standoff, etc.). Is this intentional or an oversight?
.../src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/admin/findAllAssets.scala.txt
Outdated
Show resolved
Hide resolved
.../src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/admin/findAllAssets.scala.txt
Outdated
Show resolved
Hide resolved
.../src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/admin/findAllAssets.scala.txt
Show resolved
Hide resolved
Co-authored-by: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com>
…sparql/admin/findAllAssets.scala.txt Co-authored-by: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com>
…sparql/admin/findAllAssets.scala.txt Co-authored-by: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com>
Pull Request Checklist
Task Description/Number
Issue Number: DEV-2106
Basic Requirements
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR change client-test-data?