ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjectSearchFactory.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 include_once 'Services/Search/classes/class.ilSearchSettings.php';
38 {
39 
46  public static function _getObjectSearchInstance($query_parser)
47  {
48  include_once './Services/Search/classes/class.ilSearchSettings.php';
49 
50  $search_settings = new ilSearchSettings();
51 
52  if($search_settings->enabledIndex())
53  {
54  // FULLTEXT
55  include_once 'Services/Search/classes/Fulltext/class.ilFulltextObjectSearch.php';
56  return new ilFulltextObjectSearch($query_parser);
57  }
58  else
59  {
60  // LIKE
61  include_once 'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
62  return new ilLikeObjectSearch($query_parser);
63  }
64 
65  }
66 
70  public static function getByTypeSearchInstance($a_object_type,$a_query_parser)
71  {
72  switch($a_object_type)
73  {
74  case 'wiki':
75  return self::_getWikiContentSearchInstance($a_query_parser);
76 
77  case 'frm':
78  return self::_getForumSearchInstance($a_query_parser);
79 
80  case 'lm':
81  return self::_getLMContentSearchInstance($a_query_parser);
82 
83  default:
84  return self::_getObjectSearchInstance($a_query_parser);
85  }
86  }
87 
94  public static function _getMetaDataSearchInstance($query_parser)
95  {
96  if(ilSearchSettings::getInstance()->enabledIndex())
97  {
98  include_once 'Services/Search/classes/Fulltext/class.ilFulltextMetaDataSearch.php';
99  return new ilFulltextMetaDataSearch($query_parser);
100  }
101  else
102  {
103  include_once 'Services/Search/classes/Like/class.ilLikeMetaDataSearch.php';
104  return new ilLikeMetaDataSearch($query_parser);
105  }
106  }
107 
114  public static function _getLMContentSearchInstance($query_parser)
115  {
116  if(ilSearchSettings::getInstance()->enabledIndex())
117  {
118  include_once 'Services/Search/classes/Fulltext/class.ilFulltextLMContentSearch.php';
119  return new ilFulltextLMContentSearch($query_parser);
120  }
121  else
122  {
123  include_once './Services/Search/classes/Like/class.ilLikeLMContentSearch.php';
124  return new ilLikeLMContentSearch($query_parser);
125  }
126 
127  }
128 
135  public static function _getForumSearchInstance($query_parser)
136  {
137  if(ilSearchSettings::getInstance()->enabledIndex())
138  {
139  include_once 'Services/Search/classes/Fulltext/class.ilFulltextForumSearch.php';
140  return new ilFulltextForumSearch($query_parser);
141  }
142  else
143  {
144  include_once 'Services/Search/classes/Like/class.ilLikeForumSearch.php';
145  return new ilLikeForumSearch($query_parser);
146  }
147 
148  }
149 
156  public static function _getGlossaryDefinitionSearchInstance($query_parser)
157  {
158  if(ilSearchSettings::getInstance()->enabledIndex())
159  {
160  include_once 'Services/Search/classes/Fulltext/class.ilFulltextGlossaryDefinitionSearch.php';
161  return new ilFulltextGlossaryDefinitionSearch($query_parser);
162  }
163  else
164  {
165  include_once 'Services/Search/classes/Like/class.ilLikeGlossaryDefinitionSearch.php';
166  return new ilLikeGlossaryDefinitionSearch($query_parser);
167  }
168  }
169 
176  public static function _getExerciseSearchInstance($query_parser)
177  {
178  if(ilSearchSettings::getInstance()->enabledIndex())
179  {
180  include_once 'Services/Search/classes/Fulltext/class.ilFulltextExerciseSearch.php';
181  return new ilFulltextExerciseSearch($query_parser);
182  }
183  else
184  {
185  include_once 'Services/Search/classes/Like/class.ilLikeExerciseSearch.php';
186  return new ilLikeExerciseSearch($query_parser);
187  }
188 
189  }
190 
197  public static function _getMediacastSearchInstance($query_parser)
198  {
199  if(ilSearchSettings::getInstance()->enabledIndex())
200  {
201  include_once 'Services/Search/classes/Fulltext/class.ilFulltextMediaCastSearch.php';
202  return new ilFulltextMediaCastSearch($query_parser);
203  }
204  else
205  {
206  include_once 'Services/Search/classes/Like/class.ilLikeMediaCastSearch.php';
207  return new ilLikeMediaCastSearch($query_parser);
208  }
209 
210  }
211 
218  public static function _getTestSearchInstance($query_parser)
219  {
220  if(ilSearchSettings::getInstance()->enabledIndex())
221  {
222  include_once 'Services/Search/classes/Fulltext/class.ilFulltextTestSearch.php';
223  return new ilFulltextTestSearch($query_parser);
224  }
225  else
226  {
227  include_once 'Services/Search/classes/Like/class.ilLikeTestSearch.php';
228  return new ilLikeTestSearch($query_parser);
229  }
230  }
231 
238  public static function _getMediaPoolSearchInstance($query_parser)
239  {
240  if(ilSearchSettings::getInstance()->enabledIndex())
241  {
242  include_once 'Services/Search/classes/Fulltext/class.ilFulltextMediaPoolSearch.php';
243  return new ilFulltextMediaPoolSearch($query_parser);
244  }
245  else
246  {
247  include_once 'Services/Search/classes/Like/class.ilLikeMediaPoolSearch.php';
248  return new ilLikeMediaPoolSearch($query_parser);
249  }
250  }
251 
258  public static function _getAdvancedSearchInstance($query_parser)
259  {
260  if(ilSearchSettings::getInstance()->enabledIndex())
261  {
262  include_once 'Services/Search/classes/Fulltext/class.ilFulltextAdvancedSearch.php';
263  return new ilFulltextAdvancedSearch($query_parser);
264  }
265  else
266  {
267  include_once './Services/Search/classes/Like/class.ilLikeAdvancedSearch.php';
268  return new ilLikeAdvancedSearch($query_parser);
269  }
270  }
271 
278  public static function _getWebresourceSearchInstance($query_parser)
279  {
280  if(ilSearchSettings::getInstance()->enabledIndex())
281  {
282  include_once 'Services/Search/classes/Fulltext/class.ilFulltextWebresourceSearch.php';
283  return new ilFulltextWebresourceSearch($query_parser);
284  }
285  else
286  {
287  include_once 'Services/Search/classes/Like/class.ilLikeWebresourceSearch.php';
288  return new ilLikeWebresourceSearch($query_parser);
289  }
290  }
291 
298  public static function _getUserSearchInstance($query_parser)
299  {
300  include_once 'Services/Search/classes/Like/class.ilLikeUserSearch.php';
301  return new ilLikeUserSearch($query_parser);
302  }
303 
310  public static function _getUserDefinedFieldSearchInstance($query_parser)
311  {
312  include_once 'Services/Search/classes/Like/class.ilLikeUserDefinedFieldSearch.php';
313  return new ilLikeUserDefinedFieldSearch($query_parser);
314  }
315 
316  public static function getUserMultiFieldSearchInstance($query_parser)
317  {
318  include_once './Services/Search/classes/Like/class.ilLikeUserMultiFieldSearch.php';
319  return new ilLikeUserMultiFieldSearch($query_parser);
320  }
321 
328  public static function _getWikiContentSearchInstance($query_parser)
329  {
330  if(ilSearchSettings::getInstance()->enabledIndex())
331  {
332  include_once 'Services/Search/classes/Fulltext/class.ilFulltextWikiContentSearch.php';
333  return new ilFulltextWikiContentSearch($query_parser);
334  }
335  else
336  {
337  include_once 'Services/Search/classes/Like/class.ilLikeWikiContentSearch.php';
338  return new ilLikeWikiContentSearch($query_parser);
339  }
340  }
341 
350  public static function _getAdvancedMDSearchInstance($query_parser)
351  {
352  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDLikeSearch.php');
353  return new ilAdvancedMDLikeSearch($query_parser);
354  }
355 
360  public static function getUserOrgUnitAssignmentInstance($query_parser)
361  {
362  include_once './Services/Search/classes/Like/class.ilLikeUserOrgUnitSearch.php';
363  return new ilLikeUserOrgUnitSearch($query_parser);
364  }
365 }
366 ?>
static _getWikiContentSearchInstance($query_parser)
get reference of ilFulltextWikiContentSearch
static _getAdvancedSearchInstance($query_parser)
get reference of ilFulltextAdvancedSearch
static _getWebresourceSearchInstance($query_parser)
get reference of ilFulltextWebresourceSearch
Class ilFulltextMediaCastSearch.
static _getMediaPoolSearchInstance($query_parser)
get reference of ilFulltextMediapoolSearch
static getUserMultiFieldSearchInstance($query_parser)
static _getAdvancedMDSearchInstance($query_parser)
get advanced meta data search instance
static _getUserSearchInstance($query_parser)
get reference of ilLikeUserSearch
static _getForumSearchInstance($query_parser)
get reference of ilFulltextForumSearch
static _getExerciseSearchInstance($query_parser)
get reference of ilFulltextExerciseSearch
static _getMediacastSearchInstance($query_parser)
get reference of ilFulltextMediacastSearch
static _getGlossaryDefinitionSearchInstance($query_parser)
get reference of ilFulltextGlossaryDefinitionSearch
static _getMetaDataSearchInstance($query_parser)
get reference of ilFulltext/LikeMetaDataSearch.
static getByTypeSearchInstance($a_object_type, $a_query_parser)
Class ilFulltextWikiContentSearch.
static _getLMContentSearchInstance($query_parser)
get reference of ilFulltextLMContentSearch
static _getObjectSearchInstance($query_parser)
get reference of ilFulltext/LikeObjectSearch.
Class ilLikeMediaCastSearch.
static _getTestSearchInstance($query_parser)
get reference of ilFulltextTestSearch
Description of class class.
static getUserOrgUnitAssignmentInstance($query_parser)
get orgunit search instance
static _getUserDefinedFieldSearchInstance($query_parser)
get reference of ilLikeUserDefinedFieldSearch