match
0
when
NOTE
Ignore title with source
IMPORTANT
As this is defined, *any* title with source blocks *all* titles from reverting to 240. This is OK as things stand, since titles using source are only added if there is no formal title on the work.
onRevert
hasTitle
0
source
ignored
true
1
when
NOTE
Drop undefined language label
onRevert
language
@id
https://id.kb.se/language/und
$l
2
when
NOTE
Drop non-language label
onRevert
language
@id
https://id.kb.se/language/zxx
$l
3
when
NOTE
Always use local language label if given
TODO
intermediary solution; local language labels are to be removed in favour of linked languages
onRevert
language
label
$l
about
_:work
link
resourceType
property
infer
false
4
when
NOTE
Sign of translation: use language label
onRevert
translationOf
5
when
onRevert
NOTE
No sign of translation: drop language label
$l
aboutAlias
_:work
TODO
[1]See also 100$t and 130. [2]Interpunction ; on $r needs to be analyzed
$6
property
$a
about
_:title
property
required
true
$0
addLink
resourceType
TODO
Just drop or remap to something simpler? uriTemplate doesn't work, also only about 37 values? None is a Libris Id...
matchUriToken
^\d{1,14}$
Exempel: -
MARC
{
  "240": {
    "ind1": "1",
    "ind2": "0",
    "subfields": [
      {
        "a": "Konsert,"
      },
      {
        "m": "piano, orkester,"
      },
      {
        "n": "nr 24, K.491,"
      },
      {
        "r": "c-moll;"
      },
      {
        "o": "arr. piano (3), 10 h"
      }
    ]
  }
}
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "Konsert",
          "partNumber": [
            "nr 24, K.491"
          ]
        }
      ],
      "musicMedium": [
        {
          "@type": "MusicMedium",
          "label": "piano, orkester"
        }
      ],
      "musicKey": "c-moll;",
      "version": "arr. piano (3), 10 h"
    }
  }
}
Exempel: -
MARC
[
  {
    "041": {
      "ind1": "1",
      "ind2": " ",
      "subfields": []
    }
  },
  {
    "240": {
      "ind1": "0",
      "ind2": " ",
      "subfields": [
        {
          "a": "Moyen âge"
        },
        {
          "l": "Engelska."
        }
      ]
    }
  }
]
Normalized MARC:
[
  {
    "240": {
      "ind1": "1",
      "ind2": "0",
      "subfields": [
        {
          "a": "Moyen âge"
        },
        {
          "l": "Engelska."
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "Moyen âge"
        }
      ],
      "language": {
        "@type": "Language",
        "label": "Engelska."
      }
    }
  }
}
Exempel: Verify revert using infer for label from prefLabelByLang[locale] - only produce $l if translationOf
Normalized MARC:
[
  {
    "008": "|     |        |  |||||||||||000 ||swe| "
  },
  {
    "041": {
      "ind1": "1",
      "ind2": " ",
      "subfields": [
        {
          "h": "rus"
        }
      ]
    }
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "0",
      "subfields": [
        {
          "a": "En titel"
        },
        {
          "l": "Svenska"
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "En titel"
        }
      ],
      "language": {
        "@type": "Language",
        "@id": "https://id.kb.se/language/swe",
        "prefLabelByLang": {
          "sv": "Svenska"
        }
      },
      "translationOf": [
        {
          "@type": "Work",
          "language": [
            {
              "@id": "https://id.kb.se/language/rus",
              "code": "rus"
            }
          ]
        }
      ]
    }
  }
}
Exempel: Verify revert using only one language since $l isn't repeatable - only produce $l if translationOf
Normalized MARC:
[
  {
    "008": "|     |        |  |||||||||||000 ||swe| "
  },
  {
    "041": {
      "ind1": "1",
      "ind2": " ",
      "subfields": [
        {
          "h": "rus"
        }
      ]
    }
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "0",
      "subfields": [
        {
          "a": "Swenglish text"
        },
        {
          "l": "Svenska"
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "Swenglish text"
        }
      ],
      "language": [
        {
          "@type": "Language",
          "@id": "https://id.kb.se/language/swe",
          "prefLabelByLang": {
            "sv": "Svenska"
          }
        },
        {
          "@type": "Language",
          "@id": "https://id.kb.se/language/eng",
          "prefLabelByLang": {
            "sv": "Engelska"
          }
        }
      ],
      "translationOf": [
        {
          "@type": "Work",
          "language": [
            {
              "@id": "https://id.kb.se/language/rus",
              "code": "rus"
            }
          ]
        }
      ]
    }
  }
}
Exempel: Verify revert skipping non-language
Normalized MARC:
[
  {
    "008": "|     |        |  |||||||||||000 ||zxx| "
  },
  {
    "041": {
      "ind1": " ",
      "ind2": " ",
      "subfields": [
        {
          "a": "zxx"
        }
      ]
    }
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "0",
      "subfields": [
        {
          "a": "Instrumental Music"
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "Instrumental Music"
        }
      ],
      "language": [
        {
          "@id": "https://id.kb.se/language/zxx",
          "@type": "Language",
          "code": "zxx",
          "langCode": "zxx",
          "prefLabelByLang": {
            "sv": "Icke-språkligt medium"
          }
        }
      ]
    }
  }
}
Exempel: Verify revert using local language with label instead of the (properly) linked with prefLabel (intermediary solution, see TODO)
Normalized MARC:
[
  {
    "008": "|     |        |  |||||||||||000 ||swe| "
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "0",
      "subfields": [
        {
          "a": "En titel"
        },
        {
          "l": "Svenska & swahili"
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "En titel"
        }
      ],
      "language": [
        {
          "@type": "Language",
          "@id": "https://id.kb.se/language/swe",
          "prefLabelByLang": {
            "sv": "Svenska"
          }
        },
        {
          "@type": "Language",
          "label": "Svenska & swahili"
        }
      ]
    }
  }
}
Exempel: Translated title, PrimaryContribution
MARC
[
  {
    "008": "|     |        |  |||||||||||000 ||swe| "
  },
  {
    "041": {
      "ind1": "1",
      "ind2": " ",
      "subfields": [
        {
          "a": "swe"
        },
        {
          "h": "eng"
        }
      ]
    }
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "4",
      "subfields": [
        {
          "a": "The lord of the rings."
        }
      ]
    }
  },
  {
    "100": {
      "ind1": "1",
      "ind2": " ",
      "subfields": [
        {
          "a": "Tolkien, J.R.R."
        },
        {
          "d": "1892-1973"
        },
        {
          "4": "aut"
        }
      ]
    }
  }
]
Normalized MARC:
[
  {
    "008": "|     |        |  |||||||||||000 ||swe| "
  },
  {
    "041": {
      "ind1": "1",
      "ind2": " ",
      "subfields": [
        {
          "a": "swe"
        },
        {
          "h": "eng"
        }
      ]
    }
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "4",
      "subfields": [
        {
          "a": "The lord of the rings."
        }
      ]
    }
  },
  {
    "100": {
      "ind1": "1",
      "ind2": " ",
      "subfields": [
        {
          "a": "Tolkien, J.R.R."
        },
        {
          "d": "1892-1973"
        },
        {
          "4": "aut"
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "contribution": [
        {
          "@type": "PrimaryContribution",
          "agent": {
            "@type": "Person",
            "familyName": "Tolkien",
            "givenName": "J.R.R.",
            "lifeSpan": "1892-1973"
          },
          "role": [
            {
              "@id": "https://id.kb.se/relator/aut",
              "@type": "Role",
              "code": "aut"
            }
          ]
        }
      ],
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "The lord of the rings.",
          "marc:nonfilingChars": "4"
        }
      ],
      "language": [
        {
          "@id": "https://id.kb.se/language/swe",
          "code": "swe"
        }
      ],
      "translationOf": [
        {
          "@type": "Work",
          "language": [
            {
              "@id": "https://id.kb.se/language/eng",
              "code": "eng"
            }
          ]
        }
      ]
    }
  }
}
Exempel: -
Normalized MARC:
[]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "En bok",
          "subtitle": "med undertitel",
          "source": [
            {
              "@id": "https://libris.kb.se/x#it"
            }
          ]
        }
      ]
    }
  }
}