<?php
require_once 'demosettings.php';
	/*$dropdownArr = array("counted_theatre"=>"Theatre",
								"ideological_stream"=>"Political Orientation",
								"islamic_sect"=>"Religious Sect",
								"languages"=>"Language",								
								"domain"=>"Domain",
								"document_topic"=>"Topic");*/

	$dropdownArr = array("document_topic"=>"Topic",
						 "counted_theatre"=>"Theatre",						 
						 "languages"=>"Language",
	                      "lang"=>"Lang",
						 "file_author" => "Author",						 
						 "file_format"=>"File Format",
						 "file_type"=>"File Type",
						 "from_field"=>"from",
						 "to_field"=>"to",
						 "cc_field"=>"cc",
						 "bcc_field"=>"bcc",
						 "subject_field"=>"subject",
						 "date_field"=>"Date Field",
						 "emailid"=>"Email Id",
	                      "filetags" => "Tags",
	                       "emotion" => "Emotion"
	);
	
	$all_search_pies = array(
	    "document_topic"=>"Topic",
	    "languages"=>"Language"
	               );
	
	/*Don't add here names without checking they are not already in the DB talbes*/
	$dropdownArrMaxMapping = /* table-name to the table-holding-the-caption mapping by docID - using max-value on the origin */
	array("user_followers_count"=>"user_screen_name",
	      "user_favourites_count"=>"user_screen_name",
	      "user_friends_count"=>"user_screen_name",
	      "user_listed_count"=>"user_screen_name",
	      "user_statuses_count"=>"user_screen_name",
	    "reply_count"=>"user_screen_name",
	    "retweet_count"=>"user_screen_name"
	);
	
	/*Don't add here names without checking they are not already in the DB talbes*/
	$dropdownArrCaptionMapping = /* table-name to the table-holding-the-caption mapping by docID - using value on the origin */
	array("topic"=>"",
	    "user_geo_enabled"=>"",
	    "t_id"=>"",
	    "tv_parent_author"=>"",
	    "user_created_at"=>"",
	    "user_id_str"=>"",
	    "user_translator_type"=>"",
	    "user_listed_count"=>"",
	    "t_post_interactions"=>"t_id"
	);
	
//json twitter fields for SOLR
	$dropdownArrSolr = 
	array("user_url",
	    "user_name",
	    "user_location",
	    "user_description",
	    "user_screen_name",
	    "place_full_name",
	    "hashtag",
	"twitter_place",
	    "filename"
	);
	
	if (!$isLegal){
		$dropdownArr = array_merge(array("threat_rating"=>"Priority",
			  "islamic_sect"=>"Religious Sect",
			  "ideological_stream"=>"Political Orientation"),$dropdownArr);
	}
	
	$dropdownArr = array_merge($dropdownArr, $extraColumns);
	
	/*$aggregationArr["ideological_stream"]["All Mainstream"][] = "Moderate or reformist Islam";
	$aggregationArr["ideological_stream"]["All Mainstream"][] = "Mainstream Islam";
	$aggregationArr["ideological_stream"]["All Mainstream"][] = "Traditional Shiite Islam";
	$aggregationArr["ideological_stream"]["All Radical"][] = "Wahhabi";
	$aggregationArr["ideological_stream"]["All Radical"][] = "Jihadi-Salafi";
	$aggregationArr["ideological_stream"]["All Radical"][] = "Salafi";	
	$aggregationArr["ideological_stream"]["All Radical"][] = "Ikhwani (Muslim Brotherhood)";
	$aggregationArr["ideological_stream"]["All Radical"][] = "Radical";
	$aggregationArr["ideological_stream"]["All Radical"][] = "Radical Iranian Shiite";		
	$aggregationArr["ideological_stream"]["All Radical"][] = "Unaffiliated-shiite-radical-stream";	
	$aggregationArr["ideological_stream"]["None"][] = "None";
	
	$aggregationArr["add_to_table"]["t_age"]["<34"] = "Young Age (less then 34)";
	$aggregationArr["add_to_table"]["t_age"][">33"] = "Old Age (More then 33)";*/
	
	$entitiesTypeToTable = array(
	    "person" => 'person_object',
	    "persons" => 'person_object',
	    "org"=> 'organizational_identity',
	    "organisation" => 'organizational_identity',
	    "organisations" => 'organizational_identity',
	    "organization" => "organizational_identity",
	    "place" => 'place_object' ,
	    "places" => 'place_object' ,
	    'event' => "event",
	    'events' => "event",   
	    'idea'=>'abstract_idea_entity'
	);
	
	$entitiesArray = array(
	    'person_object' => "person",
	    'organizational_identity' => "org",
	    'place_object' => "place",
	    'event' => "event",
	    'abstract_idea_entity'=>'idea'
	);
	
	$manageEntitiesArray = array(
	    'person_object' => "persons",
	    'organizational_identity' => "organisations",
	    'place_object' => "places",
	    'event' => "events"
	);
	
	
	
	
	