def _getpidclass(type, baseval): baseval = baseval.strip().replace('\n', '') if type.strip().lower() == "doi": return Doi(baseval) if type.strip().lower() == "urn" or type.strip().lower( ) == "urn:nbn" or type.strip().lower() == "urn:nbn:nl" or type.strip( ).lower() == "urnnbn" or type.strip().lower() == "nbn": return Nbn(baseval) if type.strip().lower() == "arxiv": return ArXiv(baseval) if type.strip().lower() == "href" or type.strip().lower( ) == "http" or type.strip().lower() == "url" or type.strip().lower( ) == "purl": # :mods:relatedItem/@xlink:href wordt met type 'url' opgezet... if ("doi.org/" in baseval.lower()): return Doi(baseval) return Purl(baseval) if type.strip().lower() == "issn": return Issn(baseval) if type.strip().lower() == "isbn": return Isbn(baseval) if type.strip().lower() == "pmid" or type.strip().lower() == "pubmed": return Pmid(baseval) if type.strip().lower() == "pure" or "pure" in type.lower(): return Pure(baseval) if type.strip().lower() == "wos": return Wos(baseval) if type.strip().lower() == "scopus": return Scopus(baseval) if type.strip().lower() == "uri": if ("issn" in baseval.lower()): return Issn(baseval) if ("isbn" in baseval.lower()): return Isbn(baseval) if ("doi" in baseval.lower()): return Doi(baseval) if ( "/handle/" in baseval.lower() or "hdl/" in baseval.lower() or "handle.net" in baseval.lower() ): #handle may resolve locally, prefixed with local url-resolver, so return url type if given so. return Handle(baseval) if ("urn:nbn:nl" in baseval.lower()): return Nbn(baseval) if ("http" in baseval.lower() or "ftp" in baseval.lower()): return Purl(baseval) if type.strip().lower() == "handle" or type.strip().lower( ) == "handle.net" or type.strip().lower() == "hdl": return Handle(baseval) return Unknown(type.strip().replace('\n', ''), baseval)
def __init__(self, search_queries=None, search_term_sets=None, sleep_time=1, database_id="WOS", search_client="Lite"): """ Initialize search queries. Keyword arguments: search_queries (list) -- Provide fully created queries in a list. search_terms (list) -- Provide series of searches as key-value pairs in a list. """ self.search_queries = search_queries self.search_term_sets = search_term_sets if not search_queries and not search_term_sets: print( "No searches provided. Include either 'search_queries' or 'search_terms' in argument." ) self.search_client = search_client self.database_id = database_id self.wos = Wos(sleep_time=sleep_time, client=self.search_client) self.wos.authorize() self.wos.retrieve_parameters()