Exemplo n.º 1
0
 /**
  * @param Publication $publication
  *
  * @return array
  * @throws Exception
  */
 private function createFields(Publication $publication)
 {
     $fields = array();
     $fields[] = array('TY', $this->encodeType($publication->getTypeName()));
     foreach ($publication->getAuthors() as $keyword) {
         if ($keyword->getLastName() && $keyword->getFirstName()) {
             $fields[] = array('AU', $keyword->getLastName() . ', ' . $keyword->getFirstName());
         }
     }
     $fields[] = array('T1', $publication->getTitle());
     // TODO: check if valid
     $fields[] = array('JA', $publication->getJournal());
     // TODO: check if valid
     $fields[] = array('TI', $publication->getBooktitle());
     // TODO: check if valid
     $fields[] = array('VL', $publication->getVolume());
     $fields[] = array('IS', $publication->getNumber());
     $fields[] = array('SP', $publication->getFirstPage());
     $fields[] = array('EP', $publication->getLastPage());
     $fields[] = array('PY', $publication->getDatePublished('Y/m/d'));
     $fields[] = array('PB', $publication->getPublisher());
     $fields[] = array('N1', $publication->getNote());
     $file = $publication->getFullTextFile();
     if ($file) {
         $fields[] = array('L1', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId(), 'file_id' => $file->getId()), true));
     }
     $fields[] = array('UR', $publication->getDoi());
     $fields[] = array('SN', $publication->getIsbn());
     $fields[] = array('AB', $publication->getAbstract());
     foreach ($publication->getKeywords() as $keyword) {
         $fields[] = array('KW', $keyword->getName());
     }
     return $fields;
 }
Exemplo n.º 2
0
 /**
  * @param Publication $publication
  *
  * @return array
  */
 private function createFields(Publication $publication)
 {
     $fields = array();
     $fields[] = array('prism.title', $publication->getTitle());
     // TODO: valid? Isn't it part of the dc subset of prism?
     $fields[] = array('prism.publicationDate', $publication->getDatePublished('Y-m-d'));
     $fields[] = array('prism.publicationYear', $publication->getDatePublished('Y'));
     $fields[] = array('prism.publicationName', $publication->getJournal());
     $fields[] = array('prism.publicationName', $publication->getBooktitle());
     $fields[] = array('prism.volume', $publication->getVolume());
     $fields[] = array('prism.number', $publication->getNumber());
     $fields[] = array('prism.edition', $publication->getEdition());
     $fields[] = array('prism.startingPage', $publication->getFirstPage());
     $fields[] = array('prism.endingPage', $publication->getLastPage());
     $file = $publication->getFullTextFile();
     if ($file) {
         $fields[] = array('prism.url', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId(), 'file_id' => $file->getId()), true));
     }
     //$fields[] = array('prism.issn', false); // TODO
     $fields[] = array('prism.isbn', $publication->getIsbn());
     $fields[] = array('prism.copyright', $publication->getCopyright());
     $fields[] = array('prism.organization', $publication->getInstitution());
     // TODO: check if valid usage
     $fields[] = array('prism.doi', $publication->getDoi());
     return $fields;
 }
Exemplo n.º 3
0
 /**
  * @param Publication $publication
  *
  * @return array
  */
 private function createFields(Publication $publication)
 {
     // NOTE: dc.citation.* are non standard tags recommended by Google Scholar
     $fields = array();
     foreach ($publication->getAuthors() as $author) {
         if ($author->getLastName() && $author->getFirstName()) {
             $fields[] = array('dc.creator', $author->getFirstName() . ' ' . $author->getLastName());
         }
     }
     $fields[] = array('dc.title', $publication->getTitle());
     // TODO: not dcterms.issued and YYYY-MM-DD according to https://wiki.whatwg.org/wiki/MetaExtensions?
     $fields[] = array('dc.issued', $publication->getDatePublished('Y/m/d'));
     $fields[] = array('dc.relation.ispartof', $publication->getJournal());
     $fields[] = array('dc.relation.ispartof', $publication->getBooktitle());
     $fields[] = array('dc.citation.volume', $publication->getVolume());
     $fields[] = array('dc.citation.issue', $publication->getNumber());
     $fields[] = array('dc.citation.spage', $publication->getFirstPage());
     $fields[] = array('dc.citation.epage', $publication->getLastPage());
     $file = $publication->getFullTextFile();
     if ($file) {
         $fields[] = array('dc.identifier', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId(), 'file_id' => $file->getId()), true));
     }
     $fields[] = array('dc.publisher', $publication->getInstitution());
     // used for institution, too
     $fields[] = array('dc.publisher', $publication->getPublisher());
     $fields[] = array('dc.identifier', $publication->getDoi());
     return $fields;
 }
