1 | {
|
2 | "title": "MediaObject",
|
3 | "@id": "schema:MediaObject",
|
4 | "extends": "CreativeWork",
|
5 | "category": "works",
|
6 | "role": "base",
|
7 | "status": "stable",
|
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": "ThingTypes.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 | "allOf": [
|
145 | {
|
146 | "parser": "scsi"
|
147 | },
|
148 | {
|
149 | "type": "array",
|
150 | "items": {
|
151 | "anyOf": [
|
152 | {
|
153 | "$ref": "Person.schema.json"
|
154 | },
|
155 | {
|
156 | "$ref": "Organization.schema.json"
|
157 | }
|
158 | ]
|
159 | }
|
160 | }
|
161 | ],
|
162 | "from": "CreativeWork",
|
163 | "isArray": true,
|
164 | "isPlural": true,
|
165 | "aliases": [
|
166 | "author"
|
167 | ]
|
168 | },
|
169 | "comments": {
|
170 | "@id": "schema:comment",
|
171 | "description": "Comments about this creative work.",
|
172 | "type": "array",
|
173 | "items": {
|
174 | "$ref": "Comment.schema.json"
|
175 | },
|
176 | "from": "CreativeWork",
|
177 | "isArray": true,
|
178 | "isPlural": true,
|
179 | "aliases": [
|
180 | "comment"
|
181 | ]
|
182 | },
|
183 | "content": {
|
184 | "@id": "stencila:content",
|
185 | "description": "The structured content of this creative work c.f. property `text`.",
|
186 | "anyOf": [
|
187 | {
|
188 | "type": "array",
|
189 | "items": {
|
190 | "$ref": "Node.schema.json"
|
191 | }
|
192 | },
|
193 | {
|
194 | "type": "string"
|
195 | }
|
196 | ],
|
197 | "from": "CreativeWork"
|
198 | },
|
199 | "dateCreated": {
|
200 | "@id": "schema:dateCreated",
|
201 | "description": "Date/time of creation.",
|
202 | "allOf": [
|
203 | {
|
204 | "$ref": "Date.schema.json"
|
205 | }
|
206 | ],
|
207 | "from": "CreativeWork"
|
208 | },
|
209 | "dateReceived": {
|
210 | "@id": "schema:dateReceived",
|
211 | "description": "Date/time that work was received.",
|
212 | "allOf": [
|
213 | {
|
214 | "$ref": "Date.schema.json"
|
215 | }
|
216 | ],
|
217 | "from": "CreativeWork"
|
218 | },
|
219 | "dateAccepted": {
|
220 | "@id": "stencila:dateAccepted",
|
221 | "description": "Date/time of acceptance.",
|
222 | "$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",
|
223 | "allOf": [
|
224 | {
|
225 | "$ref": "Date.schema.json"
|
226 | }
|
227 | ],
|
228 | "from": "CreativeWork"
|
229 | },
|
230 | "dateModified": {
|
231 | "@id": "schema:dateModified",
|
232 | "description": "Date/time of most recent modification.",
|
233 | "allOf": [
|
234 | {
|
235 | "$ref": "Date.schema.json"
|
236 | }
|
237 | ],
|
238 | "from": "CreativeWork"
|
239 | },
|
240 | "datePublished": {
|
241 | "@id": "schema:datePublished",
|
242 | "aliases": [
|
243 | "date"
|
244 | ],
|
245 | "description": "Date of first publication.",
|
246 | "allOf": [
|
247 | {
|
248 | "$ref": "Date.schema.json"
|
249 | }
|
250 | ],
|
251 | "from": "CreativeWork"
|
252 | },
|
253 | "editors": {
|
254 | "@id": "schema:editor",
|
255 | "description": "People who edited the `CreativeWork`.",
|
256 | "type": "array",
|
257 | "items": {
|
258 | "$ref": "Person.schema.json"
|
259 | },
|
260 | "from": "CreativeWork",
|
261 | "isArray": true,
|
262 | "isPlural": true,
|
263 | "aliases": [
|
264 | "editor"
|
265 | ]
|
266 | },
|
267 | "funders": {
|
268 | "@id": "schema:funder",
|
269 | "description": "People or organizations that funded the `CreativeWork`.",
|
270 | "type": "array",
|
271 | "items": {
|
272 | "anyOf": [
|
273 | {
|
274 | "$ref": "Person.schema.json"
|
275 | },
|
276 | {
|
277 | "$ref": "Organization.schema.json"
|
278 | }
|
279 | ]
|
280 | },
|
281 | "from": "CreativeWork",
|
282 | "isArray": true,
|
283 | "isPlural": true,
|
284 | "aliases": [
|
285 | "funder"
|
286 | ]
|
287 | },
|
288 | "fundedBy": {
|
289 | "@id": "stencila:fundedBy",
|
290 | "description": "Grants that funded the `CreativeWork`; reverse of `fundedItems`.",
|
291 | "$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",
|
292 | "type": "array",
|
293 | "items": {
|
294 | "anyOf": [
|
295 | {
|
296 | "$ref": "Grant.schema.json"
|
297 | },
|
298 | {
|
299 | "$ref": "MonetaryGrant.schema.json"
|
300 | }
|
301 | ]
|
302 | },
|
303 | "from": "CreativeWork",
|
304 | "isArray": true
|
305 | },
|
306 | "genre": {
|
307 | "@id": "schema:genre",
|
308 | "description": "Genre of the creative work, broadcast channel or group.",
|
309 | "allOf": [
|
310 | {
|
311 | "parser": "csi"
|
312 | },
|
313 | {
|
314 | "type": "array",
|
315 | "items": {
|
316 | "type": "string"
|
317 | }
|
318 | }
|
319 | ],
|
320 | "from": "CreativeWork",
|
321 | "isArray": true
|
322 | },
|
323 | "keywords": {
|
324 | "@id": "schema:keywords",
|
325 | "description": "Keywords or tags used to describe this content.\nMultiple entries in a keywords list are typically delimited by commas.\n",
|
326 | "allOf": [
|
327 | {
|
328 | "parser": "csi"
|
329 | },
|
330 | {
|
331 | "type": "array",
|
332 | "items": {
|
333 | "type": "string"
|
334 | }
|
335 | }
|
336 | ],
|
337 | "from": "CreativeWork",
|
338 | "isArray": true,
|
339 | "isPlural": true,
|
340 | "aliases": [
|
341 | "keyword"
|
342 | ]
|
343 | },
|
344 | "isPartOf": {
|
345 | "@id": "schema:isPartOf",
|
346 | "description": "An item or other CreativeWork that this CreativeWork is a part of.\n",
|
347 | "$ref": "CreativeWorkTypes.schema.json",
|
348 | "from": "CreativeWork"
|
349 | },
|
350 | "licenses": {
|
351 | "@id": "schema:license",
|
352 | "description": "License documents that applies to this content, typically indicated by URL.\n",
|
353 | "type": "array",
|
354 | "items": {
|
355 | "anyOf": [
|
356 | {
|
357 | "$ref": "CreativeWorkTypes.schema.json"
|
358 | },
|
359 | {
|
360 | "type": "string",
|
361 | "format": "uri"
|
362 | }
|
363 | ]
|
364 | },
|
365 | "from": "CreativeWork",
|
366 | "isArray": true,
|
367 | "isPlural": true,
|
368 | "aliases": [
|
369 | "license"
|
370 | ]
|
371 | },
|
372 | "maintainers": {
|
373 | "@id": "schema:maintainer",
|
374 | "description": "The people or organizations who maintain this CreativeWork.",
|
375 | "$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",
|
376 | "type": "array",
|
377 | "items": {
|
378 | "anyOf": [
|
379 | {
|
380 | "$ref": "Person.schema.json"
|
381 | },
|
382 | {
|
383 | "$ref": "Organization.schema.json"
|
384 | }
|
385 | ]
|
386 | },
|
387 | "from": "CreativeWork",
|
388 | "isArray": true,
|
389 | "isPlural": true,
|
390 | "aliases": [
|
391 | "maintainer"
|
392 | ]
|
393 | },
|
394 | "parts": {
|
395 | "@id": "schema:hasParts",
|
396 | "aliases": [
|
397 | "hasParts",
|
398 | "part"
|
399 | ],
|
400 | "description": "Elements of the collection which can be a variety of different elements,\nsuch as Articles, Datatables, Tables and more.\n",
|
401 | "type": "array",
|
402 | "items": {
|
403 | "$ref": "CreativeWorkTypes.schema.json"
|
404 | },
|
405 | "from": "CreativeWork",
|
406 | "isArray": true,
|
407 | "isPlural": true
|
408 | },
|
409 | "publisher": {
|
410 | "@id": "schema:publisher",
|
411 | "description": "A publisher of the CreativeWork.\n",
|
412 | "anyOf": [
|
413 | {
|
414 | "$ref": "Person.schema.json"
|
415 | },
|
416 | {
|
417 | "$ref": "Organization.schema.json"
|
418 | }
|
419 | ],
|
420 | "from": "CreativeWork"
|
421 | },
|
422 | "references": {
|
423 | "@id": "schema:citation",
|
424 | "aliases": [
|
425 | "citations",
|
426 | "reference"
|
427 | ],
|
428 | "description": "References to other creative works, such as another publication,\nweb page, scholarly article, etc.\n",
|
429 | "type": "array",
|
430 | "items": {
|
431 | "anyOf": [
|
432 | {
|
433 | "$ref": "CreativeWorkTypes.schema.json"
|
434 | },
|
435 | {
|
436 | "type": "string"
|
437 | }
|
438 | ]
|
439 | },
|
440 | "from": "CreativeWork",
|
441 | "isArray": true,
|
442 | "isPlural": true
|
443 | },
|
444 | "text": {
|
445 | "@id": "schema:text",
|
446 | "description": "The textual content of this creative work.",
|
447 | "type": "string",
|
448 | "from": "CreativeWork"
|
449 | },
|
450 | "title": {
|
451 | "@id": "schema:headline",
|
452 | "description": "The title of the creative work.",
|
453 | "aliases": [
|
454 | "headline"
|
455 | ],
|
456 | "$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",
|
457 | "anyOf": [
|
458 | {
|
459 | "type": "array",
|
460 | "items": {
|
461 | "$ref": "InlineContent.schema.json"
|
462 | },
|
463 | "minItems": 2
|
464 | },
|
465 | {
|
466 | "type": "string"
|
467 | }
|
468 | ],
|
469 | "from": "CreativeWork"
|
470 | },
|
471 | "version": {
|
472 | "@id": "schema:version",
|
473 | "description": "The version of the creative work.",
|
474 | "$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",
|
475 | "anyOf": [
|
476 | {
|
477 | "type": "string"
|
478 | },
|
479 | {
|
480 | "type": "number"
|
481 | }
|
482 | ],
|
483 | "from": "CreativeWork"
|
484 | },
|
485 | "bitrate": {
|
486 | "@id": "schema:bitrate",
|
487 | "description": "Bitrate in megabits per second (Mbit/s, Mb/s, Mbps).\n",
|
488 | "type": "number",
|
489 | "from": "MediaObject"
|
490 | },
|
491 | "contentSize": {
|
492 | "@id": "schema:contentSize",
|
493 | "description": "File size in megabits (Mbit, Mb).\n",
|
494 | "type": "number",
|
495 | "from": "MediaObject"
|
496 | },
|
497 | "contentUrl": {
|
498 | "@id": "schema:contentUrl",
|
499 | "description": "URL for the actual bytes of the media object, for example the image file or video file.\n",
|
500 | "$comment": "To allow for file paths, including possibly erroneous paths, niether `format` or `pattern`\nkeywords are used here, or on `embedUrl`.\n",
|
501 | "type": "string",
|
502 | "from": "MediaObject"
|
503 | },
|
504 | "embedUrl": {
|
505 | "@id": "schema:embedUrl",
|
506 | "description": "URL that can be used to embed the media on a web page via a specific media player.\n",
|
507 | "type": "string",
|
508 | "from": "MediaObject"
|
509 | },
|
510 | "mediaType": {
|
511 | "@id": "schema:encodingFormat",
|
512 | "aliases": [
|
513 | "encodingFormat"
|
514 | ],
|
515 | "description": "IANA media type (MIME type).",
|
516 | "$comment": "This property is more restrictive than https://schema.org/encodingFormat which\nexpects either Text or URL for this property. This schema expects a media type e.g. `text/html`\nas listed at http://www.iana.org/assignments/media-types/media-types.xhtml.\n",
|
517 | "type": "string",
|
518 | "pattern": "^\\w+/[-+.\\w]+$",
|
519 | "from": "MediaObject"
|
520 | }
|
521 | },
|
522 | "required": [
|
523 | "type",
|
524 | "contentUrl"
|
525 | ],
|
526 | "examples": [
|
527 | {
|
528 | "type": "MediaObject",
|
529 | "bitrate": "44",
|
530 | "contentSize": "2",
|
531 | "contentUrl": "http://www.example.com/file.mp3",
|
532 | "encodingFormat": "audio/mpeg3",
|
533 | "embedUrl": "http://www.example.com/full_size/file.mp3"
|
534 | }
|
535 | ],
|
536 | "file": "MediaObject.schema.yaml",
|
537 | "children": [
|
538 | "AudioObject",
|
539 | "ImageObject",
|
540 | "VideoObject"
|
541 | ],
|
542 | "descendants": [
|
543 | "AudioObject",
|
544 | "ImageObject",
|
545 | "VideoObject"
|
546 | ],
|
547 | "$schema": "http://json-schema.org/draft-07/schema#",
|
548 | "$id": "https://schema.stenci.la/v1/MediaObject.schema.json",
|
549 | "source": "https://github.com/stencila/schema/blob/master/schema/MediaObject.schema.yaml",
|
550 | "type": "object",
|
551 | "propertyAliases": {
|
552 | "alternateName": "alternateNames",
|
553 | "identifier": "identifiers",
|
554 | "image": "images",
|
555 | "author": "authors",
|
556 | "comment": "comments",
|
557 | "date": "datePublished",
|
558 | "editor": "editors",
|
559 | "funder": "funders",
|
560 | "keyword": "keywords",
|
561 | "license": "licenses",
|
562 | "maintainer": "maintainers",
|
563 | "hasParts": "parts",
|
564 | "part": "parts",
|
565 | "citations": "references",
|
566 | "reference": "references",
|
567 | "headline": "title",
|
568 | "encodingFormat": "mediaType"
|
569 | },
|
570 | "additionalProperties": false
|
571 | }
|