Skip to content
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 an RDF processing façade (2nd iteration) (DSP-1083) #1759

Merged
merged 14 commits into from Nov 24, 2020

Conversation

benjamingeer
Copy link

@benjamingeer benjamingeer commented Nov 18, 2020

resolves DSP-1083

  • Add RDF stream processing to RdfFormatUtil, and use it in:
    • HttpTriplestoreConnector.turtleToTrig
    • ProjectsResponderADM.projectDataGetRequestADM
    • RepositoryUpdater
  • Add RdfRepository for using SPARQL to query an RdfModel in a test.
    • Move SparqlSelectResponse from TriplestoreMessages into org.knora.webapi.messages.util.rdf, and rename it SparqlSelectResult, so it can be used with RdfRepository.
    • Rename InconsistentTriplestoreDataException -> InconsistentRepositoryDataException so it can be used with RdfRepository.
  • Refactor the repository update framework, plugins, and tests to use the RDF façade.
  • Refactor TEIHeader to use the RDF façade.
    • Change RDF/XML formatting so that, when pretty-printing is off, all elements are rdf:Description elements, to facilitate writing XSLT stylesheets. (Previously, you could get a mix of rdf:Description elements and typed elements, making it difficult to write XPath.)
    • Change the sample XSLT stylesheet for generating a TEI/XML header, test_data/test_route/texts/beol/header.xsl (used by KnoraSipiIntegrationV1ITSpec), so it works with RDF/XML in that format.
  • Add tests.
  • Update docs.

For the next PR:

  • Add SHACL validation API.

@benjamingeer benjamingeer changed the title feat: Add an RDF processing façade (2nd iteration) feat: Add an RDF processing façade (2nd iteration) (DSP-1083) Nov 18, 2020
@benjamingeer benjamingeer self-assigned this Nov 18, 2020
@benjamingeer benjamingeer added API/V2 enhancement improve existing code or new feature labels Nov 18, 2020
@benjamingeer benjamingeer marked this pull request as draft November 20, 2020 14:06
@benjamingeer benjamingeer marked this pull request as ready for review November 23, 2020 14:10
# Conflicts:
#	webapi/src/main/scala/org/knora/webapi/responders/admin/ListsResponderADM.scala
Copy link
Contributor

@SepidehAlassi SepidehAlassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thank you for implementing this.

}
}

// Wrap that Map in an ErrorHandlingMap that will gracefully report errors about missing values when they
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gracefully :-D

@@ -906,7 +907,7 @@ class SearchResponderV2(responderData: ResponderData) extends ResponderWithStand
}

prequeryResponseNotMerged.copy(
results = SparqlSelectResponseBody(prequeryRowsMerged)
results = SparqlSelectResultBody(prequeryRowsMerged)
)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha, I found something. Please add an empty line here :-D

@benjamingeer
Copy link
Author

Thanks for the review! I will try harder to make more mistakes next time. :)

@benjamingeer benjamingeer merged commit 346873d into main Nov 24, 2020
@benjamingeer benjamingeer deleted the wip/DSP-1083-rdf-api branch November 24, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API/V2 enhancement improve existing code or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants