ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLuceneAdvancedSearchFields Class Reference

Field definitions of advanced meta data search. More...

+ Collaboration diagram for ilLuceneAdvancedSearchFields:

Public Member Functions

 getActiveFields ()
 Get all active fields.
 getActiveSections ()
 getFormElement ($a_query, $a_field_name)
 parseFieldQuery ($a_field, $a_query)
 Called from ilLuceneAdvancedQueryParser Parse a field specific query.

Static Public Member Functions

static getInstance ()
 Get singleton instance.
static getFields ()
 Return an array of all meta data fields.

Protected Member Functions

 __construct ()
 readFields ()
 Read active fields.
 readSections ()
 Read active sections.
 getRangeSelect ($txt_from, $select_from, $txt_until, $select_until)
 get a range selection

Protected Attributes

 $lng = null

Private Attributes

 $settings = null
 $active_fields = array()
 $active_sections = array()

Static Private Attributes

static $instance = null
static $fields = null
static $sections = null

Detailed Description

Field definitions of advanced meta data search.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 36 of file class.ilLuceneAdvancedSearchFields.php.

Constructor & Destructor Documentation

ilLuceneAdvancedSearchFields::__construct ( )
protected

Definition at line 50 of file class.ilLuceneAdvancedSearchFields.php.

References $lng, getInstance(), readFields(), and readSections().

{
global $lng;
$this->lng = $lng;
$this->lng->loadLanguageModule('meta');
$this->readFields();
$this->readSections();
}

+ Here is the call graph for this function:

Member Function Documentation

ilLuceneAdvancedSearchFields::getActiveFields ( )

Get all active fields.

Definition at line 129 of file class.ilLuceneAdvancedSearchFields.php.

Referenced by readSections().

{
return $this->active_fields ? $this->active_fields : array();
}

+ Here is the caller graph for this function:

ilLuceneAdvancedSearchFields::getActiveSections ( )

Definition at line 134 of file class.ilLuceneAdvancedSearchFields.php.

{
return $this->active_sections ? $this->active_sections : array();
}
static ilLuceneAdvancedSearchFields::getFields ( )
static

Return an array of all meta data fields.

Definition at line 78 of file class.ilLuceneAdvancedSearchFields.php.

References $fields, $lng, ilAdvancedMDFieldDefinition\_getDefinitionsByRecordId(), and ilAdvancedMDRecord\_getRecords().

Referenced by ilLuceneAdvancedSearchActivationTableGUI\parse(), ilLuceneAdvancedSearchSettings\read(), and ilObjSearchSettingsGUI\saveAdvancedLuceneSettingsObject().

