Closed mchlrch closed 4 years ago
Sample DSL, using null
in logical-source
:
logical-source airport {
type csv
source "http://www.example.com/Airport.csv"
referenceables
id
longitude null "N/A"
ownership "airport ownership" null "X"
}
map AirportMapping from airport {
subject template "http://airport.example.com/{0}" with id;
types transit.Stop;
properties
wgs84_pos.long from longitude;
ex.owner from ownership;
}
Generated CSVW output:
{
"url": "http://www.example.com/Airport.csv",
"tableSchema": {
"aboutUrl": "http://airport.example.com/{id}",
"columns": [
{
"virtual": true,
"propertyUrl": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"valueUrl": "http://vocab.org/transit/terms/Stop"
}
,
{
"propertyUrl": "http://www.w3.org/2003/01/geo/wgs84_pos#long",
"titles": "longitude",
"null": "N/A"
},
{
"propertyUrl": "https://schema.example.org/owner",
"titles": "airport ownership",
"null": "X"
}
,
{
"suppressOutput": true,
"titles": "id"
}
]
}
}
Support null property as optional attribute of
Referenceable
(insideLogicalSource
)For null property see http://w3c.github.io/csvw/primer/#mixed-datatypes
Sample DSL snippet:
To clarify: