Closed PonteIneptique closed 6 years ago
Ok, so I am facing my limits right now :/ I'll let you all have a check on this :)
I have my "answer" :
@context
:
hydra:
).So the first example would look like :
{
"@context": {
"hydra": "https://www.w3.org/ns/hydra/core#",
"dc": "http://purl.org/dc/terms/",
"dts": "https://w3id.org/dts/api#",
"tei": "http://www.tei-c.org/ns/1.0"
},
"@id": "general",
"@type": "hydra:Collection",
"hydra:totalItems": "2",
"hydra:title": "Collection Générale de l'École Nationale des Chartes",
"dts:dublincore": {
"dc:publisher": ["École Nationale des Chartes", "https://viaf.org/viaf/167874585"],
"dc:title": [
{"@language":"fre", "@value": "Collection Générale de l'École Nationale des Chartes"}
]
},
"hydra:member": [
{
"@id" : "cartulaires",
"hydra:title" : "Cartulaires",
"hydra:description": "Collection de cartulaires d'Île-de-France et de ses environs",
"@type" : "hydra:Collection",
"hydra:totalItems" : "10"
},
{
"@id" : "lasciva_roma",
"hydra:title" : "Lasciva Roma",
"hydra:description": "Collection of primary sources of interest in the studies of Ancient World's sexuality",
"@type" : "hydra:Collection",
"hydra:totalItems" : "1"
},
{
"@id" : "lettres_de_poilus",
"hydra:title" : "Correspondance des poilus",
"hydra:description": "Collection de lettres de poilus entre 1917 et 1918",
"@type" : "hydra:Collection",
"hydra:totalItems" : "10000"
}
]
}
Note that to check compliancy I mostly used the expand capacities in python and https://json-ld.org/playground/
Is another option to use the @vocab
keyword to set the default vocabulary instead of @base
?
I think @base
is intended to use to set the base IRI for identifiers and @vocab
is for the base IRI for vocabulary.
{
"@context": {
"@vocab": "https://www.w3.org/ns/hydra/core#",
"dc": "http://purl.org/dc/terms/",
"dts": "https://w3id.org/dts/api#",
"tei": "http://www.tei-c.org/ns/1.0"
},
"@id": "general",
"@type": "Collection",
"totalItems": "2",
"title": "Collection Générale de l'École Nationale des Chartes",
"dts:dublincore": {
"dc:publisher": ["École Nationale des Chartes", "https://viaf.org/viaf/167874585"],
"dc:title": [
{"fre" : "Collection Générale de l'École Nationale des Chartes"}
]
},
"member": [
{
"@id" : "cartulaires",
"title" : "Cartulaires",
"description": "Collection de cartulaires d'Île-de-France et de ses environs",
"@type" : "Collection",
"totalItems" : "10"
},
{
"@id" : "lasciva_roma",
"title" : "Lasciva Roma",
"description": "Collection of primary sources of interest in the studies of Ancient World's sexuality",
"@type" : "Collection",
"totalItems" : "1"
},
{
"@id" : "lettres_de_poilus",
"title" : "Correspondance des poilus",
"description": "Collection de lettres de poilus entre 1917 et 1918",
"@type" : "Collection",
"totalItems" : "10000"
}
]
}
Somehow it did not work this morning, we still have to fix the dc:title
writing, even if I find lang_key:title
much better...
I was working on the parsing of collection data in MyCapytain and saw that the json (Example) was not correct.
I am investigating what would make it correct, even if it's not my forte clearly :)