{
global $lng;
$lng->loadLanguageModule('meta');
$fields = array(
'lom_content' => $lng->txt('content'),
//'lom_type' => $lng->txt('type'),
'lom_language' => $lng->txt('language'),
'lom_keyword' => $lng->txt('meta_keyword'),
'lom_coverage' => $lng->txt('meta_coverage'),
'lom_structure' => $lng->txt('meta_structure'),
'lom_status' => $lng->txt('meta_status'),
'lom_version' => $lng->txt('meta_version'),
'lom_contribute' => $lng->txt('meta_contribute'),
'lom_format' => $lng->txt('meta_format'),
'lom_operating_system' => $lng->txt('meta_operating_system'),
'lom_browser' => $lng->txt('meta_browser'),
'lom_interactivity' => $lng->txt('meta_interactivity_type'),
'lom_resource' => $lng->txt('meta_learning_resource_type'),
'lom_level' => $lng->txt('meta_interactivity_level'),
'lom_density' => $lng->txt('meta_semantic_density'),
'lom_user_role' => $lng->txt('meta_intended_end_user_role'),
'lom_context' => $lng->txt('meta_context'),
'lom_difficulty' => $lng->txt('meta_difficulty'),
'lom_costs' => $lng->txt('meta_cost'),
'lom_copyright' => $lng->txt('meta_copyright_and_other_restrictions'),
'lom_purpose' => $lng->txt('meta_purpose'),
'lom_taxon' => $lng->txt('meta_taxon')
);
// Append all advanced meta data fields
include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
foreach(ilAdvancedMDRecord::_getRecords() as $record)
{
foreach(ilAdvancedMDFieldDefinition::_getDefinitionsByRecordId($record->getRecordId()) as $def)
{
if($def->isSearchable())
{
$fields['adv_'.$def->getFieldId()] = $def->getTitle();
}
}
}
return $fields;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLuceneAdvancedSearchFields::getFormElement (   $a_query,
  $a_field_name 
)

Definition at line 139 of file class.ilLuceneAdvancedSearchFields.php.

References ilMDUtilSelect\_getBrowserSelect(), ilMDUtilSelect\_getContextSelect(), ilMDUtilSelect\_getCopyrightAndOtherRestrictionsSelect(), ilMDUtilSelect\_getCostsSelect(), ilMDUtilSelect\_getDifficultySelect(), ilMDUtilSelect\_getFormatSelect(), ilAdvancedMDFieldDefinition\_getInstanceByFieldId(), ilMDUtilSelect\_getIntendedEndUserRoleSelect(), ilMDUtilSelect\_getInteractivityLevelSelect(), ilMDUtilSelect\_getInteractivityTypeSelect(), ilMDUtilSelect\_getLanguageSelect(), ilMDUtilSelect\_getLearningResourceTypeSelect(), ilMDUtilSelect\_getOperatingSystemSelect(), ilMDUtilSelect\_getPurposeSelect(), ilMDUtilSelect\_getRoleSelect(), ilMDUtilSelect\_getSemanticDensitySelect(), ilMDUtilSelect\_getStatusSelect(), ilMDUtilSelect\_getStructureSelect(), getRangeSelect(), IL_CAL_UNIX, ilTextInputGUI\setValue(), ilAdvancedMDFieldDefinition\TYPE_DATE, ilAdvancedMDFieldDefinition\TYPE_DATETIME, ilAdvancedMDFieldDefinition\TYPE_SELECT, and ilAdvancedMDFieldDefinition\TYPE_TEXT.

{
include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
$a_post_name = 'query['.$a_field_name.']';
switch($a_field_name)
{
case 'lom_content':
$text = new ilTextInputGUI($this->active_fields[$a_field_name],$a_post_name);
$text->setSubmitFormOnEnter(true);
$text->setValue($a_query['lom_content']);
$text->setSize(30);
$text->setMaxLength(255);
return $text;
// General
case 'lom_language':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_language']);
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_keyword':
$text = new ilTextInputGUI($this->active_fields[$a_field_name],$a_post_name);
$text->setSubmitFormOnEnter(true);
$text->setValue($a_query['lom_keyword']);
$text->setSize(30);
$text->setMaxLength(255);
return $text;
case 'lom_coverage':
$text = new ilTextInputGUI($this->active_fields[$a_field_name],$a_post_name);
$text->setSubmitFormOnEnter(true);
$text->setValue($a_query['lom_coverage']);
$text->setSize(30);
$text->setMaxLength(255);
return $text;
case 'lom_structure':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_structure']);
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
// Lifecycle
case 'lom_status':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_status']);
$select->setOptions(ilMDUtilSelect::_getStatusSelect(
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_version':
$text = new ilTextInputGUI($this->active_fields[$a_field_name],$a_post_name);
$text->setSubmitFormOnEnter(true);
$text->setValue($a_query['lom_version']);
$text->setSize(30);
$text->setMaxLength(255);
return $text;
case 'lom_contribute':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],'query['.'lom_role'.']');
$select->setValue($a_query['lom_role']);
$select->setOptions(ilMDUtilSelect::_getRoleSelect(
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
$text = new ilTextInputGUI($this->lng->txt('meta_entry'),'query['.'lom_role_entry'.']');
$text->setValue($a_query['lom_role_entry']);
$text->setSize(30);
$text->setMaxLength(255);
$select->addSubItem($text);
return $select;
// Technical
case 'lom_format':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_format']);
$select->setOptions(ilMDUtilSelect::_getFormatSelect(
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_operating_system':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_operating_system']);
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_browser':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_browser']);
$select->setOptions(ilMDUtilSelect::_getBrowserSelect(
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
// Education
case 'lom_interactivity':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_interactivity']);
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_resource':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_resource']);
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_level':
$range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
$html = $this->getRangeSelect(
$this->lng->txt('from'),
$a_query['lom_level_start'],
'query['.'lom_level_start'.']',
array(0 => $this->lng->txt('search_any'))),
$this->lng->txt('until'),
$a_query['lom_level_end'],
'query['.'lom_level_end'.']',
array(0 => $this->lng->txt('search_any')))
);
$range->setHTML($html);
return $range;
case 'lom_density':
$range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
$html = $this->getRangeSelect(
$this->lng->txt('from'),
$a_query['lom_density_start'],
'query['.'lom_density_start'.']',
array(0 => $this->lng->txt('search_any'))),
$this->lng->txt('until'),
$a_query['lom_density_end'],
'query['.'lom_density_end'.']',
array(0 => $this->lng->txt('search_any')))
);
$range->setHTML($html);
return $range;
case 'lom_user_role':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_user_role']);
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_context':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_context']);
$select->setOptions(ilMDUtilSelect::_getContextSelect(
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_difficulty':
$range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
$html = $this->getRangeSelect(
$this->lng->txt('from'),
$a_query['lom_difficulty_start'],
'query['.'lom_difficulty_start'.']',
array(0 => $this->lng->txt('search_any'))),
$this->lng->txt('until'),
$a_query['lom_difficulty_end'],
'query['.'lom_difficulty_end'.']',
array(0 => $this->lng->txt('search_any')))
);
$range->setHTML($html);
return $range;
// Rights
case 'lom_costs':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_costs']);
$select->setOptions(ilMDUtilSelect::_getCostsSelect(
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_copyright':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_copyright']);
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
// Classification
case 'lom_purpose':
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query['lom_purpose']);
$select->setOptions(ilMDUtilSelect::_getPurposeSelect(
'',
$a_field_name,
array(0 => $this->lng->txt('search_any')),
true));
return $select;
case 'lom_taxon':
$text = new ilTextInputGUI($this->active_fields[$a_field_name],$a_post_name);
$text->setSubmitFormOnEnter(true);
$text->setValue($a_query['lom_taxon']);
$text->setSize(30);
$text->setMaxLength(255);
return $text;
default:
if(substr($a_field_name,0,3) != 'adv')
break;
// Advanced meta data
$field_id = substr($a_field_name,4);
include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
switch($field->getFieldType())
{
$text = new ilTextInputGUI($this->active_fields[$a_field_name],$a_post_name);
$text->setSubmitFormOnEnter(true);
$text->setValue($a_query[$a_field_name]);
$text->setSize(30);
$text->setMaxLength(255);
return $text;
$select = new ilSelectInputGUI($this->active_fields[$a_field_name],$a_post_name);
$select->setValue($a_query[$a_field_name]);
$select->setOptions($field->getFieldValuesForSearch());
return $select;
$check = new ilCheckboxInputGUI($this->active_fields[$a_field_name],$a_post_name);
$check->setValue(1);
$check->setChecked($a_query[$a_field_name]);
$time = new ilDateTimeInputGUI($this->lng->txt('from'),$a_field_name.'_start');
$time->setShowTime($field->getFieldType() != ilAdvancedMDFieldDefinition::TYPE_DATE);
$time->setDate(new ilDateTime(mktime(8,0,0,date('m'),date('d'),date('Y')),IL_CAL_UNIX));
$check->addSubItem($time);
$time = new ilDateTimeInputGUI($this->lng->txt('until'),$a_field_name.'_end');
$time->setShowTime($field->getFieldType() != ilAdvancedMDFieldDefinition::TYPE_DATE);
$time->setDate(new ilDateTime(mktime(16,0,0,date('m'),date('d'),date('Y')),IL_CAL_UNIX));
$check->addSubItem($time);
return $check;
}
}
return null;
}

