Complex classes like CreativeWorkTrait often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use CreativeWorkTrait, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 13 | trait CreativeWorkTrait |
||
| 14 | { |
||
| 15 | use ThingTrait; |
||
| 16 | |||
| 17 | private $_about; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @return Thing |
||
| 21 | */ |
||
| 22 | public function getAbout() |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The subject matter of the content. |
||
| 29 | * Inverse property: subjectOf. |
||
| 30 | * |
||
| 31 | * @param Thing $about |
||
| 32 | * @return CreativeWork|CreativeWorkTrait |
||
| 33 | */ |
||
| 34 | public function setAbout(Thing $about) |
||
| 39 | |||
| 40 | private $_accessMode; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function getAccessMode() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * The human sensory perceptual system or cognitive faculty through which a person may process or perceive |
||
| 52 | * information. |
||
| 53 | * |
||
| 54 | * Expected values include: auditory, tactile, textual, visual, colorDependent, chartOnVisual, chemOnVisual, |
||
| 55 | * diagramOnVisual, mathOnVisual, musicOnVisual, textOnVisual. |
||
| 56 | * |
||
| 57 | * @param string $accessMode |
||
| 58 | * @return CreativeWork|CreativeWorkTrait |
||
| 59 | */ |
||
| 60 | public function setAccessMode($accessMode) |
||
| 65 | |||
| 66 | private $_accessModeSufficient; |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return string |
||
| 70 | */ |
||
| 71 | public function getAccessModeSufficient() |
||
| 75 | |||
| 76 | /** |
||
| 77 | * A list of single or combined accessModes that are sufficient to understand all the intellectual content of a |
||
| 78 | * resource. |
||
| 79 | * |
||
| 80 | * Expected values include: auditory, tactile, textual, visual. |
||
| 81 | * |
||
| 82 | * @param string $accessModeSufficient |
||
| 83 | * @return CreativeWork|CreativeWorkTrait |
||
| 84 | */ |
||
| 85 | public function setAccessModeSufficient($accessModeSufficient) |
||
| 90 | |||
| 91 | private $_accessibilityAPI; |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @return string |
||
| 95 | */ |
||
| 96 | public function getAccessibilityAPI() |
||
| 100 | |||
| 101 | /** |
||
| 102 | * Indicates that the resource is compatible with the referenced accessibility API |
||
| 103 | * (WebSchemas wiki lists possible values). |
||
| 104 | * |
||
| 105 | * @param string $accessibilityAPI |
||
| 106 | * @return CreativeWork|CreativeWorkTrait |
||
| 107 | */ |
||
| 108 | public function setAccessibilityAPI($accessibilityAPI) |
||
| 113 | |||
| 114 | private $_accessibilityControl; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @return string |
||
| 118 | */ |
||
| 119 | public function getAccessibilityControl() |
||
| 123 | |||
| 124 | /** |
||
| 125 | * Identifies input methods that are sufficient to fully control the described resource |
||
| 126 | * (WebSchemas wiki lists possible values). |
||
| 127 | * |
||
| 128 | * @param string $accessibilityControl |
||
| 129 | * @return CreativeWork|CreativeWorkTrait |
||
| 130 | */ |
||
| 131 | public function setAccessibilityControl($accessibilityControl) |
||
| 136 | |||
| 137 | private $_accessibilityFeature; |
||
| 138 | |||
| 139 | /** |
||
| 140 | * @return string |
||
| 141 | */ |
||
| 142 | public function getAccessibilityFeature() |
||
| 146 | |||
| 147 | /** |
||
| 148 | * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility |
||
| 149 | * (WebSchemas wiki lists possible values). |
||
| 150 | * |
||
| 151 | * @param string $accessibilityFeature |
||
| 152 | * @return CreativeWork|CreativeWorkTrait |
||
| 153 | */ |
||
| 154 | public function setAccessibilityFeature($accessibilityFeature) |
||
| 159 | |||
| 160 | private $_accessibilityHazard; |
||
| 161 | |||
| 162 | /** |
||
| 163 | * @return string |
||
| 164 | */ |
||
| 165 | public function getAccessibilityHazard() |
||
| 169 | |||
| 170 | /** |
||
| 171 | * A characteristic of the described resource that is physiologically dangerous to some users. |
||
| 172 | * Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). |
||
| 173 | * |
||
| 174 | * @param string $accessibilityHazard |
||
| 175 | * @return CreativeWork|CreativeWorkTrait |
||
| 176 | */ |
||
| 177 | public function setAccessibilityHazard($accessibilityHazard) |
||
| 182 | |||
| 183 | private $_accessibilitySummary; |
||
| 184 | |||
| 185 | /** |
||
| 186 | * @return string |
||
| 187 | */ |
||
| 188 | public function getAccessibilitySummary() |
||
| 192 | |||
| 193 | /** |
||
| 194 | * A human-readable summary of specific accessibility features or deficiencies, consistent with the other |
||
| 195 | * accessibility metadata but expressing subtleties such as "short descriptions are present but long descriptions |
||
| 196 | * will be needed for non-visual users" or "short descriptions are present and no long descriptions are needed." |
||
| 197 | * |
||
| 198 | * @param string $accessibilitySummary |
||
| 199 | * @return CreativeWork|CreativeWorkTrait |
||
| 200 | */ |
||
| 201 | public function setAccessibilitySummary($accessibilitySummary) |
||
| 206 | |||
| 207 | private $_accountablePerson; |
||
| 208 | |||
| 209 | /** |
||
| 210 | * @return Person |
||
| 211 | */ |
||
| 212 | public function getAccountablePerson() |
||
| 216 | |||
| 217 | /** |
||
| 218 | * Specifies the Person that is legally accountable for the CreativeWork. |
||
| 219 | * |
||
| 220 | * @param Person $accountablePerson |
||
| 221 | * @return CreativeWork|CreativeWorkTrait |
||
| 222 | */ |
||
| 223 | public function setAccountablePerson(Person $accountablePerson) |
||
| 228 | |||
| 229 | private $_alternativeHeadline; |
||
| 230 | |||
| 231 | /** |
||
| 232 | * @return string |
||
| 233 | */ |
||
| 234 | public function getAlternativeHeadline() |
||
| 238 | |||
| 239 | /** |
||
| 240 | * A secondary title of the CreativeWork. |
||
| 241 | * |
||
| 242 | * @param string $alternativeHeadline |
||
| 243 | * @return CreativeWork|CreativeWorkTrait |
||
| 244 | */ |
||
| 245 | public function setAlternativeHeadline($alternativeHeadline) |
||
| 250 | |||
| 251 | private $_associatedMedia; |
||
| 252 | |||
| 253 | /** |
||
| 254 | * @return MediaObject |
||
| 255 | */ |
||
| 256 | public function getAssociatedMedia() |
||
| 260 | |||
| 261 | /** |
||
| 262 | * A media object that encodes this CreativeWork. This property is a synonym for encoding. |
||
| 263 | * |
||
| 264 | * @param MediaObject $associatedMedia |
||
| 265 | * @return CreativeWork|CreativeWorkTrait |
||
| 266 | */ |
||
| 267 | public function setAssociatedMedia(MediaObject $associatedMedia) |
||
| 272 | |||
| 273 | private $_author; |
||
| 274 | |||
| 275 | /** |
||
| 276 | * @return Organization|Person |
||
| 277 | */ |
||
| 278 | public function getAuthor() |
||
| 282 | |||
| 283 | /** |
||
| 284 | * The author of this content or rating. Please note that author is special in that HTML 5 provides a special |
||
| 285 | * mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. |
||
| 286 | * |
||
| 287 | * @param Organization|Person $author |
||
| 288 | * @return CreativeWork|CreativeWorkTrait |
||
| 289 | */ |
||
| 290 | public function setAuthor($author) |
||
| 295 | |||
| 296 | private $_award; |
||
| 297 | |||
| 298 | /** |
||
| 299 | * @return string |
||
| 300 | */ |
||
| 301 | public function getAward() |
||
| 305 | |||
| 306 | /** |
||
| 307 | * An award won by or for this item. |
||
| 308 | * Supersedes awards. |
||
| 309 | * |
||
| 310 | * @param string $award |
||
| 311 | * @return CreativeWork|CreativeWorkTrait |
||
| 312 | */ |
||
| 313 | public function setAward($award) |
||
| 318 | |||
| 319 | private $_character; |
||
| 320 | |||
| 321 | /** |
||
| 322 | * @return Person |
||
| 323 | */ |
||
| 324 | public function getCharacter() |
||
| 328 | |||
| 329 | /** |
||
| 330 | * Fictional person connected with a creative work. |
||
| 331 | * |
||
| 332 | * @param Person $character |
||
| 333 | * @return CreativeWork|CreativeWorkTrait |
||
| 334 | */ |
||
| 335 | public function setCharacter(Person $character) |
||
| 340 | |||
| 341 | private $_citation; |
||
| 342 | |||
| 343 | /** |
||
| 344 | * @return CreativeWork |
||
| 345 | */ |
||
| 346 | public function getCitation() |
||
| 350 | |||
| 351 | /** |
||
| 352 | * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. |
||
| 353 | * |
||
| 354 | * @param CreativeWork $citation |
||
| 355 | * @return CreativeWork|CreativeWorkTrait |
||
| 356 | */ |
||
| 357 | public function setCitation(CreativeWork $citation) |
||
| 362 | |||
| 363 | private $_comment; |
||
| 364 | |||
| 365 | /** |
||
| 366 | * @return Comment |
||
| 367 | */ |
||
| 368 | public function getComment() |
||
| 372 | |||
| 373 | /** |
||
| 374 | * Comments, typically from users. |
||
| 375 | * |
||
| 376 | * @param Comment $comment |
||
| 377 | * @return CreativeWork|CreativeWorkTrait |
||
| 378 | */ |
||
| 379 | public function setComment(Comment $comment) |
||
| 384 | |||
| 385 | private $_commentCount; |
||
| 386 | |||
| 387 | /** |
||
| 388 | * @return int |
||
| 389 | */ |
||
| 390 | public function getCommentCount() |
||
| 394 | |||
| 395 | /** |
||
| 396 | * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most |
||
| 397 | * applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. |
||
| 398 | * |
||
| 399 | * @param int $commentCount |
||
| 400 | * @return CreativeWork|CreativeWorkTrait |
||
| 401 | */ |
||
| 402 | public function setCommentCount($commentCount) |
||
| 407 | |||
| 408 | private $_contentLocation; |
||
| 409 | |||
| 410 | /** |
||
| 411 | * @return Place |
||
| 412 | */ |
||
| 413 | public function getContentLocation() |
||
| 417 | |||
| 418 | /** |
||
| 419 | * The location depicted or described in the content. For example, the location in a photograph or painting. |
||
| 420 | * |
||
| 421 | * @param Place $contentLocation |
||
| 422 | * @return CreativeWork|CreativeWorkTrait |
||
| 423 | */ |
||
| 424 | public function setContentLocation(Place $contentLocation) |
||
| 429 | |||
| 430 | private $_contentRating; |
||
| 431 | |||
| 432 | /** |
||
| 433 | * @return string |
||
| 434 | */ |
||
| 435 | public function getContentRating() |
||
| 439 | |||
| 440 | /** |
||
| 441 | * Official rating of a piece of content—for example,'MPAA PG-13'. |
||
| 442 | * |
||
| 443 | * @param string $contentRating |
||
| 444 | * @return CreativeWork|CreativeWorkTrait |
||
| 445 | */ |
||
| 446 | public function setContentRating($contentRating) |
||
| 451 | |||
| 452 | private $_contentReferenceTime; |
||
| 453 | |||
| 454 | /** |
||
| 455 | * @return string |
||
| 456 | */ |
||
| 457 | public function getContentReferenceTime() |
||
| 461 | |||
| 462 | /** |
||
| 463 | * The specific time described by a creative work, for works (e.g. articles, video objects etc.) that emphasise |
||
| 464 | * a particular moment within an Event. |
||
| 465 | * |
||
| 466 | * @param DateTimeValue $contentReferenceTime |
||
| 467 | * @return CreativeWork|CreativeWorkTrait |
||
| 468 | */ |
||
| 469 | public function setContentReferenceTime(DateTimeValue $contentReferenceTime) |
||
| 474 | |||
| 475 | private $_contributor; |
||
| 476 | |||
| 477 | /** |
||
| 478 | * @return Organization|Person |
||
| 479 | */ |
||
| 480 | public function getContributor() |
||
| 484 | |||
| 485 | /** |
||
| 486 | * A secondary contributor to the CreativeWork or Event. |
||
| 487 | * |
||
| 488 | * @param Organization|Person $contributor |
||
| 489 | * @return CreativeWork|CreativeWorkTrait |
||
| 490 | */ |
||
| 491 | public function setContributor($contributor) |
||
| 496 | |||
| 497 | private $_copyrightHolder; |
||
| 498 | |||
| 499 | /** |
||
| 500 | * @return Organization|Person |
||
| 501 | */ |
||
| 502 | public function getCopyrightHolder() |
||
| 506 | |||
| 507 | /** |
||
| 508 | * The party holding the legal copyright to the CreativeWork. |
||
| 509 | * |
||
| 510 | * @param Organization|Person $copyrightHolder |
||
| 511 | * @return CreativeWork|CreativeWorkTrait |
||
| 512 | */ |
||
| 513 | public function setCopyrightHolder($copyrightHolder) |
||
| 518 | |||
| 519 | private $_copyrightYear; |
||
| 520 | |||
| 521 | /** |
||
| 522 | * @return mixed |
||
| 523 | */ |
||
| 524 | public function getCopyrightYear() |
||
| 528 | |||
| 529 | /** |
||
| 530 | * The year during which the claimed copyright for the CreativeWork was first asserted. |
||
| 531 | * |
||
| 532 | * @param mixed $copyrightYear |
||
| 533 | * @return CreativeWork|CreativeWorkTrait |
||
| 534 | */ |
||
| 535 | public function setCopyrightYear($copyrightYear) |
||
| 540 | |||
| 541 | private $_creator; |
||
| 542 | |||
| 543 | /** |
||
| 544 | * @return Organization|Person |
||
| 545 | */ |
||
| 546 | public function getCreator() |
||
| 550 | |||
| 551 | /** |
||
| 552 | * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. |
||
| 553 | * |
||
| 554 | * @param Organization|Person $creator |
||
| 555 | * @return CreativeWork|CreativeWorkTrait |
||
| 556 | */ |
||
| 557 | public function setCreator($creator) |
||
| 562 | |||
| 563 | private $_dateCreated; |
||
| 564 | |||
| 565 | /** |
||
| 566 | * @return string |
||
| 567 | */ |
||
| 568 | public function getDateCreated() |
||
| 572 | |||
| 573 | /** |
||
| 574 | * The date on which the CreativeWork was created or the item was added to a DataFeed. |
||
| 575 | * |
||
| 576 | * @param DateTimeValue $dateCreated |
||
| 577 | * @return CreativeWork|CreativeWorkTrait |
||
| 578 | */ |
||
| 579 | public function setDateCreated(DateTimeValue $dateCreated) |
||
| 584 | |||
| 585 | private $_dateModified; |
||
| 586 | |||
| 587 | /** |
||
| 588 | * @return string |
||
| 589 | */ |
||
| 590 | public function getDateModified() |
||
| 594 | |||
| 595 | /** |
||
| 596 | * The date on which the CreativeWork was most recently modified |
||
| 597 | * or when the item's entry was modified within a DataFeed. |
||
| 598 | * |
||
| 599 | * @param DateTimeValue $dateModified |
||
| 600 | * @return CreativeWork|CreativeWorkTrait |
||
| 601 | */ |
||
| 602 | public function setDateModified(DateTimeValue $dateModified) |
||
| 607 | |||
| 608 | private $_datePublished; |
||
| 609 | |||
| 610 | /** |
||
| 611 | * @return string |
||
| 612 | */ |
||
| 613 | public function getDatePublished() |
||
| 617 | |||
| 618 | /** |
||
| 619 | * Date of first broadcast/publication. |
||
| 620 | * |
||
| 621 | * @param DateTimeValue $datePublished |
||
| 622 | * @return CreativeWork|CreativeWorkTrait |
||
| 623 | */ |
||
| 624 | public function setDatePublished(DateTimeValue $datePublished) |
||
| 629 | |||
| 630 | private $_discussionUrl; |
||
| 631 | |||
| 632 | /** |
||
| 633 | * @return string |
||
| 634 | */ |
||
| 635 | public function getDiscussionUrl() |
||
| 639 | |||
| 640 | /** |
||
| 641 | * A link to the page containing the comments of the CreativeWork. |
||
| 642 | * |
||
| 643 | * @param UrlValue $discussionUrl |
||
| 644 | * @return CreativeWork|CreativeWorkTrait |
||
| 645 | */ |
||
| 646 | public function setDiscussionUrl(UrlValue $discussionUrl) |
||
| 651 | |||
| 652 | private $_editor; |
||
| 653 | |||
| 654 | /** |
||
| 655 | * @return Person |
||
| 656 | */ |
||
| 657 | public function getEditor() |
||
| 661 | |||
| 662 | /** |
||
| 663 | * Specifies the Person who edited the CreativeWork. |
||
| 664 | * |
||
| 665 | * @param Person $editor |
||
| 666 | */ |
||
| 667 | public function setEditor(Person $editor) |
||
| 671 | |||
| 672 | private $_educationalUse; |
||
| 673 | |||
| 674 | |||
| 675 | /** |
||
| 676 | * @return string |
||
| 677 | */ |
||
| 678 | public function getEducationalUse() |
||
| 682 | |||
| 683 | /** |
||
| 684 | * The purpose of a work in the context of education; for example, 'assignment', 'group work'. |
||
| 685 | * |
||
| 686 | * @param string $educationalUse |
||
| 687 | * @return CreativeWork|CreativeWorkTrait |
||
| 688 | */ |
||
| 689 | public function setEducationalUse(CreativeWork $educationalUse) |
||
| 694 | |||
| 695 | private $_encoding; |
||
| 696 | |||
| 697 | /** |
||
| 698 | * @return MediaObject |
||
| 699 | */ |
||
| 700 | public function getEncoding() |
||
| 704 | |||
| 705 | /** |
||
| 706 | * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. |
||
| 707 | * Supersedes encodings. |
||
| 708 | * |
||
| 709 | * @param MediaObject $encoding |
||
| 710 | * @return CreativeWork|CreativeWorkTrait |
||
| 711 | */ |
||
| 712 | public function setEncoding(MediaObject $encoding) |
||
| 717 | |||
| 718 | private $_exampleOfWork; |
||
| 719 | |||
| 720 | /** |
||
| 721 | * @return CreativeWork |
||
| 722 | */ |
||
| 723 | public function getExampleOfWork() |
||
| 727 | |||
| 728 | /** |
||
| 729 | * A creative work that this work is an example/instance/realization/derivation of. |
||
| 730 | * Inverse property: workExample. |
||
| 731 | * |
||
| 732 | * @param CreativeWork $exampleOfWork |
||
| 733 | * @return CreativeWork|CreativeWorkTrait |
||
| 734 | */ |
||
| 735 | public function setExampleOfWork(CreativeWork $exampleOfWork) |
||
| 740 | |||
| 741 | private $_expires; |
||
| 742 | |||
| 743 | /** |
||
| 744 | * @return string |
||
| 745 | */ |
||
| 746 | public function getExpires() |
||
| 750 | |||
| 751 | /** |
||
| 752 | * Date the content expires and is no longer useful or available. For example a VideoObject or NewsArticle whose |
||
| 753 | * availability or relevance is time-limited, or a ClaimReview fact check whose publisher wants to indicate that |
||
| 754 | * it may no longer be relevant (or helpful to highlight) after some date. |
||
| 755 | * |
||
| 756 | * @param DateValue $expires |
||
| 757 | * @return CreativeWork|CreativeWorkTrait |
||
| 758 | */ |
||
| 759 | public function setExpires(DateValue $expires) |
||
| 764 | |||
| 765 | private $_fileFormat; |
||
| 766 | |||
| 767 | /** |
||
| 768 | * @return URL|string |
||
| 769 | */ |
||
| 770 | public function getFileFormat() |
||
| 774 | |||
| 775 | /** |
||
| 776 | * Media type, typically MIME format (see IANA site) of the content e.g. application/zip of a SoftwareApplication |
||
| 777 | * binary. In cases where a CreativeWork has several media type representations, 'encoding' can be used to indicate |
||
| 778 | * each MediaObject alongside particular fileFormat information. Unregistered or niche file formats can be indicated |
||
| 779 | * instead via the most appropriate URL, e.g. defining Web page or a Wikipedia entry. |
||
| 780 | * |
||
| 781 | * @param URL|string $fileFormat |
||
| 782 | * @return CreativeWork|CreativeWorkTrait |
||
| 783 | */ |
||
| 784 | public function setFileFormat($fileFormat) |
||
| 789 | |||
| 790 | private $_funder; |
||
| 791 | |||
| 792 | /** |
||
| 793 | * @return Organization|Person |
||
| 794 | */ |
||
| 795 | public function getFunder() |
||
| 799 | |||
| 800 | /** |
||
| 801 | * A person or organization that supports (sponsors) something through some kind of financial contribution. |
||
| 802 | * |
||
| 803 | * @param Organization|Person $funder |
||
| 804 | * @return CreativeWork|CreativeWorkTrait |
||
| 805 | */ |
||
| 806 | public function setFunder($funder) |
||
| 811 | |||
| 812 | private $_genre; |
||
| 813 | |||
| 814 | /** |
||
| 815 | * @return URL|string |
||
| 816 | */ |
||
| 817 | public function getGenre() |
||
| 821 | |||
| 822 | /** |
||
| 823 | * Genre of the creative work, broadcast channel or group. |
||
| 824 | * |
||
| 825 | * @param URL|string $genre |
||
| 826 | * @return CreativeWork|CreativeWorkTrait |
||
| 827 | */ |
||
| 828 | public function setGenre($genre) |
||
| 833 | |||
| 834 | private $_hasPart; |
||
| 835 | |||
| 836 | /** |
||
| 837 | * @return CreativeWork |
||
| 838 | */ |
||
| 839 | public function getHasPart() |
||
| 843 | |||
| 844 | /** |
||
| 845 | * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. |
||
| 846 | * Inverse property: isPartOf. |
||
| 847 | * |
||
| 848 | * @param CreativeWork $hasPart |
||
| 849 | * @return CreativeWork|CreativeWorkTrait |
||
| 850 | */ |
||
| 851 | public function setHasPart(CreativeWork $hasPart) |
||
| 856 | |||
| 857 | private $_headline; |
||
| 858 | |||
| 859 | /** |
||
| 860 | * @return string |
||
| 861 | */ |
||
| 862 | public function getHeadline() |
||
| 866 | |||
| 867 | /** |
||
| 868 | * Headline of the article. |
||
| 869 | * |
||
| 870 | * @param string $headline |
||
| 871 | * @return CreativeWork|CreativeWorkTrait |
||
| 872 | */ |
||
| 873 | public function setHeadline($headline) |
||
| 878 | |||
| 879 | |||
| 880 | private $_interactivityType; |
||
| 881 | |||
| 882 | /** |
||
| 883 | * @return string |
||
| 884 | */ |
||
| 885 | public function getInteractivityType() |
||
| 889 | |||
| 890 | /** |
||
| 891 | * The predominant mode of learning supported by the learning resource. |
||
| 892 | * Acceptable values are 'active', 'expositive', or 'mixed'. |
||
| 893 | * |
||
| 894 | * @param string $interactivityType |
||
| 895 | * @return CreativeWork|CreativeWorkTrait |
||
| 896 | */ |
||
| 897 | public function setInteractivityType($interactivityType) |
||
| 902 | |||
| 903 | private $_isAccessibleForFree; |
||
| 904 | |||
| 905 | /** |
||
| 906 | * @return bool |
||
| 907 | */ |
||
| 908 | public function isAccessibleForFree() |
||
| 912 | |||
| 913 | /** |
||
| 914 | * A flag to signal that the item, event, or place is accessible for free. |
||
| 915 | * Supersedes free. |
||
| 916 | * |
||
| 917 | * @param bool $isAccessibleForFree |
||
| 918 | * @return CreativeWork|CreativeWorkTrait |
||
| 919 | */ |
||
| 920 | public function setIsAccessibleForFree($isAccessibleForFree) |
||
| 925 | |||
| 926 | private $_isFamilyFriendly; |
||
| 927 | |||
| 928 | /** |
||
| 929 | * @return bool |
||
| 930 | */ |
||
| 931 | public function isFamilyFriendly() |
||
| 935 | |||
| 936 | /** |
||
| 937 | * Indicates whether this content is family friendly. |
||
| 938 | * |
||
| 939 | * @param bool $isFamilyFriendly |
||
| 940 | * @return CreativeWork|CreativeWorkTrait |
||
| 941 | */ |
||
| 942 | public function setIsFamilyFriendly($isFamilyFriendly) |
||
| 947 | |||
| 948 | private $_isPartOf; |
||
| 949 | |||
| 950 | /** |
||
| 951 | * @return CreativeWork |
||
| 952 | */ |
||
| 953 | public function getisPartOf() |
||
| 957 | |||
| 958 | /** |
||
| 959 | * Indicates a CreativeWork that this CreativeWork is (in some sense) part of. |
||
| 960 | * Inverse property: hasPart. |
||
| 961 | * |
||
| 962 | * @param CreativeWork $isPartOf |
||
| 963 | * @return CreativeWork|CreativeWorkTrait |
||
| 964 | */ |
||
| 965 | public function setIsPartOf(CreativeWork $isPartOf) |
||
| 970 | |||
| 971 | private $_keywords; |
||
| 972 | |||
| 973 | /** |
||
| 974 | * @return string |
||
| 975 | */ |
||
| 976 | public function getKeywords() |
||
| 980 | |||
| 981 | /** |
||
| 982 | * Keywords or tags used to describe this content. |
||
| 983 | * Multiple entries in a keywords list are typically delimited by commas. |
||
| 984 | * |
||
| 985 | * @param string $keywords |
||
| 986 | * @return CreativeWork|CreativeWorkTrait |
||
| 987 | */ |
||
| 988 | public function setKeywords($keywords) |
||
| 993 | |||
| 994 | private $_learningResourceType; |
||
| 995 | |||
| 996 | /** |
||
| 997 | * @return string |
||
| 998 | */ |
||
| 999 | public function getLearningResourceType() |
||
| 1003 | |||
| 1004 | /** |
||
| 1005 | * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. |
||
| 1006 | * |
||
| 1007 | * @param string $learningResourceType |
||
| 1008 | * @return CreativeWork|CreativeWorkTrait |
||
| 1009 | */ |
||
| 1010 | public function setLearningResourceType($learningResourceType) |
||
| 1015 | |||
| 1016 | private $_locationCreated; |
||
| 1017 | |||
| 1018 | /** |
||
| 1019 | * @return Place |
||
| 1020 | */ |
||
| 1021 | public function getLocationCreated() |
||
| 1025 | |||
| 1026 | /** |
||
| 1027 | * The location where the CreativeWork was created, which may not be the same as the location depicted in the CreativeWork. |
||
| 1028 | * |
||
| 1029 | * @param Place $locationCreated |
||
| 1030 | * @return CreativeWork|CreativeWorkTrait |
||
| 1031 | */ |
||
| 1032 | public function setLocationCreated(Place $locationCreated) |
||
| 1037 | |||
| 1038 | private $_mainEntity; |
||
| 1039 | |||
| 1040 | /** |
||
| 1041 | * @return Thing |
||
| 1042 | */ |
||
| 1043 | public function getMainEntity() |
||
| 1047 | |||
| 1048 | /** |
||
| 1049 | * Indicates the primary entity described in some page or other CreativeWork. |
||
| 1050 | * Inverse property: mainEntityOfPage. |
||
| 1051 | * |
||
| 1052 | * @param Thing $mainEntity |
||
| 1053 | * @return CreativeWork|CreativeWorkTrait |
||
| 1054 | */ |
||
| 1055 | public function setMainEntity(Thing $mainEntity) |
||
| 1060 | |||
| 1061 | private $_mentions; |
||
| 1062 | |||
| 1063 | /** |
||
| 1064 | * @return Thing |
||
| 1065 | */ |
||
| 1066 | public function getMentions() |
||
| 1070 | |||
| 1071 | /** |
||
| 1072 | * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. |
||
| 1073 | * |
||
| 1074 | * @param Thing $mentions |
||
| 1075 | * @return CreativeWork|CreativeWorkTrait |
||
| 1076 | */ |
||
| 1077 | public function setMentions(Thing $mentions) |
||
| 1082 | |||
| 1083 | private $_position; |
||
| 1084 | |||
| 1085 | /** |
||
| 1086 | * @return int|string |
||
| 1087 | */ |
||
| 1088 | public function getPosition() |
||
| 1092 | |||
| 1093 | /** |
||
| 1094 | * The position of an item in a series or sequence of items. |
||
| 1095 | * |
||
| 1096 | * @param int|string $position |
||
| 1097 | * @return CreativeWork|CreativeWorkTrait |
||
| 1098 | */ |
||
| 1099 | public function setPosition($position) |
||
| 1104 | |||
| 1105 | private $_producer; |
||
| 1106 | |||
| 1107 | /** |
||
| 1108 | * @return Organization|Person |
||
| 1109 | */ |
||
| 1110 | public function getProducer() |
||
| 1114 | |||
| 1115 | /** |
||
| 1116 | * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). |
||
| 1117 | * |
||
| 1118 | * @param Organization|Person $producer |
||
| 1119 | * @return CreativeWork|CreativeWorkTrait |
||
| 1120 | */ |
||
| 1121 | public function setProducer($producer) |
||
| 1126 | |||
| 1127 | private $_provider; |
||
| 1128 | |||
| 1129 | /** |
||
| 1130 | * @return Organization|Person |
||
| 1131 | */ |
||
| 1132 | public function getProvider() |
||
| 1136 | |||
| 1137 | /** |
||
| 1138 | * The service provider, service operator, or service performer; the goods producer. Another party (a seller) |
||
| 1139 | * may offer those services or goods on behalf of the provider. A provider may also serve as the seller. |
||
| 1140 | * Supersedes carrier. |
||
| 1141 | * |
||
| 1142 | * @param Organization|Person $provider |
||
| 1143 | * @return CreativeWork|CreativeWorkTrait |
||
| 1144 | */ |
||
| 1145 | public function setProvider($provider) |
||
| 1150 | |||
| 1151 | private $_publisher; |
||
| 1152 | |||
| 1153 | /** |
||
| 1154 | * @return Organization|Person |
||
| 1155 | */ |
||
| 1156 | public function getPublisher() |
||
| 1160 | |||
| 1161 | /** |
||
| 1162 | * The publisher of the creative work. |
||
| 1163 | * |
||
| 1164 | * @param Organization|Person $publisher |
||
| 1165 | * @return CreativeWork|CreativeWorkTrait |
||
| 1166 | */ |
||
| 1167 | public function setPublisher($publisher) |
||
| 1172 | |||
| 1173 | private $_publisherImprint; |
||
| 1174 | |||
| 1175 | /** |
||
| 1176 | * @return Organization |
||
| 1177 | */ |
||
| 1178 | public function getPublisherImprint() |
||
| 1182 | |||
| 1183 | /** |
||
| 1184 | * The publishing division which published the comic. |
||
| 1185 | * |
||
| 1186 | * @param Organization $publisherImprint |
||
| 1187 | * @return CreativeWork|CreativeWorkTrait |
||
| 1188 | */ |
||
| 1189 | public function setPublisherImprint(Organization $publisherImprint) |
||
| 1194 | |||
| 1195 | private $_publishingPrinciples; |
||
| 1196 | |||
| 1197 | /** |
||
| 1198 | * @return CreativeWork|URL |
||
| 1199 | */ |
||
| 1200 | public function getPublishingPrinciples() |
||
| 1204 | |||
| 1205 | /** |
||
| 1206 | * The publishingPrinciples property indicates (typically via URL) a document describing the editorial principles |
||
| 1207 | * of an Organization (or individual e.g. a Person writing a blog) that relate to their activities as a publisher, |
||
| 1208 | * e.g. ethics or diversity policies. When applied to a CreativeWork (e.g. NewsArticle) the principles are those |
||
| 1209 | * of the party primarily responsible for the creation of the CreativeWork. |
||
| 1210 | * |
||
| 1211 | * While such policies are most typically expressed in natural language, sometimes related information |
||
| 1212 | * (e.g. indicating a funder) can be expressed using schema.org terminology. |
||
| 1213 | * |
||
| 1214 | * @param CreativeWork|URL $publishingPrinciples |
||
| 1215 | * @return CreativeWork|CreativeWorkTrait |
||
| 1216 | */ |
||
| 1217 | public function setPublishingPrinciples(CreativeWork $publishingPrinciples) |
||
| 1222 | |||
| 1223 | private $_recordedAt; |
||
| 1224 | |||
| 1225 | /** |
||
| 1226 | * @return Event |
||
| 1227 | */ |
||
| 1228 | public function getRecordedAt() |
||
| 1232 | |||
| 1233 | /** |
||
| 1234 | * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. |
||
| 1235 | * Inverse property: recordedIn. |
||
| 1236 | * |
||
| 1237 | * @param Event $recordedAt |
||
| 1238 | * @return CreativeWork|CreativeWorkTrait |
||
| 1239 | */ |
||
| 1240 | public function setRecordedAt(Event $recordedAt) |
||
| 1245 | |||
| 1246 | private $_schemaVersion; |
||
| 1247 | |||
| 1248 | /** |
||
| 1249 | * @return string |
||
| 1250 | */ |
||
| 1251 | public function getSchemaVersion() |
||
| 1255 | |||
| 1256 | /** |
||
| 1257 | * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. |
||
| 1258 | * For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ |
||
| 1259 | * if precise indication of schema version was required by some application. |
||
| 1260 | * |
||
| 1261 | * @param UrlValue $schemaVersion |
||
| 1262 | * @return CreativeWork|CreativeWorkTrait |
||
| 1263 | */ |
||
| 1264 | public function setSchemaVersion(UrlValue $schemaVersion) |
||
| 1269 | |||
| 1270 | private $_sourceOrganization; |
||
| 1271 | |||
| 1272 | /** |
||
| 1273 | * @return Organization |
||
| 1274 | */ |
||
| 1275 | public function getSourceOrganization() |
||
| 1279 | |||
| 1280 | /** |
||
| 1281 | * The Organization on whose behalf the creator was working. |
||
| 1282 | * |
||
| 1283 | * @param Organization $sourceOrganization |
||
| 1284 | * @return CreativeWork|CreativeWorkTrait |
||
| 1285 | */ |
||
| 1286 | public function setSourceOrganization(Organization $sourceOrganization) |
||
| 1291 | |||
| 1292 | private $_spatialCoverage; |
||
| 1293 | |||
| 1294 | /** |
||
| 1295 | * @return Place |
||
| 1296 | */ |
||
| 1297 | public function getSpatialCoverage() |
||
| 1301 | |||
| 1302 | /** |
||
| 1303 | * The spatialCoverage of a CreativeWork indicates the place(s) which are the focus of the content. |
||
| 1304 | * It is a subproperty of contentLocation intended primarily for more technical and detailed materials. |
||
| 1305 | * For example with a Dataset, it indicates areas that the dataset describes: a dataset of New York weather would |
||
| 1306 | * have spatialCoverage which was the place: the state of New York. Supersedes spatial. |
||
| 1307 | * |
||
| 1308 | * @param Place $spatialCoverage |
||
| 1309 | * @return CreativeWork|CreativeWorkTrait |
||
| 1310 | */ |
||
| 1311 | public function setSpatialCoverage(Place $spatialCoverage) |
||
| 1316 | |||
| 1317 | private $_sponsor; |
||
| 1318 | |||
| 1319 | /** |
||
| 1320 | * @return Organization|Person |
||
| 1321 | */ |
||
| 1322 | public function getSponsor() |
||
| 1326 | |||
| 1327 | /** |
||
| 1328 | * A person or organization that supports a thing through a pledge, promise, or financial contribution. |
||
| 1329 | * e.g. a sponsor of a Medical Study or a corporate sponsor of an event. |
||
| 1330 | * |
||
| 1331 | * @param Organization|Person $sponsor |
||
| 1332 | * @return CreativeWork|CreativeWorkTrait |
||
| 1333 | */ |
||
| 1334 | public function setSponsor($sponsor) |
||
| 1339 | |||
| 1340 | private $_temporalCoverage; |
||
| 1341 | |||
| 1342 | /** |
||
| 1343 | * @return DateTime|URL|string |
||
| 1344 | */ |
||
| 1345 | public function getTemporalCoverage() |
||
| 1349 | |||
| 1350 | /** |
||
| 1351 | * The temporalCoverage of a CreativeWork indicates the period that the content applies to, |
||
| 1352 | * i.e. that it describes, either as a DateTime or as a textual string indicating a time period in ISO 8601 time |
||
| 1353 | * interval format. In the case of a Dataset it will typically indicate the relevant time period in a precise |
||
| 1354 | * notation (e.g. for a 2011 census dataset, the year 2011 would be written "2011/2012"). Other forms of content |
||
| 1355 | * e.g. ScholarlyArticle, Book, TVSeries or TVEpisode may indicate their temporalCoverage in broader terms - |
||
| 1356 | * textually or via well-known URL. Written works such as books may sometimes have precise temporal coverage too, |
||
| 1357 | * e.g. a work set in 1939 - 1945 can be indicated in ISO 8601 interval format format via "1939/1945". |
||
| 1358 | * Supersedes datasetTimeInterval, temporal. |
||
| 1359 | * |
||
| 1360 | * @param DateTime|URL|string $temporalCoverage |
||
| 1361 | * @return CreativeWork|CreativeWorkTrait |
||
| 1362 | */ |
||
| 1363 | public function setTemporalCoverage($temporalCoverage) |
||
| 1368 | |||
| 1369 | private $_text; |
||
| 1370 | |||
| 1371 | /** |
||
| 1372 | * @return string |
||
| 1373 | */ |
||
| 1374 | public function getText() |
||
| 1378 | |||
| 1379 | /** |
||
| 1380 | * The textual content of this CreativeWork. |
||
| 1381 | * |
||
| 1382 | * @param string $text |
||
| 1383 | * @return CreativeWork|CreativeWorkTrait |
||
| 1384 | */ |
||
| 1385 | public function setText($text) |
||
| 1390 | |||
| 1391 | private $_thumbnailUrl; |
||
| 1392 | |||
| 1393 | /** |
||
| 1394 | * @return URL |
||
| 1395 | */ |
||
| 1396 | public function getThumbnailUrl() |
||
| 1400 | |||
| 1401 | /** |
||
| 1402 | * A thumbnail image relevant to the Thing. |
||
| 1403 | * |
||
| 1404 | * @param UrlValue $thumbnailUrl |
||
| 1405 | * @return CreativeWork|CreativeWorkTrait |
||
| 1406 | */ |
||
| 1407 | public function setThumbnailUrl(UrlValue $thumbnailUrl) |
||
| 1412 | |||
| 1413 | |||
| 1414 | private $_translationOfWork; |
||
| 1415 | |||
| 1416 | /** |
||
| 1417 | * @return CreativeWork |
||
| 1418 | */ |
||
| 1419 | public function getTranslationOfWork() |
||
| 1423 | |||
| 1424 | /** |
||
| 1425 | * The work that this work has been translated from. e.g. 物种起源 is a translationOf “On the Origin of Species” |
||
| 1426 | * Inverse property: workTranslation. |
||
| 1427 | * |
||
| 1428 | * @param CreativeWork $translationOfWork |
||
| 1429 | * @return CreativeWork|CreativeWorkTrait |
||
| 1430 | */ |
||
| 1431 | public function setTranslationOfWork(CreativeWork $translationOfWork) |
||
| 1436 | |||
| 1437 | private $_translator; |
||
| 1438 | |||
| 1439 | /** |
||
| 1440 | * @return Organization|Person |
||
| 1441 | */ |
||
| 1442 | public function getTranslator() |
||
| 1446 | |||
| 1447 | /** |
||
| 1448 | * Organization or person who adapts a creative work to different languages, regional differences and technical |
||
| 1449 | * requirements of a target market, or that translates during some event. |
||
| 1450 | * |
||
| 1451 | * @param Organization|Person $translator |
||
| 1452 | * @return CreativeWork|CreativeWorkTrait |
||
| 1453 | */ |
||
| 1454 | public function setTranslator($translator) |
||
| 1459 | |||
| 1460 | private $_typicalAgeRange; |
||
| 1461 | |||
| 1462 | /** |
||
| 1463 | * @return string |
||
| 1464 | */ |
||
| 1465 | public function getTypicalAgeRange() |
||
| 1469 | |||
| 1470 | /** |
||
| 1471 | * The typical expected age range, e.g. '7-9', '11-'. |
||
| 1472 | * |
||
| 1473 | * @param string $typicalAgeRange |
||
| 1474 | * @return CreativeWork|CreativeWorkTrait |
||
| 1475 | */ |
||
| 1476 | public function setTypicalAgeRange($typicalAgeRange) |
||
| 1481 | |||
| 1482 | private $_version; |
||
| 1483 | |||
| 1484 | /** |
||
| 1485 | * @return int|string |
||
| 1486 | */ |
||
| 1487 | public function getVersion() |
||
| 1491 | |||
| 1492 | /** |
||
| 1493 | * The version of the CreativeWork embodied by a specified resource. |
||
| 1494 | * |
||
| 1495 | * @param int|string $version |
||
| 1496 | * @return CreativeWork|CreativeWorkTrait |
||
| 1497 | */ |
||
| 1498 | public function setVersion($version) |
||
| 1503 | |||
| 1504 | |||
| 1505 | private $_workExample; |
||
| 1506 | |||
| 1507 | /** |
||
| 1508 | * @return CreativeWork |
||
| 1509 | */ |
||
| 1510 | public function getWorkExample() |
||
| 1514 | |||
| 1515 | /** |
||
| 1516 | * Example/instance/realization/derivation of the concept of this creative work. |
||
| 1517 | * eg. The paperback edition, first edition, or eBook. |
||
| 1518 | * Inverse property: exampleOfWork. |
||
| 1519 | * |
||
| 1520 | * @param CreativeWork $workExample |
||
| 1521 | * @return CreativeWork|CreativeWorkTrait |
||
| 1522 | */ |
||
| 1523 | public function setWorkExample(CreativeWork $workExample) |
||
| 1528 | |||
| 1529 | private $_workTranslation; |
||
| 1530 | |||
| 1531 | /** |
||
| 1532 | * @return CreativeWork |
||
| 1533 | */ |
||
| 1534 | public function getWorkTranslation() |
||
| 1538 | |||
| 1539 | /** |
||
| 1540 | * A work that is a translation of the content of this work. e.g. 西遊記 has an English workTranslation “Journey to |
||
| 1541 | * the West”,a German workTranslation “Monkeys Pilgerfahrt” and a Vietnamese translation Tây du ký bình khảo. |
||
| 1542 | * Inverse property: translationOfWork. |
||
| 1543 | * |
||
| 1544 | * @param CreativeWork $workTranslation |
||
| 1545 | * @return CreativeWork|CreativeWorkTrait |
||
| 1546 | */ |
||
| 1547 | public function setWorkTranslation(CreativeWork $workTranslation) |
||
| 1552 | } |
||
| 1553 |