Commit c3609b4f authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

MEMO-780: Search for sftp locators in all instantiations

Previously the RdfHandler only searched for locators starting with
the string "sftp:" in RDF resources of RICO type "digitalObject",
which resulted in binaries for thumbnails not being ingested into
fedora. This commit fixes this bug by searching for locators that
point to the sftp server in all instantiatons.
parent 4403ec19
Pipeline #18361 passed with stages
in 4 minutes and 3 seconds
......@@ -98,7 +98,7 @@ class RdfHandler(data: String, private val externalBaseUrl: String) {
fun getSftpLocators(): List<Pair<String, String?>> {
return model.listSubjectsWithProperty(RICO.type, Service.DIGITAL_OBJECT_TYPE).filterKeep {
return model.listResourcesWithProperty(RDF.type, RICO.Instantiation).filterKeep {
}.mapWith {
val url = it.getProperty(EBUCORE.locator).`object`.asLiteral().string
......@@ -34,7 +34,6 @@ import org.memobase.sftp.SftpClient
class Service(fileName: String = "app.yml") : Closeable {
companion object {
const val DIGITAL_OBJECT_TYPE = "digitalObject"
const val FEDORA_PROPERTIES_PREFIX = "fedora"
const val CONSUMER_MAX_INTERVAL_MS = "3600000" // 3600000ms = 1h
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment