1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace GroupByInc\API\Model; |
4
|
|
|
|
5
|
|
|
use JMS\Serializer\Annotation as JMS; |
6
|
|
|
|
7
|
|
|
class Results |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* @var int |
11
|
|
|
* @JMS\Type("integer") |
12
|
|
|
*/ |
13
|
|
|
public $totalRecordCount; |
14
|
|
|
/** |
15
|
|
|
* @var string |
16
|
|
|
* @JMS\Type("string") |
17
|
|
|
*/ |
18
|
|
|
public $area; |
19
|
|
|
/** |
20
|
|
|
* @var string |
21
|
|
|
* @JMS\Type("string") |
22
|
|
|
*/ |
23
|
|
|
public $biasingProfile; |
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
* @JMS\Type("string") |
27
|
|
|
*/ |
28
|
|
|
public $redirect; |
29
|
|
|
/** |
30
|
|
|
* @var string |
31
|
|
|
* @JMS\Type("string") |
32
|
|
|
*/ |
33
|
|
|
public $errors; |
34
|
|
|
/** |
35
|
|
|
* @var string |
36
|
|
|
* @JMS\Type("string") |
37
|
|
|
*/ |
38
|
|
|
public $query; |
39
|
|
|
/** |
40
|
|
|
* @var string |
41
|
|
|
* @JMS\Type("string") |
42
|
|
|
*/ |
43
|
|
|
public $originalQuery; |
44
|
|
|
/** |
45
|
|
|
* @var string |
46
|
|
|
* @JMS\Type("string") |
47
|
|
|
*/ |
48
|
|
|
public $correctedQuery; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var Template |
52
|
|
|
* @JMS\Type("GroupByInc\API\Model\Template") |
53
|
|
|
*/ |
54
|
|
|
public $template; |
55
|
|
|
/** |
56
|
|
|
* @var PageInfo |
57
|
|
|
* @JMS\Type("GroupByInc\API\Model\PageInfo") |
58
|
|
|
*/ |
59
|
|
|
public $pageInfo; |
60
|
|
|
/** |
61
|
|
|
* @var Navigation[] |
62
|
|
|
* @JMS\Type("array<GroupByInc\API\Model\Navigation>") |
63
|
|
|
*/ |
64
|
|
|
public $availableNavigation = array(); |
65
|
|
|
/** |
66
|
|
|
* @var Navigation[] |
67
|
|
|
* @JMS\Type("array<GroupByInc\API\Model\Navigation>") |
68
|
|
|
*/ |
69
|
|
|
public $selectedNavigation = array(); |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @var Record[] |
73
|
|
|
* @JMS\Type("array<GroupByInc\API\Model\Record>") |
74
|
|
|
*/ |
75
|
|
|
public $records = array(); |
76
|
|
|
/** |
77
|
|
|
* @var string[] |
78
|
|
|
* @JMS\Type("array<string>") |
79
|
|
|
*/ |
80
|
|
|
public $didYouMean = array(); |
81
|
|
|
/** |
82
|
|
|
* @var string[] |
83
|
|
|
* @JMS\Type("array<string>") |
84
|
|
|
*/ |
85
|
|
|
public $relatedQueries = array(); |
86
|
|
|
/** |
87
|
|
|
* @var string[] |
88
|
|
|
* @JMS\Type("array<string>") |
89
|
|
|
*/ |
90
|
|
|
public $rewrites = array(); |
91
|
|
|
/** |
92
|
|
|
* @var Metadata[] |
93
|
|
|
* @JMS\Type("array<GroupByInc\API\Model\Metadata>") |
94
|
|
|
*/ |
95
|
|
|
public $siteParams = array(); |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return string[] A list of spell corrections based on the search term. |
99
|
|
|
*/ |
100
|
|
|
public function getDidYouMean() |
101
|
|
|
{ |
102
|
|
|
return $this->didYouMean; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @param string[] $didYouMean Set the list. |
107
|
|
|
*/ |
108
|
|
|
public function setDidYouMean($didYouMean) |
109
|
|
|
{ |
110
|
|
|
$this->didYouMean = $didYouMean; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @return string[] A list of related queries for a given search term. |
115
|
|
|
*/ |
116
|
|
|
public function getRelatedQueries() |
117
|
|
|
{ |
118
|
|
|
return $this->relatedQueries; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @param string[] $relatedQueries Set the related queries for a search term. |
123
|
|
|
*/ |
124
|
|
|
public function setRelatedQueries($relatedQueries) |
125
|
|
|
{ |
126
|
|
|
$this->relatedQueries = $relatedQueries; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* @return Record[] A list of the records for this search and navigation state. |
131
|
|
|
*/ |
132
|
|
|
public function getRecords() |
133
|
|
|
{ |
134
|
|
|
return $this->records; |
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* @param Record[] $records Set the records. |
139
|
|
|
*/ |
140
|
|
|
public function setRecords($records) |
141
|
|
|
{ |
142
|
|
|
$this->records = $records; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @return Template If a rule has fired, the associated template will be returned. |
147
|
|
|
*/ |
148
|
|
|
public function getTemplate() |
149
|
|
|
{ |
150
|
|
|
return $this->template; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @param Template $template Set the template. |
155
|
|
|
*/ |
156
|
|
|
public function setTemplate($template) |
157
|
|
|
{ |
158
|
|
|
$this->template = $template; |
159
|
|
|
} |
160
|
|
|
|
161
|
|
|
/** |
162
|
|
|
* @return PageInfo Information about the results page. |
163
|
|
|
*/ |
164
|
|
|
public function getPageInfo() |
165
|
|
|
{ |
166
|
|
|
return $this->pageInfo; |
167
|
|
|
} |
168
|
|
|
|
169
|
|
|
/** |
170
|
|
|
* @param PageInfo $pageInfo Set the page info. |
171
|
|
|
*/ |
172
|
|
|
public function setPageInfo($pageInfo) |
173
|
|
|
{ |
174
|
|
|
$this->pageInfo = $pageInfo; |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* @return Navigation[] A list of all the ways in which you can filter the current result set. |
179
|
|
|
*/ |
180
|
|
|
public function getAvailableNavigation() |
181
|
|
|
{ |
182
|
|
|
return $this->availableNavigation; |
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* @param Navigation[] $availableNavigation Set the available navigation. |
187
|
|
|
*/ |
188
|
|
|
public function setAvailableNavigation($availableNavigation) |
189
|
|
|
{ |
190
|
|
|
$this->availableNavigation = $availableNavigation; |
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* @return Navigation[] A list of the currently selected navigations. Also known as breadcrumbs. |
195
|
|
|
*/ |
196
|
|
|
public function getSelectedNavigation() |
197
|
|
|
{ |
198
|
|
|
return $this->selectedNavigation; |
199
|
|
|
} |
200
|
|
|
|
201
|
|
|
/** |
202
|
|
|
* @param Navigation[] $selectedNavigation Set the selected navigations. |
203
|
|
|
*/ |
204
|
|
|
public function setSelectedNavigation($selectedNavigation) |
205
|
|
|
{ |
206
|
|
|
$this->selectedNavigation = $selectedNavigation; |
207
|
|
|
} |
208
|
|
|
|
209
|
|
|
/** |
210
|
|
|
* @return string A URL to redirect to based on this search term. |
211
|
|
|
*/ |
212
|
|
|
public function getRedirect() |
213
|
|
|
{ |
214
|
|
|
return $this->redirect; |
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
/** |
218
|
|
|
* @param string $redirect Set the redirect. |
219
|
|
|
*/ |
220
|
|
|
public function setRedirect($redirect) |
221
|
|
|
{ |
222
|
|
|
$this->redirect = $redirect; |
223
|
|
|
} |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* @return string representation of any errors encountered. |
227
|
|
|
*/ |
228
|
|
|
public function getErrors() |
229
|
|
|
{ |
230
|
|
|
return $this->errors; |
231
|
|
|
} |
232
|
|
|
|
233
|
|
|
/** |
234
|
|
|
* @param string $errors Set errors. |
235
|
|
|
*/ |
236
|
|
|
public function setErrors($errors) |
237
|
|
|
{ |
238
|
|
|
$this->errors = $errors; |
239
|
|
|
} |
240
|
|
|
|
241
|
|
|
/** |
242
|
|
|
* @return int A count of the total number of records in this search and navigation state. |
243
|
|
|
*/ |
244
|
|
|
public function getTotalRecordCount() |
245
|
|
|
{ |
246
|
|
|
return $this->totalRecordCount; |
247
|
|
|
} |
248
|
|
|
|
249
|
|
|
/** |
250
|
|
|
* @param int $totalRecordCount Set the total record count. |
251
|
|
|
*/ |
252
|
|
|
public function setTotalRecordCount($totalRecordCount) |
253
|
|
|
{ |
254
|
|
|
$this->totalRecordCount = $totalRecordCount; |
255
|
|
|
} |
256
|
|
|
|
257
|
|
|
/** |
258
|
|
|
* @return Metadata[] A list of metadata as set in the area management section of the command center. |
259
|
|
|
*/ |
260
|
|
|
public function getSiteParams() |
261
|
|
|
{ |
262
|
|
|
return $this->siteParams; |
263
|
|
|
} |
264
|
|
|
|
265
|
|
|
/** |
266
|
|
|
* @param Metadata[] $siteParams Set the site metadata. |
267
|
|
|
*/ |
268
|
|
|
public function setSiteParams($siteParams) |
269
|
|
|
{ |
270
|
|
|
$this->siteParams = $siteParams; |
271
|
|
|
} |
272
|
|
|
|
273
|
|
|
/** |
274
|
|
|
* @return string The query sent to the bridge. |
275
|
|
|
*/ |
276
|
|
|
public function getQuery() |
277
|
|
|
{ |
278
|
|
|
return $this->query; |
279
|
|
|
} |
280
|
|
|
|
281
|
|
|
/** |
282
|
|
|
* @param string $query Sets the query to the bridge. |
283
|
|
|
*/ |
284
|
|
|
public function setQuery($query) |
285
|
|
|
{ |
286
|
|
|
$this->query = $query; |
287
|
|
|
} |
288
|
|
|
|
289
|
|
|
/** |
290
|
|
|
* @return string The original query sent to the search service. |
291
|
|
|
*/ |
292
|
|
|
public function getOriginalQuery() |
293
|
|
|
{ |
294
|
|
|
return $this->originalQuery; |
295
|
|
|
} |
296
|
|
|
|
297
|
|
|
/** |
298
|
|
|
* @param string $originalQuery Sets the original query sent to the search service. |
299
|
|
|
*/ |
300
|
|
|
public function setOriginalQuery($originalQuery) |
301
|
|
|
{ |
302
|
|
|
$this->originalQuery = $originalQuery; |
303
|
|
|
} |
304
|
|
|
|
305
|
|
|
/** |
306
|
|
|
* @return string The corrected query sent to the engine, if auto-correction is enabled. |
307
|
|
|
*/ |
308
|
|
|
public function getCorrectedQuery() |
309
|
|
|
{ |
310
|
|
|
return $this->correctedQuery; |
311
|
|
|
} |
312
|
|
|
|
313
|
|
|
/** |
314
|
|
|
* @param string $correctedQuery Sets the corrected query sent to the engine, if auto-correction is enabled. |
315
|
|
|
*/ |
316
|
|
|
public function setCorrectedQuery($correctedQuery) |
317
|
|
|
{ |
318
|
|
|
$this->correctedQuery = $correctedQuery; |
319
|
|
|
} |
320
|
|
|
|
321
|
|
|
/** |
322
|
|
|
* @return string[] A list of rewrites (spellings, synonyms, etc...) that occurred. |
323
|
|
|
*/ |
324
|
|
|
public function getRewrites() |
325
|
|
|
{ |
326
|
|
|
return $this->rewrites; |
327
|
|
|
} |
328
|
|
|
|
329
|
|
|
/** |
330
|
|
|
* @param string[] $rewrites Sets the rewrites that occurred. |
331
|
|
|
*/ |
332
|
|
|
public function setRewrites($rewrites) |
333
|
|
|
{ |
334
|
|
|
$this->rewrites = $rewrites; |
335
|
|
|
} |
336
|
|
|
|
337
|
|
|
/** |
338
|
|
|
* @return string The area that the search fired against. |
339
|
|
|
*/ |
340
|
|
|
public function getArea() |
341
|
|
|
{ |
342
|
|
|
return $this->area; |
343
|
|
|
} |
344
|
|
|
|
345
|
|
|
/** |
346
|
|
|
* @param string $area Sets the area. |
347
|
|
|
*/ |
348
|
|
|
public function setArea($area) |
349
|
|
|
{ |
350
|
|
|
$this->area = $area; |
351
|
|
|
} |
352
|
|
|
|
353
|
|
|
/** |
354
|
|
|
* @return string |
355
|
|
|
*/ |
356
|
|
|
public function getBiasingProfile() |
357
|
|
|
{ |
358
|
|
|
return $this->biasingProfile; |
359
|
|
|
} |
360
|
|
|
|
361
|
|
|
/** |
362
|
|
|
* @param string $biasingProfile |
363
|
|
|
*/ |
364
|
|
|
public function setBiasingProfile($biasingProfile) |
365
|
|
|
{ |
366
|
|
|
$this->biasingProfile = $biasingProfile; |
367
|
|
|
} |
368
|
|
|
} |
369
|
|
|
|
370
|
|
|
|