+ Here is the call graph for this function:

static ilLuceneAdvancedSearchFields::getInstance ( )
static

Get singleton instance.

Definition at line 66 of file class.ilLuceneAdvancedSearchFields.php.

References $instance.

Referenced by ilLuceneAdvancedQueryParser\__construct(), ilLuceneSearchGUI\__construct(), __construct(), ilLuceneAdvancedSearchGUI\__construct(), and ilAdvancedSearchGUI\ilAdvancedSearchGUI().

{
if(isset(self::$instance) and self::$instance)
{
}
return self::$instance = new ilLuceneAdvancedSearchFields();
}

+ Here is the caller graph for this function:

ilLuceneAdvancedSearchFields::getRangeSelect (   $txt_from,
  $select_from,
  $txt_until,
  $select_until 
)
protected

get a range selection

Definition at line 822 of file class.ilLuceneAdvancedSearchFields.php.

References $tpl.

Referenced by getFormElement().

{
$tpl = new ilTemplate('tpl.range_search.html',true,true,'Services/Search');
$tpl->setVariable('TXT_FROM',$txt_from);
$tpl->setVariable('FROM',$select_from);
$tpl->setVariable('TXT_UPTO',$txt_until);
$tpl->setVariable('UPTO',$select_until);
return $tpl->get();
}

