Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( ccf559...b4fe18 )
by
unknown
04:08
created

Document::setTstamp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
5
 *
6
 * This file is part of the Kitodo and TYPO3 projects.
7
 *
8
 * @license GNU General Public License version 3 or later.
9
 * For the full copyright and license information, please read the
10
 * LICENSE.txt file that was distributed with this source code.
11
 */
12
13
namespace Kitodo\Dlf\Domain\Model;
14
15
use Kitodo\Dlf\Common\AbstractDocument;
16
use TYPO3\CMS\Extbase\Annotation as Extbase;
17
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
18
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
19
20
/**
21
 * Domain model of the 'Document'.
22
 *
23
 * @package TYPO3
24
 * @subpackage dlf
25
 * @access public
26
 */
27
class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
28
{
29
    /**
30
     * @var \DateTime
31
     */
32
    protected $crdate;
33
34
    /**
35
     * @var \DateTime
36
     */
37
    protected $tstamp;
38
39
    /**
40
     * This contains the representative of the raw XML / IIIF data of the document.
41
     *
42
     * @var AbstractDocument|null
43
     */
44
    protected $currentDocument = null;
45
46
    /**
47
     * @var string
48
     */
49
    protected $title;
50
51
    /**
52
     * @var string
53
     */
54
    protected $prodId;
55
56
    /**
57
     * @var string
58
     */
59
    protected $location;
60
61
    /**
62
     * @var string
63
     */
64
    protected $recordId;
65
66
    /**
67
     * @var string
68
     */
69
    protected $opacId;
70
71
    /**
72
     * @var string
73
     */
74
    protected $unionId;
75
76
    /**
77
     * @var string
78
     */
79
    protected $urn;
80
81
    /**
82
     * @var string
83
     */
84
    protected $purl;
85
86
    /**
87
     * @var string
88
     */
89
    protected $titleSorting;
90
91
    /**
92
     * @var string
93
     */
94
    protected $author;
95
96
    /**
97
     * @var string
98
     */
99
    protected $year;
100
101
    /**
102
     * @var string
103
     */
104
    protected $place;
105
106
    /**
107
     * @var string
108
     */
109
    protected $thumbnail;
110
111
    /**
112
     * @var \Kitodo\Dlf\Domain\Model\Structure
113
     */
114
    protected $structure;
115
116
    /**
117
     * @var int
118
     */
119
    protected $partof = 0;
120
121
    /**
122
     * @var string
123
     */
124
    protected $volume;
125
126
    /**
127
     * @var string
128
     */
129
    protected $volumeSorting;
130
131
    /**
132
     * @var string
133
     */
134
    protected $license;
135
136
    /**
137
     * @var string
138
     */
139
    protected $terms;
140
141
    /**
142
     * @var string
143
     */
144
    protected $restrictions;
145
146
    /**
147
     * @var string
148
     */
149
    protected $outOfPrint;
150
151
    /**
152
     * @var string
153
     */
154
    protected $rightsInfo;
155
156
    /**
157
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection>
158
     * @Extbase\ORM\Lazy
159
     */
160
    protected $collections = null;
161
162
    /**
163
     * @var string
164
     */
165
    protected $metsLabel;
166
167
    /**
168
     * @var string
169
     */
170
    protected $metsOrderlabel;
171
172
    /**
173
     * @var \Kitodo\Dlf\Domain\Model\Library
174
     * @Extbase\ORM\Lazy
175
     */
176
    protected $owner;
177
178
    /**
179
     * @var int
180
     */
181
    protected $solrcore;
182
183
    /**
184
     * @var int
185
     */
186
    protected $status;
187
188
    /**
189
     * @var string
190
     */
191
    protected $documentFormat;
192
193
    /**
194
     * constructor
195
     */
196
    public function __construct()
197
    {
198
        // Do not remove the next line: It would break the functionality
199
        $this->initStorageObjects();
200
    }
201
202
    protected function initStorageObjects()
203
    {
204
        $this->collections = new ObjectStorage();
205
    }
206
207
    /**
208
     * @return AbstractDocument
209
     */
210
    public function getCurrentDocument(): ?AbstractDocument
211
    {
212
        return $this->currentDocument;
213
    }
214
215
    /**
216
     * @param AbstractDocument $currentDocument
217
     */
218
    public function setCurrentDocument(AbstractDocument $currentDocument): void
219
    {
220
        $this->currentDocument = $currentDocument;
221
    }
222
223
    /**
224
     * @return string
225
     */
226
    public function getTitle(): string
227
    {
228
        return $this->title;
229
    }
230
231
    /**
232
     * @param string $title
233
     */
234
    public function setTitle(string $title): void
235
    {
236
        $this->title = $title;
237
    }
238
239
    /**
240
     * @return string
241
     */
242
    public function getProdId(): string
243
    {
244
        return $this->prodId;
245
    }
246
247
    /**
248
     * @param string $prodId
249
     */
250
    public function setProdId(string $prodId): void
251
    {
252
        $this->prodId = $prodId;
253
    }
254
255
    /**
256
     * @return string
257
     */
258
    public function getLocation(): string
259
    {
260
        return $this->location;
261
    }
262
263
    /**
264
     * @param string $location
265
     */
266
    public function setLocation(string $location): void
267
    {
268
        $this->location = $location;
269
    }
270
271
    /**
272
     * @return string
273
     */
274
    public function getRecordId(): string
275
    {
276
        return $this->recordId;
277
    }
278
279
    /**
280
     * @param string $recordId
281
     */
282
    public function setRecordId(string $recordId): void
283
    {
284
        $this->recordId = $recordId;
285
    }
286
287
    /**
288
     * @return string
289
     */
290
    public function getOpacId(): string
291
    {
292
        return $this->opacId;
293
    }
294
295
    /**
296
     * @param string $opacId
297
     */
298
    public function setOpacId(string $opacId): void
299
    {
300
        $this->opacId = $opacId;
301
    }
302
303
    /**
304
     * @return string
305
     */
306
    public function getUnionId(): string
307
    {
308
        return $this->unionId;
309
    }
310
311
    /**
312
     * @param string $unionId
313
     */
314
    public function setUnionId(string $unionId): void
315
    {
316
        $this->unionId = $unionId;
317
    }
318
319
    /**
320
     * @return string
321
     */
322
    public function getUrn(): string
323
    {
324
        return $this->urn;
325
    }
326
327
    /**
328
     * @param string $urn
329
     */
330
    public function setUrn(string $urn): void
331
    {
332
        $this->urn = $urn;
333
    }
334
335
    /**
336
     * @return string
337
     */
338
    public function getPurl(): string
339
    {
340
        return $this->purl;
341
    }
342
343
    /**
344
     * @param string $purl
345
     */
346
    public function setPurl(string $purl): void
347
    {
348
        $this->purl = $purl;
349
    }
350
351
    /**
352
     * @return string
353
     */
354
    public function getTitleSorting(): string
355
    {
356
        return $this->titleSorting;
357
    }
358
359
    /**
360
     * @param string $titleSorting
361
     */
362
    public function setTitleSorting(string $titleSorting): void
363
    {
364
        $this->titleSorting = $titleSorting;
365
    }
366
367
    /**
368
     * @return string
369
     */
370
    public function getAuthor(): string
371
    {
372
        return $this->author;
373
    }
374
375
    /**
376
     * @param string $author
377
     */
378
    public function setAuthor(string $author): void
379
    {
380
        $this->author = $author;
381
    }
382
383
    /**
384
     * @return string
385
     */
386
    public function getYear(): string
387
    {
388
        return $this->year;
389
    }
390
391
    /**
392
     * @param string $year
393
     */
394
    public function setYear(string $year): void
395
    {
396
        $this->year = $year;
397
    }
398
399
    /**
400
     * @return string
401
     */
402
    public function getPlace(): string
403
    {
404
        return $this->place;
405
    }
406
407
    /**
408
     * @param string $place
409
     */
410
    public function setPlace(string $place): void
411
    {
412
        $this->place = $place;
413
    }
414
415
    /**
416
     * @return string
417
     */
418
    public function getThumbnail(): string
419
    {
420
        return $this->thumbnail;
421
    }
422
423
    /**
424
     * @param string $thumbnail
425
     */
426
    public function setThumbnail(string $thumbnail): void
427
    {
428
        $this->thumbnail = $thumbnail;
429
    }
430
431
    /**
432
     * @return \Kitodo\Dlf\Domain\Model\Structure
433
     */
434
    public function getStructure(): Structure
435
    {
436
        return $this->structure;
437
    }
438
439
    /**
440
     * @param \Kitodo\Dlf\Domain\Model\Structure $structure
441
     */
442
    public function setStructure(Structure $structure): void
443
    {
444
        $this->structure = $structure;
445
    }
446
447
    /**
448
     * @return int
449
     */
450
    public function getPartof(): int
451
    {
452
        return $this->partof;
453
    }
454
455
    /**
456
     * @param int $partof
457
     */
458
    public function setPartof(int $partof): void
459
    {
460
        $this->partof = $partof;
461
    }
462
463
    /**
464
     * @return string
465
     */
466
    public function getVolume(): string
467
    {
468
        return $this->volume;
469
    }
470
471
    /**
472
     * @param string $volume
473
     */
474
    public function setVolume(string $volume): void
475
    {
476
        $this->volume = $volume;
477
    }
478
479
    /**
480
     * @return string
481
     */
482
    public function getVolumeSorting(): string
483
    {
484
        return $this->volumeSorting;
485
    }
486
487
    /**
488
     * @param string $volumeSorting
489
     */
490
    public function setVolumeSorting(string $volumeSorting): void
491
    {
492
        $this->volumeSorting = $volumeSorting;
493
    }
494
495
    /**
496
     * @return string
497
     */
498
    public function getLicense(): string
499
    {
500
        return $this->license;
501
    }
502
503
    /**
504
     * @param string $license
505
     */
506
    public function setLicense(string $license): void
507
    {
508
        $this->license = $license;
509
    }
510
511
    /**
512
     * @return string
513
     */
514
    public function getTerms(): string
515
    {
516
        return $this->terms;
517
    }
518
519
    /**
520
     * @param string $terms
521
     */
522
    public function setTerms(string $terms): void
523
    {
524
        $this->terms = $terms;
525
    }
526
527
    /**
528
     * @return string
529
     */
530
    public function getRestrictions(): string
531
    {
532
        return $this->restrictions;
533
    }
534
535
    /**
536
     * @param string $restrictions
537
     */
538
    public function setRestrictions(string $restrictions): void
539
    {
540
        $this->restrictions = $restrictions;
541
    }
542
543
    /**
544
     * @return string
545
     */
546
    public function getOutOfPrint(): string
547
    {
548
        return $this->outOfPrint;
549
    }
550
551
    /**
552
     * @param string $outOfPrint
553
     */
554
    public function setOutOfPrint(string $outOfPrint): void
555
    {
556
        $this->outOfPrint = $outOfPrint;
557
    }
558
559
    /**
560
     * @return string
561
     */
562
    public function getRightsInfo(): string
563
    {
564
        return $this->rightsInfo;
565
    }
566
567
    /**
568
     * @param string $rightsInfo
569
     */
570
    public function setRightsInfo(string $rightsInfo): void
571
    {
572
        $this->rightsInfo = $rightsInfo;
573
    }
574
575
576
    /**
577
     * Returns the collections
578
     *
579
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> $collections
580
     */
581
    public function getCollections()
582
    {
583
        return $this->collections;
584
    }
585
586
    /**
587
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> $collections
588
     */
589
    public function setCollections(?ObjectStorage $collections): void
590
    {
591
        $this->collections = $collections;
592
    }
593
594
    /**
595
     * Adds a collection
596
     *
597
     * @param \Kitodo\Dlf\Domain\Model\Collection $collection
598
     */
599
    public function addCollection(Collection $collection): void
600
    {
601
        $this->collections->attach($collection);
602
    }
603
604
    /**
605
     * Removes a collection
606
     *
607
     * @param \Kitodo\Dlf\Domain\Model\Collection $collection
608
     *
609
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> collections
610
     */
611
    public function removeCollection(Collection $collection)
612
    {
613
        $this->collections->detach($collection);
614
    }
615
616
    /**
617
     * @return string
618
     */
619
    public function getMetsLabel(): string
620
    {
621
        return $this->metsLabel;
622
    }
623
624
    /**
625
     * @param string $metsLabel
626
     */
627
    public function setMetsLabel(string $metsLabel): void
628
    {
629
        $this->metsLabel = $metsLabel;
630
    }
631
632
    /**
633
     * @return string
634
     */
635
    public function getMetsOrderlabel(): string
636
    {
637
        return $this->metsOrderlabel;
638
    }
639
640
    /**
641
     * @param string $metsOrderlabel
642
     */
643
    public function setMetsOrderlabel(string $metsOrderlabel): void
644
    {
645
        $this->metsOrderlabel = $metsOrderlabel;
646
    }
647
648
    /**
649
     * @return \Kitodo\Dlf\Domain\Model\Library|null
650
     */
651
    public function getOwner(): ?Library
652
    {
653
        return $this->owner instanceof LazyLoadingProxy
0 ignored issues
show
introduced by
$this->owner is never a sub-type of TYPO3\CMS\Extbase\Persis...eneric\LazyLoadingProxy.
Loading history...
654
            ? $this->owner->_loadRealInstance()
655
            : $this->owner;
656
    }
657
658
    /**
659
     * @param \Kitodo\Dlf\Domain\Model\Library $owner
660
     */
661
    public function setOwner(Library $owner): void
662
    {
663
        $this->owner = $owner;
664
    }
665
666
    /**
667
     * @return int
668
     */
669
    public function getSolrcore(): int
670
    {
671
        return $this->solrcore;
672
    }
673
674
    /**
675
     * @param int $solrcore
676
     */
677
    public function setSolrcore(int $solrcore): void
678
    {
679
        $this->solrcore = $solrcore;
680
    }
681
682
    /**
683
     * @return int
684
     */
685
    public function getStatus(): int
686
    {
687
        return $this->status;
688
    }
689
690
    /**
691
     * @param int $status
692
     */
693
    public function setStatus(int $status): void
694
    {
695
        $this->status = $status;
696
    }
697
698
    /**
699
     * @return string
700
     */
701
    public function getDocumentFormat(): string
702
    {
703
        return $this->documentFormat;
704
    }
705
706
    /**
707
     * @param string $documentFormat
708
     */
709
    public function setDocumentFormat(string $documentFormat): void
710
    {
711
        $this->documentFormat = $documentFormat;
712
    }
713
714
    /**
715
     * Returns the timestamp
716
     *
717
     * @return \DateTime
718
     */
719
    public function getTstamp(): \DateTime
720
    {
721
        return $this->tstamp;
722
    }
723
724
    /**
725
     * Sets the timestamp
726
     *
727
     * @param \DateTime $tstamp
728
     */
729
    public function setTstamp($tstamp): void
730
    {
731
        $this->tstamp = $tstamp;
732
    }
733
734
    /**
735
     * Returns the creation date
736
     *
737
     * @return \DateTime
738
     */
739
    public function getCrdate(): \DateTime
740
    {
741
        return $this->crdate;
742
    }
743
744
    /**
745
     * Sets the creation date
746
     *
747
     * @param \DateTime $crdate
748
     */
749
    public function setCrdate($crdate): void
750
    {
751
        $this->crdate = $crdate;
752
    }
753
754
}
755