Unverified Commit 64c613c5 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

replace old digitalObject url


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 2dfa7bd3
Pipeline #14139 passed with stages
in 13 minutes and 33 seconds
...@@ -67,7 +67,7 @@ object BinaryResourceMetadata { ...@@ -67,7 +67,7 @@ object BinaryResourceMetadata {
.withFilter(v => isDigitalBinaryObject(v.obj, baseUrl)) .withFilter(v => isDigitalBinaryObject(v.obj, baseUrl))
.map { o => .map { o =>
BinaryResourceMetadata( BinaryResourceMetadata(
o("@id").str.substring(s"$baseUrl/instantiation/digital/".length).replaceFirst("/binary", ""), o("@id").str.substring(s"$baseUrl/digital/".length).replaceFirst("/binary", ""),
o("@id").str, o("@id").str,
o("hasMimeType").str, o("hasMimeType").str,
setEventType(o("eventType").str)) setEventType(o("eventType").str))
...@@ -77,7 +77,7 @@ object BinaryResourceMetadata { ...@@ -77,7 +77,7 @@ object BinaryResourceMetadata {
private def isDigitalBinaryObject(obj: ujson.Obj, internalBaseUrl: String): Boolean = { private def isDigitalBinaryObject(obj: ujson.Obj, internalBaseUrl: String): Boolean = {
isObjectWrapper(obj) { isObjectWrapper(obj) {
id => id.startsWith(s"$internalBaseUrl/instantiation/digital") && id.endsWith("/binary") id => id.startsWith(s"$internalBaseUrl/digital") && id.endsWith("/binary")
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
}, },
"@graph": [ "@graph": [
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1",
"@type": [ "@type": [
"ldp:RDFSource", "ldp:RDFSource",
"ldp:Container", "ldp:Container",
...@@ -16,44 +16,44 @@ ...@@ -16,44 +16,44 @@
"createdBy": "fedoraAdmin", "createdBy": "fedoraAdmin",
"lastModified": "2020-06-30T10:07:26.563Z", "lastModified": "2020-06-30T10:07:26.563Z",
"lastModifiedBy": "fedoraAdmin", "lastModifiedBy": "fedoraAdmin",
"contains": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1/binary", "contains": "https://memobase.ch/digital/BAZ-MEI_77466-1/binary",
"identifiedBy": [ "identifiedBy": [
"https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genidd1c6f2c6-99a9-407a-970a-1ec31a8e0292", "https://memobase.ch/digital/BAZ-MEI_77466-1#genidd1c6f2c6-99a9-407a-970a-1ec31a8e0292",
"https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genidada014e8-ead3-459f-a7ea-ac0aaf02b392" "https://memobase.ch/digital/BAZ-MEI_77466-1#genidada014e8-ead3-459f-a7ea-ac0aaf02b392"
], ],
"instantiates": "https://memobase.ch/record/BAZ-MEI_77466", "instantiates": "https://memobase.ch/record/BAZ-MEI_77466",
"isDerivedFromInstantiation": "https://memobase.ch/instantiation/physical/BAZ-MEI_77466-0", "isDerivedFromInstantiation": "https://memobase.ch/physical/BAZ-MEI_77466-0",
"regulatedBy": [ "regulatedBy": [
"https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genid03e8a0c8-2164-4608-93b9-14a2361b90d2", "https://memobase.ch/digital/BAZ-MEI_77466-1#genid03e8a0c8-2164-4608-93b9-14a2361b90d2",
"https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genid5abe8161-110a-429f-a6b7-9e7e10dafe0d" "https://memobase.ch/digital/BAZ-MEI_77466-1#genid5abe8161-110a-429f-a6b7-9e7e10dafe0d"
], ],
"type": "digitalObject" "type": "digitalObject"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genid03e8a0c8-2164-4608-93b9-14a2361b90d2", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1#genid03e8a0c8-2164-4608-93b9-14a2361b90d2",
"@type": "https://www.ica.org/standards/RiC/ontology#Rule", "@type": "https://www.ica.org/standards/RiC/ontology#Rule",
"sameAs": "http://rightsstatements.org/vocab/InC/1.0/", "sameAs": "http://rightsstatements.org/vocab/InC/1.0/",
"name": "In Copyright (InC)", "name": "In Copyright (InC)",
"regulates": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1", "regulates": "https://memobase.ch/digital/BAZ-MEI_77466-1",
"type": "usage" "type": "usage"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genid5abe8161-110a-429f-a6b7-9e7e10dafe0d", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1#genid5abe8161-110a-429f-a6b7-9e7e10dafe0d",
"@type": "https://www.ica.org/standards/RiC/ontology#Rule", "@type": "https://www.ica.org/standards/RiC/ontology#Rule",
"name": "public", "name": "public",
"regulates": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1", "regulates": "https://memobase.ch/digital/BAZ-MEI_77466-1",
"type": "access" "type": "access"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genidada014e8-ead3-459f-a7ea-ac0aaf02b392", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1#genidada014e8-ead3-459f-a7ea-ac0aaf02b392",
"@type": "https://www.ica.org/standards/RiC/ontology#Identifier", "@type": "https://www.ica.org/standards/RiC/ontology#Identifier",
"identifier": "MEI_77466", "identifier": "MEI_77466",
"type": "original" "type": "original"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genidd1c6f2c6-99a9-407a-970a-1ec31a8e0292", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1#genidd1c6f2c6-99a9-407a-970a-1ec31a8e0292",
"@type": "https://www.ica.org/standards/RiC/ontology#Identifier", "@type": "https://www.ica.org/standards/RiC/ontology#Identifier",
"identifier": "http://127.0.0.1:8080/fcrepo/rest/instantiation/digital/BAZ-MEI_77466-1", "identifier": "http://127.0.0.1:8080/fcrepo/rest/digital/BAZ-MEI_77466-1",
"type": "main" "type": "main"
}, },
{ {
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
"type": "Fotograf" "type": "Fotograf"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1/binary", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1/binary",
"@type": [ "@type": [
"ldp:NonRDFSource", "ldp:NonRDFSource",
"fedora:Binary", "fedora:Binary",
...@@ -179,13 +179,13 @@ ...@@ -179,13 +179,13 @@
], ],
"created": "2020-06-30T10:07:26.621Z", "created": "2020-06-30T10:07:26.621Z",
"createdBy": "fedoraAdmin", "createdBy": "fedoraAdmin",
"hasFixityService": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1/binary/fcr:fixity", "hasFixityService": "https://memobase.ch/digital/BAZ-MEI_77466-1/binary/fcr:fixity",
"lastModified": "2020-06-30T10:07:26.621Z", "lastModified": "2020-06-30T10:07:26.621Z",
"lastModifiedBy": "fedoraAdmin", "lastModifiedBy": "fedoraAdmin",
"filename": "Nicolas_Muller_snowboard_wallpaper_1920x1080.jpg", "filename": "Nicolas_Muller_snowboard_wallpaper_1920x1080.jpg",
"hasMimeType": "{{mimeType}}", "hasMimeType": "{{mimeType}}",
"eventType": "{{eventType}}", "eventType": "{{eventType}}",
"describedby": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1/binary/fcr:metadata", "describedby": "https://memobase.ch/digital/BAZ-MEI_77466-1/binary/fcr:metadata",
"hasMessageDigest": "urn:sha1:884adf9882fd76cc1c863f527bcde9cc45d7cfc0", "hasMessageDigest": "urn:sha1:884adf9882fd76cc1c863f527bcde9cc45d7cfc0",
"hasSize": "244220" "hasSize": "244220"
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
}, },
"@graph": [ "@graph": [
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1",
"@type": [ "@type": [
"ldp:RDFSource", "ldp:RDFSource",
"ldp:Container", "ldp:Container",
...@@ -17,42 +17,42 @@ ...@@ -17,42 +17,42 @@
"lastModified": "2020-06-30T10:07:26.563Z", "lastModified": "2020-06-30T10:07:26.563Z",
"lastModifiedBy": "fedoraAdmin", "lastModifiedBy": "fedoraAdmin",
"identifiedBy": [ "identifiedBy": [
"https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genidd1c6f2c6-99a9-407a-970a-1ec31a8e0292", "https://memobase.ch/digital/BAZ-MEI_77466-1#genidd1c6f2c6-99a9-407a-970a-1ec31a8e0292",
"https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genidada014e8-ead3-459f-a7ea-ac0aaf02b392" "https://memobase.ch/digital/BAZ-MEI_77466-1#genidada014e8-ead3-459f-a7ea-ac0aaf02b392"
], ],
"instantiates": "https://memobase.ch/record/BAZ-MEI_77466", "instantiates": "https://memobase.ch/record/BAZ-MEI_77466",
"isDerivedFromInstantiation": "https://memobase.ch/instantiation/physical/BAZ-MEI_77466-0", "isDerivedFromInstantiation": "https://memobase.ch/physical/BAZ-MEI_77466-0",
"regulatedBy": [ "regulatedBy": [
"https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genid03e8a0c8-2164-4608-93b9-14a2361b90d2", "https://memobase.ch/digital/BAZ-MEI_77466-1#genid03e8a0c8-2164-4608-93b9-14a2361b90d2",
"https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genid5abe8161-110a-429f-a6b7-9e7e10dafe0d" "https://memobase.ch/digital/BAZ-MEI_77466-1#genid5abe8161-110a-429f-a6b7-9e7e10dafe0d"
], ],
"type": "digitalObject" "type": "digitalObject"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genid03e8a0c8-2164-4608-93b9-14a2361b90d2", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1#genid03e8a0c8-2164-4608-93b9-14a2361b90d2",
"@type": "https://www.ica.org/standards/RiC/ontology#Rule", "@type": "https://www.ica.org/standards/RiC/ontology#Rule",
"sameAs": "http://rightsstatements.org/vocab/InC/1.0/", "sameAs": "http://rightsstatements.org/vocab/InC/1.0/",
"name": "In Copyright (InC)", "name": "In Copyright (InC)",
"regulates": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1", "regulates": "https://memobase.ch/digital/BAZ-MEI_77466-1",
"type": "usage" "type": "usage"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genid5abe8161-110a-429f-a6b7-9e7e10dafe0d", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1#genid5abe8161-110a-429f-a6b7-9e7e10dafe0d",
"@type": "https://www.ica.org/standards/RiC/ontology#Rule", "@type": "https://www.ica.org/standards/RiC/ontology#Rule",
"name": "public", "name": "public",
"regulates": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1", "regulates": "https://memobase.ch/digital/BAZ-MEI_77466-1",
"type": "access" "type": "access"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genidada014e8-ead3-459f-a7ea-ac0aaf02b392", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1#genidada014e8-ead3-459f-a7ea-ac0aaf02b392",
"@type": "https://www.ica.org/standards/RiC/ontology#Identifier", "@type": "https://www.ica.org/standards/RiC/ontology#Identifier",
"identifier": "MEI_77466", "identifier": "MEI_77466",
"type": "original" "type": "original"
}, },
{ {
"@id": "https://memobase.ch/instantiation/digital/BAZ-MEI_77466-1#genidd1c6f2c6-99a9-407a-970a-1ec31a8e0292", "@id": "https://memobase.ch/digital/BAZ-MEI_77466-1#genidd1c6f2c6-99a9-407a-970a-1ec31a8e0292",
"@type": "https://www.ica.org/standards/RiC/ontology#Identifier", "@type": "https://www.ica.org/standards/RiC/ontology#Identifier",
"identifier": "http://127.0.0.1:8080/fcrepo/rest/instantiation/digital/BAZ-MEI_77466-1", "identifier": "http://127.0.0.1:8080/fcrepo/rest/digital/BAZ-MEI_77466-1",
"type": "main" "type": "main"
}, },
{ {
......
...@@ -74,7 +74,7 @@ class RecordProcessorTest extends AnyFunSuite with MockFactory { ...@@ -74,7 +74,7 @@ class RecordProcessorTest extends AnyFunSuite with MockFactory {
private val fixture = new { private val fixture = new {
val externalBaseUrl = "https://memobase.ch" val externalBaseUrl = "https://memobase.ch"
val resourceId = "BAZ-MEI_77466-1" val resourceId = "BAZ-MEI_77466-1"
val pathToResource = s"$externalBaseUrl/instantiation/digital/$resourceId/binary" val pathToResource = s"$externalBaseUrl/digital/$resourceId/binary"
val mockDisseminationCopyHandler: DisseminationCopyHandler = mock[DisseminationCopyHandler] val mockDisseminationCopyHandler: DisseminationCopyHandler = mock[DisseminationCopyHandler]
val mockFedoraClientWrapper: FedoraClientWrapper = mock[FedoraClientWrapper] val mockFedoraClientWrapper: FedoraClientWrapper = mock[FedoraClientWrapper]
} }
......
Markdown is supported
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