Exemplo n.º 4
0
 /** @noinspection PhpUnusedPrivateMethodInspection
  * @param Request $request
  *
  * @return bool
  */
 private function delete(Request $request)
 {
     $confirmed = Validator::sanitizeBoolean($request->post('delete'));
     if (!$confirmed) {
         $this->errors[] = 'Please confirm the deletion';
         return false;
     }
     $this->model->delete($this->user->getId());
     $this->redirect(Request::createUrl(array('p' => 'logout')));
     exit;
 }
Exemplo n.º 5
0
 /**
  * @param Publication $publication
  *
  * @return array
  */
 private function createFields(Publication $publication)
 {
     $fields = array();
     $fields[] = array('citation_title', $publication->getTitle());
     foreach ($publication->getAuthors() as $author) {
         if ($author->getLastName() && $author->getFirstName()) {
             $fields[] = array('citation_author', $author->getLastName() . ', ' . $author->getFirstName());
         }
     }
     $fields[] = array('citation_publication_date', $publication->getDatePublished('Y/m/d'));
     $fields[] = array('citation_journal_title', $publication->getJournal());
     $fields[] = array('citation_conference_title', $publication->getBooktitle());
     $fields[] = array('citation_volume', $publication->getVolume());
     if ($publication->getTypeName() == 'techreport') {
         $fields[] = array('citation_technical_report_number', $publication->getNumber());
     } else {
         $fields[] = array('citation_issue', $publication->getNumber());
     }
     $fields[] = array('citation_firstpage', $publication->getFirstPage());
     $fields[] = array('citation_lastpage', $publication->getLastPage());
     $file = $publication->getFullTextFile();
     if ($file) {
         $fields[] = array('citation_pdf_url', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId(), 'file_id' => $file->getId()), true));
     }
     //$fields[] = array('citation_issn', false); // TODO
     $fields[] = array('citation_isbn', $publication->getIsbn());
     $fields[] = array('citation_publisher', $publication->getPublisher());
     if ($publication->getTypeName() == 'techreport') {
         $fields[] = array('citation_technical_report_institution', $publication->getInstitution());
     } else {
         if (in_array($publication->getTypeName(), array('phdthesis', 'mastersthesis'))) {
             $fields[] = array('citation_dissertation_institution', $publication->getInstitution());
         }
     }
     $fields[] = array('citation_doi', $publication->getDoi());
     $keywords = '';
     foreach ($publication->getKeywords() as $keyword) {
         if ($keyword->getName()) {
             $keywords .= $keyword->getName() . '; ';
         }
     }
     $keywords = substr($keywords, 0, -2);
     $fields[] = array('citation_keywords', $keywords);
     return $fields;
 }
Exemplo n.º 6
0
 /** @noinspection PhpUnusedPrivateMethodInspection
  * @param Request $request
  *
  * @return bool
  * @throws PermissionRequiredException
  * @throws exceptions\LoginRequiredException
  */
 private function delete(Request $request)
 {
     if (!$this->auth->checkPermission(Auth::DELETE_KEYWORD)) {
         throw new PermissionRequiredException(Auth::DELETE_KEYWORD);
     }
     $id = Validator::sanitizeNumber($request->get('id'));
     if (!$id) {
         throw new UnexpectedValueException();
     }
     $confirmed = Validator::sanitizeBoolean($request->post('delete'));
     if (!$confirmed) {
         $this->errors[] = 'Please confirm the deletion';
         return false;
     }
     $this->model->delete($id);
     $this->redirect(Request::createUrl(array('p' => 'browse', 'by' => 'keyword')));
     exit;
 }
