1 | {
|
2 | "title": "MediaObject",
|
3 | "@id": "schema:MediaObject",
|
4 | "extends": "CreativeWork",
|
5 | "role": "base",
|
6 | "status": "stable",
|
7 | "category": "data",
|
8 | "description": "A media object, such as an image, video, or audio object embedded in a web page or a\ndownloadable dataset.\n",
|
9 | "properties": {
|
10 | "type": {
|
11 | "@id": "schema:type",
|
12 | "description": "The name of the type.",
|
13 | "type": "string",
|
14 | "enum": [
|
15 | "MediaObject",
|
16 | "AudioObject",
|
17 | "ImageObject",
|
18 | "VideoObject"
|
19 | ],
|
20 | "default": "MediaObject",
|
21 | "from": "Entity"
|
22 | },
|
23 | "id": {
|
24 | "@id": "schema:id",
|
25 | "description": "The identifier for this item.",
|
26 | "type": "string",
|
27 | "from": "Entity"
|
28 | },
|
29 | "meta": {
|
30 | "@id": "stencila:meta",
|
31 | "description": "Metadata associated with this item.",
|
32 | "type": "object",
|
33 | "from": "Entity"
|
34 | },
|
35 | "alternateNames": {
|
36 | "@id": "schema:alternateName",
|
37 | "description": "Alternate names (aliases) for the item.",
|
38 | "type": "array",
|
39 | "items": {
|
40 | "type": "string"
|
41 | },
|
42 | "from": "Thing",
|
43 | "isArray": true,
|
44 | "isPlural": true,
|
45 | "aliases": [
|
46 | "alternateName"
|
47 | ]
|
48 | },
|
49 | "description": {
|
50 | "@id": "schema:description",
|
51 | "description": "A description of the item.",
|
52 | "$comment": "Allows for the description to be an array of nodes (e.g. an array of inline content,\nor a couple of paragraphs), or a string. The `minItems` restriction avoids a string\nbeing coerced into an array with a single string item.\n",
|
53 | "anyOf": [
|
54 | {
|
55 | "type": "array",
|
56 | "items": {
|
57 | "$ref": "BlockContent.schema.json"
|
58 | }
|
59 | },
|
60 | {
|
61 | "type": "array",
|
62 | "items": {
|
63 | "$ref": "InlineContent.schema.json"
|
64 | },
|
65 | "minItems": 2
|
66 | },
|
67 | {
|
68 | "type": "string"
|
69 | }
|
70 | ],
|
71 | "from": "Thing"
|
72 | },
|
73 | "identifiers": {
|
74 | "@id": "schema:identifier",
|
75 | "description": "Any kind of identifier for any kind of Thing.",
|
76 | "$comment": "Some identifiers have specific properties e.g the `issn` property for\nthe `Periodical` type. These should be used in preference to this\nproperty which is intended for identifiers that do not yet have a\nspecific property. Identifiers can be represented as strings, but\nusing a `PropertyValue` will usually be better because it allows\nfor `propertyID` (i.e. the type of identifier).\n",
|
77 | "type": "array",
|
78 | "items": {
|
79 | "anyOf": [
|
80 | {
|
81 | "$ref": "PropertyValue.schema.json"
|
82 | },
|
83 | {
|
84 | "type": "string"
|
85 | }
|
86 | ]
|
87 | },
|
88 | "from": "Thing",
|
89 | "isArray": true,
|
90 | "isPlural": true,
|
91 | "aliases": [
|
92 | "identifier"
|
93 | ]
|
94 | },
|
95 | "images": {
|
96 | "@id": "schema:image",
|
97 | "description": "Images of the item.",
|
98 | "type": "array",
|
99 | "items": {
|
100 | "anyOf": [
|
101 | {
|
102 | "$ref": "ImageObject.schema.json"
|
103 | },
|
104 | {
|
105 | "type": "string",
|
106 | "format": "uri"
|
107 | }
|
108 | ]
|
109 | },
|
110 | "from": "Thing",
|
111 | "isArray": true,
|
112 | "isPlural": true,
|
113 | "aliases": [
|
114 | "image"
|
115 | ]
|
116 | },
|
117 | "name": {
|
118 | "@id": "schema:name",
|
119 | "description": "The name of the item.",
|
120 | "type": "string",
|
121 | "from": "Thing"
|
122 | },
|
123 | "url": {
|
124 | "@id": "schema:url",
|
125 | "description": "The URL of the item.",
|
126 | "type": "string",
|
127 | "format": "uri",
|
128 | "from": "Thing"
|
129 | },
|
130 | "about": {
|
131 | "@id": "schema:about",
|
132 | "description": "The subject matter of the content.",
|
133 | "$comment": "Consistent with https://schema.org/about, this property allows for\nlinking to one of more `Thing` nodes. This could for example include\na `Person` (e.g for a bibliography) or a `DefinedTerm` (e.g. for\nsubject areas the creative work relates to).\n",
|
134 | "type": "array",
|
135 | "items": {
|
136 | "$ref": "Thing.schema.json"
|
137 | },
|
138 | "from": "CreativeWork",
|
139 | "isArray": true
|
140 | },
|
141 | "authors": {
|
142 | "@id": "schema:author",
|
143 | "description": "The authors of this creative work.",
|
144 | "type": "array",
|
145 | "allOf": [
|
146 | {
|
147 | "parser": "csi"
|
148 | },
|
149 | {
|
150 | "type": "array",
|
151 | "items": {
|
152 | "anyOf": [
|
153 | {
|
154 | "$ref": "Person.schema.json"
|
155 | },
|
156 | {
|
157 | "$ref": "Organization.schema.json"
|
158 | }
|
159 | ]
|
160 | }
|
161 | }
|
162 | ],
|
163 | "from": "CreativeWork",
|
164 | "isArray": true,
|
165 | "isPlural": true,
|
166 | "aliases": [
|
167 | "author"
|
168 | ]
|
169 | },
|
170 | "comments": {
|
171 | "@id": "schema:comment",
|
172 | "description": "Comments about this creative work.",
|
173 | "type": "array",
|
174 | "items": {
|
175 | "$ref": "Comment.schema.json"
|
176 | },
|
177 | "from": "CreativeWork",
|
178 | "isArray": true,
|
179 | "isPlural": true,
|
180 | "aliases": [
|
181 | "comment"
|
182 | ]
|
183 | },
|
184 | "content": {
|
185 | "@id": "stencila:content",
|
186 | "description": "The structured content of this creative work c.f. property `text`.",
|
187 | "type": "array",
|
188 | "items": {
|
189 | "$ref": "Node.schema.json"
|
190 | },
|
191 | "from": "CreativeWork",
|
192 | "isArray": true
|
193 | },
|
194 | "dateCreated": {
|
195 | "@id": "schema:dateCreated",
|
196 | "description": "Date/time of creation.",
|
197 | "allOf": [
|
198 | {
|
199 | "$ref": "#/definitions/dateProperty"
|
200 | }
|
201 | ],
|
202 | "from": "CreativeWork"
|
203 | },
|
204 | "dateReceived": {
|
205 | "@id": "schema:dateReceived",
|
206 | "description": "Date/time that work was received.",
|
207 | "allOf": [
|
208 | {
|
209 | "$ref": "#/definitions/dateProperty"
|
210 | }
|
211 | ],
|
212 | "from": "CreativeWork"
|
213 | },
|
214 | "dateAccepted": {
|
215 | "@id": "stencila:dateAccepted",
|
216 | "description": "Date/time of acceptance.",
|
217 | "$comment": "This is not yet a schema.org property but the term is used\n[in Dublin Core](http://purl.org/dc/terms/dateAccepted).\n",
|
218 | "allOf": [
|
219 | {
|
220 | "$ref": "#/definitions/dateProperty"
|
221 | }
|
222 | ],
|
223 | "from": "CreativeWork"
|
224 | },
|
225 | "dateModified": {
|
226 | "@id": "schema:dateModified",
|
227 | "description": "Date/time of most recent modification.",
|
228 | "allOf": [
|
229 | {
|
230 | "$ref": "#/definitions/dateProperty"
|
231 | }
|
232 | ],
|
233 | "from": "CreativeWork"
|
234 | },
|
235 | "datePublished": {
|
236 | "@id": "schema:datePublished",
|
237 | "aliases": [
|
238 | "date"
|
239 | ],
|
240 | "description": "Date of first publication.",
|
241 | "allOf": [
|
242 | {
|
243 | "$ref": "#/definitions/dateProperty"
|
244 | }
|
245 | ],
|
246 | "from": "CreativeWork"
|
247 | },
|
248 | "editors": {
|
249 | "@id": "schema:editor",
|
250 | "description": "People who edited the `CreativeWork`.",
|
251 | "type": "array",
|
252 | "items": {
|
253 | "$ref": "Person.schema.json"
|
254 | },
|
255 | "from": "CreativeWork",
|
256 | "isArray": true,
|
257 | "isPlural": true,
|
258 | "aliases": [
|
259 | "editor"
|
260 | ]
|
261 | },
|
262 | "funders": {
|
263 | "@id": "schema:funder",
|
264 | "description": "People or organizations that funded the `CreativeWork`.",
|
265 | "type": "array",
|
266 | "items": {
|
267 | "anyOf": [
|
268 | {
|
269 | "$ref": "Person.schema.json"
|
270 | },
|
271 | {
|
272 | "$ref": "Organization.schema.json"
|
273 | }
|
274 | ]
|
275 | },
|
276 | "from": "CreativeWork",
|
277 | "isArray": true,
|
278 | "isPlural": true,
|
279 | "aliases": [
|
280 | "funder"
|
281 | ]
|
282 | },
|
283 | "fundedBy": {
|
284 | "@id": "stencila:fundedBy",
|
285 | "description": "Grants that funded the `CreativeWork`; reverse of `fundedItems`.",
|
286 | "$comment": "This follows the proposal [here](https://github.com/schemaorg/schemaorg/issues/2258)\nfor a property that is the reverse of `fundedItems`.\nIt is an any because a `CreativeWork` may have been funded through more than\none `Grant`.\n",
|
287 | "type": "array",
|
288 | "items": {
|
289 | "anyOf": [
|
290 | {
|
291 | "$ref": "Grant.schema.json"
|
292 | },
|
293 | {
|
294 | "$ref": "MonetaryGrant.schema.json"
|
295 | }
|
296 | ]
|
297 | },
|
298 | "from": "CreativeWork",
|
299 | "isArray": true
|
300 | },
|
301 | "genre": {
|
302 | "@id": "schema:genre",
|
303 | "description": "Genre of the creative work, broadcast channel or group.",
|
304 | "type": "array",
|
305 | "items": {
|
306 | "type": "string"
|
307 | },
|
308 | "from": "CreativeWork",
|
309 | "isArray": true
|
310 | },
|
311 | "keywords": {
|
312 | "@id": "schema:keywords",
|
313 | "description": "Keywords or tags used to describe this content.\nMultiple entries in a keywords list are typically delimited by commas.\n",
|
314 | "allOf": [
|
315 | {
|
316 | "parser": "csi"
|
317 | },
|
318 | {
|
319 | "type": "array",
|
320 | "items": {
|
321 | "type": "string"
|
322 | }
|
323 | }
|
324 | ],
|
325 | "from": "CreativeWork",
|
326 | "isArray": true,
|
327 | "isPlural": true,
|
328 | "aliases": [
|
329 | "keyword"
|
330 | ]
|
331 | },
|
332 | "isPartOf": {
|
333 | "@id": "schema:isPartOf",
|
334 | "description": "An item or other CreativeWork that this CreativeWork is a part of.\n",
|
335 | "allOf": [
|
336 | {
|
337 | "$ref": "CreativeWorkTypes.schema.json"
|
338 | }
|
339 | ],
|
340 | "from": "CreativeWork"
|
341 | },
|
342 | "licenses": {
|
343 | "@id": "schema:license",
|
344 | "description": "License documents that applies to this content, typically indicated by URL.\n",
|
345 | "type": "array",
|
346 | "items": {
|
347 | "anyOf": [
|
348 | {
|
349 | "$ref": "CreativeWorkTypes.schema.json"
|
350 | },
|
351 | {
|
352 | "type": "string",
|
353 | "format": "uri"
|
354 | }
|
355 | ]
|
356 | },
|
357 | "from": "CreativeWork",
|
358 | "isArray": true,
|
359 | "isPlural": true,
|
360 | "aliases": [
|
361 | "license"
|
362 | ]
|
363 | },
|
364 | "maintainers": {
|
365 | "@id": "schema:maintainer",
|
366 | "description": "The people or organizations who maintain this CreativeWork.",
|
367 | "$comment": "A maintainer of a Dataset, SoftwareApplication, or other CreativeWork.\nA maintainer is a Person or Organization that manages contributions to,\nand/or publication of, some (typically complex) artifact. It is common for\ndistributions of software and data to be based on \"upstream\" sources.\nWhen maintainer is applied to a specific version of something e.g. a particular\nversion or packaging of a Dataset, it is always possible that the upstream\nsource has a different maintainer. The isBasedOn property can be used to\nindicate such relationships between datasets to make the different maintenance\nroles clear. Similarly in the case of software, a package may have dedicated\nmaintainers working on integration into software distributions such as Ubuntu,\nas well as upstream maintainers of the underlying work.\n",
|
368 | "type": "array",
|
369 | "items": [
|
370 | {
|
371 | "$ref": "Organization.schema.json"
|
372 | },
|
373 | {
|
374 | "$ref": "Person.schema.json"
|
375 | }
|
376 | ],
|
377 | "from": "CreativeWork",
|
378 | "isArray": true,
|
379 | "isPlural": true,
|
380 | "aliases": [
|
381 | "maintainer"
|
382 | ]
|
383 | },
|
384 | "parts": {
|
385 | "@id": "schema:hasParts",
|
386 | "aliases": [
|
387 | "hasParts",
|
388 | "part"
|
389 | ],
|
390 | "description": "Elements of the collection which can be a variety of different elements,\nsuch as Articles, Datatables, Tables and more.\n",
|
391 | "type": "array",
|
392 | "items": {
|
393 | "$ref": "CreativeWorkTypes.schema.json"
|
394 | },
|
395 | "from": "CreativeWork",
|
396 | "isArray": true,
|
397 | "isPlural": true
|
398 | },
|
399 | "publisher": {
|
400 | "@id": "schema:publisher",
|
401 | "description": "A publisher of the CreativeWork.\n",
|
402 | "anyOf": [
|
403 | {
|
404 | "$ref": "Person.schema.json"
|
405 | },
|
406 | {
|
407 | "$ref": "Organization.schema.json"
|
408 | }
|
409 | ],
|
410 | "from": "CreativeWork"
|
411 | },
|
412 | "references": {
|
413 | "@id": "schema:citation",
|
414 | "aliases": [
|
415 | "citations",
|
416 | "reference"
|
417 | ],
|
418 | "description": "References to other creative works, such as another publication,\nweb page, scholarly article, etc.\n",
|
419 | "type": "array",
|
420 | "items": {
|
421 | "anyOf": [
|
422 | {
|
423 | "$ref": "CreativeWorkTypes.schema.json"
|
424 | },
|
425 | {
|
426 | "type": "string"
|
427 | }
|
428 | ]
|
429 | },
|
430 | "from": "CreativeWork",
|
431 | "isArray": true,
|
432 | "isPlural": true
|
433 | },
|
434 | "text": {
|
435 | "@id": "schema:text",
|
436 | "description": "The textual content of this creative work.",
|
437 | "type": "string",
|
438 | "from": "CreativeWork"
|
439 | },
|
440 | "title": {
|
441 | "@id": "schema:headline",
|
442 | "description": "The title of the creative work.",
|
443 | "aliases": [
|
444 | "headline"
|
445 | ],
|
446 | "$comment": "Allows for the title to include inline content (e.g `Strong`, `Math`)\nor a string. The title can not be block content e.g `Paragraph`.\nThe `minItems` restriction avoids a string being coerced into an array\nwith a single string item.\n",
|
447 | "anyOf": [
|
448 | {
|
449 | "type": "array",
|
450 | "items": {
|
451 | "$ref": "InlineContent.schema.json"
|
452 | },
|
453 | "minItems": 2
|
454 | },
|
455 | {
|
456 | "type": "string"
|
457 | }
|
458 | ],
|
459 | "from": "CreativeWork"
|
460 | },
|
461 | "version": {
|
462 | "@id": "schema:version",
|
463 | "description": "The version of the creative work.",
|
464 | "$comment": "In this case `string` is listed as an alternative before `number` to\navoid semantic version numbers e.g. `1.0` being parsed, and subsequently\nencoded, as `1` thereby resulting in loss of information.\n",
|
465 | "anyOf": [
|
466 | {
|
467 | "type": "string"
|
468 | },
|
469 | {
|
470 | "type": "number"
|
471 | }
|
472 | ],
|
473 | "from": "CreativeWork"
|
474 | },
|
475 | "bitrate": {
|
476 | "@id": "schema:bitrate",
|
477 | "description": "Bitrate in megabits per second (Mbit/s, Mb/s, Mbps).\n",
|
478 | "type": "number",
|
479 | "from": "MediaObject"
|
480 | },
|
481 | "contentSize": {
|
482 | "@id": "schema:contentSize",
|
483 | "description": "File size in megabits (Mbit, Mb).\n",
|
484 | "type": "number",
|
485 | "from": "MediaObject"
|
486 | },
|
487 | "contentUrl": {
|
488 | "@id": "schema:contentUrl",
|
489 | "description": "URL for the actual bytes of the media object, for example the image file or video file.\n",
|
490 | "$comment": "To allow for file paths, including possibly erroneous paths, niether `format` or `pattern`\nkeywords are used here, or on `embedUrl`.\n",
|
491 | "type": "string",
|
492 | "from": "MediaObject"
|
493 | },
|
494 | "embedUrl": {
|
495 | "@id": "schema:embedUrl",
|
496 | "description": "URL that can be used to embed the media on a web page via a specific media player.\n",
|
497 | "type": "string",
|
498 | "from": "MediaObject"
|
499 | },
|
500 | "format": {
|
501 | "@id": "schema:encodingFormat",
|
502 | "aliases": [
|
503 | "encoding",
|
504 | "encodingFormat"
|
505 | ],
|
506 | "description": "Media type (MIME type) as per http://www.iana.org/assignments/media-types/media-types.xhtml.\n",
|
507 | "type": "string",
|
508 | "pattern": "^[a-z]+(\\/[a-z\\+\\-]+)?$",
|
509 | "from": "MediaObject"
|
510 | }
|
511 | },
|
512 | "required": [
|
513 | "type",
|
514 | "contentUrl"
|
515 | ],
|
516 | "file": "MediaObject.schema.yaml",
|
517 | "children": [
|
518 | "AudioObject",
|
519 | "ImageObject",
|
520 | "VideoObject"
|
521 | ],
|
522 | "descendants": [
|
523 | "AudioObject",
|
524 | "ImageObject",
|
525 | "VideoObject"
|
526 | ],
|
527 | "$schema": "http://json-schema.org/draft-07/schema#",
|
528 | "$id": "https://schema.stenci.la/v0/MediaObject.schema.json",
|
529 | "source": "https://github.com/stencila/schema/blob/master/MediaObject.schema.yaml",
|
530 | "type": "object",
|
531 | "propertyAliases": {
|
532 | "alternateName": "alternateNames",
|
533 | "identifier": "identifiers",
|
534 | "image": "images",
|
535 | "author": "authors",
|
536 | "comment": "comments",
|
537 | "date": "datePublished",
|
538 | "editor": "editors",
|
539 | "funder": "funders",
|
540 | "keyword": "keywords",
|
541 | "license": "licenses",
|
542 | "maintainer": "maintainers",
|
543 | "hasParts": "parts",
|
544 | "part": "parts",
|
545 | "citations": "references",
|
546 | "reference": "references",
|
547 | "headline": "title",
|
548 | "encoding": "format",
|
549 | "encodingFormat": "format"
|
550 | },
|
551 | "additionalProperties": false,
|
552 | "definitions": {
|
553 | "dateProperty": {
|
554 | "anyOf": [
|
555 | {
|
556 | "$ref": "Date.schema.json"
|
557 | },
|
558 | {
|
559 | "type": "string",
|
560 | "format": "date-time"
|
561 | },
|
562 | {
|
563 | "type": "string",
|
564 | "format": "date"
|
565 | }
|
566 | ]
|
567 | }
|
568 | }
|
569 | }
|