16 import(
'classes.plugins.DOIPubIdExportPlugin');
19 define(
'O4DOI_ISSUE_AS_WORK', 0x01);
20 define(
'O4DOI_ISSUE_AS_MANIFESTATION', 0x02);
21 define(
'O4DOI_ARTICLE_AS_WORK', 0x03);
22 define(
'O4DOI_ARTICLE_AS_MANIFESTATION', 0x04);
30 return 'MedraExportPlugin';
37 return __(
'plugins.importexport.medra.displayName');
44 return __(
'plugins.importexport.medra.description');
51 return 'article=>medra-xml';
58 return 'issue=>medra-xml';
65 return 'galley=>medra-xml';
79 return 'MedraSettingsForm';
86 return 'MedraExportDeployment';
95 $this->
import(
'classes.MedraWebservice');
96 $endpoint = ($this->
isTestMode($context) ? MEDRA_WS_ENDPOINT_DEV : MEDRA_WS_ENDPOINT);
99 $username = $this->
getSetting($context->getId(),
'username');
100 $password = $this->
getSetting($context->getId(),
'password');
102 assert(is_readable($filename));
103 $xml = file_get_contents($filename);
104 assert($xml !==
false && !empty($xml));
109 $result = $ws->upload($xml);
111 if ($result ===
true) {
113 foreach($objects as $object) {
119 if (is_string($result)) {
121 array(
'plugins.importexport.common.register.error.mdsError', $result)