Exemplo n.º 7
0
 /**
  * @param Publication $publication
  *
  * @return array
  * @throws Exception
  */
 private function createFields(Publication $publication)
 {
     $fields = array();
     $fields['type'] = $this->encodeTypes($publication->getTypeName());
     $fields['id'] = 'TODO_' . $publication->getId();
     // TODO
     $fields['title'] = $publication->getTitle();
     foreach ($publication->getAuthors() as $author) {
         if ($author->getFirstName() && $author->getLastName()) {
             $fields['author'][] = array('family' => $author->getLastName(), 'given' => $author->getFirstName());
         }
     }
     $fields['issued'] = array('date-parts' => array($publication->getDatePublished('Y'), $publication->getDatePublished('m'), $publication->getDatePublished('d')));
     $fields['container-title'] = $publication->getJournal();
     // TODO
     $fields['container-title'] = $publication->getBooktitle();
     $fields['citation-number'] = $publication->getNumber();
     $fields['volume'] = $publication->getVolume();
     $fields['number'] = '';
     // TODO
     $fields['issue'] = '';
     // TODO
     $fields['page'] = '';
     $fields['page-first'] = $publication->getFirstPage();
     $fields['edition'] = $publication->getEdition();
     $fields['abstract'] = $publication->getAbstract();
     $fields['DOI'] = $publication->getDoi();
     $fields['ISBN'] = $publication->getIsbn();
     $fields['ISSN'] = '';
     // TODO
     $file = $publication->getFullTextFile();
     if ($file) {
         $fields['URL'] = Request::createUrl(array('p' => 'publication', 'id' => $publication->getId(), 'file_id' => $file->getId()), true);
     }
     $fields['note'] = $publication->getNote();
     $fields['publisher'] = $publication->getPublisher();
     return $fields;
 }
Exemplo n.º 8
0
 /** @noinspection PhpUnusedPrivateMethodInspection
  * @param Request $request
  *
  * @return bool
  */
 private function sendNewPassword(Request $request)
 {
     $user_id = Validator::sanitizeText($request->post('user_id'));
     if (!$user_id) {
         throw new UnexpectedValueException();
     }
     $repo = new UserRepository($this->db);
     $user = $repo->where('id', '=', $user_id)->findSingle();
     $password = $this->auth->generatePassword();
     //print_r('new pw is '.$password); // TODO remove this
     $this->auth->setPassword($user->getName(), $password);
     $subject = 'Your password at ' . Request::createUrl() . ' was reset!';
     $message = 'Greetings,' . "\n\n" . $this->auth->getCurrentUser()->getName() . ' has reset your password for you at ' . Request::createUrl() . '.' . "\n\n";
     $message .= 'The new temporary password is: ' . $password . "\n";
     $message .= "\n" . 'Please change your password soon at ' . Request::createUrl(array('p' => 'user')) . '!';
     if (MailHandler::sendMail($user->getMail(), $subject, $message)) {
         return true;
     } else {
         $this->errors[] = 'The mail to the user could not be sent';
         return false;
     }
 }
Exemplo n.º 9
0
 /** @noinspection PhpUnusedPrivateMethodInspection
  * @param Request $request
  *
  * @return string
  * @throws Exception
  * @throws NotFoundException
  */
 private function login(Request $request)
 {
     $errors = array();
     if ($request->post('username') && $request->post('password')) {
         $username = Validator::sanitizeText($request->post('username'));
         $password = Validator::sanitizeText($request->post('password'));
         if ($this->auth->login($username, $password)) {
             $destination = !empty($_SESSION['referrer']) ? $_SESSION['referrer'] : Request::createUrl(array(), true);
             $this->redirect($destination);
         } else {
             $errors[] = 'Invalid user name or password';
         }
     }
     $view = new View('login', $errors);
     return $view->display();
 }
