def id_generator(entry, handler): if namespace is not None: pre = ns_split(namespace) else: pre = (None , None) if test(entry, handler): return func_if_true(entry, handler, pre) else: return func_if_false(entry, handler, pre)
def ris_issn_ingester(entry_id, rdf_dict, ris_dict, rdf_key, sub_obj_type, ris_key, converter): _ns, pre = ns_split(rdf_key) for _sn in rdf_dict[find_parent_of_type(entry_id, rdf_dict, sub_obj_type)][rdf_key]: if ris_key not in ris_dict: ris_dict[ris_key] = [] ris_dict[ris_key].append("%s (%s)"%(_sn, pre.upper()))
def SN_ID_Generator(entry, handle): _ns, val = SN_Extractor(entry[SN][0]) __ns, pre = ns_split(_ns) return "urn:%s:%s"%(pre,val)