Skip to content

Commit 72733f1

Browse files
committed
convert csv to jsonld
1 parent 8dc7f03 commit 72733f1

File tree

4 files changed

+109
-40
lines changed

4 files changed

+109
-40
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"$id": "http://example.com/TypeDefinitionComponent_validation",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"description": "Component to check type specification",
5+
"properties": {
6+
"Booleantype": {
7+
"description": "TBD",
8+
"not": {
9+
"type": "null"
10+
},
11+
"title": "Boolean type"
12+
},
13+
"Booleantypecaps": {
14+
"description": "TBD",
15+
"not": {
16+
"type": "null"
17+
},
18+
"title": "Boolean type caps"
19+
},
20+
"Component": {
21+
"description": "TBD",
22+
"not": {
23+
"type": "null"
24+
},
25+
"title": "Component"
26+
},
27+
"Inttype": {
28+
"description": "TBD",
29+
"not": {
30+
"type": "null"
31+
},
32+
"title": "Int type"
33+
},
34+
"Inttypecaps": {
35+
"description": "TBD",
36+
"not": {
37+
"type": "null"
38+
},
39+
"title": "Int type caps"
40+
},
41+
"Missingtype": {
42+
"description": "TBD",
43+
"not": {
44+
"type": "null"
45+
},
46+
"title": "Missing type"
47+
},
48+
"Nantype": {
49+
"description": "TBD",
50+
"not": {
51+
"type": "null"
52+
},
53+
"title": "Nan type"
54+
},
55+
"Numtype": {
56+
"description": "TBD",
57+
"not": {
58+
"type": "null"
59+
},
60+
"title": "Num type"
61+
},
62+
"Numtypecaps": {
63+
"description": "TBD",
64+
"not": {
65+
"type": "null"
66+
},
67+
"title": "Num type caps"
68+
},
69+
"Stringtype": {
70+
"description": "TBD",
71+
"not": {
72+
"type": "null"
73+
},
74+
"title": "String type"
75+
},
76+
"Stringtypecaps": {
77+
"description": "TBD",
78+
"not": {
79+
"type": "null"
80+
},
81+
"title": "String type caps"
82+
}
83+
},
84+
"required": [
85+
"Booleantype",
86+
"Booleantypecaps",
87+
"Component",
88+
"Inttype",
89+
"Inttypecaps",
90+
"Missingtype",
91+
"Nantype",
92+
"Numtype",
93+
"Numtypecaps",
94+
"Stringtype",
95+
"Stringtypecaps"
96+
],
97+
"title": "TypeDefinitionComponent_validation",
98+
"type": "object"
99+
}

tests/data/example.model.column_type_component.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ List Enum,,"ab, cd, ef, gh",,,TRUE,DataProperty,,,list,
6969
List Enum Not Required,,"ab, cd, ef, gh",,,FALSE,DataProperty,,,list,
7070
List String,,,,,TRUE,DataProperty,,,list::str,
7171
List InRange,,,,,TRUE,DataProperty,,,list::inRange 50 100,
72-
TypeDefinitionComponent,Component to check type specification,"Component, String type, String type caps, Int type, Int type caps, Num type, Num type caps, Nan type, Missing type, Boolean type, Boolean type caps",,,FALSE,DataType,,,,
72+
TypeDefinitionComponent,Component to check type specification,,"Component, String type, String type caps, Int type, Int type caps, Num type, Num type caps, Nan type, Missing type, Boolean type, Boolean type caps",,FALSE,DataType,,,,
7373
String type,,,,,TRUE,DataProperty,,,,string
7474
String type caps,,,,,TRUE,DataProperty,,,,STRING
7575
Int type,,,,,TRUE,DataProperty,,,,integer

tests/data/example.model.column_type_component.invalid.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ String,,,,,TRUE,DataProperty,,,str error,
6060
String Not Required,,,,,FALSE,DataProperty,,,str error,
6161
Enum,,"ab, cd, ef, gh",,,TRUE,DataProperty,,,,
6262
Enum Not Required,,"ab, cd, ef, gh",,,FALSE,DataProperty,,,,
63-
Date,,,,,TRUE,DataProperty,,,date
64-
URL,,,,,TRUE,DataProperty,,,url
65-
InRange,,,,,TRUE,DataProperty,,,inRange 50 100
63+
Date,,,,,TRUE,DataProperty,,,date,
64+
URL,,,,,TRUE,DataProperty,,,url,
65+
InRange,,,,,TRUE,DataProperty,,,inRange 50 100,
6666
Range,,,,,TRUE,DataProperty,,,inRange 50 100,
6767
List,,,,,TRUE,DataProperty,,,list,
6868
List Not Required,,,,,FALSE,DataProperty,,,list,
6969
List Enum,,"ab, cd, ef, gh",,,TRUE,DataProperty,,,list,
7070
List Enum Not Required,,"ab, cd, ef, gh",,,FALSE,DataProperty,,,list,
7171
List String,,,,,TRUE,DataProperty,,,list::str,
7272
List InRange,,,,,TRUE,DataProperty,,,list::inRange 50 100,
73-
TypeDefinitionComponent,Component to check type specification,"Component, String type, String type caps, Int type, Int type caps, Num type, Num type caps, Nan type, Missing type, Boolean type, Boolean type caps, Invalid type spec",,,FALSE,DataType,,,,
73+
TypeDefinitionComponent,Component to check type specification,,"Component, String type, String type caps, Int type, Int type caps, Num type, Num type caps, Nan type, Missing type, Boolean type, Boolean type caps, Invalid type spec",,FALSE,DataType,,,,
7474
String type,,,,,TRUE,DataProperty,,,,string
7575
String type caps,,,,,TRUE,DataProperty,,,,STRING
7676
Int type,,,,,TRUE,DataProperty,,,,integer

