|
| 1 | +do put_macro("gndPersonCombinedLabel") # in contrast to morph this is not normalizing utf 8 |
| 2 | + paste("$[field].@combinedLabel","$[field].P", "$[field].a", "~, ", "$[field].d", join_char:"") |
| 3 | + replace_all("$[field].@combinedLabel",", $","") |
| 4 | + if exists("$[field].c") |
| 5 | + paste("$[field].@combinedLabel", "$[field].@combinedLabel", "$[field].c") |
| 6 | + end |
| 7 | + copy_field("$[field].n","$[field].add.$append") |
| 8 | + copy_field("$[field].l","$[field].add.$append") |
| 9 | + copy_field("$[field].g","$[field].add.$append") |
| 10 | + join_field("$[field].add",", ") |
| 11 | + replace_all("$[field].add","(^.*$)"," <$1>") |
| 12 | + if exists("$[field].add") |
| 13 | + paste("$[field].@combinedLabel", "$[field].@combinedLabel", "$[field].add", join_char:"") |
| 14 | + end |
| 15 | + copy_field("$[field].@combinedLabel", "$[out]") |
| 16 | +end |
| 17 | + |
| 18 | +do put_macro("gndCorporationCombinedLabel") # in contrast to morph this is not normalizing utf 8 |
| 19 | + if any_equal("@type","b") |
| 20 | + copy_field("$[field].n","$[field].add.$append") |
| 21 | + copy_field("$[field].l","$[field].add.$append") |
| 22 | + copy_field("$[field].g","$[field].add.$append") |
| 23 | + join_field("$[field].add",", ") |
| 24 | + replace_all("$[field].add","(^.*$)"," <$1>") |
| 25 | + copy_field("$[field].a","$[field].@combinedLabel") |
| 26 | + if exists("$[field].add") |
| 27 | + paste("$[field].@combinedLabel", "$[field].@combinedLabel", "$[field].add", join_char:"") |
| 28 | + end |
| 29 | + if exists("$[field].b") |
| 30 | + paste("$[field].@combinedLabel", "$[field].@combinedLabel", "~ / ", "$[field].b", join_char:"") |
| 31 | + end |
| 32 | + copy_field("$[field].@combinedLabel", "$[out]") |
| 33 | + end |
| 34 | +end |
| 35 | + |
| 36 | +do put_macro("gndConferenceCombinedLabel") # in contrast to morph this is not normalizing utf 8 |
| 37 | + if any_equal("@type","f") |
| 38 | + copy_field("$[field].g","$[field].add.$append") |
| 39 | + copy_field("$[field].n","$[field].add.$append") |
| 40 | + copy_field("$[field].d","$[field].add.$append") |
| 41 | + copy_field("$[field].c","$[field].add.$append") |
| 42 | + join_field("$[field].add",", ") |
| 43 | + replace_all("$[field].add","(^.*$)"," <$1>") |
| 44 | + if exists("$[field].b") |
| 45 | + paste("$[field].@combinedLabel", "$[field].a", "~ / ", "$[field].b", join_char:"") |
| 46 | + else |
| 47 | + copy_field("$[field].a","$[field].@combinedLabel") |
| 48 | + end |
| 49 | + if exists("$[field].add") |
| 50 | + paste("$[field].@combinedLabel", "$[field].@combinedLabel", "$[field].add", join_char:"") |
| 51 | + end |
| 52 | + copy_field("$[field].@combinedLabel", "$[out]") |
| 53 | + end |
| 54 | +end |
| 55 | + |
| 56 | + |
| 57 | +do put_macro("gndGeolocationCombinedLabel") # in contrast to morph this is not normalizing utf 8 |
| 58 | + if any_equal("@type","g") |
| 59 | + copy_field("$[field].z","$[field].add.$append") |
| 60 | + copy_field("$[field].g","$[field].add.$append") |
| 61 | + join_field("$[field].add",", ") |
| 62 | + replace_all("$[field].add","(^.*$)"," <$1>") |
| 63 | + if exists("$[field].b") |
| 64 | + paste("$[field].@combinedLabel", "$[field].a", "~ / ", "$[field].x", join_char:"") |
| 65 | + else |
| 66 | + copy_field("$[field].a","$[field].@combinedLabel") |
| 67 | + end |
| 68 | + if exists("$[field].add") |
| 69 | + paste("$[field].@combinedLabel", "$[field].@combinedLabel", "$[field].add", join_char:"") |
| 70 | + end |
| 71 | + copy_field("$[field].@combinedLabel", "$[out]") |
| 72 | + end |
| 73 | +end |
| 74 | + |
| 75 | +do put_macro("gndSubjectCombinedLabel") # in contrast to morph this is not normalizing utf 8 |
| 76 | + if any_equal("@type","s") |
| 77 | + copy_field("$[field].g","$[field].add.$append") |
| 78 | + join_field("$[field].add",", ") |
| 79 | + replace_all("$[field].add","(^.*$)"," <$1>") |
| 80 | + copy_field("$[field].a","$[field].@combinedLabel") |
| 81 | + if exists("$[field].add") |
| 82 | + paste("$[field].@combinedLabel", "$[field].@combinedLabel", "$[field].add", join_char:"") |
| 83 | + end |
| 84 | + copy_field("$[field].@combinedLabel", "$[out]") |
| 85 | + end |
| 86 | +end |
| 87 | + |
| 88 | +do put_macro("gndWorkCombinedLabel") # in contrast to morph this is not normalizing utf 8 |
| 89 | + if any_equal("@type","u") |
| 90 | + copy_field("$[field].f","$[field].add.$append") |
| 91 | + copy_field("$[field].g","$[field].add.$append") |
| 92 | + copy_field("$[field].n","$[field].add.$append") |
| 93 | + join_field("$[field].add",", ") |
| 94 | + replace_all("$[field].add","(^.*$)"," <$1>") |
| 95 | + if exists("$[field].p") |
| 96 | + paste("$[field].@combinedLabel", "$[field].a", "~ / ", "$[field].p", join_char:"") |
| 97 | + else |
| 98 | + copy_field("$[field].a","$[field].@combinedLabel") |
| 99 | + end |
| 100 | + if exists("$[field].add") |
| 101 | + paste("$[field].@combinedLabel", "$[field].@combinedLabel", "$[field].add", join_char:"") |
| 102 | + end |
| 103 | + copy_field("$[field].@combinedLabel", "$[out]") |
| 104 | + end |
| 105 | +end |
| 106 | + |
| 107 | +copy_field(" [email protected]","@type") |
| 108 | +substring("@type","1","1") |
| 109 | + |
| 110 | +do list(path:"028A","var":"PERSONNAME") |
| 111 | + call_macro("gndPersonCombinedLabel",field:"PERSONNAME",out:"name") |
| 112 | +end |
| 113 | +do list(path:"029A","var":"CORPORATIONNAME") |
| 114 | + call_macro("gndCorporationCombinedLabel",field:"CORPORATIONNAME",out:"name") |
| 115 | +end |
| 116 | +do list(path:"030A","var":"CONFERENCENAME") |
| 117 | + call_macro("gndConferenceCombinedLabel",field:"CONFERENCENAME",out:"name") |
| 118 | +end |
| 119 | +do list(path:"065A","var":"GEONAME") |
| 120 | + call_macro("gndGeolocationCombinedLabel",field:"GEONAME",out:"name") |
| 121 | +end |
| 122 | +do list(path:"041A","var":"SUBJECTNAME") |
| 123 | + call_macro("gndSubjectCombinedLabel",field:"SUBJECTNAME",out:"name") |
| 124 | +end |
| 125 | +do list(path:"022A","var":"WORKNAME") |
| 126 | + call_macro("gndWorkCombinedLabel",field:"WORKNAME",out:"name") |
| 127 | +end |
| 128 | + |
| 129 | +retain("name") |
0 commit comments