CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
OAIClient Class Reference

## Public Member Functions
| OAIClient ($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.

## 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 155 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 125 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 | $Id | The unique identifier of the desired record

Returns
  array of records (zero or one entries) returned

Definition at line 260 of file OAIClient.php.

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

Retrieve records from repository server.

Parameters

  string | $StartDate | start of date range for retrieval (optional)
  string | $EndDate | end of date range for retrieval (optional)

Returns
  array of records returned from repository

Definition at line 195 of file OAIClient.php.

References SetSpec().

OAIClient::MetadataPrefix | ( |  | $NewValue = `NULL` | ) |

Get or set metadata schema for records being retrieved.

Parameters

  string | $NewValue | new metadata prefix (optional)

Returns
  current metadata prefix

Definition at line 94 of file OAIClient.php.

Referenced by OAIClient().

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 277 of file OAIClient.php.

OAIClient::OAIClient | ( |  | $ServerUrl,
|  |  | $Cache = `NULL`
| ) |  |

Class constructor.

Parameters

  string | $ServerUrl | URL of target OAI repository server
  string | $Cache | name of directory to use to store cached content

Definition at line 48 of file OAIClient.php.

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

OAIClient::ResetRecordPointer | ( |  | ) |

Clear any additional records available after last GetRecords().

Definition at line 285 of file OAIClient.php.

OAIClient::ServerUrl | ( |  | $NewValue = `NULL` | ) |

Get or set URL of target OAI repository server.

Parameters

  string | $NewValue | new 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 OAIClient(), and SetDebugLevel().

Here is the caller graph for this function:

OAIClient::SetDebugLevel | ( |  | $NewLevel | ) |

Set current debug output level.

Parameters

  int | $NewLevel | numerical debugging output level (0-9)

Definition at line 296 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 | $NewValue | new set specification (optional)

Returns
  current set specification

Definition at line 109 of file OAIClient.php.

Referenced by GetRecords(), and OAIClient().

Here is the caller graph for this function:

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

- lib/ScoutLib/OAIClient.php