VuFind API Documentation

Backend extends AbstractBackend
in package

EDS API Backend

Tags
category

VuFind

author

Michelle Milton mmilton@epnet.com

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link
https://vufind.org

Table of Contents

$authManager  : Manager
VuFind Authentication manager
$backendType  : string
Backend type
$cache  : StorageInterface
Object cache (for storing authentication tokens)
$client  : Connector
Client user to make the actually requests to the EdsApi
$collectionFactory  : RecordCollectionFactoryInterface
Record collection factory.
$defaultProfile  : string
Default profile for EBSCO EDS API account (taken from initial config and never changed)
$identifier  : string
Backend identifier.
$ipAuth  : bool
Whether or not to use IP Authentication for communication with the EDS API
$isGuest  : bool
Is the current user a guest?
$orgId  : string
Organization EDS API requests are being made for
$password  : string
Password for EBSCO EDS API account if using UID Authentication
$profile  : string
Profile for EBSCO EDS API account (may be overridden)
$queryBuilder  : QueryBuilder
Query builder
$session  : Container
Session container
$userName  : string
User name for EBSCO EDS API account if using UID Authentication
__construct()  : mixed
Constructor.
autocomplete()  : array<string|int, mixed>
Get popular terms using the autocomplete API.
createSession()  : string
Obtain the session to use with the EDS API from cache if it exists. If not, then generate a new one.
getIdentifier()  : string
Return backend identifier.
getInfo()  : array<string|int, mixed>
Obtain data from the INFO method
getQueryBuilder()  : QueryBuilder
Return query builder.
getRecordCollectionFactory()  : RecordCollectionFactoryInterface
Return the record collection factory.
getSessionToken()  : string
Obtain the session token from the Session container. If it doesn't exist, generate a new one.
retrieve()  : RecordCollectionInterface
Retrieve a single document.
search()  : RecordCollectionInterface
Perform a search and return record collection.
setAuthManager()  : void
Set the VuFind Authentication Manager
setBackendType()  : void
Set the EBSCO backend type. Backend/EDS is used for both EDS and EPF.
setIdentifier()  : void
Set the backend identifier.
setQueryBuilder()  : void
Set the query builder.
setRecordCollectionFactory()  : void
Set the record collection factory.
createEBSCOSession()  : string
Generate a new session token and store it in the Session container.
createRecordCollection()  : RecordCollectionInterface
Create record collection.
debug()  : void
Log a debug message.
getAuthenticationToken()  : string
Obtain the authentication to use with the EDS API from cache if it exists. If not, then generate a new one.
getAutocompleteData()  : array<string|int, mixed>
Obtain the autocomplete authentication to use with the EDS API from cache if it exists. If not, then generate a new set.
injectSourceIdentifier()  : RecordCollectionInterface
Inject source identifier in record collection and all contained records.
isGuest()  : string
Is the current user a guest? If so, return 'y' else 'n'.
log()  : void
Send a message to the logger.
logError()  : void
Log an error message.
logWarning()  : void
Log a warning message.
paramBagToEBSCOSearchModel()  : SearchRequestModel
Convert a ParamBag to a EdsApi Search request object.

Properties

$authManager

VuFind Authentication manager

protected Manager $authManager = null

$backendType

Backend type

protected string $backendType = null

$cache

Object cache (for storing authentication tokens)

protected StorageInterface $cache

$client

Client user to make the actually requests to the EdsApi

protected Connector $client

$defaultProfile

Default profile for EBSCO EDS API account (taken from initial config and never changed)

protected string $defaultProfile

$ipAuth

Whether or not to use IP Authentication for communication with the EDS API

protected bool $ipAuth

$isGuest

Is the current user a guest?

protected bool $isGuest

$orgId

Organization EDS API requests are being made for

protected string $orgId

$password

Password for EBSCO EDS API account if using UID Authentication

protected string $password

$profile

Profile for EBSCO EDS API account (may be overridden)

protected string $profile

$session

Session container

