|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* Copyright (C) 2016 Michael Giesler |
|
4
|
|
|
* |
|
5
|
|
|
* This file is part of Dembelo. |
|
6
|
|
|
* |
|
7
|
|
|
* Dembelo is free software: you can redistribute it and/or modify |
|
8
|
|
|
* it under the terms of the GNU Affero General Public License as published by |
|
9
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
|
10
|
|
|
* (at your option) any later version. |
|
11
|
|
|
* |
|
12
|
|
|
* Dembelo is distributed in the hope that it will be useful, |
|
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15
|
|
|
* GNU Affero General Public License 3 for more details. |
|
16
|
|
|
* |
|
17
|
|
|
* You should have received a copy of the GNU Affero General Public License 3 |
|
18
|
|
|
* along with Dembelo. If not, see <http://www.gnu.org/licenses/>. |
|
19
|
|
|
*/ |
|
20
|
|
|
|
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* @package DembeloMain |
|
24
|
|
|
*/ |
|
25
|
|
|
|
|
26
|
|
|
namespace DembeloMain\Document; |
|
27
|
|
|
|
|
28
|
|
|
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* Class Importfile |
|
32
|
|
|
* |
|
33
|
|
|
* @MongoDB\Document |
|
34
|
|
|
* @MongoDB\Document(repositoryClass="\DembeloMain\Model\Repository\Doctrine\ODM\ImportfileRepository") |
|
35
|
|
|
*/ |
|
36
|
|
|
class Importfile |
|
37
|
|
|
{ |
|
38
|
|
|
/** |
|
39
|
|
|
* @MongoDB\Id |
|
40
|
|
|
*/ |
|
41
|
|
|
protected $id; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @MongoDB\Field(type="string") |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $name; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @MongoDB\Field(type="object_id") |
|
50
|
|
|
*/ |
|
51
|
|
|
protected $licenseeId; |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @MongoDB\Field(type="timestamp") |
|
55
|
|
|
*/ |
|
56
|
|
|
protected $imported; |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* @MongoDB\Field(type="string") |
|
60
|
|
|
*/ |
|
61
|
|
|
protected $author; |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @MongoDB\Field(type="string") |
|
65
|
|
|
*/ |
|
66
|
|
|
protected $publisher; |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* @MongoDB\Field(type="string") |
|
70
|
|
|
*/ |
|
71
|
|
|
protected $originalname; |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* @MongoDB\Field(type="string") |
|
75
|
|
|
*/ |
|
76
|
|
|
protected $filename; |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* @MongoDB\Field(type="object_id") |
|
80
|
|
|
*/ |
|
81
|
|
|
protected $topicId; |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* gets the mongodb id |
|
85
|
|
|
* |
|
86
|
|
|
* @return string|null |
|
87
|
|
|
*/ |
|
88
|
9 |
|
public function getId(): ?string |
|
89
|
|
|
{ |
|
90
|
9 |
|
return $this->id; |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
/** |
|
94
|
|
|
* sets the mongoDB id |
|
95
|
|
|
* |
|
96
|
|
|
* @param string $id |
|
97
|
|
|
*/ |
|
98
|
2 |
|
public function setId(string $id): void |
|
99
|
|
|
{ |
|
100
|
2 |
|
$this->id = $id; |
|
101
|
2 |
|
} |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* gets the name |
|
105
|
|
|
* |
|
106
|
|
|
* @return string|null |
|
107
|
|
|
*/ |
|
108
|
2 |
|
public function getName(): ?string |
|
109
|
|
|
{ |
|
110
|
2 |
|
return $this->name; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
/** |
|
114
|
|
|
* sets the name |
|
115
|
|
|
* |
|
116
|
|
|
* @param string $name |
|
117
|
|
|
*/ |
|
118
|
9 |
|
public function setName(string $name): void |
|
119
|
|
|
{ |
|
120
|
9 |
|
$this->name = $name; |
|
121
|
9 |
|
} |
|
122
|
|
|
|
|
123
|
|
|
/** |
|
124
|
|
|
* gets the licensee ID |
|
125
|
|
|
* |
|
126
|
|
|
* @return string|null |
|
127
|
|
|
*/ |
|
128
|
2 |
|
public function getLicenseeId(): ?string |
|
129
|
|
|
{ |
|
130
|
2 |
|
return $this->licenseeId; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
/** |
|
134
|
|
|
* sets the licensee ID |
|
135
|
|
|
* |
|
136
|
|
|
* @param string $licenseeId licensee ID |
|
137
|
|
|
*/ |
|
138
|
3 |
|
public function setLicenseeId(string $licenseeId): void |
|
139
|
|
|
{ |
|
140
|
3 |
|
$this->licenseeId = $licenseeId; |
|
141
|
3 |
|
} |
|
142
|
|
|
|
|
143
|
|
|
/** |
|
144
|
|
|
* @return integer|null |
|
145
|
|
|
*/ |
|
146
|
1 |
|
public function getImported(): ?int |
|
147
|
|
|
{ |
|
148
|
1 |
|
return $this->imported; |
|
149
|
|
|
} |
|
150
|
|
|
|
|
151
|
|
|
/** |
|
152
|
|
|
* @param integer $imported |
|
153
|
|
|
*/ |
|
154
|
1 |
|
public function setImported(?int $imported): void |
|
155
|
|
|
{ |
|
156
|
1 |
|
$this->imported = $imported; |
|
157
|
1 |
|
} |
|
158
|
|
|
|
|
159
|
|
|
/** |
|
160
|
|
|
* @return string|null |
|
161
|
|
|
*/ |
|
162
|
1 |
|
public function getAuthor(): ?string |
|
163
|
|
|
{ |
|
164
|
1 |
|
return $this->author; |
|
165
|
|
|
} |
|
166
|
|
|
|
|
167
|
|
|
/** |
|
168
|
|
|
* @param string $author |
|
169
|
|
|
*/ |
|
170
|
3 |
|
public function setAuthor(string $author): void |
|
171
|
|
|
{ |
|
172
|
3 |
|
$this->author = $author; |
|
173
|
3 |
|
} |
|
174
|
|
|
|
|
175
|
|
|
/** |
|
176
|
|
|
* @return string|null |
|
177
|
|
|
*/ |
|
178
|
1 |
|
public function getPublisher(): ?string |
|
179
|
|
|
{ |
|
180
|
1 |
|
return $this->publisher; |
|
181
|
|
|
} |
|
182
|
|
|
|
|
183
|
|
|
/** |
|
184
|
|
|
* @param string $publisher |
|
185
|
|
|
*/ |
|
186
|
3 |
|
public function setPublisher(string $publisher): void |
|
187
|
|
|
{ |
|
188
|
3 |
|
$this->publisher = $publisher; |
|
189
|
3 |
|
} |
|
190
|
|
|
|
|
191
|
|
|
/** |
|
192
|
|
|
* @return string|null |
|
193
|
|
|
*/ |
|
194
|
1 |
|
public function getOriginalname(): ?string |
|
195
|
|
|
{ |
|
196
|
1 |
|
return $this->originalname; |
|
197
|
|
|
} |
|
198
|
|
|
|
|
199
|
|
|
/** |
|
200
|
|
|
* @param string $originalname |
|
201
|
|
|
*/ |
|
202
|
1 |
|
public function setOriginalname(string $originalname): void |
|
203
|
|
|
{ |
|
204
|
1 |
|
$this->originalname = $originalname; |
|
205
|
1 |
|
} |
|
206
|
|
|
|
|
207
|
|
|
/** |
|
208
|
|
|
* @return string|null |
|
209
|
|
|
*/ |
|
210
|
2 |
|
public function getFilename(): ?string |
|
211
|
|
|
{ |
|
212
|
2 |
|
return $this->filename; |
|
213
|
|
|
} |
|
214
|
|
|
|
|
215
|
|
|
/** |
|
216
|
|
|
* @param string $filename |
|
217
|
|
|
*/ |
|
218
|
3 |
|
public function setFilename(string $filename): void |
|
219
|
|
|
{ |
|
220
|
3 |
|
$this->filename = $filename; |
|
221
|
3 |
|
} |
|
222
|
|
|
|
|
223
|
|
|
/** |
|
224
|
|
|
* @return string|null |
|
225
|
|
|
*/ |
|
226
|
|
|
public function getTopicId(): ?string |
|
227
|
|
|
{ |
|
228
|
|
|
return $this->topicId; |
|
229
|
|
|
} |
|
230
|
|
|
|
|
231
|
|
|
/** |
|
232
|
|
|
* @param string $topicId |
|
233
|
|
|
*/ |
|
234
|
2 |
|
public function setTopicId(string $topicId): void |
|
235
|
|
|
{ |
|
236
|
2 |
|
$this->topicId = $topicId; |
|
237
|
2 |
|
} |
|
238
|
|
|
} |
|
239
|
|
|
|