Skip to content

Commit

Permalink
Merge branch 'master' into 441-slidesSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
acka47 committed Feb 25, 2021
2 parents ab4192d + d80c9d6 commit 97c008a
Show file tree
Hide file tree
Showing 10 changed files with 128 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"@context": "https://schema.org/",
"id": "https://github.com/hbz/lobid-resources/milestone/1",
"type": "Project",
"type": [
"Project"
],
"name": {
"de": "lobid/Alma-Migration",
"en": "lobid/Alma Migration"
Expand All @@ -10,5 +12,10 @@
"en": "Switch lobid-resources ETL and indexing from Aleph to Alma Marc21 XML",
"de": "Umstieg von Aleph- auf Alma-MARC21-Daten bei Transformation und Indexierung für lobid-resources"
},
"url": "https://github.com/hbz/lobid-resources/milestone/1"
"url": "https://github.com/hbz/lobid-resources/milestone/1",
"enhances": [
{
"id": "https://lobid.org"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"@context": "https://schema.org/",
"id": "https://github.com/dini-ag-kim/lrmi-profile",
"type": "Project",
"type": [
"Project"
],
"name": {
"de": "LRMI-Metadatenprofil",
"en": "LRMI Metadata Profile"
Expand Down
21 changes: 21 additions & 0 deletions examples/project/valid/metafacture-fix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"@context": "https://schema.org/",
"id": "https://github.com/metafacture/metafacture-fix",
"type": [
"Project"
],
"name": {
"de": "Metafacture-Fix",
"en": "Metafacture-Fix"
},
"description": {
"en": "Implementation of the Fix language for Metafacture as an alternative to configuring data transformations with Metamorph",
"de": "Das Projekt entwickelt und implementiert FIX als Metafacture Sprache. Diese soll als Alternative zu Metamorph für Datentransformation eingesetzt werden."
},
"url": "https://github.com/metafacture/metafacture-fix",
"enhances": [
{
"id": "https://metafacture.org"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{
"@context": "https://schema.org/",
"id": "https://github.com/metafacture/metafacture-playground",
"type": "Project",
"type": [
"Project"
],
"name": {
"de": "Metafacture Playground",
"en": "Metafacture Playground"
},
"description": {
"en": "This projects aims to provide a web application to play around with Metafactures languages Fix and Flux."
"en": "This projects aims to provide a web application to play around with Metafactures languages Fix and Flux.",
"de": "Dieses Projekt entwickelt eine Web-Applikation, mit der man interaktiv die Metafacture-Sprachen Fix und Flux austesten kann."
},
"url": "https://github.com/metafacture/metafacture-playground"
"url": "https://github.com/metafacture/metafacture-playground",
"enhances": [
{
"id": "https://metafacture.org"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"@context": "https://schema.org/",
"id": "https://oersi.de",
"type": "Project",
"type": [
"Project"
],
"name": {
"de": "OER Search Index",
"en": "OER Search Index"
},
"alternateName": {
"de": "OERSI",
"en": "OERSI"
},
"alternateName": [
"OERSI"
],
"description": {
"de": "Ein gemeinsames Projekt der TIB Hannover und des hbz zum Aufbau eines offenen Suchindex für Bildungsressourcen",
"en": "Common project by TIB Hannover and hbz to create an open search index for educational resources"
},
"url": "https://oersi.de"
"url": "https://oersi.de",
"isBasedOn": {
"id": "https://metafacture.org"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"@context": "https://schema.org/",
"id": "https://github.com/hbz/rpb",
"type": "Project",
"type": [
"Project"
],
"name": {
"de": "Rheinland-Pfälzische Bibliographie",
"en": "Bibliography of Rhineland-Platinate"
Expand Down
13 changes: 0 additions & 13 deletions examples/projects/valid/metafacture-fix.json

This file was deleted.

20 changes: 20 additions & 0 deletions schemas/enhances.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$id": "resource:/enhances.json",
"title": "product",
"description": "Schema to describe a product at lobid.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "resource:/id.json"
},
"name": {
"$ref": "resource:/name.json"
}
},
"required": [
"id"
]
}
}
49 changes: 49 additions & 0 deletions schemas/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "resource:/project.json",
"title": "Project",
"description": "Schema to describe a project at lobid.",
"type": "object",
"properties": {
"id": {
"$ref": "resource:/id.json"
},
"type": {
"type": "array",
"items": {
"type": "string",
"const": "Project"
}
},
"alternateName": {
"$ref": "resource:/alternateName.json"
},
"description": {
"$ref": "resource:/description.json"
},
"name": {
"$ref": "resource:/name.json"
},
"image": {
"$ref": "resource:/image.json"
},
"startDate": {
"$ref": "resource:/startDate.json"
},
"endDate": {
"$ref": "resource:/endDate.json"
},
"enhances": {
"$ref": "resource:/enhances.json"
},
"membership": {
"$ref": "resource:/membership.json"
}
},
"required": [
"id",
"name",
"type",
"description"
]
}
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ajv test -s schemas/group.json -r "schemas/*.json" -d "examples/group/valid/*.js
ajv test -s schemas/group.json -r "schemas/*.json" -d "examples/group/invalid/*.json" --invalid
ajv test -s schemas/publication.json -r "schemas/*.json" -d "examples/publication/valid/*.json" --valid
ajv test -s schemas/publication.json -r "schemas/*.json" -d "examples/publication/invalid/*.json" --invalid
ajv test -s schemas/project.json -r "schemas/*.json" -d "examples/project/valid/*.json" --valid
ajv test -s schemas/project.json -r "schemas/*.json" -d "examples/project/invalid/*.json" --invalid

if [ $? -eq 0 ]
then
Expand Down

0 comments on commit 97c008a

Please sign in to comment.