Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
ArtworkFileNativeXmlFilter.inc.php
1 <?php
2 
16 import('lib.pkp.plugins.importexport.native.filter.SubmissionFileNativeXmlFilter');
17 
23  function ArtworkFileNativeXmlFilter($filterGroup) {
24  parent::SubmissionFileNativeXmlFilter($filterGroup);
25  }
26 
27 
28  //
29  // Implement template methods from PersistableFilter
30  //
34  function getClassName() {
35  return 'plugins.importexport.native.filter.ArtworkFileNativeXmlFilter';
36  }
37 
38 
39  //
40  // Implement/override functions from SubmissionFileNativeXmlFilter
41  //
48  function createSubmissionFileNode($doc, $submissionFile) {
49  $deployment = $this->getDeployment();
50  $submissionFileNode = parent::createSubmissionFileNode($doc, $submissionFile);
51  if ($caption = $submissionFile->getCaption()) {
52  $submissionFileNode->appendChild($doc->createElementNS($deployment->getNamespace(), 'caption', $caption));
53  }
54  if ($credit = $submissionFile->getCredit()) {
55  $submissionFileNode->appendChild($doc->createElementNS($deployment->getNamespace(), 'credit', $credit));
56  }
57  if ($copyrightOwner = $submissionFile->getCopyrightOwner()) {
58  $submissionFileNode->appendChild($doc->createElementNS($deployment->getNamespace(), 'copyright_owner', $copyrightOwner));
59  }
60  if ($copyrightOwnerContact = $submissionFile->getCopyrightOwnerContactDetails()) {
61  $submissionFileNode->appendChild($doc->createElementNS($deployment->getNamespace(), 'copyright_owner_contact', $copyrightOwnerContact));
62  }
63  if ($permissionTerms = $submissionFile->getPermissionTerms()) {
64  $submissionFileNode->appendChild($doc->createElementNS($deployment->getNamespace(), 'permission_terms', $permissionTerms));
65  }
66 
67  // FIXME: is permission file ID implemented?
68  // FIXME: is chapter ID implemented?
69  // FIXME: is contact author ID implemented?
70 
71  return $submissionFileNode;
72  }
73 
78  return 'artwork_file';
79  }
80 }
81 
82 ?>
Filter to convert an artwork file to a Native XML document.
Base class that converts a submissionFile to a Native XML document.
createSubmissionFileNode($doc, $submissionFile)