Skip to content

Commit

Permalink
Validate prefLabel to use a language map
Browse files Browse the repository at this point in the history
ref #18
  • Loading branch information
acka47 committed Sep 10, 2020
1 parent ed3bf31 commit 12499f9
Show file tree
Hide file tree
Showing 5 changed files with 349 additions and 5 deletions.
5 changes: 4 additions & 1 deletion draft/context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"type": "@type",
"@vocab": "http://schema.org/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"prefLabel": "skos:prefLabel",
"prefLabel": {
"id": "skos:prefLabel",
"@container": "@language"
},
"inScheme": "skos:inScheme",
"Concept": "skos:Concept"
}
Expand Down
55 changes: 55 additions & 0 deletions draft/examples/invalid/conceptWithMonolingualLabels
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"@context": [
"https://w3id.org/kim/lrmi-profile/draft/context.jsonld",
{"@language": "de"}
],
"name": "Arbeitsblatt - Mon avenir - Französisch - tutory.de",
"id": "https://www.tutory.de/w/fbbadf1a",
"image": "https://www.tutory.de/worksheet/fbbadf1a-145a-463d-9a43-1ae9965c86b9.jpg?width=1000",
"type": "CreativeWork",
"creator": [
{
"name": "HerunterS",
"type": "Person"
}
],
"description": "Französisch-Arbeitsblatt",
"about": [
{
"id": "https://w3id.org/kim/hochschulfaechersystematik/n059",
"prefLabel": "Französisch",
"type": "Concept",
"inScheme": {
"id": "https://w3id.org/kim/hochschulfaechersystematik/scheme"
}
}
],
"license": "https://creativecommons.org/publicdomain/zero/1.0/legalcode",
"dateCreated": "2019-07-03",
"inLanguage": "fr",
"publisher": [
{
"type": "Organization",
"name": "Tutory",
"id": "https://www.tutory.de"
}
],
"audience": [
{
"id": "http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/student",
"prefLabel": "Lernende",
"type": "Concept",
"inScheme": {
"id": "http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/"
}
}
],
"learningResourceType": {
"id": "https://w3id.org/kim/hcrt/course",
"prefLabel": "Kurs",
"type": "Concept",
"inScheme": {
"id": "https://w3id.org/kim/hcrt/scheme"
}
}
}
66 changes: 66 additions & 0 deletions draft/examples/valid/conceptsWithMultilingualLabels
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"@context": [
"https://w3id.org/kim/lrmi-profile/draft/context.jsonld"
],
"name": "Arbeitsblatt - Mon avenir - Französisch - tutory.de",
"id": "https://www.tutory.de/w/fbbadf1a",
"image": "https://www.tutory.de/worksheet/fbbadf1a-145a-463d-9a43-1ae9965c86b9.jpg?width=1000",
"type": "CreativeWork",
"creator": [
{
"name": "HerunterS",
"type": "Person"
}
],
"description": "Französisch-Arbeitsblatt",
"about": [
{
"id": "https://w3id.org/kim/hochschulfaechersystematik/n059",
"prefLabel": {
"de": "Französisch",
"en": "French",
"fr": "Français"

},
"type": "Concept",
"inScheme": {
"id": "https://w3id.org/kim/hochschulfaechersystematik/scheme"
}
}
],
"license": "https://creativecommons.org/publicdomain/zero/1.0/legalcode",
"dateCreated": "2019-07-03",
"inLanguage": "fr",
"publisher": [
{
"type": "Organization",
"name": "Tutory",
"id": "https://www.tutory.de"
}
],
"audience": [
{
"id": "http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/student",
"prefLabel": {
"en": "student",
"de": "Lernende"
},
"type": "Concept",
"inScheme": {
"id": "http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/"
}
}
],
"learningResourceType": {
"id": "https://w3id.org/kim/hcrt/course",
"prefLabel": {
"en": "Course",
"de": "Kurs"
},
"type": "Concept",
"inScheme": {
"id": "https://w3id.org/kim/hcrt/scheme"
}
}
}
}
2 changes: 1 addition & 1 deletion draft/examples/valid/tutory-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
"id": "http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/student",
"prefLabel": {
"en_us": "student"
"en": "student"
},
"type": "Concept",
"inScheme": {
Expand Down
Loading

0 comments on commit 12499f9

Please sign in to comment.