protected Container $session

$userName

User name for EBSCO EDS API account if using UID Authentication

protected string $userName

Methods

__construct()

Constructor.

public __construct(Connector $client, RecordCollectionFactoryInterface $factory, StorageInterface $cache, Container $session[, Config $config = null ][, bool $isGuest = true ]) : mixed
Parameters
$client : Connector

EdsApi client to use

$factory : RecordCollectionFactoryInterface

Record collection factory

$cache : StorageInterface

Object cache

$session : Container

Session container

$config : Config = null

Object representing EDS.ini

$isGuest : bool = true

Is the current user a guest?

Return values
mixed

autocomplete()

Get popular terms using the autocomplete API.

public autocomplete(string $query[, string $domain = 'rawqueries' ]) : array<string|int, mixed>
Parameters
$query : string

Simple query string

$domain : string = 'rawqueries'

Autocomplete type (e.g. 'rawqueries' or 'holdings')

Return values
array<string|int, mixed>

of terms

createSession()

Obtain the session to use with the EDS API from cache if it exists. If not, then generate a new one.

public createSession(bool $isGuest[, string $profile = '' ]) : string
Parameters
$isGuest : bool

Whether or not this sesssion will be a guest session

$profile : string = ''

Authentication to use for generating a new session if necessary

Return values
string

getIdentifier()

Return backend identifier.

public getIdentifier() : string
Return values
string

getInfo()

Obtain data from the INFO method

public getInfo([string $sessionToken = null ]) : array<string|int, mixed>
Parameters
$sessionToken : string = null

Session token (optional)

Return values
array<string|int, mixed>

getQueryBuilder()

Return query builder.

public getQueryBuilder() : QueryBuilder

Lazy loads an empty QueryBuilder if none was set.

Return values
QueryBuilder

getSessionToken()

Obtain the session token from the Session container. If it doesn't exist, generate a new one.

public getSessionToken([bool $isInvalid = false ]) : string
Parameters
$isInvalid : bool = false

If a session token is invalid, generate a new one regardless of what is in the session container

Return values
string

setAuthManager()

Set the VuFind Authentication Manager

public setAuthManager(Manager $authManager) : void
Parameters
$authManager : Manager

Authentication Manager

Return values
void

setBackendType()

Set the EBSCO backend type. Backend/EDS is used for both EDS and EPF.

public setBackendType(str $backendType) : void
Parameters
$backendType : str

'EDS' or 'EPF'

Return values
void

setIdentifier()

Set the backend identifier.

public setIdentifier(string $identifier) : void
Parameters
$identifier : string

Backend identifier

Return values
void

setQueryBuilder()

Set the query builder.

public setQueryBuilder(QueryBuilder $queryBuilder) : void
Parameters
$queryBuilder : QueryBuilder

Query builder

Return values
void

createEBSCOSession()

Generate a new session token and store it in the Session container.

protected createEBSCOSession() : string
Return values
string

debug()

Log a debug message.

protected debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

getAuthenticationToken()

Obtain the authentication to use with the EDS API from cache if it exists. If not, then generate a new one.

protected getAuthenticationToken([bool $isInvalid = false ]) : string
Parameters
$isInvalid : bool = false

whether or not the the current token is invalid

Return values
string

getAutocompleteData()

Obtain the autocomplete authentication to use with the EDS API from cache if it exists. If not, then generate a new set.

protected getAutocompleteData([bool $isInvalid = false ]) : array<string|int, mixed>
Parameters
$isInvalid : bool = false

whether or not the the current autocomplete data is invalid and should be regenerated

Return values
array<string|int, mixed>

autocomplete data

isGuest()

Is the current user a guest? If so, return 'y' else 'n'.

protected isGuest() : string
Return values
string

log()

Send a message to the logger.

protected log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
$level : string

Log level

$message : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = false

Prepend class name to message?

Return values
void

logError()

Log an error message.

protected logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

logWarning()

Log a warning message.

protected logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

Search results