Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
MedraWebservice Class Reference

Public Member Functions

 _doRequest ($action, $arg, $attachment=null)
 
 _escapeXmlEntities ($string)
 
 _getContentId ($prefix)
 
 _getMimePart ($contentId, $content)
 
 MedraWebservice ($endpoint, $login, $password)
 
 upload ($xml)
 
 viewMetadata ($doi)
 

Detailed Description

A wrapper for the mEDRA web service 2.0.

NB: We do not use PHP's SoapClient because it is not PHP4 compatible and it doesn't support multipart SOAP messages.

Definition at line 26 of file MedraWebservice.inc.php.

Member Function Documentation

MedraWebservice::_doRequest (   $action,
  $arg,
  $attachment = null 
)

Do the actual web service request.

Parameters
$actionstring
$argstring
$attachmentarray
Returns
boolean|string True for success, an error message otherwise.

Definition at line 81 of file MedraWebservice.inc.php.

References _getContentId(), _getMimePart(), String\regexp_match(), String\regexp_match_get(), and String\regexp_replace().

Referenced by upload(), and viewMetadata().

MedraWebservice::_escapeXmlEntities (   $string)

Escape XML entities.

Parameters
$stringstring

Definition at line 195 of file MedraWebservice.inc.php.

Referenced by viewMetadata().

MedraWebservice::_getContentId (   $prefix)

Create a globally unique MIME content ID.

Parameters
$prefixstring
Returns
string

Definition at line 187 of file MedraWebservice.inc.php.

Referenced by _doRequest(), and upload().

MedraWebservice::_getMimePart (   $contentId,
  $content 
)

Create a mime part with the given content.

Parameters
$contentIdstring
$contentstring
Returns
string

Definition at line 174 of file MedraWebservice.inc.php.

Referenced by _doRequest().

MedraWebservice::MedraWebservice (   $endpoint,
  $login,
  $password 
)

Constructor

Parameters
$endpointstring The mEDRA web service endpoint.
$loginstring
$passwordstring

Definition at line 41 of file MedraWebservice.inc.php.

MedraWebservice::upload (   $xml)

mEDRA upload operation.

Parameters
$xml

Definition at line 54 of file MedraWebservice.inc.php.

References _doRequest(), and _getContentId().

MedraWebservice::viewMetadata (   $doi)

mEDRA viewMetadata operation

Definition at line 64 of file MedraWebservice.inc.php.

References _doRequest(), and _escapeXmlEntities().


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