public function view($term, $pageID)
 {
     //require_once  'JsonClientUtil.php';
     require_once 'ServiceUtil.php';
     require_once 'Config.php';
     $myConfig = new Config();
     $myConfig->loadJsonConfig($data);
     $util = new ServiceUtil();
     $data['test'] = NULL;
     $term = str_replace("_", "%20", $term);
     //$term = str_replace("/", "%2F", $term);
     $startPoint = ($pageID - 1) * 20;
     $result = $util->expandTerm($term);
     $terms = $util->parseExpandedTerm($result, $term);
     //$litResult = searchLiteratureByYearUsingSolr($terms,$startPoint,20,"*",$year);
     $litResult = $util->searchLatestLiterature($terms, $startPoint, 20, "*", "*");
     $data['publications'] = $litResult;
     $data['term'] = $term;
     $data['pageID'] = $pageID;
     $data['page_title'] = "Literature:" . str_replace("%20", " ", $term);
     $data['enable_config'] = true;
     $this->load->view('templates/header2', $data);
     $this->load->view('pages/latestPublicationDisplay', $data);
     $this->load->view('templates/footer2', $data);
 }
 private function handleLiterature(&$data, $searchName)
 {
     //echo "--------handleLiterature-------searchName:".$searchName;
     require_once 'ServiceUtil.php';
     date_default_timezone_set("America/New_York");
     //echo "Year----".date("Y");
     $util = new ServiceUtil();
     $result = $util->expandTerm($searchName);
     $terms = $util->parseExpandedTerm($result, $searchName);
     //echo "<br/>----------------------Terms:".$terms;
     $latestResult = $util->searchLatestLiterature($terms, 0, 5, "*", "*");
     $litResult = $util->searchLiteratureByYearUsingSolr($terms, 0, 25000000, "year", "*");
     //$data['litResult'] = $litResult;
     $litMap = $util->processLiteratureObj2($litResult);
     $data['latestResult'] = $latestResult;
     $data['litSearchTerms'] = $terms;
     //var_dump($litMap);
     $data['litMap'] = $litMap;
     $count = count($litMap);
     $data['count'] = $count;
 }
 private function handleLiterature(&$data, $searchName)
 {
     require_once 'ServiceUtil.php';
     $util = new ServiceUtil();
     $result = expandTerm($searchName);
     $terms = parseExpandedTerm($result, $searchName);
     $latestResult = $util->searchLatestLiterature($terms, 0, 5, "*", "*");
     $litResult = searchLiteratureByYearUsingSolr($terms, 0, 25000000, "year", "*");
     //$data['litResult'] = $litResult;
     $litMap = processLiteratureObj2($litResult);
     $data['latestResult'] = $latestResult;
     $data['litSearchTerms'] = $terms;
     //var_dump($litMap);
     $data['litMap'] = $litMap;
     $count = count($litMap);
     $data['count'] = $count;
 }