Tariqa
3.0
|
Public Member Functions | |
__construct ($newsConfig) | |
listArticles ($query) | |
getArticle ($article_id) | |
newsSection ($flavour, $filtering, $flavour_query) | |
multiAjaxSearch ($query, $from, $count, $startDate=null, $endDate=null) | |
getSavePost ($query_txt, $query, $start_date=null, $end_date=null, $additional_parameters=array()) | |
Static Public Member Functions | |
static | listChannels () |
static | addCuepoint ($idx, $doc, $words) |
Data Fields | |
const | CHANNEL_AJL = 'al-jazeera' |
const | CHANNEL_EN = 'euronews' |
const | CHANNEL_BBC = 'bbc' |
const | CHANNEL_F24FR = 'france24-fr' |
const | VOICE_MATCH = 'voice' |
const | TEXT_MATCH = 'text' |
const | TIMEZONE = 'Europe/Brussels' |
const | IDOL_URL = 'http://s-relex-crisis:9000/' |
const | IDOL_HOST = 's-relex-crisis' |
const | ARCHIVE_URL = 'https://webgate.ec.europa.eu/tariqa/archive/' |
const | HOTFOLDERS_LOCATION = "\\\\s-relex-crisis\\hotfolders$" |
Static Public Attributes | |
static | $channel_names |
Protected Member Functions | |
splitId ($id) | |
getImgIdx ($times, $time, $start=0) | |
highlight ($text, $data, $template, $img_idx, $section, $text_type=self::VOICE_MATCH, $others=null) | |
getDocumentSummary ($article, $path, $img_url, $img_onclick, $template= 'virage.html') | |
getDocumentSummaryTest ($article) | |
getFirstMatch ($doc) | |
createSubtitle ($document) | |
Static Protected Member Functions | |
static | headlineCompare ($h1, $h2) |
Protected Attributes | |
$app_config |
Base class for fetching the news results from the Virage engine
__construct | ( | $ | newsConfig | ) |
Constructs the object
array | $newsConfig | The news configuration array public |
Reimplemented from searchEngine.
static addCuepoint | ( | $ | idx, |
$ | doc, | ||
$ | words | ||
) | [static] |
Used for adding the javascript code for one match in the text
int | $idx | The match index in the text |
VirageDocument | $doc | The virage document |
int | $words | the number of words before and after the match |
public
createSubtitle | ( | $ | document | ) | [protected] |
Creates a subtitle for a document
VirageDocument | $document | The virage document protected |
getArticle | ( | $ | article_id | ) |
Gets a specific article
string | $article_id | The article identifier public |
Reimplemented from searchEngine.
getDocumentSummary | ( | $ | article, |
$ | path, | ||
$ | img_url, | ||
$ | img_onclick, | ||
$ | template = 'virage.html' |
||
) | [protected] |
Gets the document summary
VirageDocument | $article | The Virage document |
string | $app_path | The path to the application |
string | $img_url | The image URL |
string | $img_onclick | The onclick part of the images protected |
getDocumentSummaryTest | ( | $ | article | ) | [protected] |
Gets the documents summary for testing purposes
VirageDocument | $article | The Virage document protected |
getFirstMatch | ( | $ | doc | ) | [protected] |
getImgIdx | ( | $ | times, |
$ | time, | ||
$ | start = 0 |
||
) | [protected] |
Gets the last image frame before a time key. Returns the index
array | $times | The images times |
int | $time | The time to search |
int | $start | Start from... [OPTIONAL] protected |
getSavePost | ( | $ | query_txt, |
$ | query, | ||
$ | start_date = null , |
||
$ | end_date = null , |
||
$ | additional_parameters = array() |
||
) |
Gets the POST data used for saving a search in the briefcase
string | $query_txt | The query string text |
Query | $query | The query |
int | $start_date | The start date (unix timestamp) [OPTIONAL] |
int | $end_date | The end date (unix timestamp) [OPTIONAL] |
array | $additional_parameters | Additional parameters [OPTIONAL] public |
Reimplemented from searchEngine.
static headlineCompare | ( | $ | h1, |
$ | h2 | ||
) | [static, protected] |
Used for comparing two headlines by their time
array | $h1 | The first headline |
array | $h2 | The second headline |
protected
highlight | ( | $ | text, |
$ | data, | ||
$ | template, | ||
$ | img_idx, | ||
$ | section, | ||
$ | text_type = self::VOICE_MATCH , |
||
$ | others = null |
||
) | [protected] |
Generates a new text highlight and adds it to the existing highlights
string | $text | The text |
array | $data | The existing highlights |
string | $template | The template for which the highlights are designed (search results or article page) |
int | $img_idx | The corresponding thumbnail index |
string | $section | The document section |
string | $text_type | The type of text (voice match or text match) [OPTIONAL] |
array | $others | Other highlights for the current highlight [OPTIONAL] protected |
listArticles | ( | $ | query | ) |
Fetches a list of articles
newsQuery | $query | The query public |
Reimplemented from searchEngine.
static listChannels | ( | ) | [static] |
Gets the channels list
public
multiAjaxSearch | ( | $ | query, |
$ | from, | ||
$ | count, | ||
$ | startDate = null , |
||
$ | endDate = null |
||
) |
Gets the multi ajax search object
string | $query | The query string |
int | $from | The first result to display |
int | $count | The number of results to display |
DateTime | $startDate | The start date [OPTIONAL] |
DateTime | $endDate | The end date [OPTIONAL] public |
Reimplemented from searchEngine.
newsSection | ( | $ | flavour, |
$ | filtering, | ||
$ | flavour_query | ||
) |
Gets the multi ajax search object for any page but the search page. For example country pages, home page, news wires page etc.
Flavour | $flavour | The flavour |
array | $filtering | The filtering data |
Query | $flavour_query | The flavour current query public |
splitId | ( | $ | id | ) | [protected] |
Splits an id into document id and searched terms
string | $id | The document id protected |
$app_config [protected] |
$channel_names [static] |
array( 'al-jazeera' => 'Al Jazeera English', 'euronews' => 'Euro News', 'bbc' => 'BBC World News', 'france24-fr' => 'France 24 (French)', )
const ARCHIVE_URL = 'https://webgate.ec.europa.eu/tariqa/archive/' |
const CHANNEL_AJL = 'al-jazeera' |
const CHANNEL_BBC = 'bbc' |
const CHANNEL_EN = 'euronews' |
const CHANNEL_F24FR = 'france24-fr' |
const HOTFOLDERS_LOCATION = "\\\\s-relex-crisis\\hotfolders$" |
const IDOL_HOST = 's-relex-crisis' |
const IDOL_URL = 'http://s-relex-crisis:9000/' |
const TEXT_MATCH = 'text' |
const TIMEZONE = 'Europe/Brussels' |
const VOICE_MATCH = 'voice' |