Exemplo n.º 10
0
 /**
  * @param Publication $publication
  * @param int         $max_authors
  *
  * @return string
  */
 public function showCitation(Publication $publication, $max_authors = 6)
 {
     $citation = '<div class="citation">';
     /* shows the title and links to the publication page */
     $url = Request::createUrl(array('p' => 'publication', 'id' => $publication->getId()));
     $citation .= '<a href="' . $this->html($url) . '" class="title">' . $this->html($publication->getTitle()) . '</a><br/>';
     /* creates list of authors */
     $authors = $publication->getAuthors();
     $num = count($authors);
     $authors_string = '';
     if ($num > 0) {
         $i = 1;
         foreach ($authors as $author) {
             if ($i == 1) {
                 /* first author */
                 $authors_string .= $author->getFirstName(true) . ' ' . $author->getLastName();
             } else {
                 if ($i > $max_authors) {
                     /* break with "et al." if too many authors */
                     $authors_string .= ' et al.';
                     break;
                 } else {
                     if ($i == $num) {
                         /* last author */
                         $authors_string .= ' and ' . $author->getFirstName(true) . ' ' . $author->getLastName();
                     } else {
                         /* all other authors */
                         $authors_string .= ', ' . $author->getFirstName(true) . ' ' . $author->getLastName();
                     }
                 }
             }
             $i++;
         }
     }
     /* shows list of authors */
     $citation .= '<span class="authors">' . $this->html($authors_string) . '</span>';
     /* appends publish date behind the authors */
     $citation .= ' <span class="year">(' . $this->html($publication->getDatePublished('Y')) . ')</span>';
     /* shows journal or booktitle and additional data*/
     if ($publication->getJournal()) {
         $citation .= '<br/><span class="journal">' . $this->html($publication->getJournal()) . '</span>';
         if ($publication->getVolume()) {
             $citation .= ', <span class="volume">' . $this->html($publication->getVolume()) . '</span>';
             if ($publication->getNumber()) {
                 $citation .= ' <span class="number">(' . $this->html($publication->getNumber()) . ')</span>';
             }
         }
         if ($publication->getPages('-')) {
             $citation .= ', <span class="pages">' . $this->html($publication->getPages('-')) . '</span>';
         }
     } else {
         if ($publication->getBooktitle()) {
             $citation .= '<br/>In: <span class="booktitle">' . $this->html($publication->getBooktitle()) . '</span>';
             if ($publication->getPages('-')) {
                 $citation .= ', <span class="pages">' . $this->html($publication->getPages('-')) . '</span>';
             }
         }
     }
     $links = array();
     /* shows full text link */
     $file = $publication->getFullTextFile();
     if ($file) {
         $title = $file->getExtension() == '.pdf' ? 'PDF' : 'FULLTEXT';
         $url = Request::createUrl(array('p' => 'publication', 'id' => $publication->getId(), 'file_id' => $file->getId()));
         $links[] = '<a href="' . $this->html($url) . '" target="_blank">' . $this->html($title) . '</a>';
     }
     /* shows DOI link */
     if ($publication->getDoi()) {
         $links[] = '<a href="http://dx.doi.org/' . $this->html($publication->getDoi()) . '" target="_blank">DOI</a>';
     }
     /* shows URLs */
     if ($publication->getUrls()) {
         foreach ($publication->getUrls() as $url) {
             $links[] = '<a href="' . $this->html($url->getUrl()) . '" target="_blank">' . $this->html($url->getName()) . '</a>';
         }
     }
     /* shows links if there are any */
     if (!empty($links)) {
         $citation .= '<br/><span class="links">' . implode(' - ', $links) . '</span>';
     }
     return $citation . '</div>';
 }
