Add function getUrlPrefix() to MDNodaRepository
This commit is contained in:
parent
06cc1d4c10
commit
8684933c9c
|
@ -134,6 +134,49 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the URL prefix for the current repository.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUrlPrefix():string {
|
||||
|
||||
return match($this) {
|
||||
self::allgemein => '',
|
||||
self::aat => 'https://vocab.getty.edu/page/aat/',
|
||||
self::ackerbau => 'https://term.museum-digital.de/ackerbau/tag/',
|
||||
self::bne => 'http://datos.bne.es/persona/',
|
||||
self::bnf => "https://catalogue.bnf.fr/ark:/12148/cb",
|
||||
self::cona => 'https://vocab.getty.edu/page/cona/',
|
||||
self::editionhumboldtdigital => 'https://edition-humboldt.de/register/personen/detail.xql?normid=http://d-nb.info/gnd/',
|
||||
self::gnd => 'https://d-nb.info/gnd/',
|
||||
self::grobsystematik => 'https://term.museum-digital.de/grobsystematik/tag/',
|
||||
self::iconclass => 'http://iconclass.org/rkd/',
|
||||
self::lcsh => 'http://id.loc.gov/authorities/names/',
|
||||
self::loc => 'http://id.loc.gov/authorities/names/',
|
||||
self::mbl => 'http://www.uni-magdeburg.de/mbl/PHP_Skripte/mbl_verwaltung/mbl_verw_anzeige_biog.php?auswahl=3&liste_biog_name=',
|
||||
self::mindatorg => 'https://www.mindat.org/min-', // Has suffix
|
||||
self::moebeltypologie => 'https://term.museum-digital.de/moebel/tag/',
|
||||
self::ndb_adb => 'https://www.deutsche-biographie.de/pnd',
|
||||
self::ndl => 'https://id.ndl.go.jp/auth/ndlna/',
|
||||
self::ndp_ikmk => 'https://ikmk.smb.museum/ndp/land/',
|
||||
self::ndp_ikmk_persons => 'https://ikmk.smb.museum/ndp/person/',
|
||||
self::nomisma => 'http://nomisma.org/id/',
|
||||
self::npg => 'https://www.npg.org.uk/collections/search/person/',
|
||||
self::oberbegriffsdatei => 'https://term.museum-digital.de/oberbegriffsdatei/tag/',
|
||||
self::orcid => 'https://orcid.org/',
|
||||
self::osm => 'https://www.openstreetmap.org/relation/',
|
||||
self::pim => 'https://opac-nevter.pim.hu/en/record/-/record/',
|
||||
self::pleiades => 'https://pleiades.stoa.org/places/',
|
||||
self::rkd => 'https://rkd.nl/explore/artists/',
|
||||
self::ulan => 'https://vocab.getty.edu/page/ulan/',
|
||||
self::viaf => 'https://viaf.org/viaf/',
|
||||
self::wikidata => 'https://www.wikidata.org/wiki/',
|
||||
self::wikipedia => 'https://de.wikipedia.org/wiki/',
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the base of the repository's entity page URLs.
|
||||
*
|
||||
|
@ -143,38 +186,10 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
|
|||
*/
|
||||
public function getEntityLink(string $id):string {
|
||||
|
||||
return match($this) {
|
||||
self::allgemein => $id,
|
||||
self::aat => 'https://vocab.getty.edu/page/aat/' . $id,
|
||||
self::ackerbau => 'https://term.museum-digital.de/ackerbau/tag/' . $id,
|
||||
self::bne => 'http://datos.bne.es/persona/' . $id,
|
||||
self::bnf => "https://catalogue.bnf.fr/ark:/12148/cb" . $id,
|
||||
self::cona => 'https://vocab.getty.edu/page/cona/' . $id,
|
||||
self::editionhumboldtdigital => 'https://edition-humboldt.de/register/personen/detail.xql?normid=http://d-nb.info/gnd/' . $id,
|
||||
self::gnd => 'https://d-nb.info/gnd/' . $id,
|
||||
self::grobsystematik => 'https://term.museum-digital.de/grobsystematik/tag/' . $id,
|
||||
self::iconclass => 'http://iconclass.org/rkd/' . $id,
|
||||
self::lcsh => 'http://id.loc.gov/authorities/names/' . $id,
|
||||
self::loc => 'http://id.loc.gov/authorities/names/' . $id,
|
||||
self::mbl => 'http://www.uni-magdeburg.de/mbl/PHP_Skripte/mbl_verwaltung/mbl_verw_anzeige_biog.php?auswahl=3&liste_biog_name=' . $id,
|
||||
self::mindatorg => 'https://www.mindat.org/min-' . $id . '.html',
|
||||
self::moebeltypologie => 'https://term.museum-digital.de/moebel/tag/' . $id,
|
||||
return match ($this) {
|
||||
self::ndb_adb => 'https://www.deutsche-biographie.de/pnd' . $id . '.html',
|
||||
self::ndl => 'https://id.ndl.go.jp/auth/ndlna/' . $id,
|
||||
self::ndp_ikmk => 'https://ikmk.smb.museum/ndp/land/' . $id,
|
||||
self::ndp_ikmk_persons => 'https://ikmk.smb.museum/ndp/person/' . $id,
|
||||
self::nomisma => 'http://nomisma.org/id/' . $id,
|
||||
self::npg => 'https://www.npg.org.uk/collections/search/person/' . $id,
|
||||
self::oberbegriffsdatei => 'https://term.museum-digital.de/oberbegriffsdatei/tag/' . $id,
|
||||
self::orcid => 'https://orcid.org/' . $id,
|
||||
self::osm => 'https://www.openstreetmap.org/relation/' . $id,
|
||||
self::pim => 'https://opac-nevter.pim.hu/en/record/-/record/' . $id,
|
||||
self::pleiades => 'https://pleiades.stoa.org/places/' . $id,
|
||||
self::rkd => 'https://rkd.nl/explore/artists/' . $id,
|
||||
self::ulan => 'https://vocab.getty.edu/page/ulan/' . $id,
|
||||
self::viaf => 'https://viaf.org/viaf/' . $id,
|
||||
self::wikidata => 'https://www.wikidata.org/wiki/' . $id,
|
||||
self::wikipedia => 'https://de.wikipedia.org/wiki/' . $id,
|
||||
self::mindatorg => 'https://www.mindat.org/min-' . $id . '.html',
|
||||
default => $this->getUrlPrefix() . $id,
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user