IMPORTANT
Actual results are subsequently modified by the NormalizeWorkTitles postProcessing step!
match
0
when
NOTE
Drop undefined language label
onRevert
language
@id
https://id.kb.se/language/und
$l
1
when
NOTE
Drop non-language label
onRevert
language
@id
https://id.kb.se/language/zxx
$l
2
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
3
when
NOTE
A translation with a title: keep title and use language label
onRevert
translationOf
hasTitle
4
when
NOTE
Continue as usual if title is already processed by NormalizeWorkTitlesStep
onRevert
hasTitle
0
5
when
NOTE
Sign of translation: use language label
onRevert
translationOf
6
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
about
_:title
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;",
      "marc:arrangedStatementForMusic": "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: Work title with source is no longer supressed
Normalized MARC:
[
  {
    "008": "|     |        |  |||||||||||000 ||swe| "
  },
  {
    "041": {
      "ind1": " ",
      "ind2": " ",
      "subfields": [
        {
          "a": "swe"
        }
      ]
    }
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "0",
      "subfields": [
        {
          "a": "The lord of the rings."
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "The lord of the rings.",
          "source": [
            {
              "@id": "https://libris.kb.se/x#it"
            }
          ]
        }
      ],
      "language": [
        {
          "@id": "https://id.kb.se/language/swe",
          "code": "swe"
        }
      ]
    }
  }
}
Exempel: Work title with source is kept if translated title is present
Normalized MARC:
[
  {
    "008": "|     |        |  |||||||||||000 ||swe| "
  },
  {
    "041": {
      "ind1": "1",
      "ind2": " ",
      "subfields": [
        {
          "a": "swe"
        },
        {
          "h": "eng"
        }
      ]
    }
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "0",
      "subfields": [
        {
          "a": "Härskarringen"
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "Härskarringen",
          "source": [
            {
              "@id": "https://libris.kb.se/x#it"
            }
          ]
        }
      ],
      "language": [
        {
          "@id": "https://id.kb.se/language/swe",
          "code": "swe"
        }
      ],
      "translationOf": [
        {
          "@type": "Work",
          "hasTitle": [
            {
              "@type": "Title",
              "mainTitle": "The lord of the rings"
            }
          ],
          "language": [
            {
              "@id": "https://id.kb.se/language/eng",
              "code": "eng"
            }
          ]
        }
      ]
    }
  }
}
Exempel: Work title with source is kept if translated title is used after NormalizeWorkTitlesStep
Normalized MARC:
[
  {
    "008": "|     |        |  |||||||||||000 ||swe| "
  },
  {
    "041": {
      "ind1": "1",
      "ind2": " ",
      "subfields": [
        {
          "a": "swe"
        },
        {
          "h": "eng"
        }
      ]
    }
  },
  {
    "240": {
      "ind1": "1",
      "ind2": "0",
      "subfields": [
        {
          "a": "The lord of the rings"
        }
      ]
    }
  }
]
JSON-LD
{
  "mainEntity": {
    "instanceOf": {
      "@type": "Text",
      "hasTitle": [
        {
          "@type": "Title",
          "mainTitle": "Härskarringen",
          "_revertedBy": "NormalizeWorkTitlesStep",
          "source": [
            {
              "@id": "https://libris.kb.se/x#it"
            }
          ]
        },
        {
          "@type": "Title",
          "mainTitle": "The lord of the rings"
        }
      ],
      "language": [
        {
          "@id": "https://id.kb.se/language/swe",
          "code": "swe"
        }
      ],
      "translationOf": [
        {
          "@type": "Work",
          "language": [
            {
              "@id": "https://id.kb.se/language/eng",
              "code": "eng"
            }
          ]
        }
      ]
    }
  }
}