16 import(
'lib.pkp.plugins.importexport.native.filter.NativeImportFilter');
25 parent::__construct($filterGroup);
35 return 'lib.pkp.plugins.importexport.native.filter.NativeXmlRepresentationFilter';
46 $context = $deployment->getContext();
48 $publication = $deployment->getPublication();
49 assert(is_a($publication,
'PKPPublication'));
53 $representation = $representationDao->newDataObject();
55 $representation->setData(
'publicationId', $publication->getId());
59 for ($n = $node->firstChild; $n !==
null; $n=$n->nextSibling)
if (is_a($n,
'DOMElement'))
switch($n->tagName) {
62 $locale = $n->getAttribute(
'locale');
63 if (empty($locale)) $locale = $publication->getData(
'locale');
64 $representation->setName($n->textContent, $locale);
66 case 'seq': $representation->setSequence($n->textContent);
break;
67 case 'remote': $representation->setRemoteURL($n->getAttribute(
'src'));
break;
71 return $representation;
81 $advice = $element->getAttribute(
'advice');
82 switch ($element->getAttribute(
'type')) {
85 assert(!$advice || $advice ==
'ignore');
88 if ($advice ==
'update') {
89 $representation->setStoredPubId(
'publisher-id', $element->textContent);
93 if ($advice ==
'update') {
96 $representation->setStoredPubId($element->getAttribute(
'type'), $element->textContent);