CWIS Developer Documentation
Public Member Functions | List of all members
OAIClient Class Reference

Public Member Functions

 __construct ($ServerUrl, $Cache=NULL)
 Class constructor. More...
 
 ServerUrl ($NewValue=NULL)
 Get or set URL of target OAI repository server. More...
 
 MetadataPrefix ($NewValue=NULL)
 Get or set metadata schema for records being retrieved. More...
 
 SetSpec ($NewValue="X-NOSETSPECVALUE-X")
 Get or set specification of subset of records to be retrieved. More...
 
 GetIdentification ()
 Retrieve identification information from repository server. More...
 
 GetFormats ()
 Retrieve list of available metadata formats from repository server. More...
 
 GetRecords ($StartDate=NULL, $EndDate=NULL)
 Retrieve records from repository server. More...
 
 GetRecord ($Id)
 Get a single record from a repositry server. More...
 
 MoreRecordsAvailable ()
 Check whether more records are available after last GetRecords(). More...
 
 ResetRecordPointer ()
 Clear any additional records available after last GetRecords(). More...
 
 SetDebugLevel ($NewLevel)
 Set current debug output level. More...
 

Detailed Description

Definition at line 38 of file OAIClient.php.

Constructor & Destructor Documentation

OAIClient::__construct (   $ServerUrl,
  $Cache = NULL 
)

Class constructor.

Parameters
string$ServerUrlURL of target OAI repository server.
string$CacheName of directory to use to store cached content. (OPTIONAL)

Definition at line 49 of file OAIClient.php.

References MetadataPrefix(), ServerUrl(), and SetSpec().

Member Function Documentation

OAIClient::GetFormats ( )

Retrieve list of available metadata formats from repository server.

Returns
array containing list of available metadata formats

Definition at line 153 of file OAIClient.php.

OAIClient::GetIdentification ( )

Retrieve identification information from repository server.

Information is returned as associative array with the following indexes: "Name", "Email", "URL".

Returns
array containing identification info

Definition at line 123 of file OAIClient.php.

OAIClient::GetRecord (   $Id)

Get a single record from a repositry server.

NOTE: due to the history and politics involved, it is generally preferable to use GetRecords() to pull a full dump from the remote provider and then filter that to get a subset. The thinking here is that pulling in batches will result in fewer queries to the remote, which is kinder to their hardware. Pull single records with caution, when only a small number of them are required.

Parameters
mixed$IdThe unique identifier of the desired record
Returns
array of records (zero or one entries) returned

Definition at line 258 of file OAIClient.php.

OAIClient::GetRecords (   $StartDate = NULL,
  $EndDate = NULL 
)

Retrieve records from repository server.

Parameters
string$StartDateStart of date range for retrieval (optional)
string$EndDateEnd of date range for retrieval (optional)
Returns
array of records returned from repository

Definition at line 193 of file OAIClient.php.

References SetSpec().

OAIClient::MetadataPrefix (   $NewValue = NULL)

Get or set metadata schema for records being retrieved.

Parameters
string$NewValueNew metadata prefix. (OPTIONAL)
Returns
current metadata prefix

Definition at line 93 of file OAIClient.php.

Referenced by __construct().

Here is the caller graph for this function:

OAIClient::MoreRecordsAvailable ( )

Check whether more records are available after last GetRecords().

Returns
TRUE if more records are available, otherwise FALSE

Definition at line 275 of file OAIClient.php.

OAIClient::ResetRecordPointer ( )

Clear any additional records available after last GetRecords().

Definition at line 283 of file OAIClient.php.

OAIClient::ServerUrl (   $NewValue = NULL)

Get or set URL of target OAI repository server.

Parameters
string$NewValueNew URL of target OAI repository server. (OPTIONAL)
Returns
current URL of target OAI repository server

Definition at line 79 of file OAIClient.php.

Referenced by __construct(), and SetDebugLevel().

Here is the caller graph for this function:

OAIClient::SetDebugLevel (   $NewLevel)

Set current debug output level.

Parameters
int$NewLevelNumerical debugging output level (0-9)

Definition at line 294 of file OAIClient.php.

References ServerUrl().

OAIClient::SetSpec (   $NewValue = "X-NOSETSPECVALUE-X")

Get or set specification of subset of records to be retrieved.

Parameters
string$NewValueNew set specification. (OPTIONAL)
Returns
current set specification

Definition at line 107 of file OAIClient.php.

Referenced by __construct(), and GetRecords().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: