Mapping für die Transformation

Mapping für die Transformation

Der https://ub-basel.atlassian.net/wiki/spaces/MEMOBASE/pages/29295472 wird mit einer Konfigurationsdatei konfiguriert. Diese Datei wird im YAML-Serialisierungsformat gespeichert. Dies Datei heisst immer mapping.yml und wird mit den restlichen Konfigurationsdateien dem Importprozess eingefügt.

Feldtypen

Field Type

Example

Remarks

Field Type

Example

Remarks

ConstantField

descriptiveNote: const: "Immer die gleiche Notiz!"

Adds the value “Immer die gleiche Notiz!" to every record as a rico:descriptiveNote.

DirectMapField

descriptiveNote: Notiz descriptiveNote: parentField: Parent field: Field

Adds the value from the field Notiz in the source JSON document to the record as a rico:descriptiveNote.

PrefixField

descriptiveNote: prefix: value: "Notiz: " field: Notiz descriptiveNote: parentField: Parent prefix: value: "Notiz: " field: Notiz

Adds the value from the field Notiz in the source JSON document to the record as a rico:descriptiveNote and adds the value Notiz: at the beginning of the text.

LanguageField

descriptiveNote: parentField: Parent de: descriptiveNote_de fr: descriptiveNote_fr it: descriptiveNote_it

Only de, fr, it are accepted.

For each label of ConstantField, DirectMapField and PrefixField is accepted. However, no list is accepted.

Record

Dies ist der Hauptabschnitt und wird zwingend benötigt.

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

uri

DirectMapField

NO

YES

rico:hasOrHadIdentifier

rico:Identifier

Is used to generate the subject URI of the record and the instantiations and adds the main identifier resource.

See https://ub-basel.atlassian.net/wiki/spaces/MD/pages/336789656

type

DirectMapField
ConstantField

NO

YES

rico:type

xsd:string

Values must be one of these:

  • Film

  • Foto

  • Radio

  • Ton

  • Tonbildschau

  • TV

  • Video

scopeAndContent

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:scopeAndContent

xsd:string or rdf:langString

 

sameAs

DirectMapField
PrefixField
ConstantField

YES

NO

schema:sameAs

xsd:string

 

abstract

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

dct:abstract

xsd:string or rdf:langString

 

source

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:source

xsd:string or rdf:langString

 

descriptiveNote

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:descriptiveNote

xsd:string or rdf:langString

 

relation

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

dct:relation

xsd:string or rdf:langString

 

conditionsOfUse

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:conditionsOfUse

xsd:string or rdf:langString

Utility property: Use rights: usage on physical and digital object where possible

conditionsOfAccess

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:conditionsOfAccess

xsd:string or rdf:langString

Utility property: Use rights: access on physical and digital object where possible

isSponsoredByMemoriav

boolean

NO

NO

rdau:P60451

IRI Node

Only accepts true or false. False is the default if the field is omitted!

Links to the memoriav corporate body.

creationDate

DirectMapField

NO

NO

dct:created

rico:DateSet

The value is copied to rico:expressedDate inside of the rico:DateSet. Any other date types must be parsed in the normalization steps.

issuedDate

DirectMapField

NO

NO

dct:issued

rico:DateSet

The value is copied to rico:expressedDate inside of the rico:DateSet. Any other date types must be parsed in the normalization steps.

temporal

DirectMapField

NO

NO

dct:temporal

rico:DateSet

The value is copied to rico:expressedDate inside of the rico:DateSet. Any other date types must be parsed in the normalization steps.

rights.holder

DirectMapField
PrefixField
ConstantField
LanguageField

NO

NO

rico:isOrWasRegulatedBy

rico:Rule

 

languages

Language

NO

NO

rico:hasOrHadLanguage

rico:Language

 

subject

Subject

YES

NO

rico:hasOrHadSubject

skos:Concept

 

genre

Subject

YES

NO

ebucore:hasGenre

skos:Concept

 

placeOfCapture

Place

YES

NO

rdau:P60556

rico:Place

 

relatedPlaces

Place

YES

NO

dct:spatial

rico:Place

 

creators

Agent

YES

NO

rico:recordResourceOrInstantiationIsSourceOfCreationRelation

rico:CreationRelation

Adds the agent, person or corporate body as the target of the creation relation

contributors

Agent

YES

NO

rico:recordResourceOrInstantiationIsSourceOfCreationRelation

rico:CreationRelation

Adds the agent, person or corporate body as the target of the creation relation

producers

Agent

YES

NO

rdau:P60441

 

 

relatedAgents

Agent

YES

NO

rico:hasOrHadSubject

 

 

publishedBy

Agent

YES

NO

rico:hasPublisher

 

 

Title Field

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

main

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:hasOrHadTitle

rico:Title

 

series

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:hasOrHadTitle

rico:Title

 

broadcast

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:hasOrHadTitle

rico:Title

 

Identifier Field

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

original

DirectMapField

NO

YES

rico:identifier

xsd:string

 

oldMemobase

DirectMapField
PrefixField
ConstantField

NO

NO

rico:identifier

xsd:string

 

Language Field

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

content

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:name

xsd:string or rdf:langString

 

caption

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:identifier

xsd:string or rdf:langString

 

Subject Field

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

prefLabel

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

skos:prefLabel

xsd:string or rdf:langString

 

Place Field

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

parentField

String

NO

NO

-

-

Use this field if the places are in a subfield on the source JSON Document

name

DirectMapField
PrefixField
ConstantField
LanguageField

YES

YES

rico:name

xsd:string or rdf:langString

 

sameAs

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

schema:sameAs

xsd:string

 

coordinates

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

wdt:P625

xsd:string

Will be normalized to geo:wktLabel.

Agent Field

For the RDF Property check the parent field in the Record map.

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

person

Agent Data

YES

NO

 

rico:Person

 

corporateBody

Agent Data

YES

NO

 

rico:corporateBody

 

agent

Agent Data

YES

NO

 

rico:Agent

 

Agent Data Field

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

Field Name

Field Types

List?

Required?

RDF Property

RDF Type

Remarks

parentField

String

NO

NO

-

-

Use this field if the places are in a subfield on the source JSON Document

name

DirectMapField
PrefixField
ConstantField
LanguageField

YES

YES

rico:name

xsd:string or rdf:langString

 

relationName

DirectMapField
PrefixField
ConstantField
LanguageField

YES

NO

rico:name

xsd:string or rdf:langString

This is added to the rico:CreationRelation resource.

sameAs

DirectMapField
PrefixField
ConstantField