Exemplo n.º 1
0
 /**
  * Create Worldcat Search Engine
  */
 public function __construct($role, $source)
 {
     parent::__construct();
     $config_key = $this->config->getConfig("WORLDCAT_API_KEY", true);
     $config_always_guest = $this->config->getConfig("WORLDCAT_SEARCH_AS_GUEST", false);
     // worldcat search object
     $this->worldcat_client = new Worldcat($config_key, Factory::getHttpClient());
     $this->group = new ConfigGroup();
     // if user is a guest, make it open, and return it pronto, since we
     // can't use the limiters below
     if ($role == "guest" || $config_always_guest != null) {
         $this->worldcat_client->setServiceLevel("default");
     } elseif ($source != "") {
         $this->group = $this->config->getWorldcatGroup($source);
         // no workset grouping, please
         if ($this->group->frbr == "false") {
             $this->worldcat_client->setWorksetGroupings(false);
         }
         // limit to certain libraries
         if ($this->group->libraries_include != null) {
             $this->worldcat_client->limitToLibraries($this->group->libraries_include);
         }
         // exclude certain libraries
         if ($this->group->libraries_exclude != null) {
             $this->worldcat_client->excludeLibraries($this->group->libraries_exclude);
         }
         // limit results to specific document types; a limit entry will
         // take presidence over any format specifically excluded
         if ($this->group->limit_material_types != null) {
             $this->worldcat_client->limitToMaterialType($this->group->limit_material_types);
         } elseif ($this->group->exclude_material_types != null) {
             $this->worldcat_client->excludeMaterialType($this->group->exclude_material_types);
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     // server address
     $this->server = $this->config->getConfig('SOLR', true);
     $this->server = rtrim($this->server, '/');
     $this->server .= "/select/?version=2.2";
 }
Exemplo n.º 3
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $id = $this->config->getConfig("SUMMON_ID", true);
     $key = $this->config->getConfig("SUMMON_KEY", true);
     $this->summon_client = new Summon($id, $key, Factory::getHttpClient());
     // formats to exclude
     $this->formats_exclude = explode(',', $this->config->getConfig("EXCLUDE_FORMATS"));
 }
Exemplo n.º 4
0
 /**
  * Constructor
  */
 public function __construct($on_campus = true, $scope = "")
 {
     parent::__construct();
     // server info
     $this->server = $this->config->getConfig('PRIMO_ADDRESS', true);
     $this->server = rtrim($this->server, '/');
     // institutional id's
     $this->institution = $this->config->getConfig('INSTITUTION', true);
     $this->vid = $this->config->getConfig('VID', false);
     // scope
     $loc = $this->config->getConfig('LOC', false, $scope);
     if ($loc != "") {
         $this->loc = explode(";", $loc);
     }
     // on campus
     $this->on_campus = $on_campus;
 }
Exemplo n.º 5
0
 /**
  * New Savd Records Engine
  */
 public function __construct()
 {
     parent::__construct();
     $this->datamap = new SavedRecords();
 }
Exemplo n.º 6
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->username = $this->config->getConfig("EBSCO_USERNAME");
     $this->password = $this->config->getConfig("EBSCO_PASSWORD");
 }
Exemplo n.º 7
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     // formats to exclude
     $this->formats_exclude = explode(',', $this->config->getConfig("EXCLUDE_FORMATS"));
 }
Exemplo n.º 8
0
 /**
  * New EDS Engine
  * 
  * @param $session  session information
  */
 public function __construct($session = "")
 {
     parent::__construct();
     $this->client = new HttpClient();
 }
Exemplo n.º 9
0
 /**
  * Create new Google Appliance Search Engine
  */
 public function __construct()
 {
     parent::__construct();
     $this->server = $this->config->getConfig('google_address', true);
     $this->server = rtrim($this->server, '/');
 }