Skip to content
Snippets Groups Projects
Commit 6da7261c authored by André Lahmann's avatar André Lahmann
Browse files

refs #5063:

* fixing merge error from previous commit:5c19853e
parent 5c19853e
No related merge requests found
...@@ -95,6 +95,28 @@ trait SolrDefaultFincTrait ...@@ -95,6 +95,28 @@ trait SolrDefaultFincTrait
return $this->getFormat(); return $this->getFormat();
} }
/**
* Get an array of all footnotes in the record.
*
* @return array
* @access public
*/
public function getFootnotes()
{
return isset($this->fields['footnote']) ? $this->fields['footnote'] : [];
}
/**
* Get an array of dissertation notes.
*
* @return null
* @access protected
*/
protected function getDissertationNote()
{
return null;
}
/** /**
* Get back the standardizied format field of Solr index. * Get back the standardizied format field of Solr index.
* *
...@@ -243,6 +265,18 @@ trait SolrDefaultFincTrait ...@@ -243,6 +265,18 @@ trait SolrDefaultFincTrait
return $retval; return $retval;
} }
/**
* Get the main author of the record.
*
* @return string
* @access protected
*/
public function getPrimaryAuthor()
{
return isset($this->fields['author']) ?
$this->_filterAuthorDates($this->fields['author']) : '';
}
/** /**
* Get the original author of the record. * Get the original author of the record.
* *
...@@ -564,11 +598,30 @@ trait SolrDefaultFincTrait ...@@ -564,11 +598,30 @@ trait SolrDefaultFincTrait
* @return strings * @return strings
* @deprecated * @deprecated
*/ */
private function _removeAuthorDates( $authordata ) public function _removeAuthorDates( $author )
{ {
if (preg_match('/^(\s|.*)\s(fl.\s|d.\s|ca.\s)*\s?(\d{4})\??(\sor\s\d\d?)?\s?(-|–)?\s?(ca.\s|after\s)?(\d{1,4})?(.|,)?$/Uu',$authordata, $match)) { $match = array();
return (isset($match[1])) ? $match[1] : $authordata; if (preg_match('/^(\s|.*)\s(fl.\s|d.\s|ca.\s|\*)*\s?(\d{4})\??(\sor\s\d\d?)?\s?(-|–)?\s?(ca.\s|after\s|†)?(\d{1,4})?(.|,)?$/Uu', $author, $match))
{
$author = (isset($match[1])) ? trim($match[1]) : $author;
} }
return $authordata; // delete unnormalized characters of gallica ressource with source_id:20
if (preg_match('/(.*)(\d.*)/Uus', $author, $match))
{
$author = (isset($match[1])) ? trim($match[1]) : $author;
}
return $author;
}
/**
* Get an array of strings representing citation formats supported
* by this record's data (empty if none). For possible legal values,
* see /application/themes/root/helpers/Citation.php.
*
* @return array Strings representing citation formats.
*/
protected function getSupportedCitationFormats()
{
return ['APA', 'ISBD', 'MLA'];
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment