CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

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

Public Member Functions | List of all members
OAIServer Class Reference

## Public Member Functions
| __construct ($RepDescr, &$ItemFactory, $SetsSupported=FALSE, $OaisqSupported=FALSE)
| Construct an OAI server object. More...
| AddFormat ($Name, $TagName, $SchemaNamespace, $SchemaDefinition, $SchemaVersion, $NamespaceList, $ElementList, $QualifierList, $DefaultMap)
| Add a new metadata format. More...
| FormatList ()
| Get the list of formats. More...
| FormatElementList ($FormatName)
| Get list of elements for a specified format. More...
| FormatQualifierList ($FormatName)
| Get the list of qualifiers for a specified format. More...
| GetFieldMapping ($FormatName, $LocalFieldName)
| Get mapped name for a field. More...
| SetFieldMapping ($FormatName, $LocalFieldName, $OAIFieldName)
| Set mapping for a field. More...
| GetQualifierMapping ($FormatName, $LocalQualifierName)
| Get mapping for a qualifier. More...
| SetQualifierMapping ($FormatName, $LocalQualifierName, $OAIQualifierName)
| Set mapping for a qualifier. More...
| GetResponse ()
| Get OAI response. More...

## Detailed Description

Definition at line 10 of file OAIServer.php.

## Constructor & Destructor Documentation

OAIServer::__construct | ( |  | $RepDescr,
|  | & | $ItemFactory,
|  |  | $SetsSupported = `FALSE`,
|  |  | $OaisqSupported = `FALSE`
| ) |  |

Construct an OAI server object.

Parameters

  string | $RepDescr | Repository Description.
  mixed | $ItemFactory | Item Factory that this repository uses to get data.
  bool | $SetsSupported | OAI sets supported (OPTIONAL, default FALSE).
  bool | $OaisqSupported | OAI-SQ supported (OPTIONAL, default FALSE).

Definition at line 24 of file OAIServer.php.

## Member Function Documentation

OAIServer::AddFormat | ( |  | $Name,
|  |  | $TagName,
|  |  | $SchemaNamespace,
|  |  | $SchemaDefinition,
|  |  | $SchemaVersion,
|  |  | $NamespaceList,
|  |  | $ElementList,
|  |  | $QualifierList,
|  |  | $DefaultMap
| ) |  |

Add a new metadata format.

Parameters

  string | $Name | Format name.
  string | $TagName | XML tag to use for format.
  string | $SchemaNamespace | XML namespace for the format.
  string | $SchemaDefinition | Schema definition URL.
  string | $SchemaVersion | Schema version number.
  array | $NamespaceList | List of namespaces in format.
  array | $ElementList | List of elements in format.
  array | $QualifierList | List of qualifiers in format.
  array | $DefaultMap | Default values for format.

Definition at line 63 of file OAIServer.php.

OAIServer::FormatElementList | ( |  | $FormatName | ) |

Get list of elements for a specified format.

Parameters

  string | $FormatName | OAI format name.

Returns
  array List of elements.

Definition at line 116 of file OAIServer.php.

OAIServer::FormatList | ( |  | ) |

Get the list of formats.

Returns
  array of supported format names, keyed by FormatId.

Definition at line 101 of file OAIServer.php.

OAIServer::FormatQualifierList | ( |  | $FormatName | ) |

Get the list of qualifiers for a specified format.

Parameters

  string | $FormatName | OAI format name.

Returns
  array List of qualifiers

Definition at line 127 of file OAIServer.php.

OAIServer::GetFieldMapping | ( |  | $FormatName,
|  |  | $LocalFieldName
| ) |  |

Get mapped name for a field.

Parameters

  string | $FormatName | OAI format name.
  string | $LocalFieldName | Local field to fetch.

Returns
  string|null Mapped name or NULL if none exists.

Definition at line 138 of file OAIServer.php.

OAIServer::GetQualifierMapping | ( |  | $FormatName,
|  |  | $LocalQualifierName
| ) |  |

Get mapping for a qualifier.

Parameters

  string | $FormatName | OAI format name.
  string | $LocalQualifierName | Local qualifier to fetch.

Returns
  string|null Mapped value or NULL if none exists.

Definition at line 168 of file OAIServer.php.

OAIServer::GetResponse | ( |  | ) |

Get OAI response.

Returns
  string XML response data.

Definition at line 198 of file OAIServer.php.

References ItemFactory\GetItem(), and ItemFactory\GetItems().

OAIServer::SetFieldMapping | ( |  | $FormatName,
|  |  | $LocalFieldName,
|  |  | $OAIFieldName
| ) |  |

Set mapping for a field.

Parameters

  string | $FormatName | OAI format name.
  string | $LocalFieldName | Local field to map.
  string | $OAIFieldName | Mapped value to set.

Definition at line 157 of file OAIServer.php.

OAIServer::SetQualifierMapping | ( |  | $FormatName,
|  |  | $LocalQualifierName,
|  |  | $OAIQualifierName
| ) |  |

Set mapping for a qualifier.

Parameters

  string | $FormatName | OAI format name.
  string | $LocalQualifierName | Local name to map.
  string | $OAIQualifierName | Mapped value to set.

Definition at line 187 of file OAIServer.php.

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

- lib/ScoutLib/OAIServer.php