Item:OSW7d3292e5104f45b1be4fc23901fae4fa /
Tabular Data [OSW7d3292e5104f45b1be4fc23901fae4fa] | |
---|---|
ID | OSW7d3292e5104f45b1be4fc23901fae4fa |
UUID | 7d3292e5-104f-45b1-be4f-c23901fae4fa |
Label | Tabular Data |
Machine compatible name | TabularData |
Statements (outgoing) | |
Statements (incoming) | |
|
|
Keywords |
Description
No description found
Item | |
---|---|
Type(s)/Category(s) | Tutorial |
CreativeWork |
---|
Article |
---|
Tutorial | |
---|---|
Prerequisites (required) | JSON-LD Tutorial |
Prerequisites (optional) | |
Follow-up (recommended) |
Tabular Data: JSON-Representation
Table
id | name | number |
---|---|---|
row1 | test1 | 1e12 |
row2 | test2 | 2 |
row3 | test3 | 3 |
JSON - id as key
{
"content": {
"row1": {"id": "row1", "name": "test1", "number": "1e12"},
"row2": {"id": "row2", "name": "test2", "number": 2},
"row3": {"id": "row3", "name": "test3", "number": 3}
}
}
JSON - index as key
{
"content": [
{"id": "row1", "name": "test1", "number": "1e12"},
{"id": "row2", "name": "test2", "number": 2},
{"id": "row3", "name": "test3", "number": 3}
]
}
Tabular Data: JSON-LD Mapping
- map each column to a term
- set a default language
- misuse language tag as unit tag - not recommended
JSON - id as key with context
{
"@context": {
"test": "http://test.voc/",
"name": {"@id": "test:name", "@language": "en"},
"number": {"@id": "test:number", "@language": "Volt"},
"content": {"@container": "@index", "@id": "test:hasRow", "@index": "test:HasId"}
},
"content": {
"row1": {"id": "row1", "name": "test1", "number": "1e12"},
"row2": {"id": "row2", "name": "test2", "number": 2},
"row3": {"id": "row3", "name": "test3", "number": 3}
}
}
Mapping
Subject | Predicate | Object | Language |
---|---|---|---|
_:b0 | http://test.voc/hasRow | _:b1 | |
_:b0 | http://test.voc/hasRow | _:b2 | |
_:b0 | http://test.voc/hasRow | _:b3 | |
_:b1 | http://test.voc/HasId | row1 | |
_:b1 | http://test.voc/name | test1 | en |
_:b1 | http://test.voc/number | 1e12 | volt |
_:b2 | http://test.voc/HasId | row2 | |
_:b2 | http://test.voc/name | test2 | en |
_:b2 | http://test.voc/number | 2 | |
_:b3 | http://test.voc/HasId | row3 | |
_:b3 | http://test.voc/name | test3 | en |
_:b3 | http://test.voc/number | 3 |
Tabular Data: JSON-LD Mapping
- map each column to a term
- set a default language
- misuse language tag as unit tag - not recommended
JSON - index as key with context
{
"@context": {
"test": "http://test.voc/",
"id": "test:hasId",
"name": {"@id": "test:name", "@language": "en"},
"number": {"@id": "test:number", "@language": "Volt"},
"content": {"@container": "@index", "@id": "test:hasRow", "@index": "test:HasId"}
},
"content": [
{"id": "row1", "name": "test1", "number": "1e12"},
{"id": "row2", "name": "test2", "number": 2},
{"id": "row3", "name": "test3", "number": 3}
]
}
Mapping
Subject | Predicate | Object | Language |
---|---|---|---|
_:b0 | http://test.voc/hasRow | _:b1 | |
_:b0 | http://test.voc/hasRow | _:b2 | |
_:b0 | http://test.voc/hasRow | _:b3 | |
_:b1 | http://test.voc/hasId | row1 | |
_:b1 | http://test.voc/name | test1 | en |
_:b1 | http://test.voc/number | 1e12 | volt |
_:b2 | http://test.voc/hasId | row2 | |
_:b2 | http://test.voc/name | test2 | en |
_:b2 | http://test.voc/number | 2 | |
_:b3 | http://test.voc/hasId | row3 | |
_:b3 | http://test.voc/name | test3 | en |
_:b3 | http://test.voc/number | 3 |
Tabular Data: JSON-LD Mapping
- alternative mapping with named nodes
JSON - index as key with context
{
"@context": {
"test": "http://test.voc/",
"id": {"@id": "@id", "@context": {"@base": "http://test.voc/"}},
"name": {"@id": "test:name", "@language": "en"},
"number": {"@id": "test:number", "@language": "Volt"},
"content": {"@container": "@index", "@id": "test:hasRow", "@index": "test:HasId", "@context": {"@base": "http://test.voc/"}}
},
"@id": "test:myTable",
"content": [
{"id": "row1", "name": "test1", "number": "1e12"},
{"id": "row2", "name": "test2", "number": 2},
{"id": "row3", "name": "test3", "number": 3}
]
}
Mapping
Subject | Predicate | Object | Language |
---|---|---|---|
http://test.voc/myTable | http://test.voc/hasRow | http://test.voc/row1 | |
http://test.voc/myTable | http://test.voc/hasRow | http://test.voc/row2 | |
http://test.voc/myTable | http://test.voc/hasRow | http://test.voc/row3 | |
http://test.voc/row1 | http://test.voc/name | test1 | en |
http://test.voc/row1 | http://test.voc/number | 1e12 | volt |
http://test.voc/row2 | http://test.voc/name | test2 | en |
http://test.voc/row2 | http://test.voc/number | 2 | |
http://test.voc/row3 | http://test.voc/name | test3 | en |
http://test.voc/row3 | http://test.voc/number | 3 |
Tabular Data: JSON-LD Mapping
jsondata
type |
| ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
uuid | "7d3292e5-104f-45b1-be4f-c23901fae4fa" | ||||||||||
name | "TabularData" | ||||||||||
label |
| ||||||||||
required_predecessor |
|