Exemplo n.º 11
0
 /**
  * @param Publication $publication
  *
  * @return string
  * @throws Exception
  */
 public function export(Publication $publication)
 {
     if (!$publication->getTypeName()) {
         throw new Exception('publication type missing');
     }
     $authors = '';
     foreach ($publication->getAuthors() as $author) {
         if ($author->getFirstName() && $author->getLastName()) {
             $authors .= $author->getFirstName() . ' ' . $author->getLastName() . ' and ';
         }
     }
     $authors = substr($authors, 0, -5);
     $keywords = '';
     foreach ($publication->getKeywords() as $keyword) {
         if ($keyword->getName()) {
             $keywords .= $keyword->getName() . ', ';
         }
     }
     $keywords = substr($keywords, 0, -2);
     $fields = array();
     $fields[] = array('author', $authors);
     $fields[] = array('title', $publication->getTitle());
     $fields[] = array('journal', $publication->getJournal());
     $fields[] = array('volume', $publication->getVolume());
     $fields[] = array('number', $publication->getNumber());
     $fields[] = array('booktitle', $publication->getBooktitle());
     $fields[] = array('series', $publication->getSeries());
     $fields[] = array('edition', $publication->getEdition());
     $fields[] = array('pages', $publication->getPages('--'));
     $fields[] = array('note', $publication->getNote());
     $fields[] = array('location', $publication->getLocation());
     $fields[] = array('month', $publication->getDatePublished('F'));
     $fields[] = array('year', $publication->getDatePublished('Y'));
     $file = $publication->getFullTextFile();
     $urls = $publication->getUrls();
     if ($file) {
         $fields[] = array('url', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId(), 'file_id' => $file->getId()), true));
     } else {
         if ($urls && isset($urls[0])) {
             $fields[] = array('url', $urls[0]);
         }
     }
     //$fields[] = array('issn', false);
     $fields[] = array('publisher', $publication->getPublisher());
     $fields[] = array('institution', $publication->getInstitution());
     $fields[] = array('school', $publication->getSchool());
     $fields[] = array('address', $publication->getAddress());
     $fields[] = array('howpublished', $publication->getHowpublished());
     $fields[] = array('copyright', $publication->getCopyright());
     $fields[] = array('doi', $publication->getDoi());
     $fields[] = array('isbn', $publication->getIsbn());
     $fields[] = array('abstract', $publication->getAbstract());
     $fields[] = array('biburl', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId()), true));
     $fields[] = array('keywords', $keywords);
     $result = '@' . $publication->getTypeName() . '{' . $this->generateCiteKey($publication);
     foreach ($fields as $field) {
         if ($field[1]) {
             $result .= ',' . "\n\t" . $field[0] . ' = {' . $this->encodeSpecialChars($field[1]) . '}';
         }
     }
     $result .= "\n" . '}';
     return $result;
 }
Exemplo n.º 12
0
 /** @noinspection PhpUnusedPrivateMethodInspection
  * @param Request $request
  *
  * @return bool
  * @throws PermissionRequiredException
  * @throws exceptions\LoginRequiredException
  */
 private function delete(Request $request)
 {
     if (!$this->auth->checkPermission(Auth::DELETE_PUBLICATION)) {
         throw new PermissionRequiredException(Auth::DELETE_PUBLICATION);
     }
     $id = Validator::sanitizeNumber($request->get('id'));
     if (!$id) {
         throw new UnexpectedValueException();
     }
     $confirmed = Validator::sanitizeBoolean($request->post('delete'));
     if (!$confirmed) {
         $this->errors[] = 'Please confirm the deletion';
         return false;
     }
     try {
         $this->model->delete($id);
         $this->redirect(Request::createUrl(array('p' => 'browse', 'by' => 'recent')));
         exit;
     } catch (DBForeignKeyException $e) {
         // TODO: remove this once files are deleted automatically
         $this->errors[] = 'Please remove the files before deleting';
         return false;
     }
 }
Exemplo n.º 13
0
 /**
  * @param Publication $publication
  *
  * @return array
  */
 private function createFields(Publication $publication)
 {
     $fields = array();
     foreach ($publication->getAuthors() as $author) {
         if ($author->getFirstName() && $author->getLastName()) {
             $fields[] = array('author', $author->getFirstName() . ' ' . $author->getLastName());
         }
     }
     $fields[] = array('title', $publication->getTitle());
     $fields[] = array('journal', $publication->getJournal());
     $fields[] = array('booktitle', $publication->getBooktitle());
     $fields[] = array('volume', $publication->getVolume());
     $fields[] = array('number', $publication->getNumber());
     $fields[] = array('series', $publication->getSeries());
     $fields[] = array('edition', $publication->getEdition());
     $fields[] = array('pages', $publication->getPages('--'));
     $fields[] = array('month', $publication->getDatePublished('F'));
     $fields[] = array('year', $publication->getDatePublished('Y'));
     $file = $publication->getFullTextFile();
     if ($file) {
         $fields[] = array('url', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId(), 'file_id' => $file->getId()), true));
     }
     //$fields[] = array('issn', false); // TODO
     $fields[] = array('isbn', $publication->getIsbn());
     $fields[] = array('institution', $publication->getInstitution());
     $fields[] = array('school', $publication->getSchool());
     $fields[] = array('publisher', $publication->getPublisher());
     $fields[] = array('ee', $publication->getDoi());
     $fields[] = array('address', $publication->getAddress());
     $fields[] = array('howpublished', $publication->getHowpublished());
     $fields[] = array('note', $publication->getNote());
     $fields[] = array('abstract', $publication->getAbstract());
     $fields[] = array('biburl', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId()), true));
     return $fields;
 }
