-
Notifications
You must be signed in to change notification settings - Fork 1
/
loading_plan_schema.json
188 lines (180 loc) · 6.93 KB
/
loading_plan_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "NDEx TSV Loading Plan",
"description": "Loading plan used by TSV loader",
"definitions": {
"NodeMapping": {
"type": "object",
"properties": {
"rep_prefix": {
"description": "Prefix that need to be added to the id column",
"type": "string"
},
"rep_column": {
"description": "Column that will be used as the represent field of a node. The first non-empty value in the list will be used to populate the node represent field.",
"type": "string"
},
"node_name_column": {
"description": "The name of a node. If id_column is missing in this object, the node_name will be used as a unique id of a node. This version of TSV loader requires node name to be unique in a network",
"type": "string"
},
"property_columns": {
"description": "Defines the mapping of all node properties. An Each of the non-empty value in these columns ",
"type": "array",
"items" : { "oneOf": [
{"type" : "string"},
{"type" : "object",
"properties": {
"column_name": {
"description": "name of the column in the spreadsheet",
"type":"string"
},
"attribute_name": {
"description": "attribute_name this column maps to",
"type": "string"
},
"value_prefix": {
"description": "prefix that need to be added to the values of this attributes(without colon).",
"type": "string"
},
"data_type": {
"description": "data type of the attribute values, default is string",
"type": "string",
"enum": ["string", "double", "boolean", "integer" ,"long", "list_of_string",
"list_of_double", "list_of_boolean", "list_of_integer", "list_of_long"]
},
"delimiter": {
"description": "delimiter character for array data types",
"type": "string"
},
"default_value": {
"description": "default value of this property when column_name is missing or the value in that column is missing",
"type": "string"
}
},
"additionalProperties": false,
"anyOf": [
{
"type":"object",
"required": ["column_name"]
},
{
"type":"object",
"required": ["attribute_name"]
}
]
}
]
}
}
},
"additionalProperties": false,
"anyOf": [
{
"type":"object",
"required": ["id_column"]
},
{
"type":"object",
"required": ["node_name_column"]
}
]
}
},
"type": "object",
"properties": {
"context": {
"description": "Declare the namespaces that are used in this TSV file.",
"type": "object",
"patternProperties": {
"^[^/@\\$\\^]+$": {
"type": "string",
"format": "uniref"
}
},
"additionalProperties": false
},
"source_plan": {
"description": "Mapping of the source nodes",
"$ref": "#/definitions/NodeMapping"
},
"target_plan": {
"description": "Mapping of the target nodes",
"$ref": "#/definitions/NodeMapping"
},
"edge_plan": {
"type": "object",
"properties": {
"default_predicate": {
"description": "default value for edge name (interaction name).",
"type": "string"
},
"predicate_id_column": {
"description": "column that specify the edge name. If the value in this cell is missing, we will use the value defined in 'defalut_predicate', if it exists.",
"type": "string"
},
"predicate_prefix": {
"type": "string"
},
"citation_id_column": {
"description": "column that specify the edge name. If the value in this cell is missing, we will use the value defined in 'defalut_predicate', if it exists.",
"type": "string"
},
"citation_id_prefix": {
"type": "string"
},
"property_columns": {
"type": "array",
"items": { "oneOf": [
{"type" : "string"},
{"type" : "object",
"properties": {
"column_name": {
"description": "name of the column in the spreadsheet",
"type":"string"
},
"attribute_name": {
"description": "attribute_name this column maps to",
"type": "string"
},
"value_prefix": {
"description": "prefix that need to be added to the values of this attributes(without colon).",
"type": "string"
},
"data_type": {
"description": "data type of the attribute values, default is string",
"type": "string",
"enum": ["string","double","float", "boolean", "char","integer","long","short","list_of_string",
"list_of_double", "list_of_float","list_of_boolean", "list_of_integer", "list_of_long"]
},
"delimiter": {
"description": "delimiter character for array data types",
"type": "string"
},
"default_value": {
"description": "default value of this property when column_name is missing or the value in that column is missing",
"type": "string"
}
},
"additionalProperties": false,
"anyOf": [
{
"type":"object",
"required": ["column_name"]
},
{
"type":"object",
"required": ["attribute_name"]
}
]
}
]
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": ["source_plan","target_plan","edge_plan"]
}