CWIS Developer Documentation
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$RepDescrRepository Description.
mixed$ItemFactoryItem Factory that this repository uses to get data.
bool$SetsSupportedOAI sets supported (OPTIONAL, default FALSE).
bool$OaisqSupportedOAI-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$NameFormat name.
string$TagNameXML tag to use for format.
string$SchemaNamespaceXML namespace for the format.
string$SchemaDefinitionSchema definition URL.
string$SchemaVersionSchema version number.
array$NamespaceListList of namespaces in format.
array$ElementListList of elements in format.
array$QualifierListList of qualifiers in format.
array$DefaultMapDefault values for format.

Definition at line 63 of file OAIServer.php.

OAIServer::FormatElementList (   $FormatName)

Get list of elements for a specified format.

Parameters
string$FormatNameOAI 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$FormatNameOAI 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$FormatNameOAI format name.
string$LocalFieldNameLocal field to fetch.
Returns
array|null Array of mapped names or NULL if none exist.

Definition at line 138 of file OAIServer.php.

OAIServer::GetQualifierMapping (   $FormatName,
  $LocalQualifierName 
)

Get mapping for a qualifier.

Parameters
string$FormatNameOAI format name.
string$LocalQualifierNameLocal 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$FormatNameOAI format name.
string$LocalFieldNameLocal field to map.
string$OAIFieldNameMapped value to set.

Definition at line 157 of file OAIServer.php.

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

Set mapping for a qualifier.

Parameters
string$FormatNameOAI format name.
string$LocalQualifierNameLocal name to map.
string$OAIQualifierNameMapped value to set.

Definition at line 187 of file OAIServer.php.


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