Unverified Commit 943e0902 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

improve reporting messages

parent f2ed626e
Pipeline #16716 canceled with stages
in 1 minute and 23 seconds
......@@ -69,42 +69,70 @@ class KafkaTopology(private val settings: SettingsLoader) {
Report(
key,
ReportStatus.failure,
"Invalid input data. Check mapper service processing."
generalFailureMessage = "Invalid input data. Check mapper service processing."
).toJson()
}
.to(reportingTopic)
val hasLocatorBranch = model[0]
val requiredFieldsAvailable = model[0]
.mapValues { value -> extractSubjects(value!!) }
.mapValues { readOnlyKey, value ->
addThumbnailSftpLocatorToModel(
readOnlyKey,
Triple(value.first, value.second, Report("", status = "", message = ""))
)
.mapValues { key, value ->
if (getDigitalObjectResource(value.second) == null) {
createRecord(
value,
key,
ReportStatus.failure,
generalMessage = "No digital object resource present in model."
)
} else {
createRecord(value, key, ReportStatus.success)
}
}
.mapValues { key, value ->
val recordResource = getRecordResource(value.second)
if (recordResource == null) {
updateRecord(value, ReportStatus.failure, generalMessage = "No record resource present in model.")
} else if (getOriginalIdentifier(recordResource) == null) {
updateRecord(value, ReportStatus.failure, generalMessage = ReportMessages.noOriginalIdentifier(key))
} else {
value
}
}
.branch(
Predicate { _, value -> value.third.status == "FAILURE" },
Predicate { _, value -> hasDigitalObjectWithoutLocator(value.second) }, // Indicates a local media file
Predicate { _, _ -> true } // Indicates a remote media file; check for youtube / vimeo thumbnail fetching
Predicate { _, _ -> true }
)
hasLocatorBranch[0]
requiredFieldsAvailable[0]
.mapValues { _, value ->
log.warn("Record contains faulty data: ${value.third.message}")
log.warn("Record contains faulty data: ${value.third.digitalObjectMessage}")
value.third.toJson()
}
.to(reportingTopic)
// TODO: To be discussed: Should message with these failures eventually be forwarded?
hasLocatorBranch[0]
// TODO: To be discussed: Should messages with these failures eventually be forwarded?
requiredFieldsAvailable[0]
.mapValues { value -> serializeModel(value.first.first) }
.to(settings.outputTopic)
val updateDigitalObjects = hasLocatorBranch[1]
val hasLocatorBranch = requiredFieldsAvailable[1]
.mapValues { readOnlyKey, value ->
addThumbnailSftpLocatorToModel(
readOnlyKey,
value
)
}
.branch(
Predicate { _, value -> hasDigitalObjectWithoutLocator(value.second) }, // Indicates a local media file
Predicate { _, _ -> true } // Indicates a remote media file; check for youtube / vimeo thumbnail fetching
)
val updateDigitalObjects = hasLocatorBranch[0]
.mapValues { readOnlyKey, value ->
val enrichedModel = addMediaSftpLocatorToModel(readOnlyKey, value)
if (enrichedModel.third.status == "FAILURE") {
log.warn("A problem enriching the digital object occurred: ${enrichedModel.third.message}")
log.warn("A problem enriching the digital object occurred: ${enrichedModel.third.digitalObjectMessage}")
}
enrichedModel
}
......@@ -117,12 +145,12 @@ class KafkaTopology(private val settings: SettingsLoader) {
.mapValues { value -> value.third.toJson() }
.to(reportingTopic)
hasLocatorBranch[2]
hasLocatorBranch[1]
.mapValues { value -> fetchThumbnailForYoutubeOrVimeoFile(value) }
.mapValues { value -> serializeModel(value.first.first) }
.to(settings.outputTopic)
hasLocatorBranch[2]
hasLocatorBranch[1]
.mapValues { _, value -> value.third.toJson() }
.to(reportingTopic)
......@@ -138,43 +166,33 @@ class KafkaTopology(private val settings: SettingsLoader) {
when {
isNoValidUrl(locator) -> {
log.warn("No valid locator url found for ${value.third.id}")
val amendedReport = Report(
value.third.id,
ReportStatus.failure,
value.third.message + "; no valid locator url"
)
return value.copy(third = amendedReport)
return updateRecord(value, ReportStatus.failure, thumbnailMessage = "no valid locator url")
}
PreviewImageHandler.isVimeoUrl(locator) -> {
log.info("Trying to download thumbnail file on vimeo for ${value.third.id}")
this.previewImageHandler.getFromVimeo(locator, Constant.vimeoThumbnailWidth)
?: return value.copy(
third = Report(
value.third.id,
ReportStatus.failure,
value.third.message + "; couldn't fetch vimeo thumbnail"
)
?: return updateRecord(
value,
ReportStatus.failure,
thumbnailMessage = "couldn't fetch vimeo thumbnail"
)
}
PreviewImageHandler.isYoutubeUrl(locator) -> {
log.info("Trying to download thumbnail file on youtube for ${value.third.id}")
this.previewImageHandler.getFromYoutube(locator)
?: return value.copy(
third = Report(
value.third.id,
ReportStatus.failure,
value.third.message + "; couldn't fetch youtube thumbnail"
)
?: return updateRecord(
value,
ReportStatus.failure,
thumbnailMessage = "couldn't fetch youtube thumbail"
)
}
else -> {
log.debug("Won't fetch thumbnail file for ${value.third.id} because no youtube/vimeo resource")
val amendedReport = Report(
value.third.id,
return updateRecord(
value,
ReportStatus.success,
value.third.message + "; no additional youtube / vimeo thumbnails fetched"
thumbnailMessage = "no additional thumbnails fetched"
)
return value.copy(third = amendedReport)
}
}.let {
val destPath = "$sftpBasePath/${value.first.second.recordSetId}/${Constant.thumbnailFolderName}/${
......@@ -191,20 +209,18 @@ class KafkaTopology(private val settings: SettingsLoader) {
digitalObjectResource,
pathOnSftpServer
)
val amendedReport = Report(
value.third.id,
return updateRecord(
value,
value.third.status,
value.third.message + "; youtube / vimeo thumbnail fetched"
thumbnailMessage = "youtube / vimeo thumbnail fetched"
)
return value.copy(third = amendedReport)
} else {
log.warn("Couldn't move downloaded thumbnail file to $destPath for ${value.third.id}")
val amendedReport = Report(
value.third.id,
return updateRecord(
value,
ReportStatus.failure,
value.third.message + "; youtube / vimeo thumbnail couldn't be uploaded to Sftp server"
thumbnailMessage = "upload of youtube / vimeo thumbnail to sFTP server failed"
)
return value.copy(third = amendedReport)
}
}
}
......@@ -249,10 +265,9 @@ class KafkaTopology(private val settings: SettingsLoader) {
record: Resource,
digitalObject: Resource,
locator: String
) {
val thumbnail = data.createResource(
"https://memobase.ch/digital/${digitalObject.uri.substringAfterLast("/")}/derived"
)
): String {
val uri = "${digitalObject.uri}/derived"
val thumbnail = data.createResource(uri)
val literal = ResourceFactory.createPlainLiteral(locator)
thumbnail.addProperty(RDF.type, RICO.Instantiation)
thumbnail.addProperty(RICO.type, Constant.thumbnailRicoType)
......@@ -261,6 +276,7 @@ class KafkaTopology(private val settings: SettingsLoader) {
thumbnail.addProperty(RICO.isDerivedFromInstantiation, digitalObject)
record.addProperty(RICO.hasInstantiation, thumbnail)
thumbnail.addProperty(RICO.instantiates, record)
return uri
}
private fun addThumbnailSftpLocatorToModel(
......@@ -282,57 +298,30 @@ class KafkaTopology(private val settings: SettingsLoader) {
data: Triple<Pair<Model, HeaderMetadata>, List<Resource>, Report>,
type: String
): Triple<Pair<Model, HeaderMetadata>, List<Resource>, Report> {
val recordResource = getRecordResource(data.second)
?: return Triple(
data.first,
data.second,
Report(key, ReportStatus.failure, "No record present in model.")
)
val digitalObjectResource = getDigitalObjectResource(data.second)
?: return Triple(
data.first,
data.second,
Report(key, ReportStatus.failure, "No digital object present in model.")
)
val originalIdentifierValue = getOriginalIdentifier(recordResource)
?: return Triple(
data.first,
data.second,
Report(key, ReportStatus.failure, ReportMessages.noOriginalIdentifier(key))
)
val recordResource = getRecordResource(data.second)!!
val digitalObjectResource = getDigitalObjectResource(data.second)!!
val originalIdentifierValue = getOriginalIdentifier(recordResource)!!
val link = getLinkToResourceOnSFTPServer(data.first.second.recordSetId, type, originalIdentifierValue)
?: return Triple(
data.first,
data.second,
Report(
recordResource.uri,
if (type == "thumbnails") ReportStatus.success else ReportStatus.failure,
"${data.third.message}\n${ReportMessages.reportFailure(digitalObjectResource.uri, type)}".trim()
)
)
if (type == Constant.mediaFolderName) {
?: return if (type == Constant.thumbnailFolderName) {
updateRecord(data, ReportStatus.success, thumbnailMessage = "no local thumbnails available")
} else {
updateRecord(data, ReportStatus.failure, digitalObjectMessage = ReportMessages.reportFailure(key, type))
}
return if (type == Constant.mediaFolderName) {
addLocatorToDigitalObjectResource(data.first.first, link, digitalObjectResource)
} else if (type == Constant.thumbnailFolderName) {
createThumbnailResource(data.first.first, recordResource, digitalObjectResource, link)
}
return Triple(
data.first,
data.second,
Report(
recordResource.uri,
updateRecord(
data,
ReportStatus.success,
"${data.third.message}\n${
ReportMessages.reportSuccess(
digitalObjectResource.uri,
link,
type
)
}".trim()
digitalObjectMessage = ReportMessages.reportSuccess(digitalObjectResource.uri, link, type)
)
)
} else {
val uri = createThumbnailResource(data.first.first, recordResource, digitalObjectResource, link)
updateRecord(
data,
ReportStatus.success,
digitalObjectMessage = ReportMessages.reportSuccess(uri, link, type)
)
}
}
private fun getLinkToResourceOnSFTPServer(
......@@ -377,4 +366,38 @@ class KafkaTopology(private val settings: SettingsLoader) {
model.write(out, Constant.rdfParserLang)
return out.toString().trim()
}
private fun updateRecord(
value: Triple<Pair<Model, HeaderMetadata>, List<Resource>, Report>,
status: String,
generalMessage: String = "",
digitalObjectMessage: String = "",
thumbnailMessage: String = ""
): Triple<Pair<Model, HeaderMetadata>, List<Resource>, Report> {
val amendedReport = value.third.copy(
status = status,
generalFailureMessage = if (generalMessage != "") generalMessage else value.third.generalFailureMessage,
digitalObjectMessage = if (digitalObjectMessage != "") digitalObjectMessage else value.third.digitalObjectMessage,
thumbnailMessage = if (thumbnailMessage != "") thumbnailMessage else value.third.thumbnailMessage
)
return value.copy(third = amendedReport)
}
private fun createRecord(
value: Pair<Pair<Model, HeaderMetadata>, List<Resource>>,
messageId: String,
status: String,
generalMessage: String = "",
digitalObjectMessage: String = "",
thumbnailMessage: String = ""
): Triple<Pair<Model, HeaderMetadata>, List<Resource>, Report> {
val report = Report(
messageId,
status,
generalFailureMessage = generalMessage,
digitalObjectMessage = digitalObjectMessage,
thumbnailMessage = thumbnailMessage
)
return updateRecord(Triple(value.first, value.second, report), status = status)
}
}
\ No newline at end of file
......@@ -21,22 +21,18 @@ package org.memobase
import com.beust.klaxon.Klaxon
import java.time.LocalDateTime
data class Report(
data class FinalReport(
val id: String,
val status: String, // success even if thumbnail is failure
val message: String, // "ok, thumbnail created" oder "ok, no thumbnail"
val status: String,
val message: String,
val step: String = "media-linker",
val timestamp: String = LocalDateTime.now().toString()
) {
fun toJson(): String {
return Klaxon().toJsonString(this)
}
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as Report
other as FinalReport
if (id != other.id) return false
if (status != other.status) return false
......@@ -54,3 +50,23 @@ data class Report(
return result
}
}
data class Report(
val id: String,
val status: String, // success even if thumbnail is failure
val generalFailureMessage: String = "",
val digitalObjectMessage: String = "", // "ok, thumbnail created" oder "ok, no thumbnail"
val thumbnailMessage: String = ""
) {
fun toJson(): String {
val message =
if (generalFailureMessage != "") {
generalFailureMessage
} else {
(if (digitalObjectMessage != "") "DIGITAL OBJECT: $digitalObjectMessage" else "") +
(if (thumbnailMessage != "") " -- THUMBNAIL: $thumbnailMessage" else "")
}
val finalReport = FinalReport(this.id, this.status, message)
return Klaxon().toJsonString(finalReport)
}
}
_:N8e2f5cb72415481aad5a88cdd85a6325 <https://www.ica.org/standards/RiC/ontology#regulates> <https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> .
_:N8e2f5cb72415481aad5a88cdd85a6325 <https://www.ica.org/standards/RiC/ontology#regulates> <https://memobase.ch/digital/BAZ-MEI_49885-1> .
_:Nd1834b21ce544129a81ea909a410c533 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Identifier> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#type> "digitalObject" .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#type> "digitalObject" .
_:Nc56e48c2631d406e889df2a1c36b0afe <https://www.ica.org/standards/RiC/ontology#type> "access" .
_:Nc56e48c2631d406e889df2a1c36b0afe <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Rule> .
_:Nc56e48c2631d406e889df2a1c36b0afe <https://www.ica.org/standards/RiC/ontology#regulates> <https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> .
_:Nc56e48c2631d406e889df2a1c36b0afe <https://www.ica.org/standards/RiC/ontology#regulates> <https://memobase.ch/digital/BAZ-MEI_49885-1> .
_:Nc56e48c2631d406e889df2a1c36b0afe <https://www.ica.org/standards/RiC/ontology#name> "public" .
_:N8e2f5cb72415481aad5a88cdd85a6325 <https://www.ica.org/standards/RiC/ontology#type> "usage" .
_:N995c0ab9252144edb4fca436615e30b4 <https://www.ica.org/standards/RiC/ontology#identifier> "https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1" .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
_:N995c0ab9252144edb4fca436615e30b4 <https://www.ica.org/standards/RiC/ontology#identifier> "https://memobase.ch/digital/BAZ-MEI_49885-1" .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
_:N8e2f5cb72415481aad5a88cdd85a6325 <http://schema.org/sameAs> "http://rightsstatements.org/vocab/InC/1.0/" .
_:N8e2f5cb72415481aad5a88cdd85a6325 <https://www.ica.org/standards/RiC/ontology#name> "In Copyright (InC)" .
_:Nd1834b21ce544129a81ea909a410c533 <https://www.ica.org/standards/RiC/ontology#identifier> "MEI_49885" .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#regulatedBy> _:Nc56e48c2631d406e889df2a1c36b0afe .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#regulatedBy> _:Nc56e48c2631d406e889df2a1c36b0afe .
_:N995c0ab9252144edb4fca436615e30b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Identifier> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#instantiates> <https://memobase.ch/record/BAZ-MEI_49885> .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#instantiates> <https://memobase.ch/record/BAZ-MEI_49885> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#identifiedBy> _:N995c0ab9252144edb4fca436615e30b4 .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#regulatedBy> _:N8e2f5cb72415481aad5a88cdd85a6325 .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#isDerivedFromInstantiation> <https://memobase.ch/instantiation/physical/BAZ-MEI_49885-0> .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#identifiedBy> _:N995c0ab9252144edb4fca436615e30b4 .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#regulatedBy> _:N8e2f5cb72415481aad5a88cdd85a6325 .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#isDerivedFromInstantiation> <https://memobase.ch/physical/BAZ-MEI_49885-0> .
_:N995c0ab9252144edb4fca436615e30b4 <https://www.ica.org/standards/RiC/ontology#type> "main" .
_:Nd1834b21ce544129a81ea909a410c533 <https://www.ica.org/standards/RiC/ontology#type> "original" .
_:N8e2f5cb72415481aad5a88cdd85a6325 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Rule> .
......
<https://memobase.ch/instantiation/physical/BAZ-MEI_49885-0> <https://www.ica.org/standards/RiC/ontology#type> "physicalObject" .
<https://memobase.ch/instantiation/physical/BAZ-MEI_49885-0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-0> <https://www.ica.org/standards/RiC/ontology#type> "digitalObject" .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-0> <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator> "https://example.org" .
<https://memobase.ch/physical/BAZ-MEI_49885-0> <https://www.ica.org/standards/RiC/ontology#type> "physicalObject" .
<https://memobase.ch/physical/BAZ-MEI_49885-0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/digital/BAZ-MEI_49885-0> <https://www.ica.org/standards/RiC/ontology#type> "digitalObject" .
<https://memobase.ch/digital/BAZ-MEI_49885-0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/digital/BAZ-MEI_49885-0> <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator> "https://example.org" .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://memobase.ch/internal/isPublished> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://rdaregistry.info/Elements/u/P60451> <https://memobase.ch/institution/mrv> .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Record> .
......
{
"id": "https://memobase.ch/record/test-institution-id-MEI_49884",
"status": "SUCCESS",
"message": "Successfully created a thumbnail with id https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1 and locator sftp:/base/test-record-set-id/thumbnails/MEI_49885.jpg\nSuccessfully enriched a sftp locator for resource https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1 with path sftp:/base/test-record-set-id/media/MEI_49885.jpg"
"message": "Successfully created a thumbnail with id https://memobase.ch/digital/BAZ-MEI_49885-1 and locator sftp:/base/test-record-set-id/thumbnails/MEI_49885.jpg\nSuccessfully enriched a sftp locator for resource https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1 with path sftp:/base/test-record-set-id/media/MEI_49885.jpg"
}
\ No newline at end of file
<https://memobase.ch/digital/BAZ-MEI_49885-1/derived> <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator> "sftp:/base/test-record-set-id/thumbnails/MEI_49885.jpg" .
<https://memobase.ch/digital/BAZ-MEI_49885-1/derived> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/digital/BAZ-MEI_49885-1/derived> <https://www.ica.org/standards/RiC/ontology#instantiates> <https://memobase.ch/record/test-institution-id-MEI_49884> .
<https://memobase.ch/digital/BAZ-MEI_49885-1/derived> <https://www.ica.org/standards/RiC/ontology#isDerivedFromInstantiation> <https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> .
<https://memobase.ch/digital/BAZ-MEI_49885-1/derived> <https://www.ica.org/standards/RiC/ontology#isDerivedFromInstantiation> <https://memobase.ch/digital/BAZ-MEI_49885-1> .
<https://memobase.ch/digital/BAZ-MEI_49885-1/derived> <https://www.ica.org/standards/RiC/ontology#type> "thumbnail" .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator> "sftp:/base/test-record-set-id/media/MEI_49885.jpg" .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#hasDerivedInstantiation> <https://memobase.ch/digital/BAZ-MEI_49885-1/derived> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#identifiedBy> _:B .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#instantiates> <https://memobase.ch/record/BAZ-MEI_49885> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#isDerivedFromInstantiation> <https://memobase.ch/instantiation/physical/BAZ-MEI_49885-0> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#regulatedBy> _:B .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#regulatedBy> _:B .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#type> "digitalObject" .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator> "sftp:/base/test-record-set-id/media/MEI_49885.jpg" .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#hasDerivedInstantiation> <https://memobase.ch/digital/BAZ-MEI_49885-1/derived> .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#identifiedBy> _:B .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#instantiates> <https://memobase.ch/record/BAZ-MEI_49885> .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#isDerivedFromInstantiation> <https://memobase.ch/physical/BAZ-MEI_49885-0> .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#regulatedBy> _:B .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#regulatedBy> _:B .
<https://memobase.ch/digital/BAZ-MEI_49885-1> <https://www.ica.org/standards/RiC/ontology#type> "digitalObject" .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://memobase.ch/internal/isPublished> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://rdaregistry.info/Elements/u/P60451> <https://memobase.ch/institution/mrv> .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Record> .
......@@ -27,11 +27,11 @@ _:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/stand
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Rule> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Rule> .
_:B <https://www.ica.org/standards/RiC/ontology#identifier> "MEI_49885" .
_:B <https://www.ica.org/standards/RiC/ontology#identifier> "https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1" .
_:B <https://www.ica.org/standards/RiC/ontology#identifier> "https://memobase.ch/digital/BAZ-MEI_49885-1" .
_:B <https://www.ica.org/standards/RiC/ontology#name> "In Copyright (InC)" .
_:B <https://www.ica.org/standards/RiC/ontology#name> "public" .
_:B <https://www.ica.org/standards/RiC/ontology#regulates> <https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> .
_:B <https://www.ica.org/standards/RiC/ontology#regulates> <https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> .
_:B <https://www.ica.org/standards/RiC/ontology#regulates> <https://memobase.ch/digital/BAZ-MEI_49885-1> .
_:B <https://www.ica.org/standards/RiC/ontology#regulates> <https://memobase.ch/digital/BAZ-MEI_49885-1> .
_:B <https://www.ica.org/standards/RiC/ontology#type> "access" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "main" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "original" .
......
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-0> <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator> "https://example.org" .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-0> <https://www.ica.org/standards/RiC/ontology#type> "digitalObject" .
<https://memobase.ch/instantiation/physical/BAZ-MEI_49885-0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/instantiation/physical/BAZ-MEI_49885-0> <https://www.ica.org/standards/RiC/ontology#type> "physicalObject" .
<https://memobase.ch/digital/BAZ-MEI_49885-0> <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator> "https://example.org" .
<https://memobase.ch/digital/BAZ-MEI_49885-0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/digital/BAZ-MEI_49885-0> <https://www.ica.org/standards/RiC/ontology#type> "digitalObject" .
<https://memobase.ch/physical/BAZ-MEI_49885-0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Instantiation> .
<https://memobase.ch/physical/BAZ-MEI_49885-0> <https://www.ica.org/standards/RiC/ontology#type> "physicalObject" .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://memobase.ch/internal/isPublished> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://rdaregistry.info/Elements/u/P60451> <https://memobase.ch/institution/mrv> .
<https://memobase.ch/record/test-institution-id-MEI_49884> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Record> .
......
......@@ -27,7 +27,7 @@
ebucore:locator "sftp:/base/test-record-set-id/thumbnails/MEI_49885.jpg" ;
rico:instantiates mbr:test-institution-id-MEI_49884 ;
rico:isDerivedFromInstantiation
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> ;
mbdo:BAZ-MEI_49885-1 ;
rico:type "thumbnail" .
mbr:test-institution-id-MEI_49884
......@@ -43,26 +43,25 @@ mbr:test-institution-id-MEI_49884
rico:isPartOf mbrs:test-institution-id ;
rico:type "Foto" .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1>
a rico:Instantiation ;
mbdo:BAZ-MEI_49885-1 a rico:Instantiation ;
ebucore:locator "sftp:/base/test-record-set-id/media/MEI_49885.jpg" ;
rico:hasDerivedInstantiation <https://memobase.ch/digital/BAZ-MEI_49885-1/derived> ;
rico:identifiedBy [ a rico:Identifier ;
rico:identifier "https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1" ;
rico:identifier "https://memobase.ch/digital/BAZ-MEI_49885-1" ;
rico:type "main"
] ;
rico:instantiates mbr:BAZ-MEI_49885 ;
rico:isDerivedFromInstantiation
<https://memobase.ch/instantiation/physical/BAZ-MEI_49885-0> ;
mbpo:BAZ-MEI_49885-0 ;
rico:regulatedBy [ a rico:Rule ;
rico:name "public" ;
rico:regulates <https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> ;
rico:regulates mbdo:BAZ-MEI_49885-1 ;
rico:type "access"
] ;
rico:regulatedBy [ a rico:Rule ;
schema:sameAs "http://rightsstatements.org/vocab/InC/1.0/" ;
rico:name "In Copyright (InC)" ;
rico:regulates <https://memobase.ch/instantiation/digital/BAZ-MEI_49885-1> ;
rico:regulates mbdo:BAZ-MEI_49885-1 ;
rico:type "usage"
] ;
rico:type "digitalObject" .
......@@ -22,9 +22,9 @@
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
<https://memobase.ch/instantiation/physical/BAZ-MEI_49885-0>
a rico:Instantiation ;
rico:type "physicalObject" .
mbdo:BAZ-MEI_49885-0 a rico:Instantiation ;
ebucore:locator "https://example.org" ;
rico:type "digitalObject" .
mbr:test-institution-id-MEI_49884
a rico:Record ;
......@@ -35,7 +35,5 @@ mbr:test-institution-id-MEI_49884
rico:isPartOf mbrs:test-institution-id ;
rico:type "Foto" .
<https://memobase.ch/instantiation/digital/BAZ-MEI_49885-0>
a rico:Instantiation ;
ebucore:locator "https://example.org" ;
rico:type "digitalObject" .
mbpo:BAZ-MEI_49885-0 a rico:Instantiation ;
rico:type "physicalObject" .
......@@ -45,16 +45,16 @@ mbr:Tanzarchiv-42858-43349
] ;
rico:heldBy mbcb:Tanzarchiv ;
rico:identifiedBy [ a rico:Identifier ;
rico:identifier "43349" ;
rico:type "original"
rico:identifier "Tanzarchiv-42858-43349" ;
rico:type "main"
] ;
rico:identifiedBy [ a rico:Identifier ;
rico:identifier "Tanzarchiv-43349" ;
rico:type "oldMemobase"
] ;
rico:identifiedBy [ a rico:Identifier ;
rico:identifier "Tanzarchiv-42858-43349" ;
rico:type "main"
rico:identifier "43349" ;
rico:type "original"
] ;
rico:isPartOf mbrs:Tanzarchiv-42858 ;
rico:recordResourceOrInstantiationIsSourceOfCreationRelation
......@@ -68,26 +68,6 @@ mbr:Tanzarchiv-42858-43349
rico:title "Additional Tones" ;
rico:type "Video" .
_:b0 a rico:CreationRelation ;
rico:creationRelationHasSource mbr:Tanzarchiv-42858-43349 ;
rico:creationRelationHasTarget [ a rico:CorporateBody ;
rico:agentIsTargetOfCreationRelation
_:b0 ;
rico:name "Compagnie Linga"
] ;
rico:name "Kompanie / Compagnie" ;
rico:type "contributor" .
_:b2 a rico:CreationRelation