From deb20d28316a3dd091d34f879def52538b85265e Mon Sep 17 00:00:00 2001 From: huberrob Date: Wed, 16 Feb 2022 13:57:13 +0100 Subject: [PATCH] ark support see: #250 --- fuji_server/helper/identifier_helper.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fuji_server/helper/identifier_helper.py b/fuji_server/helper/identifier_helper.py index d00b35d3..0c9a7146 100644 --- a/fuji_server/helper/identifier_helper.py +++ b/fuji_server/helper/identifier_helper.py @@ -44,9 +44,12 @@ def __init__(self, idstring): if len(self.identifier) > 4 and not self.identifier.isnumeric(): #workaround to resolve lsids: #idutils.LANDING_URLS['lsid'] ='http://www.lsid.info/resolver/?lsid={pid}' - #workaround to recognize https purls - if 'https://purl.' in self.identifier: + #workaround to recognize https purls and arks + if 'https://purl.' in self.identifier or '/ark:' in self.identifier: self.identifier = self.identifier.replace('https:', 'http:') + #workaround to identify arks properly: + self.identifier = self.identifier.replace('/ark:' , '/ark:/' ) + self.identifier = self.identifier.replace('/ark://', '/ark:/') generic_identifiers_org_pattern = '^([a-z0-9\._]+):(.+)' # idutils check self.identifier_schemes = idutils.detect_identifier_schemes(self.identifier)