Developing a JSON-LD-based LRMI metadata profile

Adrian Pohl
Open Infrastructure, Library service centre NRW (hbz)


DCMI Virtual, WWW, 2020-09-25

This presentation:
http://slides.lobid.org/dcmi2020/
Creative Commons License

Personal background

Focus: data modelling, web and (meta)data standards

Working in Open Infrastructure team at hbz

focus on lobid and lately on SkoHub and OERSI (OER Search Index)

Initiated the OER Metadata Group of KIM und Jointly in 2013

Metadata profile

Indicates which properties and types from existing metadata schemas are used

Defines constraints for their usage (mandatory fields, cardinality, value constraints etc.)

Source: Baker/Coyle (2019), Slide 4

What does a profile look like?

Human-only-readable doc (PDF)

Schema for specific serialization (e.g. XML Schema, JSON Schema)

Graph shapes (e.g. ShEx)

Generic specification of a profile with tabular DC AP Core Vocabulary (in development)

...

LRMI metadata profile for higher ed OER

Too many acronyms?!

OER: Open Educational Resources, free accessible & openly licensed

LRMI? – Phil already cleared that up

Why an LRMI profile?

Great interest in LRMI in the German-speaking OER community but there are no easy instructions for implementation

Current project by hbz and TIB Hannover in need of a standards-oriented JSON Schema for learning resources: OERSI – OER Search Index

A LOM-based XML profile exists but a HTTP+JSON-based approach is more future-proof

The general approach

JSON Schema plus SKOS vocabularies

JSON Schema defines fields, value type & referenced controlled vocabularies

Controlled vocabularies/value lists are published separately as SKOS files and are referenced in the schema

Schema can be tried out in SkoHub editor including lookup of controlled vocabs

Machines first, humans second

1st step: define JSON Schema & controlled vocabularies, and provide SkoHub-based reference web form

2nd step: write human-readable documentation with ReSpec

JSON Schema & SkoHub Editor

Property with non-specified string


{
  "properties": {
    "name": {
    "title": "Title",
    "type": "string"
    }
  }
}
		 

Property with formated string (URI)


{
  "image": {
    "title": "Image",
    "type": "string",
    "format": "uri",
    "_display": {
     "placeholder": "A link to an image of the resource"
    }
  }
}
		 

Listing possible strings


{
  "type": {
    "title": "Type",
    "type": "string",
    "enum": [
      "AudioObject",
      "Book",
      "Course",
      "CreativeWork",
      "DataDownload",
      "ImageObject",
      "PresentationDigitalDocument",
      "SoftwareApplication",
      "VideoObject"
    ]
  }
}
		 

Referencing a SKOS vocabulary


{
  "about":{
    "title":"Subject",
    "type":"array",
    "items":{
      "type":"object",
      "properties":{
        "inScheme":{
          "type":"object",
          "properties":{
            "id":{
              "type":"string",
              "enum":[
                "https://w3id.org/kim/hochschulfaechersystematik/scheme"
              ]
            }
          }
        }
      },
      "_widget":"SkohubLookup"
    }
  }
}
         

Automatic test setup

JSON Schema is automatically tested against two sets of examples (valid & invalid)

Whenever a file validates that shouldn't, it is added to the /invalid folder and the schema is updated to pass the tests

The example files are also helpful for people implementing the profile

Where exactly do these suggested values come from?

SKOS & SkoHub Vocabs

Publishing SKOS with SkoHub vocabs

Controlled vocabularies must be published with SkoHub Vocabs

Publication & maintenance in Turtle file on GitHub/GitLab & publication as HTML/JSON-LD under skohub.io (see here for details)

What does the LRMI data look like?

A few examples

schema.org + SKOS


$ curl -L  https://w3id.org/kim/lrmi-profile/draft/context.jsonld
{
   "@context": {
      "id": "@id",
      "type": "@type",
      "@vocab": "http://schema.org/",
      "skos": "http://www.w3.org/2004/02/skos/core#",
      "prefLabel": {
         "id": "skos:prefLabel",
         "@container": "@language"
      },
      "inScheme": "skos:inScheme",
      "Concept": "skos:Concept"
   }
}
         

Localization 1: Default language


{
  "@context":[
    "https://dini-ag-kim.github.io/lrmi-profile/draft/context.jsonld",
    {"@language":"de"}
  ]
}
         

Localization 2: prefLabel + language maps


{
  "@context": {
  "prefLabel": {
    "id": "skos:prefLabel",
    "@container": "@language"
    },
  },
  "id": "https://example.org/oer",
  "about": {
    "id": "https://w3id.org/kim/hochschulfaechersystematik/n222",
    "type": "Concept",
    "prefLabel": {
      "de": "Kommunikations- und Informationstechnik",
      "en": "Communication and information technology",
    },
   "inScheme": "https://w3id.org/kim/hochschulfaechersystematik/scheme"
  }
}
         

Metametadata with mainEntityOfPage


{
   "mainEntityOfPage":[
      {
         "provider":{
            "id":"https://oerworldmap.org/resource/urn:uuid:51277cb8-c5a4-4204-aeaf-10ee06df53ce",
            "type":"Service",
            "name":"OERNDS"
         },
         "id":"https://www.oernds.de/edu-sharing/components/render/52e3c18a-27c3-4dca-b431-37f30790a977",
         "dateCreated":"2020-03-18",
         "dateModified":"2020-03-18"
      }
   ]
}
         

Thanks for watching!

Further informationen