How can we define semantic links in DPDS? #32
andrea-gioia
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Existing solutions to evaluateDCATDCAT is an RDF vocabulary designed to facilitate interoperability between data catalogs published on the Web. How semantic linking works in DCATTODO Potential LimitationsTODO JSON-LDJSON-LD is a lightweight Linked Data format. How semantic linking works in JSON-LDJSON Schema {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Simplified Movie Object (Compact)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"datePublished": {
"type": "string",
"format": "date"
},
"director": {
"type": "string"
},
"actor": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"copyrightHolder": {
"type": "string"
},
"genre": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"image": {
"type": "string",
"format": "uri"
}
}
} JSON {
"name": "The Shawshank Redemption",
"datePublished": "1994-09-23",
"director": "Frank Darabont",
"actor": [
"Tim Robbins",
"Morgan Freeman"
],
"copyrightHolder": "Warner Bros. Pictures",
"genre": [
"Drama",
"Crime"
],
"image": "https://example.com/shawshank-redemption.jpg"
} JSONLD {
"@context": "https://schema.org",
"@type": "Movie",
"name": "The Shawshank Redemption",
"description": "A seemingly dull and quiet banker is sentenced to life in prison for the murder of his wife, despite his claims of innocence. Through the years, he befriends a hardened criminal and becomes embroiled in a mysterious scheme involving contraband and redemption.",
"datePublished": "1994-09-23",
"director": {
"@type": "Person",
"name": "Frank Darabont"
},
"actor": [
{
"@type": "Person",
"name": "Tim Robbins"
},
{
"@type": "Person",
"name": "Morgan Freeman"
}
],
"copyrightHolder": {
"@type": "Organization",
"name": "Warner Bros. Pictures"
},
"genre": [
"Drama",
"Crime"
],
"image": "https://example.com/shawshank-redemption.jpg"
} REST API Linked Data Keywords It's a specification to apply JSON-LD mappings to JSON schema. It's well defined and easy to use to generate JSON-LD annotation on schema instances. It has the same limitation of JSNO-LD. see REST API Linked Data Keywords {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Simplified Movie Object (Compact)",
"x-jsonld-context": "https://schema.org",
"x-jsonld-type": "Movie",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"datePublished": {
"type": "string",
"format": "date"
},
"director": {
"type": "string"
},
"actor": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"copyrightHolder": {
"type": "string"
},
"genre": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"image": {
"type": "string",
"format": "uri"
}
}
} Potential LimitationsIt's very difficult in JSON-LD to semantically map flattened schemas like the following one: {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Simplified Movie Object (Compact)",
"type": "object",
"properties": {
"movieId": {
"type": "string"
},
"name": {
"type": "string"
},
"directorName": {
"type": "string"
},
"directorCountryName": {
"type": "string"
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Proposed solution{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Simplified Movie Object (Compact)",
"type": "object",
"s-context": {
"s-base": "https://schema.org",
"s-type": "[Movie]",
"movieId": null,
"directorName": "director[Person].name",
"directorCountryName": "director[Person].country[Country].name",
"actors": "actor[Person].name",
"copyright": {
"s-type": "copyrightHolder[Organization]",
"organizationId": null,
"email": "contactPoint[ContactPoint].mail"
}
},
"properties": {
"movieId": {
"type": "string"
},
"name": {
"type": "string"
},
"directorName": {
"type": "string"
},
"directorCountryName": {
"type": "string"
},
"actors": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"copyright": {
"type": "object",
"properties": {
"organizationId": {
"type": "string"
},
"legalName": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
}
} Explanation:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's brainstorm here on how to define semantic links in DPDS.
The ideas collected in this thread could become the foundation for a new RFC proposal.
What is a semantic link anyway?
A semantic link is an explicit connection between a data asset exposed by a data product through one of its output ports and one or more concepts defined in a central enterprise ontology.
Why it matters?
Semantic linking is a way to bring semantics to a data product and improve its capability to be discovered, reused, and composed with other data products belonging to different domains.
Some useful resources
Beta Was this translation helpful? Give feedback.
All reactions