You are here

public function EndNoteXMLParser::endnote7_endElement in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote7_endElement()
  2. 7.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote7_endElement()

File

modules/endnote/endnote_xml_parser.inc, line 425
endnote_xml_parser.inc

Class

EndNoteXMLParser

Code

public function endnote7_endElement($parser, $name) {
  switch ($name) {
    case 'RECORD':
      $this->node->biblio_xml_md5 = md5(serialize($this->node));
      if (!($dup = $this
        ->biblio_xml_check_md5($this->node->biblio_xml_md5))) {
        biblio_save_node($this->node, $this->terms, $this->batch_proc, $this->session_id);
        if (!empty($this->node->nid)) {
          $this->nids[] = $this->node->nid;
        }
      }
      else {
        $this->dups[] = $dup;
      }
      break;
    case 'AUTHORS':
    case 'SECONDARY_AUTHORS':
    case 'TERTIARY_AUTHORS':
    case 'SUBSIDIARY_AUTHORS':
      $this->contributors_type = '';
      foreach ($this->contributors as $contributor) {
        $this->node->biblio_contributors[] = $contributor;
      }
      break;
    case 'AUTHOR':
      $this->contributors[$this->contrib_count]['auth_category'] = 1;
      $this->contributors[$this->contrib_count]['auth_type'] = 1;
      $this->contrib_count++;
      break;
    case 'SECONDARY_AUTHOR':
      $this->contributors[$this->contrib_count]['auth_category'] = 2;
      $this->contributors[$this->contrib_count]['auth_type'] = 2;
      $this->contrib_count++;
      break;
    case 'TERTIARY_AUTHOR':
      $this->contributors[$this->contrib_count]['auth_category'] = 3;
      $this->contributors[$this->contrib_count]['auth_type'] = 3;
      $this->contrib_count++;
      break;
    case 'SUBSIDIARY_AUTHOR':
      $this->contributors[$this->contrib_count]['auth_category'] = 4;
      $this->contributors[$this->contrib_count]['auth_type'] = 4;
      $this->contrib_count++;
      break;
    case 'KEYWORD':
      $this->keyword_count++;
      break;
    default:
  }
  $this->element = '';
}