Exemplo n.º 14
0
 /** @noinspection PhpUnusedPrivateMethodInspection
  * @param Request $request
  *
  * @return bool
  * @throws \Exception
  */
 private function submit(Request $request)
 {
     $input = $this->model->formatPost($request->post());
     $_SESSION['input'] = $input;
     try {
         $result = $this->store_publication($input);
     } catch (DBDuplicateEntryException $e) {
         //$this->db->cancelTransaction();
         // TODO make single error messages for each case
         $this->errors[] = 'A publication with this name already exists or you tried to add the same author or keyword to this publication twice';
         return false;
     }
     if (empty($this->errors) && $result) {
         if ($this->next()) {
             return true;
         }
         $this->clearForm();
         $this->redirect(Request::createUrl(array('p' => 'browse', 'by' => 'recent')));
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 15
0
    /**
     * @return string
     */
    public function showEditFiles()
    {
        $files = $this->publication->getFiles();
        $string = '';
        foreach ($files as $file) {
            $url = Request::createUrl(array('p' => 'publication', 'id' => $this->publication->getId(), 'file_id' => $file->getId()));
            $full_text = $file->isFullText() ? ' (full text)' : '';
            $hidden = $file->isHidden() ? ' (hidden)' : '';
            $restricted = $file->isRestricted() ? ' (restricted)' : '';
            $string .= '<li>
                        <form action="#" method="post" accept-charset="utf-8">
                        <a href="' . $this->html($url) . '" target="_blank">' . $this->html($file->getTitle() . $file->getExtension()) . '</a>' . $this->html($full_text . $hidden . $restricted) . '
                        <input type="hidden" name="file_id" value="' . $this->html($file->getId()) . '"/>
                        <input type="hidden" name="action" value="removeFile"/>
                        <input type="submit" value="x" onclick="return confirm(\'Do you really want to delete the file ' . $this->html($file->getTitle() . $file->getExtension()) . '?\')"/>
                        </form>
                        </li>';
        }
        $string .= '<li><form action="#" method="post" enctype="multipart/form-data">
    <label for="file">File:</label>
    <input type="file" name="file" id="file"><br/>
    <label for="title">Description:</label>
    <input type="text" name="title" id="title"><br/>
    <input type="checkbox" name="full_text" id="full_text" value="yes">
    <label for="full_text">Full Text</label>
    <input type="checkbox" name="restricted" id="restricted" value="yes"/>
    <label for="restricted">Access Restricted</label>
    <input type="checkbox" name="hidden" id="hidden" value="yes"/>
    <label for="hidden">Hidden</label><br/>
    <input type="hidden" name="action" value="addFile"/>
    <input type="submit" value="Upload File"/>
</form></li>';
        return $string;
    }
Exemplo n.º 16
0
 /**
  * @return string|null
  */
 public function getPublinUrl()
 {
     return Request::createUrl(array('p' => 'publication', 'id' => $this->id));
 }
Exemplo n.º 17
0
 /**
  * @param Publication $publication
  * @param             $metadataPrefix
  *
  * @return array
  */
 private function createRecordMetadataFields(Publication $publication, $metadataPrefix)
 {
     if ($metadataPrefix == 'oai_dc') {
         $fields = array();
         $fields[] = array('dc:title', $publication->getTitle());
         foreach ($publication->getAuthors() as $author) {
             if ($author->getLastName() && $author->getFirstName()) {
                 $fields[] = array('dc:creator', $author->getLastName() . ', ' . $author->getFirstName());
             }
         }
         $fields[] = array('dc:description', $publication->getAbstract());
         $fields[] = array('dc:date', $publication->getDatePublished('Y'));
         $fields[] = array('dc:publisher', $publication->getPublisher());
         $fields[] = array('dc:type', 'Text');
         $fields[] = array('dc:rights', $publication->getCopyright());
         $fields[] = array('dc:identifier', $publication->getDoi());
         $fields[] = array('dc:identifier', Request::createUrl(array('p' => 'publication', 'id' => $publication->getId())));
         return $fields;
     } else {
         throw new UnexpectedValueException('Implementation for ' . $metadataPrefix . ' missing!');
     }
 }