tests/data/example.model.column_type_component.jsonld

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"rdfs:label": "Component",
1515
"rdfs:subClassOf": [
1616
{
17-
"@id": "bts:TypeDefinitionComponent"
17+
"@id": "bts:Thing"
1818
}
1919
],
2020
"schema:isPartOf": {
@@ -2269,7 +2269,9 @@
22692269
"schema:isPartOf": {
22702270
"@id": "http://schema.biothings.io"
22712271
},
2272-
"schema:rangeIncludes": [
2272+
"sms:displayName": "TypeDefinitionComponent",
2273+
"sms:required": "sms:false",
2274+
"sms:requiresDependency": [
22732275
{
22742276
"@id": "bts:Component"
22752277
},
@@ -2304,8 +2306,6 @@
23042306
"@id": "bts:Booleantypecaps"
23052307
}
23062308
],
2307-
"sms:displayName": "TypeDefinitionComponent",
2308-
"sms:required": "sms:false",
23092309
"sms:validationRules": []
23102310
},
23112311
{
@@ -2316,9 +2316,6 @@
23162316
"rdfs:subClassOf": [
23172317
{
23182318
"@id": "bts:DataProperty"
2319-
},
2320-
{
2321-
"@id": "bts:TypeDefinitionComponent"
23222319
}
23232320
],
23242321
"schema:isPartOf": {
@@ -2337,9 +2334,6 @@
23372334
"rdfs:subClassOf": [
23382335
{
23392336
"@id": "bts:DataProperty"
2340-
},
2341-
{
2342-
"@id": "bts:TypeDefinitionComponent"
23432337
}
23442338
],
23452339
"schema:isPartOf": {
@@ -2358,9 +2352,6 @@
23582352
"rdfs:subClassOf": [
23592353
{
23602354
"@id": "bts:DataProperty"
2361-
},
2362-
{
2363-
"@id": "bts:TypeDefinitionComponent"
23642355
}
23652356
],
23662357
"schema:isPartOf": {
@@ -2379,9 +2370,6 @@
23792370
"rdfs:subClassOf": [
23802371
{
23812372
"@id": "bts:DataProperty"
2382-
},
2383-
{
2384-
"@id": "bts:TypeDefinitionComponent"
23852373
}
23862374
],
23872375
"schema:isPartOf": {
@@ -2400,9 +2388,6 @@
24002388
"rdfs:subClassOf": [
24012389
{
24022390
"@id": "bts:DataProperty"
2403-
},
2404-
{
2405-
"@id": "bts:TypeDefinitionComponent"
24062391
}
24072392
],
24082393
"schema:isPartOf": {
@@ -2421,9 +2406,6 @@
24212406
"rdfs:subClassOf": [
24222407
{
24232408
"@id": "bts:DataProperty"
2424-
},
2425-
{
2426-
"@id": "bts:TypeDefinitionComponent"
24272409
}
24282410
],
24292411
"schema:isPartOf": {
@@ -2442,9 +2424,6 @@
24422424
"rdfs:subClassOf": [
24432425
{
24442426
"@id": "bts:DataProperty"
2445-
},
2446-
{
2447-
"@id": "bts:TypeDefinitionComponent"
24482427
}
24492428
],
24502429
"schema:isPartOf": {
@@ -2462,9 +2441,6 @@
24622441
"rdfs:subClassOf": [
24632442
{
24642443
"@id": "bts:DataProperty"
2465-
},
2466-
{
2467-
"@id": "bts:TypeDefinitionComponent"
24682444
}
24692445
],
24702446
"schema:isPartOf": {
@@ -2482,9 +2458,6 @@
24822458
"rdfs:subClassOf": [
24832459
{
24842460
"@id": "bts:DataProperty"
2485-
},
2486-
{
2487-
"@id": "bts:TypeDefinitionComponent"
24882461
}
24892462
],
24902463
"schema:isPartOf": {
@@ -2503,9 +2476,6 @@
25032476
"rdfs:subClassOf": [
25042477
{
25052478
"@id": "bts:DataProperty"
2506-
},
2507-
{
2508-
"@id": "bts:TypeDefinitionComponent"
25092479
}
25102480
],
25112481
"schema:isPartOf": {
@@ -2518,4 +2488,4 @@
25182488
}
25192489
],
25202490
"@id": "http://schema.biothings.io/#0.1"
2521-
}
2491+
}

0 commit comments

Comments
 (0)