+ Here is the caller graph for this function:

ilLuceneAdvancedSearchFields::parseFieldQuery (   $a_field,
  $a_query 
)

Called from ilLuceneAdvancedQueryParser Parse a field specific query.

Definition at line 446 of file class.ilLuceneAdvancedSearchFields.php.

References $_POST, ilMDUtilSelect\_getDifficultySelect(), ilAdvancedMDFieldDefinition\_getInstanceByFieldId(), ilMDUtilSelect\_getInteractivityLevelSelect(), ilMDUtilSelect\_getSemanticDensitySelect(), IL_CAL_FKT_GETDATE, IL_CAL_UNIX, ilAdvancedMDFieldDefinition\TYPE_DATE, ilAdvancedMDFieldDefinition\TYPE_DATETIME, ilAdvancedMDFieldDefinition\TYPE_SELECT, and ilAdvancedMDFieldDefinition\TYPE_TEXT.

{
switch($a_field)
{
case 'lom_content':
return $a_query;
// General
case 'lom_language':
return 'lomLanguage:'.$a_query;
case 'lom_keyword':
return 'lomKeyword:'.$a_query;
case 'lom_coverage':
return 'lomCoverage:'.$a_query;
case 'lom_structure':
return 'lomStructure:'.$a_query;
// Lifecycle
case 'lom_status':
return 'lomStatus:'.$a_query;
case 'lom_version':
return 'lomVersion:'.$a_query;
// Begin Contribute
case 'lom_role':
return 'lomRole:'.$a_query;
case 'lom_role_entry':
return 'lomRoleEntity:'.$a_query;
// End contribute
// Technical
case 'lom_format':
return 'lomFormat:'.$a_query;
case 'lom_operating_system':
return 'lomOS:'.$a_query;
case 'lom_browser':
return 'lomBrowser:'.$a_query;
// Educational
case 'lom_interactivity':
return 'lomInteractivity:'.$a_query;
case 'lom_resource':
return 'lomResource:'.$a_query;
case 'lom_level_start':
$q_string = '';
include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
$options = ilMDUtilSelect::_getInteractivityLevelSelect(0,'lom_level',array(),true);
for($i = $a_query; $i <= count($options); $i++)
{
if(strlen($q_string))
{
$q_string .= 'OR ';
}
$q_string .= ('lomLevel:"'.$options[$i].'" ');
}
return $q_string;
case 'lom_level_end':
$q_string = '';
include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
$options = ilMDUtilSelect::_getInteractivityLevelSelect(0,'lom_level',array(),true);
for($i = 1; $i <= $a_query; $i++)
{
if(strlen($q_string))
{
$q_string .= 'OR ';
}
$q_string .= ('lomLevel:"'.$options[$i].'" ');
}
return $q_string;
case 'lom_density_start':
$q_string = '';
include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
$options = ilMDUtilSelect::_getSemanticDensitySelect(0,'lom_density',array(),true);
for($i = $a_query; $i <= count($options); $i++)
{
if(strlen($q_string))
{
$q_string .= 'OR ';
}
$q_string .= ('lomDensity:"'.$options[$i].'" ');
}
return $q_string;
case 'lom_density_end':
$q_string = '';
include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
$options = ilMDUtilSelect::_getSemanticDensitySelect(0,'lom_density',array(),true);
for($i = 1; $i <= $a_query; $i++)
{
if(strlen($q_string))
{
$q_string .= 'OR ';
}
$q_string .= ('lomDensity:"'.$options[$i].'" ');
}
return $q_string;
case 'lom_user_role':
return 'lomUserRole:'.$a_query;
case 'lom_context':
return 'lomContext:'.$a_query;
case 'lom_difficulty_start':
$q_string = '';
include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
$options = ilMDUtilSelect::_getDifficultySelect(0,'lom_difficulty',array(),true);
for($i = $a_query; $i <= count($options); $i++)
{
if(strlen($q_string))
{
$q_string .= 'OR ';
}
$q_string .= ('lomDifficulty:"'.$options[$i].'" ');
}
return $q_string;
case 'lom_difficulty_end':
$q_string = '';
include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
$options = ilMDUtilSelect::_getDifficultySelect(0,'lom_difficulty',array(),true);
for($i = 1; $i <= $a_query; $i++)
{
if(strlen($q_string))
{
$q_string .= 'OR ';
}
$q_string .= ('lomDifficulty:"'.$options[$i].'" ');
}
return $q_string;
// Rights
case 'lom_costs':
return 'lomCosts:'.$a_query;
case 'lom_copyright':
return 'lomCopyright:'.$a_query;
// Classification
case 'lom_purpose':
return 'lomPurpose:'.$a_query;
case 'lom_taxon':
return 'lomTaxon:'.$a_query;
default:
if(substr($a_field,0,3) != 'adv')
break;
// Advanced meta data
$field_id = substr($a_field,4);
include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
switch($field->getFieldType())
{
return 'advancedMetaData_'.$field_id.':'.$a_query;
$value = $_POST['adv_'.$field_id.'_start'];
$dt['year'] = (int) $value['date']['y'];
$dt['mon'] = (int) $value['date']['m'];
$dt['mday'] = (int) $value['date']['d'];
$dt['hours'] = (int) 0;
$dt['minutes'] = (int) 0;
$dt['seconds'] = (int) 0;
$date = new ilDate($dt,IL_CAL_FKT_GETDATE);
$ustart = $date->get(IL_CAL_UNIX);
$value = $_POST['adv_'.$field_id.'_end'];
$dt['year'] = (int) $value['date']['y'];
$dt['mon'] = (int) $value['date']['m'];
$dt['mday'] = (int) $value['date']['d'];
$dt['hours'] = (int) 0;
$dt['minutes'] = (int) 0;
$dt['seconds'] = (int) 0;
$date = new ilDate($dt,IL_CAL_FKT_GETDATE);
$uend = $date->get(IL_CAL_UNIX);
return 'advancedMetaData_'.$field_id.':{'.$ustart.' TO '.$uend.'}';
$value = $_POST['adv_'.$field_id.'_start'];
$dt['year'] = (int) $value['date']['y'];
$dt['mon'] = (int) $value['date']['m'];
$dt['mday'] = (int) $value['date']['d'];
$dt['hours'] = (int) $value['time']['h'];
$dt['minutes'] = (int) $value['time']['m'];
$dt['seconds'] = (int) 0;
$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE);
$ustart = $date->get(IL_CAL_UNIX);
$value = $_POST['adv_'.$field_id.'_end'];
$dt['year'] = (int) $value['date']['y'];
$dt['mon'] = (int) $value['date']['m'];
$dt['mday'] = (int) $value['date']['d'];
$dt['hours'] = (int) $value['time']['h'];
$dt['minutes'] = (int) $value['time']['m'];
$dt['seconds'] = (int) 0;
$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE);
$uend = $date->get(IL_CAL_UNIX);
return 'advancedMetaData_'.$field_id.':{'.$ustart.' TO '.$uend.'}';
}
break;
}
}

