Skip to content

Instantly share code, notes, and snippets.

@jaw111
Last active August 29, 2018 19:01
Show Gist options
  • Save jaw111/bbd1b00d656045ba8a2c to your computer and use it in GitHub Desktop.
Save jaw111/bbd1b00d656045ba8a2c to your computer and use it in GitHub Desktop.
example skos tree in JSON-LD
{
"@context": {
"skos": "http://www.w3.org/2004/02/skos/core#"
},
"@type": "skos:ConceptScheme",
"skos:hasTopConcept": {
"@type": "skos:Concept"
}
}
{
"@context": {
"skos": "http://www.w3.org/2004/02/skos/core#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
},
"rdf:type": "skos:ConceptScheme",
"skos:hasTopConcept": {
"rdf:type": "skos:Concept"
}
}
{
"@context": {
"@base": "http://qa.data.nxp.com/id/concepts/",
"@language": "en-us",
"skos": "http://www.w3.org/2004/02/skos/core#",
"nxp": "http://purl.org/nxp/schema/v1/",
"id": "@id",
"type": "@type",
"name": "skos:prefLabel",
"children": "skos:narrower",
"topConcept": "skos:hasTopConcept",
"Concept": "skos:Concept",
"TopConcept": "nxp:TopConcept",
"results": "@graph"
},
"@type": "TopConcept"
}
{
"@context": {
"@base": "http://qa.data.nxp.com/id/concepts/",
"@language": "en-us",
"skos": "http://www.w3.org/2004/02/skos/core#",
"foaf": "http://xmlns.com/foaf/0.1/",
"id": "@id",
"type": "@type",
"name": "skos:prefLabel",
"children": "skos:narrower",
"parents": "skos:broader",
"Concept": "skos:Concept",
"link": {
"@id": "foaf:isPrimaryTopicOf",
"@type": "@id"
},
"results": "@graph"
},
"@type": "Concept"
}
[
{
"@id": "http://example.com/conceptSchemes/myTree",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {
"@id": "http://www.w3.org/2004/02/skos/core#ConceptScheme"
}
},
{
"@id": "http://example.com/conceptSchemes/myTree",
"http://www.w3.org/2004/02/skos/core#hasTopConcept": {
"@id": "http://example.com/concepts/1"
}
},
{
"@id": "http://example.com/conceptSchemes/myTree",
"http://www.w3.org/2004/02/skos/core#hasTopConcept": {
"@id": "http://example.com/concepts/2"
}
},
{
"@id": "http://example.com/concepts/1",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {
"@id": "http://www.w3.org/2004/02/skos/core#Concept"
}
},
{
"@id": "http://example.com/concepts/1",
"http://www.w3.org/2004/02/skos/core#prefLabel": {
"@language": "en-us",
"@value": "Concept 1"
}
},
{
"@id": "http://example.com/concepts/1",
"http://www.w3.org/2004/02/skos/core#narrower": {
"@id": "http://example.com/concepts/3"
}
},
{
"@id": "http://example.com/concepts/1",
"http://www.w3.org/2004/02/skos/core#isTopConceptOf": {
"@id": "http://example.com/conceptSchemes/myTree"
}
},
{
"@id": "http://example.com/concepts/2",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {
"@id": "http://www.w3.org/2004/02/skos/core#Concept"
}
},
{
"@id": "http://example.com/concepts/2",
"http://www.w3.org/2004/02/skos/core#prefLabel": {
"@language": "en-us",
"@value": "Concept 2"
}
},
{
"@id": "http://example.com/concepts/2",
"http://www.w3.org/2004/02/skos/core#isTopConceptOf": {
"@id": "http://example.com/conceptSchemes/myTree"
}
},
{
"@id": "http://example.com/concepts/3",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {
"@id": "http://www.w3.org/2004/02/skos/core#Concept"
}
},
{
"@id": "http://example.com/concepts/3",
"http://www.w3.org/2004/02/skos/core#prefLabel": {
"@language": "en-us",
"@value": "Concept 3 that is narrower than concept 1"
}
},
{
"@id": "http://example.com/concepts/3",
"http://www.w3.org/2004/02/skos/core#broader": {
"@id": "http://example.com/concepts/1"
}
}
]
[
{
"@id": "http://example.com/conceptSchemes/myTree",
"@type": "http://www.w3.org/2004/02/skos/core#ConceptScheme"
},
{
"@id": "http://example.com/conceptSchemes/myTree",
"http://www.w3.org/2004/02/skos/core#hasTopConcept": {
"@id": "http://example.com/concepts/1"
}
},
{
"@id": "http://example.com/conceptSchemes/myTree",
"http://www.w3.org/2004/02/skos/core#hasTopConcept": {
"@id": "http://example.com/concepts/2"
}
},
{
"@id": "http://example.com/concepts/1",
"@type": "http://www.w3.org/2004/02/skos/core#Concept"
},
{
"@id": "http://example.com/concepts/1",
"http://www.w3.org/2004/02/skos/core#prefLabel": {
"@language": "en-us",
"@value": "Concept 1"
}
},
{
"@id": "http://example.com/concepts/1",
"http://www.w3.org/2004/02/skos/core#narrower": {
"@id": "http://example.com/concepts/3"
}
},
{
"@id": "http://example.com/concepts/1",
"http://www.w3.org/2004/02/skos/core#isTopConceptOf": {
"@id": "http://example.com/conceptSchemes/myTree"
}
},
{
"@id": "http://example.com/concepts/2",
"@type": "http://www.w3.org/2004/02/skos/core#Concept"
},
{
"@id": "http://example.com/concepts/2",
"http://www.w3.org/2004/02/skos/core#prefLabel": {
"@language": "en-us",
"@value": "Concept 2"
}
},
{
"@id": "http://example.com/concepts/2",
"http://www.w3.org/2004/02/skos/core#isTopConceptOf": {
"@id": "http://example.com/conceptSchemes/myTree"
}
},
{
"@id": "http://example.com/concepts/3",
"@type": "http://www.w3.org/2004/02/skos/core#Concept"
},
{
"@id": "http://example.com/concepts/3",
"http://www.w3.org/2004/02/skos/core#prefLabel": {
"@language": "en-us",
"@value": "Concept 3 that is narrower than concept 1"
}
},
{
"@id": "http://example.com/concepts/3",
"http://www.w3.org/2004/02/skos/core#broader": {
"@id": "http://example.com/concepts/1"
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment