Search:

# CWIS Developers Documentation

- Main Page
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# OAIClient Class Reference

List of all members.

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

## Detailed Description

Definition at line 42 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 160 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 130 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:

  | 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.

References MetadataPrefix().

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

Retrieve records from repository server.

Parameters:

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

Returns:
  array of records returned from repository

Definition at line 200 of file OAIClient.php.

References MetadataPrefix(), and SetSpec().

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

Get or set metadata schema for records being retrieved.

Parameters:

  | NewValue | new metadata prefix (optional)

Returns:
  current metadata prefix

Definition at line 99 of file OAIClient.php.

Referenced by GetRecord(), GetRecords(), and 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:

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

Definition at line 52 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:

  | NewValue | new URL of target OAI repository server (optional)

Returns:
  current URL of target OAI repository server

Definition at line 84 of file OAIClient.php.

Referenced by OAIClient().

Here is the caller graph for this function:

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

Set current debug output level.

Parameters:

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

Definition at line 296 of file OAIClient.php.

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

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

Parameters:

  | NewValue | new set specification (optional)

Returns:
  current set specification

Definition at line 114 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:

- OAIClient.php