+ Here is the call graph for this function:

ilLuceneAdvancedSearchFields::readFields ( )
protected

Read active fields.

Definition at line 675 of file class.ilLuceneAdvancedSearchFields.php.

References $name.

Referenced by __construct().

{
foreach(self::getFields() as $name => $translation)
{
if($this->settings->isActive($name))
{
$this->active_fields[$name] = $translation;
}
}
}

+ Here is the caller graph for this function:

ilLuceneAdvancedSearchFields::readSections ( )
protected

Read active sections.

Definition at line 689 of file class.ilLuceneAdvancedSearchFields.php.

References ilAdvancedMDFieldDefinition\_getInstanceByFieldId(), ilAdvancedMDRecord\_lookupTitle(), and getActiveFields().

Referenced by __construct().

{
foreach($this->getActiveFields() as $field_name => $translation)
{
switch($field_name)
{
// Default section
case 'lom_content':
$this->active_sections['default']['fields'][] = 'lom_content';
$this->active_sections['default']['name'] = '';
break;
case 'lom_type':
$this->active_sections['default']['fields'][] = 'lom_type';
$this->active_sections['default']['name'] = '';
break;
// General
case 'lom_language':
$this->active_sections['general']['fields'][] = 'lom_language';
$this->active_sections['general']['name'] = $this->lng->txt('meta_general');
break;
case 'lom_keyword':
$this->active_sections['general']['fields'][] = 'lom_keyword';
$this->active_sections['general']['name'] = $this->lng->txt('meta_general');
break;
case 'lom_coverage':
$this->active_sections['general']['fields'][] = 'lom_coverage';
$this->active_sections['general']['name'] = $this->lng->txt('meta_general');
break;
case 'lom_structure':
$this->active_sections['general']['fields'][] = 'lom_structure';
$this->active_sections['general']['name'] = $this->lng->txt('meta_general');
break;
// Lifecycle
case 'lom_status':
$this->active_sections['lifecycle']['fields'][] = 'lom_status';
$this->active_sections['lifecycle']['name'] = $this->lng->txt('meta_lifecycle');
break;
case 'lom_version':
$this->active_sections['lifecycle']['fields'][] = 'lom_version';
$this->active_sections['lifecycle']['name'] = $this->lng->txt('meta_lifecycle');
break;
case 'lom_contribute':
$this->active_sections['lifecycle']['fields'][] = 'lom_contribute';
$this->active_sections['lifecycle']['name'] = $this->lng->txt('meta_lifecycle');
break;
// Technical
case 'lom_format':
$this->active_sections['technical']['fields'][] = 'lom_format';
$this->active_sections['technical']['name'] = $this->lng->txt('meta_technical');
break;
case 'lom_operating_system':
$this->active_sections['technical']['fields'][] = 'lom_operating_system';
$this->active_sections['technical']['name'] = $this->lng->txt('meta_technical');
break;
case 'lom_browser':
$this->active_sections['technical']['fields'][] = 'lom_browser';
$this->active_sections['technical']['name'] = $this->lng->txt('meta_technical');
break;
// Education
case 'lom_interactivity':
$this->active_sections['education']['fields'][] = 'lom_interactivity';
$this->active_sections['education']['name'] = $this->lng->txt('meta_education');
break;
case 'lom_resource':
$this->active_sections['education']['fields'][] = 'lom_resource';
$this->active_sections['education']['name'] = $this->lng->txt('meta_education');
break;
case 'lom_level':
$this->active_sections['education']['fields'][] = 'lom_level';
$this->active_sections['education']['name'] = $this->lng->txt('meta_education');
break;
case 'lom_density':
$this->active_sections['education']['fields'][] = 'lom_density';
$this->active_sections['education']['name'] = $this->lng->txt('meta_education');
break;
case 'lom_user_role':
$this->active_sections['education']['fields'][] = 'lom_user_role';
$this->active_sections['education']['name'] = $this->lng->txt('meta_education');
break;
case 'lom_context':
$this->active_sections['education']['fields'][] = 'lom_context';
$this->active_sections['education']['name'] = $this->lng->txt('meta_education');
break;
case 'lom_difficulty':
$this->active_sections['education']['fields'][] = 'lom_difficulty';
$this->active_sections['education']['name'] = $this->lng->txt('meta_education');
break;
// Rights
case 'lom_costs':
$this->active_sections['rights']['fields'][] = 'lom_costs';
$this->active_sections['rights']['name'] = $this->lng->txt('meta_rights');
break;
case 'lom_copyright':
$this->active_sections['rights']['fields'][] = 'lom_copyright';
$this->active_sections['rights']['name'] = $this->lng->txt('meta_rights');
break;
// Classification
case 'lom_purpose':
$this->active_sections['classification']['fields'][] = 'lom_purpose';
$this->active_sections['classification']['name'] = $this->lng->txt('meta_classification');
break;
case 'lom_taxon':
$this->active_sections['classification']['fields'][] = 'lom_taxon';
$this->active_sections['classification']['name'] = $this->lng->txt('meta_classification');
break;
default:
if(substr($field_name,0,3) != 'adv')
break;
// Advanced meta data
$field_id = substr($field_name,4);
include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
$record_id = $field->getRecordId();
$this->active_sections['adv_record_'.$record_id]['fields'][] = $field_name;
$this->active_sections['adv_record_'.$record_id]['name'] = ilAdvancedMDRecord::_lookupTitle($record_id);
break;
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilLuceneAdvancedSearchFields::$active_fields = array()
private

Definition at line 44 of file class.ilLuceneAdvancedSearchFields.php.

ilLuceneAdvancedSearchFields::$active_sections = array()
private

Definition at line 47 of file class.ilLuceneAdvancedSearchFields.php.

ilLuceneAdvancedSearchFields::$fields = null
staticprivate

Definition at line 43 of file class.ilLuceneAdvancedSearchFields.php.

Referenced by getFields().

ilLuceneAdvancedSearchFields::$instance = null
staticprivate

Definition at line 38 of file class.ilLuceneAdvancedSearchFields.php.

Referenced by getInstance().

ilLuceneAdvancedSearchFields::$lng = null
protected

Definition at line 41 of file class.ilLuceneAdvancedSearchFields.php.

Referenced by __construct(), and getFields().

ilLuceneAdvancedSearchFields::$sections = null
staticprivate

Definition at line 46 of file class.ilLuceneAdvancedSearchFields.php.

ilLuceneAdvancedSearchFields::$settings = null
private

Definition at line 39 of file class.ilLuceneAdvancedSearchFields.php.


The documentation for this class was generated from the following file: