Inheritance diagram for ilLuceneRPCAdapter:
Collaboration diagram for ilLuceneRPCAdapter:Public Member Functions | |
| ilLuceneRPCAdapter () | |
| setMode ($a_mode) | |
| getMode () | |
| setFiles (&$files) | |
| & | getFiles () |
| setHTLMs (&$htlms) | |
| & | getHTLMs () |
| setQueryString ($a_str) | |
| getQueryString () | |
| setSearchFilter ($a_filter) | |
| getSearchFilter () | |
| __getClientId () | |
| Create a unique client id. | |
| send () | |
| Send message to remote rpc server and get response. | |
| __prepareQueryParams () | |
| __preparePingParams () | |
| __prepareIndexFileParams () | |
| __prepareIndexHTLMParams () | |
| __prepareFlushIndex () | |
Data Fields | |
| $mode = '' | |
| $files = array() | |
| $query_str = '' | |
| $filter = '' | |
Definition at line 35 of file class.ilLuceneRPCAdapter.php.
| ilLuceneRPCAdapter::__getClientId | ( | ) |
Create a unique client id.
Since the lucene index can be used from multiple ILIAS-Installations it must be unique over installations
Definition at line 96 of file class.ilLuceneRPCAdapter.php.
References $ilias.
Referenced by __prepareFlushIndex(), __prepareIndexFileParams(), __prepareIndexHTLMParams(), __preparePingParams(), and __prepareQueryParams().
{
global $ilias;
// TODO: handle problem if nic_key isn't set
return $ilias->getSetting('nic_key').'_'.CLIENT_ID;
}
Here is the caller graph for this function:| ilLuceneRPCAdapter::__prepareFlushIndex | ( | ) |
Definition at line 186 of file class.ilLuceneRPCAdapter.php.
References __getClientId(), and ilRPCServerAdapter::__initMessage().
Referenced by send().
{
$this->__initMessage('Indexer.ilClearIndex',array(new XML_RPC_Value($this->__getClientId(),"string")));
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLuceneRPCAdapter::__prepareIndexFileParams | ( | ) |
Definition at line 160 of file class.ilLuceneRPCAdapter.php.
References $obj_id, $params, __getClientId(), ilRPCServerAdapter::__initMessage(), and getFiles().
Referenced by send().
{
foreach($this->getFiles() as $obj_id => $fname)
{
$struct[$obj_id] = new XML_RPC_Value($fname,"string");
}
$params = array(new XML_RPC_Value($this->__getClientId(),"string"),
new XML_RPC_Value($struct,"struct"));
$this->__initMessage('Indexer.ilFileIndexer',$params);
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLuceneRPCAdapter::__prepareIndexHTLMParams | ( | ) |
Definition at line 174 of file class.ilLuceneRPCAdapter.php.
References $obj_id, __getClientId(), ilRPCServerAdapter::__initMessage(), and getHTLMs().
Referenced by send().
{
foreach($this->getHTLMs() as $obj_id => $fname)
{
$struct[$obj_id] = new XML_RPC_Value($fname,"string");
}
$this->__initMessage('Indexer.ilHTLMIndexer',array(new XML_RPC_Value($this->__getClientId(),"string"),
new XML_RPC_Value($struct,"struct")));
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLuceneRPCAdapter::__preparePingParams | ( | ) |
Definition at line 153 of file class.ilLuceneRPCAdapter.php.
References __getClientId(), and ilRPCServerAdapter::__initMessage().
Referenced by send().
{
$this->__initMessage('Searcher.ilPing',array(new XML_RPC_Value($this->__getClientId(),"string")));
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLuceneRPCAdapter::__prepareQueryParams | ( | ) |
Definition at line 139 of file class.ilLuceneRPCAdapter.php.
References $filter, __getClientId(), ilRPCServerAdapter::__initMessage(), getQueryString(), and getSearchFilter().
Referenced by send().
{
$filter = array();
foreach($this->getSearchFilter() as $obj_type)
{
$filter[] = new XML_RPC_Value($obj_type,'string');
}
$this->__initMessage('Searcher.ilSearch',array(new XML_RPC_Value($this->__getClientId(),"string"),
new XML_RPC_Value($this->getQueryString(),"string"),
new XML_RPC_Value($filter,'array')));
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| & ilLuceneRPCAdapter::getFiles | ( | ) |
Definition at line 60 of file class.ilLuceneRPCAdapter.php.
Referenced by __prepareIndexFileParams().
{
return $this->files ? $this->files : array();
}
Here is the caller graph for this function:| & ilLuceneRPCAdapter::getHTLMs | ( | ) |
Definition at line 68 of file class.ilLuceneRPCAdapter.php.
Referenced by __prepareIndexHTLMParams().
{
return $this->htlms;
}
Here is the caller graph for this function:| ilLuceneRPCAdapter::getMode | ( | ) |
Definition at line 52 of file class.ilLuceneRPCAdapter.php.
Referenced by send().
{
return $this->mode;
}
Here is the caller graph for this function:| ilLuceneRPCAdapter::getQueryString | ( | ) |
Definition at line 77 of file class.ilLuceneRPCAdapter.php.
Referenced by __prepareQueryParams().
{
return $this->query_str;
}
Here is the caller graph for this function:| ilLuceneRPCAdapter::getSearchFilter | ( | ) |
Definition at line 86 of file class.ilLuceneRPCAdapter.php.
Referenced by __prepareQueryParams().
{
return $this->filter ? $this->filter : array();
}
Here is the caller graph for this function:| ilLuceneRPCAdapter::ilLuceneRPCAdapter | ( | ) |
Definition at line 43 of file class.ilLuceneRPCAdapter.php.
References ilRPCServerAdapter::ilRPCServerAdapter().
{
parent::ilRPCServerAdapter();
}
Here is the call graph for this function:| ilLuceneRPCAdapter::send | ( | ) |
Send message to remote rpc server and get response.
protected
Reimplemented from ilRPCServerAdapter.
Definition at line 106 of file class.ilLuceneRPCAdapter.php.
References ilRPCServerAdapter::__initClient(), __prepareFlushIndex(), __prepareIndexFileParams(), __prepareIndexHTLMParams(), __preparePingParams(), __prepareQueryParams(), and getMode().
{
$this->__initClient();
switch($this->getMode())
{
case 'ping':
$this->__preparePingParams();
break;
case 'file':
$this->__prepareIndexFileParams();
break;
case 'query':
$this->__prepareQueryParams();
break;
case 'htlm':
$this->__prepareIndexHTLMParams();
break;
case 'flush':
$this->__prepareFlushIndex();
break;
default:
$this->log->write('ilLuceneRPCHandler(): No valid mode given');
return false;
}
return parent::send();
}
Here is the call graph for this function:| ilLuceneRPCAdapter::setFiles | ( | &$ | files | ) |
Definition at line 56 of file class.ilLuceneRPCAdapter.php.
References $files.
{
$this->files =& $files;
}
| ilLuceneRPCAdapter::setHTLMs | ( | &$ | htlms | ) |
Definition at line 64 of file class.ilLuceneRPCAdapter.php.
{
$this->htlms = $htlms;
}
| ilLuceneRPCAdapter::setMode | ( | $ | a_mode | ) |
Definition at line 48 of file class.ilLuceneRPCAdapter.php.
{
$this->mode = $a_mode;
}
| ilLuceneRPCAdapter::setQueryString | ( | $ | a_str | ) |
Definition at line 73 of file class.ilLuceneRPCAdapter.php.
{
$this->query_str = $a_str;
}
| ilLuceneRPCAdapter::setSearchFilter | ( | $ | a_filter | ) |
Definition at line 82 of file class.ilLuceneRPCAdapter.php.
{
$this->filter = $a_filter;
}
| ilLuceneRPCAdapter::$files = array() |
Definition at line 38 of file class.ilLuceneRPCAdapter.php.
Referenced by setFiles().
| ilLuceneRPCAdapter::$filter = '' |
Definition at line 40 of file class.ilLuceneRPCAdapter.php.
Referenced by __prepareQueryParams().
| ilLuceneRPCAdapter::$mode = '' |
Definition at line 37 of file class.ilLuceneRPCAdapter.php.
| ilLuceneRPCAdapter::$query_str = '' |
Definition at line 39 of file class.ilLuceneRPCAdapter.php.
1.7.1