Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/cwltool/schemas/v1.0/salad/schema_salad/metaschema/metaschema.yml @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
1 $base: "https://w3id.org/cwl/salad#" | |
2 | |
3 $namespaces: | |
4 sld: "https://w3id.org/cwl/salad#" | |
5 dct: "http://purl.org/dc/terms/" | |
6 rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
7 rdfs: "http://www.w3.org/2000/01/rdf-schema#" | |
8 xsd: "http://www.w3.org/2001/XMLSchema#" | |
9 | |
10 $graph: | |
11 | |
12 - name: "Semantic_Annotations_for_Linked_Avro_Data" | |
13 type: documentation | |
14 doc: | |
15 - $include: salad.md | |
16 - $import: field_name.yml | |
17 - $import: ident_res.yml | |
18 - $import: link_res.yml | |
19 - $import: vocab_res.yml | |
20 - $include: import_include.md | |
21 - $import: map_res.yml | |
22 - $import: typedsl_res.yml | |
23 | |
24 - name: "Link_Validation" | |
25 type: documentation | |
26 doc: | | |
27 # Link validation | |
28 | |
29 Once a document has been preprocessed, an implementation may validate | |
30 links. The link validation traversal may visit fields which the schema | |
31 designates as link fields and check that each URI references an existing | |
32 object in the current document, an imported document, file system, or | |
33 network resource. Failure to validate links may be a fatal error. Link | |
34 validation behavior for individual fields may be modified by `identity` and | |
35 `noLinkCheck` in the `jsonldPredicate` section of the field schema. | |
36 | |
37 | |
38 - name: "Schema_validation" | |
39 type: documentation | |
40 doc: "" | |
41 | |
42 | |
43 # - name: "JSON_LD_Context" | |
44 # type: documentation | |
45 # doc: | | |
46 # # Generating JSON-LD Context | |
47 | |
48 # How to generate the json-ld context... | |
49 | |
50 | |
51 - $import: metaschema_base.yml | |
52 | |
53 - name: JsonldPredicate | |
54 type: record | |
55 doc: | | |
56 Attached to a record field to define how the parent record field is handled for | |
57 URI resolution and JSON-LD context generation. | |
58 fields: | |
59 - name: _id | |
60 type: string? | |
61 jsonldPredicate: | |
62 _id: sld:_id | |
63 _type: "@id" | |
64 identity: true | |
65 doc: | | |
66 The predicate URI that this field corresponds to. | |
67 Corresponds to JSON-LD `@id` directive. | |
68 - name: _type | |
69 type: string? | |
70 doc: | | |
71 The context type hint, corresponds to JSON-LD `@type` directive. | |
72 | |
73 * If the value of this field is `@id` and `identity` is false or | |
74 unspecified, the parent field must be resolved using the link | |
75 resolution rules. If `identity` is true, the parent field must be | |
76 resolved using the identifier expansion rules. | |
77 | |
78 * If the value of this field is `@vocab`, the parent field must be | |
79 resolved using the vocabulary resolution rules. | |
80 | |
81 - name: _container | |
82 type: string? | |
83 doc: | | |
84 Structure hint, corresponds to JSON-LD `@container` directive. | |
85 - name: identity | |
86 type: boolean? | |
87 doc: | | |
88 If true and `_type` is `@id` this indicates that the parent field must | |
89 be resolved according to identity resolution rules instead of link | |
90 resolution rules. In addition, the field value is considered an | |
91 assertion that the linked value exists; absence of an object in the loaded document | |
92 with the URI is not an error. | |
93 - name: noLinkCheck | |
94 type: boolean? | |
95 doc: | | |
96 If true, this indicates that link validation traversal must stop at | |
97 this field. This field (it is is a URI) or any fields under it (if it | |
98 is an object or array) are not subject to link checking. | |
99 - name: mapSubject | |
100 type: string? | |
101 doc: | | |
102 If the value of the field is a JSON object, it must be transformed | |
103 into an array of JSON objects, where each key-value pair from the | |
104 source JSON object is a list item, the list items must be JSON objects, | |
105 and the key is assigned to the field specified by `mapSubject`. | |
106 - name: mapPredicate | |
107 type: string? | |
108 doc: | | |
109 Only applies if `mapSubject` is also provided. If the value of the | |
110 field is a JSON object, it is transformed as described in `mapSubject`, | |
111 with the addition that when the value of a map item is not an object, | |
112 the item is transformed to a JSON object with the key assigned to the | |
113 field specified by `mapSubject` and the value assigned to the field | |
114 specified by `mapPredicate`. | |
115 - name: refScope | |
116 type: int? | |
117 doc: | | |
118 If the field contains a relative reference, it must be resolved by | |
119 searching for valid document references in each successive parent scope | |
120 in the document fragment. For example, a reference of `foo` in the | |
121 context `#foo/bar/baz` will first check for the existence of | |
122 `#foo/bar/baz/foo`, followed by `#foo/bar/foo`, then `#foo/foo` and | |
123 then finally `#foo`. The first valid URI in the search order shall be | |
124 used as the fully resolved value of the identifier. The value of the | |
125 refScope field is the specified number of levels from the containing | |
126 identifer scope before starting the search, so if `refScope: 2` then | |
127 "baz" and "bar" must be stripped to get the base `#foo` and search | |
128 `#foo/foo` and the `#foo`. The last scope searched must be the top | |
129 level scope before determining if the identifier cannot be resolved. | |
130 - name: typeDSL | |
131 type: boolean? | |
132 doc: | | |
133 Field must be expanded based on the the Schema Salad type DSL. | |
134 | |
135 | |
136 - name: SpecializeDef | |
137 type: record | |
138 fields: | |
139 - name: specializeFrom | |
140 type: string | |
141 doc: "The data type to be replaced" | |
142 jsonldPredicate: | |
143 _id: "sld:specializeFrom" | |
144 _type: "@id" | |
145 refScope: 1 | |
146 | |
147 - name: specializeTo | |
148 type: string | |
149 doc: "The new data type to replace with" | |
150 jsonldPredicate: | |
151 _id: "sld:specializeTo" | |
152 _type: "@id" | |
153 refScope: 1 | |
154 | |
155 | |
156 - name: NamedType | |
157 type: record | |
158 abstract: true | |
159 docParent: "#Schema" | |
160 fields: | |
161 - name: name | |
162 type: string | |
163 jsonldPredicate: "@id" | |
164 doc: "The identifier for this type" | |
165 - name: inVocab | |
166 type: boolean? | |
167 doc: | | |
168 By default or if "true", include the short name of this type in the | |
169 vocabulary (the keys of the JSON-LD context). If false, do not include | |
170 the short name in the vocabulary. | |
171 | |
172 | |
173 - name: DocType | |
174 type: record | |
175 abstract: true | |
176 docParent: "#Schema" | |
177 fields: | |
178 - name: doc | |
179 type: | |
180 - string? | |
181 - string[]? | |
182 doc: "A documentation string for this type, or an array of strings which should be concatenated." | |
183 jsonldPredicate: "rdfs:comment" | |
184 | |
185 - name: docParent | |
186 type: string? | |
187 doc: | | |
188 Hint to indicate that during documentation generation, documentation | |
189 for this type should appear in a subsection under `docParent`. | |
190 jsonldPredicate: | |
191 _id: "sld:docParent" | |
192 _type: "@id" | |
193 | |
194 - name: docChild | |
195 type: | |
196 - string? | |
197 - string[]? | |
198 doc: | | |
199 Hint to indicate that during documentation generation, documentation | |
200 for `docChild` should appear in a subsection under this type. | |
201 jsonldPredicate: | |
202 _id: "sld:docChild" | |
203 _type: "@id" | |
204 | |
205 - name: docAfter | |
206 type: string? | |
207 doc: | | |
208 Hint to indicate that during documentation generation, documentation | |
209 for this type should appear after the `docAfter` section at the same | |
210 level. | |
211 jsonldPredicate: | |
212 _id: "sld:docAfter" | |
213 _type: "@id" | |
214 | |
215 | |
216 - name: SchemaDefinedType | |
217 type: record | |
218 extends: DocType | |
219 doc: | | |
220 Abstract base for schema-defined types. | |
221 abstract: true | |
222 fields: | |
223 - name: jsonldPredicate | |
224 type: | |
225 - string? | |
226 - JsonldPredicate? | |
227 doc: | | |
228 Annotate this type with linked data context. | |
229 jsonldPredicate: sld:jsonldPredicate | |
230 | |
231 - name: documentRoot | |
232 type: boolean? | |
233 doc: | | |
234 If true, indicates that the type is a valid at the document root. At | |
235 least one type in a schema must be tagged with `documentRoot: true`. | |
236 | |
237 | |
238 - name: SaladRecordField | |
239 type: record | |
240 extends: RecordField | |
241 doc: "A field of a record." | |
242 fields: | |
243 - name: jsonldPredicate | |
244 type: | |
245 - string? | |
246 - JsonldPredicate? | |
247 doc: | | |
248 Annotate this type with linked data context. | |
249 jsonldPredicate: "sld:jsonldPredicate" | |
250 | |
251 | |
252 - name: SaladRecordSchema | |
253 docParent: "#Schema" | |
254 type: record | |
255 extends: [NamedType, RecordSchema, SchemaDefinedType] | |
256 documentRoot: true | |
257 specialize: | |
258 RecordField: SaladRecordField | |
259 fields: | |
260 - name: abstract | |
261 type: boolean? | |
262 doc: | | |
263 If true, this record is abstract and may be used as a base for other | |
264 records, but is not valid on its own. | |
265 | |
266 - name: extends | |
267 type: | |
268 - string? | |
269 - string[]? | |
270 jsonldPredicate: | |
271 _id: "sld:extends" | |
272 _type: "@id" | |
273 refScope: 1 | |
274 doc: | | |
275 Indicates that this record inherits fields from one or more base records. | |
276 | |
277 - name: specialize | |
278 type: | |
279 - SpecializeDef[]? | |
280 doc: | | |
281 Only applies if `extends` is declared. Apply type specialization using the | |
282 base record as a template. For each field inherited from the base | |
283 record, replace any instance of the type `specializeFrom` with | |
284 `specializeTo`. | |
285 jsonldPredicate: | |
286 _id: "sld:specialize" | |
287 mapSubject: specializeFrom | |
288 mapPredicate: specializeTo | |
289 | |
290 - name: SaladEnumSchema | |
291 docParent: "#Schema" | |
292 type: record | |
293 extends: [EnumSchema, SchemaDefinedType] | |
294 documentRoot: true | |
295 doc: | | |
296 Define an enumerated type. | |
297 fields: | |
298 - name: extends | |
299 type: | |
300 - string? | |
301 - string[]? | |
302 jsonldPredicate: | |
303 _id: "sld:extends" | |
304 _type: "@id" | |
305 refScope: 1 | |
306 doc: | | |
307 Indicates that this enum inherits symbols from a base enum. | |
308 | |
309 | |
310 - name: Documentation | |
311 type: record | |
312 docParent: "#Schema" | |
313 extends: [NamedType, DocType] | |
314 documentRoot: true | |
315 doc: | | |
316 A documentation section. This type exists to facilitate self-documenting | |
317 schemas but has no role in formal validation. | |
318 fields: | |
319 - name: type | |
320 doc: "Must be `documentation`" | |
321 type: | |
322 name: Documentation_symbol | |
323 type: enum | |
324 symbols: | |
325 - "sld:documentation" | |
326 jsonldPredicate: | |
327 _id: "sld:type" | |
328 _type: "@vocab" | |
329 typeDSL: true | |
330 refScope: 2 |