Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/cwltool/schemas/v1.1.0-dev1/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 - name: subscope | |
135 type: string? | |
136 doc: | | |
137 Append the subscope to the current scope when performing | |
138 identifier resolution to objects under this field. | |
139 | |
140 - name: SpecializeDef | |
141 type: record | |
142 fields: | |
143 - name: specializeFrom | |
144 type: string | |
145 doc: "The data type to be replaced" | |
146 jsonldPredicate: | |
147 _id: "sld:specializeFrom" | |
148 _type: "@id" | |
149 refScope: 1 | |
150 | |
151 - name: specializeTo | |
152 type: string | |
153 doc: "The new data type to replace with" | |
154 jsonldPredicate: | |
155 _id: "sld:specializeTo" | |
156 _type: "@id" | |
157 refScope: 1 | |
158 | |
159 | |
160 - name: NamedType | |
161 type: record | |
162 abstract: true | |
163 docParent: "#Schema" | |
164 fields: | |
165 - name: name | |
166 type: string | |
167 jsonldPredicate: "@id" | |
168 doc: "The identifier for this type" | |
169 - name: inVocab | |
170 type: boolean? | |
171 doc: | | |
172 By default or if "true", include the short name of this type in the | |
173 vocabulary (the keys of the JSON-LD context). If false, do not include | |
174 the short name in the vocabulary. | |
175 | |
176 | |
177 - name: DocType | |
178 type: record | |
179 extends: Documented | |
180 abstract: true | |
181 docParent: "#Schema" | |
182 fields: | |
183 - name: docParent | |
184 type: string? | |
185 doc: | | |
186 Hint to indicate that during documentation generation, documentation | |
187 for this type should appear in a subsection under `docParent`. | |
188 jsonldPredicate: | |
189 _id: "sld:docParent" | |
190 _type: "@id" | |
191 | |
192 - name: docChild | |
193 type: | |
194 - string? | |
195 - string[]? | |
196 doc: | | |
197 Hint to indicate that during documentation generation, documentation | |
198 for `docChild` should appear in a subsection under this type. | |
199 jsonldPredicate: | |
200 _id: "sld:docChild" | |
201 _type: "@id" | |
202 | |
203 - name: docAfter | |
204 type: string? | |
205 doc: | | |
206 Hint to indicate that during documentation generation, documentation | |
207 for this type should appear after the `docAfter` section at the same | |
208 level. | |
209 jsonldPredicate: | |
210 _id: "sld:docAfter" | |
211 _type: "@id" | |
212 | |
213 | |
214 - name: SchemaDefinedType | |
215 type: record | |
216 extends: DocType | |
217 doc: | | |
218 Abstract base for schema-defined types. | |
219 abstract: true | |
220 fields: | |
221 - name: jsonldPredicate | |
222 type: | |
223 - string? | |
224 - JsonldPredicate? | |
225 doc: | | |
226 Annotate this type with linked data context. | |
227 jsonldPredicate: sld:jsonldPredicate | |
228 | |
229 - name: documentRoot | |
230 type: boolean? | |
231 doc: | | |
232 If true, indicates that the type is a valid at the document root. At | |
233 least one type in a schema must be tagged with `documentRoot: true`. | |
234 | |
235 | |
236 - name: SaladRecordField | |
237 type: record | |
238 extends: RecordField | |
239 doc: "A field of a record." | |
240 fields: | |
241 - name: jsonldPredicate | |
242 type: | |
243 - string? | |
244 - JsonldPredicate? | |
245 doc: | | |
246 Annotate this type with linked data context. | |
247 jsonldPredicate: "sld:jsonldPredicate" | |
248 - name: default | |
249 type: Any? | |
250 jsonldPredicate: | |
251 _id: sld:default | |
252 noLinkCheck: true | |
253 doc: | | |
254 The default value to use for this field if the field is missing or "null". | |
255 | |
256 | |
257 - name: SaladRecordSchema | |
258 docParent: "#Schema" | |
259 type: record | |
260 extends: [NamedType, RecordSchema, SchemaDefinedType] | |
261 documentRoot: true | |
262 specialize: | |
263 RecordField: SaladRecordField | |
264 fields: | |
265 - name: abstract | |
266 type: boolean? | |
267 doc: | | |
268 If true, this record is abstract and may be used as a base for other | |
269 records, but is not valid on its own. | |
270 | |
271 - name: extends | |
272 type: | |
273 - string? | |
274 - string[]? | |
275 jsonldPredicate: | |
276 _id: "sld:extends" | |
277 _type: "@id" | |
278 refScope: 1 | |
279 doc: | | |
280 Indicates that this record inherits fields from one or more base records. | |
281 | |
282 - name: specialize | |
283 type: | |
284 - SpecializeDef[]? | |
285 doc: | | |
286 Only applies if `extends` is declared. Apply type specialization using the | |
287 base record as a template. For each field inherited from the base | |
288 record, replace any instance of the type `specializeFrom` with | |
289 `specializeTo`. | |
290 jsonldPredicate: | |
291 _id: "sld:specialize" | |
292 mapSubject: specializeFrom | |
293 mapPredicate: specializeTo | |
294 | |
295 - name: SaladEnumSchema | |
296 docParent: "#Schema" | |
297 type: record | |
298 extends: [NamedType, EnumSchema, SchemaDefinedType] | |
299 documentRoot: true | |
300 doc: | | |
301 Define an enumerated type. | |
302 fields: | |
303 - name: extends | |
304 type: | |
305 - string? | |
306 - string[]? | |
307 jsonldPredicate: | |
308 _id: "sld:extends" | |
309 _type: "@id" | |
310 refScope: 1 | |
311 doc: | | |
312 Indicates that this enum inherits symbols from a base enum. | |
313 | |
314 | |
315 - name: Documentation | |
316 type: record | |
317 docParent: "#Schema" | |
318 extends: [NamedType, DocType] | |
319 documentRoot: true | |
320 doc: | | |
321 A documentation section. This type exists to facilitate self-documenting | |
322 schemas but has no role in formal validation. | |
323 fields: | |
324 - name: type | |
325 doc: "Must be `documentation`" | |
326 type: | |
327 type: enum | |
328 symbols: | |
329 - "sld:documentation" | |
330 jsonldPredicate: | |
331 _id: "sld:type" | |
332 _type: "@vocab" | |
333 typeDSL: true | |
334 refScope: 2 |