function BiblioCrossRefClient::unixref_endElement in Bibliography Module 6.2
Same name and namespace in other branches
- 7 modules/crossref/biblio.crossref.client.php \BiblioCrossRefClient::unixref_endElement()
- 7.2 modules/crossref/biblio.crossref.client.php \BiblioCrossRefClient::unixref_endElement()
File
- modules/
crossref/ biblio.crossref.client.php, line 186
Class
Code
function unixref_endElement($parser, $name) {
switch ($name) {
case 'doi_record':
array_walk_recursive($this->node, array(
$this,
'unixref_decode',
));
$this->node['biblio_crossref_id'] = $this->node['biblio_doi'] = $this
->getDOI();
$this->node['biblio_crossref_md5'] = md5(serialize($this->node));
$this->nodes[] = $this->node;
//biblio_save_node($node, $batch, $session_id, $save_node);
break;
case 'person_name':
$this->node['biblio_contributors'][$this->auth_category][$this->contrib_count]['auth_type'] = _biblio_get_auth_type($this->auth_category, $this->node['biblio_type']);
$this->node['biblio_contributors'][$this->auth_category][$this->contrib_count]['name'] = $this->node['biblio_contributors'][$this->auth_category][$this->contrib_count]['lastname'];
if (isset($this->node['biblio_contributors'][$this->auth_category][$this->contrib_count]['firstname'])) {
$this->node['biblio_contributors'][$this->auth_category][$this->contrib_count]['name'] .= ', ' . $this->node['biblio_contributors'][$this->auth_category][$this->contrib_count]['firstname'];
}
$this->auth_category = '';
$this->contrib_count++;
break;
case 'organization':
$this->node['biblio_contributors'][5][$this->org_count]['auth_type'] = _biblio_get_auth_type(5, $this->node['biblio_type']);
$this->org_count++;
break;
case 'pages':
if (isset($this->node['biblio_first_page'])) {
$this->node['biblio_pages'] = $this->node['biblio_first_page'];
}
if (isset($this->node['biblio_last_page'])) {
$this->node['biblio_pages'] .= ' - ' . $this->node['biblio_last_page'];
}
break;
case 'publication_date':
break;
case 'journal_issue':
$this->node['biblio_date'] = (!empty($this->node['month']) ? $this->node['month'] . '/' : '') . $this->node['year'];
if (empty($this->node['biblio_year'])) {
$this->node['biblio_year'] = $this->node['year'];
}
break;
case 'journal_article':
case 'conference_paper':
case 'content_item':
case 'report-paper_metadata':
case 'standard_metadata':
case 'database_date':
case 'component':
if (!empty($this->node['year'])) {
$this->node['biblio_year'] = $this->node['year'];
}
// $this->node['biblio_doi'] = $this->node['doi'];
break;
case 'issn':
case 'isbn':
$this->attribute = '';
break;
case 'i':
// HTML font style tags
case 'b':
case 'u':
case 'sub':
case 'sup':
$this
->unixref_characterData(NULL, '</' . $name . '> ');
break;
default:
}
}