function getPIDs($articleMetadataServer, $articleDomain)
 {
     $articleServices = new ArticleService($articleMetadataServer, $articleDomain);
     $tmp =& $this->domLiteDocument->getElementsByPath("//similarlist/similar");
     for ($i = 0; $i < $tmp->getLength(); $i++) {
         $item = $tmp->item($i);
         $pid = $item->getText();
         $relevance = $this->getNodeAttribute($item, 's');
         $articleServices->setParams($pid);
         $article = $articleServices->getArticle();
         $article->setPID($pid);
         $article->setRelevance($relevance);
         $articles[] = $article;
     }
     return $articles;
 }
Ejemplo n.º 2
0
fazendo a consistencia de usuário logado/não logado
*/
if($_data['userID']){
/*
a url do serviço que retorna os meta-dados do artigo
é o domínio de onde o usuário esta vendo o artigo
*/
	$domain = str_replace("http://","",$_data['url']);
	$domain = substr($domain,0,strpos($domain,"/"));

/*
chamando o serviço (ele devolve um objeto Article)
*/
	$articleService = new ArticleService($domain);

	$articleService->setParams($_data['PID']);

	$article = 	$articleService->getArticle();

	$article->setURL($domain);

//die(var_dump($article->getPID()));

	$article->addArticle();

	$shelf = new Shelf();

	$shelf->setUserID($_data['userID']);
	$shelf->setPID($_data['PID']);
	$shelf->setCitedStat($_data['cited_stat']);
Ejemplo n.º 3
0
$DirNameLocalGraphPage = dirname(__FILE__) . '/';
require_once $DirNameLocalGraphPage . "../../users/functions.php";
require_once $DirNameLocalGraphPage . "../../users/langs.php";
require_once $DirNameLocalGraphPage . "../../../../php/include.php";
require_once $DirNameLocalGraphPage . "../../classes/services/ArticleServices.php";
require_once dirname(__FILE__) . "/../../classes/services/AccessServiceBar.php";
require_once dirname(__FILE__) . "/../../classes/Open_Flash_Chart/ofc-library/open_flash_chart_object.php";
$DirHtml = $DirNameLocalGraphPage . "../html/" . $lang . "/";
$site = parse_ini_file($DirNameLocalGraphPage . "/../../../../ini/" . $lang . "/bvs.ini", true);
$scielodef = parse_ini_file($DirNameLocalGraphPage . "/../../scielo.def.php", true);
$scielomaindef = parse_ini_file($DirNameLocalGraphPage . "/../../../../scielo.def.php", true);
$pid = $_REQUEST['pid'];
$caller = $_REQUEST["caller"];
$articleService = new ArticleService($caller);
$articleService->setParams($pid);
$article = $articleService->getArticle();
$accessService = new AccessService();
$accessService->setParam('pid', $_REQUEST['pid']);
$accessService->setParam('app', $scielomaindef["SITE_INFO"][APP_NAME]);
$years = array();
$years = $accessService->getYears($accessService->getStats());
$yearsLastIndex = count($years) - 1;
$startYear = $_REQUEST['startYear'] ? $_REQUEST['startYear'] : $years[$yearsLastIndex];
$lastYear = $_REQUEST['lastYear'] ? $_REQUEST['lastYear'] : $years[$yearsLastIndex];
?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">