Campaigns, first version: storing in CSV file
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,577 @@
|
|||||||
|
;;;;;;;;;;
|
||||||
|
;;;Legend:;;;;;;;
|
||||||
|
;;;Open Question;Mapping to Classification;Create Campaign;Copy to Keywords;Do not migrate;;;
|
||||||
|
;;;;Mapping to Media Type;;;;;;
|
||||||
|
;;;;;;;;;;
|
||||||
|
Action;Parameter;;;;;;;;;
|
||||||
|
;;;;;;;;;;
|
||||||
|
classify;Status.Released;;Advertising Media;;;;;;;
|
||||||
|
classify;BusinessUnit.CAP;;;Brands & Concepts CAP;;;;;;
|
||||||
|
brand;;;;;Advantage;;;;;
|
||||||
|
campaign;;;;;;2006 - Makeover Kit Packaging;;;;
|
||||||
|
campaign;;;;;;2008 - Speed of Flea Kill;;;;
|
||||||
|
campaign;;;;;;2010 - CAP Parasiticides;;;;
|
||||||
|
campaign;;;;;;2012 - Rabbit Detailer;;;;
|
||||||
|
campaign;;;;;;2013 - Advantage vs. Activyl Detailer;;;;
|
||||||
|
campaign;;;;;;2013 - Flea Escape Game;;;;
|
||||||
|
campaign;;;;;;2014 - Cat to the Vet Detailer;;;;
|
||||||
|
campaign;;;;;;2015 - Toolbox;;;;
|
||||||
|
campaign;;;;;;2016 - Cat Breeds Poster;;;;
|
||||||
|
campaign;(2007-2017);;;;;FSM Detailer;;;;
|
||||||
|
brand;;;;;Advantix ;;;;;
|
||||||
|
skip;;;;;;Concepts - Toolkits;;;;
|
||||||
|
campaign;;;;;;;2003 - Free the Dog - Toolkit;;;
|
||||||
|
campaign;;;;;;;2006 - Go to the Max - Toolkit;;;
|
||||||
|
campaign;;;;;;;2012 - Tape Campaign;;;
|
||||||
|
campaign;;;;;;;2016 - No Bite Campaign;;;
|
||||||
|
campaign;;;;;;;2017 - Advantix Toolbox;;;
|
||||||
|
campaign;;;;;;;2017 - Neighbor Dogs;;;
|
||||||
|
skip;;;;;;Detailer ;;;;
|
||||||
|
campaign;;;;;;;2004 - eDetailer & Virtual Detailer;;;
|
||||||
|
campaign;;;;;;;2007 - eDetailer & Virtual Detailer;;;
|
||||||
|
campaign;;;;;;;2008 - New evidence of efficacy ;;;
|
||||||
|
campaign;;;;;;;2009 - Detailer Ehrlichosis;;;
|
||||||
|
campaign;;;;;;;2010 - Otranto Detailer ;;;
|
||||||
|
campaign;;;;;;;2012 - LeishVet Detailer;;;
|
||||||
|
campaign;;;;;;;2013 - Detailer - Ehrlichia;;;
|
||||||
|
campaign;;;;;;;2013 - eDetailer;;;
|
||||||
|
campaign;;;;;;;2015 - H2H Detailer;;;
|
||||||
|
campaign;;;;;;;2016 - Advantix H2H eDetailer;;;
|
||||||
|
campaign;(2014);;;;;Info Website;;;;
|
||||||
|
brand;;;;;Advocate;;;;;
|
||||||
|
campaign;;;;;;2006 - Technical Manual;;;;
|
||||||
|
campaign;;;;;;2007 - Advocate Meets Advocate Toolkit;;;;
|
||||||
|
campaign;;;;;;2007 - Launch Campaign Toolkit;;;;
|
||||||
|
campaign;;;;;;2007 - New Indications;;;;
|
||||||
|
campaign;;;;;;2008 - Lice Management;;;;
|
||||||
|
campaign;;;;;;2008 - The Endectocide;;;;
|
||||||
|
campaign;;;;;;2009 - Baermann Protocol;;;;
|
||||||
|
campaign;;;;;;2009 - Detailer Angiostrongylus Vasorum;;;;
|
||||||
|
campaign;;;;;;2009 Ferret;;;;
|
||||||
|
skip;;;;;;;Communication Strategy;;;
|
||||||
|
skip;;;;;;;Market Research;;;
|
||||||
|
skip;;;;;;;PR;;;
|
||||||
|
skip;;;;;;;Veterinary Services Support;;;
|
||||||
|
campaign;;;;;;2009/2010 - Lifecycle Aelurostrongylus abstrusus;;;;
|
||||||
|
campaign;;;;;;2010 - Lifecycle Crenosoma;;;;
|
||||||
|
campaign;;;;;;2010/2011 - Detailers;;;;
|
||||||
|
campaign;;;;;;2011 - Speed of Flea kill Detailer;;;;
|
||||||
|
campaign;;;;;;2013 - Evolution Campaign;;;;
|
||||||
|
campaign;;;;;;2014 - Advocate Advertorials;;;;
|
||||||
|
campaign;;;;;;2014 - Advocate eDetailer ;;;;
|
||||||
|
campaign;;;;;;2015 - D. repens Detailer;;;;
|
||||||
|
campaign;;;;;;2015 - Global website Localization Docs;;;;
|
||||||
|
campaign;;;;;;2015 - Steady State Detailer;;;;
|
||||||
|
campaign;;;;;;2016 - Advocate Vet Ad;;;;
|
||||||
|
campaign;;;;;;2016 - Diagnosis of Mites;;;;
|
||||||
|
campaign;;;;;;2017 - Advocate Poster;;;;
|
||||||
|
brand;;;;;Baytril;;;;;
|
||||||
|
campaign;;;;;;2000 - Intelligence at Work - Toolkit;;;;
|
||||||
|
campaign;;;;;;2009 - New Branding Campaign Toolkit;;;;
|
||||||
|
campaign;;;;;;2009 - Baytril Symposium Florence;;;;
|
||||||
|
campaign;;;;;;2011 - Oral Suspension ;;;;
|
||||||
|
campaign;;;;;;2013/14 - Clinical Cases;;;;
|
||||||
|
brand;;;;;Bolfo/Bay-o-Pet;;;;;
|
||||||
|
brand;;;;;CVBD;;;;;
|
||||||
|
campaign;;;;;;2009 - Risk Map;;;;
|
||||||
|
campaign;;;;;;2010 - Canine Leishmaniosis;;;;
|
||||||
|
campaign;;;;;;2010 - Clinic Manual;;;;
|
||||||
|
campaign;;;;;;2011 - CVBD, Idexx;;;;
|
||||||
|
campaign;;;;;;2012 - CVBD World Forum recommendations;;;;
|
||||||
|
campaign;;;;;;2013 - CVBD Diagnostic Paths;;;;
|
||||||
|
campaign;;;;;;2013 - CVBD Diagnostic Poster;;;;
|
||||||
|
campaign;;;;;;2014 - CVBD Digest;;;;
|
||||||
|
campaign;(2016-2017);;;;;CVBD Feline Clinical Cases;;;;
|
||||||
|
campaign;(2012-2015);;;;;CVBD Symposia;;;;
|
||||||
|
brand;;;;;Drontal;;;;;
|
||||||
|
campaign;;;;;;2007 - Wormers;;;;
|
||||||
|
campaign;;;;;;2010 - Giardia;;;;
|
||||||
|
campaign;;;;;;2012 - Vet Detailer;;;;
|
||||||
|
campaign;;;;;;2013 - Drontal Tasty Communication;;;;
|
||||||
|
campaign;;;;;;2015 - Drontal eDetailer;;;;
|
||||||
|
campaign;;;;;;2016 - Digital Game;;;;
|
||||||
|
campaign;;;;;;2016 - Giardia;;;;
|
||||||
|
campaign;;;;;;2017 - Drontal Tasty Images;;;;
|
||||||
|
brand;;;;;Procox;;;;;
|
||||||
|
campaign;;;;;;2011 - Procox Launch Communication Concept ;;;;
|
||||||
|
classify;MediaType.Packshot;;;;;;Packshots;;;
|
||||||
|
campaign;;;;;;2012 - Brand Guideline;;;;
|
||||||
|
campaign;;;;;;2012 - Easy digest 1, Coccidia;;;;
|
||||||
|
campaign;;;;;;2014 - Procox Positioning Video;;;;
|
||||||
|
brand;;;;;Profender;;;;;
|
||||||
|
keyword;;;;;;Profender Cat;;;;
|
||||||
|
campaign;;;;;;;2005 - Launch Campaign - Toolkit;;;
|
||||||
|
campaign;;;;;;;2005 - Technical Manual;;;
|
||||||
|
campaign;;;;;;;2008 - Spot-on Toolkit;;;
|
||||||
|
campaign;;;;;;;2011 - Spot on Detailer;;;
|
||||||
|
campaign;;;;;;;2011 - Tapeworm Materials;;;
|
||||||
|
campaign;;;;;;;2011 - Vet Ad;;;
|
||||||
|
campaign;;;;;;;2012 - Comparative study vet detailer;;;
|
||||||
|
campaign;;;;;;;2013 - iPad eDetailer materials;;;
|
||||||
|
campaign;;;;;;;2016 - Cat Breeds Poster;;;
|
||||||
|
campaign;;;;;;;2016 - Happy Cat Campaign;;;
|
||||||
|
keyword;;;;;;Profender Dog;;;;
|
||||||
|
campaign;;;;;;;2009 - Tablets Launch Concept;;;
|
||||||
|
campaign;;;;;;;2011 - Advocate MDR1;;;
|
||||||
|
campaign;;;;;;;2011 - Toxocara canis in dogs;;;
|
||||||
|
campaign;;;;;;;2012 - Vet Detailer;;;
|
||||||
|
brand;;;;;Seresto;;;;;
|
||||||
|
campaign;(2017);;;;;Augmented Reality;;;;
|
||||||
|
campaign;(2016);;;;;Blogger Materials;;;;
|
||||||
|
keyword;;;;;;;Blogger Box;;;
|
||||||
|
keyword;;;;;;;Guideline;;;
|
||||||
|
keyword;;;;;;;Microsite;;;
|
||||||
|
campaign;(2011-2017);;;;;Brand Guideline;;;;
|
||||||
|
campaign;(2012);;;;;Conference Material;;;;
|
||||||
|
keyword;;;;;;;PowerPoint Templates;;;
|
||||||
|
campaign;(2014);;;;;PR Material;;;;
|
||||||
|
campaign;(2011-2014);;;;;Pet Owner Material;;;;
|
||||||
|
keyword;;;;;;;Images TV Spot;;;
|
||||||
|
keyword;;;;;;;Key Visuals;;;
|
||||||
|
campaign;(2011-2017);;;;;Seresto Images;;;;
|
||||||
|
campaign;(2015);;;;;Technical Manual;;;;
|
||||||
|
campaign;(2012-2016);;;;;Vet /Nurse Material;;;;
|
||||||
|
keyword;;;;;;;Advertisements;;;
|
||||||
|
keyword;;;;;;;Print Detailer;;;
|
||||||
|
keyword;;;;;;;eDetailer;;;
|
||||||
|
brand;;;;;Veraflox;;;;;
|
||||||
|
campaign;;;;;;2011 - Veraflox Brands;;;;
|
||||||
|
keyword;;;;;;;Key Visuals;;;
|
||||||
|
keyword;;;;;;;Pictograms;;;
|
||||||
|
campaign;;;;;;2013 - Laboratory card;;;;
|
||||||
|
campaign;;;;;;2013 - Product Manual;;;;
|
||||||
|
campaign;;;;;;"2014 - Concept ""Reduce the risk of recurrens""";;;;
|
||||||
|
campaign;(2016-2017);;;;;AI Symposium Proceedings/Digest;;;;
|
||||||
|
campaign;(2013-1014);;;;;Clinical Cases;;;;
|
||||||
|
campaign;(2006-2013);;;;;Veraflox Symposium;;;;
|
||||||
|
brand;;;;;miscellaneous;;;;;
|
||||||
|
campaign;;;;;;2009 - Symposium ESVD/ECVD;;;;
|
||||||
|
campaign;;;;;;2011 - Dog Breed Poster;;;;
|
||||||
|
campaign;;;;;;2013 - A. ceylanicum detailer for Asia;;;;
|
||||||
|
campaign;;;;;;2013 - Egg Shedding Leaflet;;;;
|
||||||
|
campaign;;;;;;2013 - WSAVA CE Ad;;;;
|
||||||
|
campaign;;;;;;2014 - Worming Tool;;;;
|
||||||
|
campaign;;;;;;2016 - Endo Book;;;;
|
||||||
|
campaign;;;;;;2017 - Ecto Book;;;;
|
||||||
|
campaign;(2007-2017);;;;;Dermatology Brochure ;;;;
|
||||||
|
skip;;;;;;Parasite Calendar;;;;
|
||||||
|
classify;BusinessUnit.FAP;;;Brands & Concepts FAP;;;;;;
|
||||||
|
brand;;;;;Baycox;;;;;
|
||||||
|
keyword;;;;;;Baycox Bovis;;;;
|
||||||
|
campaign;;;;;;;2012 - Toolkit;;;
|
||||||
|
campaign;;;;;;;2013 - iPad eDetailer;;;
|
||||||
|
campaign;;;;;;;2016 - Baycox Bovis Detailer;;;
|
||||||
|
keyword;;;;;;Baycox Lamb;;;;
|
||||||
|
keyword;;;;;;Baycox Poultry;;;;
|
||||||
|
keyword;;;;;;Baycox Swine;;;;
|
||||||
|
campaign;;;;;;;2010 - Old Concept: Gain more by preventing coccidiosis;;;
|
||||||
|
campaign;;;;;;;2012 - Toolkit;;;
|
||||||
|
campaign;(2015-2016);;;;;;2015/16 - Baycox Iron Oral;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
campaign;;;;;;;2016 - Baycox Swine Detailer;;;
|
||||||
|
campaign;(2004-2008);;;;;Baycox Technical Information;;;;
|
||||||
|
skip;;;;;;Videos/Animations;;;;
|
||||||
|
keyword;;;;;;;Baycox Bovis;;;
|
||||||
|
keyword;;;;;;;Baycox Lamb;;;
|
||||||
|
keyword;;;;;;;Baycox Swine;;;
|
||||||
|
brand;;;;;Bayticol;;;;;
|
||||||
|
brand;;;;;Baytril;;;;;
|
||||||
|
campaign;(2011-2013);;;;;Brand Guide;;;;
|
||||||
|
campaign;(2006-2013);;;;;Cattle;;;;
|
||||||
|
keyword;;;;;;;Advertisements;;;
|
||||||
|
keyword;;;;;;;Mastitis Technical Manual;;;
|
||||||
|
campaign;(2011);;;;;MPC Concept;;;;
|
||||||
|
campaign;(2013);;;;;Poultry;;;;
|
||||||
|
keyword;;;;;;;Advertisements;;;
|
||||||
|
keyword;;;;;;;Brochures & Manuals;;;
|
||||||
|
campaign;(2011-2015);;;;;Swine;;;;
|
||||||
|
keyword;;;;;;;Advertisements;;;
|
||||||
|
keyword;;;;;;;Brochures & Manuals;;;
|
||||||
|
keyword;;;;;;;eDetailer;;;
|
||||||
|
brand;;;;;Bayvarol;;;;;
|
||||||
|
campaign;(2006-2013);;;;;Bayvarol Perizin Checkmite - Toolkit;;;;
|
||||||
|
skip;;;;;;;Animated PowerPoint Presentation;;;
|
||||||
|
skip;;;;;;;Give Aways;;;
|
||||||
|
brand;;;;;Biosecurity;;;;;
|
||||||
|
campaign;;;;;;2014 - eDetailer;;;;
|
||||||
|
brand;;;;;Catosal;;;;;
|
||||||
|
campaign;;;;;;2008 - Trust Pink Toolkit;;;;
|
||||||
|
campaign;;;;;;2011 - Metabolic Moments;;;;
|
||||||
|
campaign;(2013-2016);;;;;Body Condition Score;;;;
|
||||||
|
brand;;;;;Ceffect;;;;;
|
||||||
|
brand;;;;;Dairy Products;;;;;
|
||||||
|
brand;;;;;Honey bee care;;;;;
|
||||||
|
keyword;;;;;;Images;;;;
|
||||||
|
brand;;;;;Polyvar;;;;;Brand noch nicht im System
|
||||||
|
classify;Status.Archived;;;;Transforming Livestock Production;;;Wird archiviert;;Welche Brand?
|
||||||
|
classify;Status.Archived;;;;;TLP Pictograms;;;;
|
||||||
|
brand;;;;;Victrio;;;;;
|
||||||
|
brand;;;;;Zelnate;;;;;
|
||||||
|
campaign;(2016);;;;;Brand Guide;;;;
|
||||||
|
campaign;(2016);;;;;Digital;;;;
|
||||||
|
campaign;(2015);;;;;Logo;;;;
|
||||||
|
campaign;(2015-2016);;;;;Print;;;;
|
||||||
|
campaign;(2016);;;;;Videos;;;;
|
||||||
|
classify;MediaType.Guideline;;;Copyright Templates;-> unter Guidelines;;;;;
|
||||||
|
classify;MediaType.Guideline;;;Guidelines;;;;;;
|
||||||
|
skip;;;;;AH Meeting Culture;;;;;
|
||||||
|
skip;;;;;Agency Briefing Templates;;;;;
|
||||||
|
skip;;;;;BAH eDetailer Template;;;;;
|
||||||
|
classify;BusinessUnit.CAP;;;;CAP Brand/Packaging Design;;;;;
|
||||||
|
campaign;(2009-2017);;;;;Advantage Family;;;;
|
||||||
|
campaign;(2003-2012);;;;;Bolfo/Bayopet (OTC);;;;
|
||||||
|
campaign;(2012-2017);;;;;Drontal Product Family;;;;
|
||||||
|
campaign;(2014);;;;;Ethical Pack;;;;
|
||||||
|
campaign;(2005);;;;;Kiltix Products;;;;
|
||||||
|
campaign;(2017);;;;;Lifestyle Photography 2017;;;;
|
||||||
|
campaign;(2009-2012);;;;;Profender Products;;;;
|
||||||
|
campaign;(2011-2017);;;;;Seresto Packaging;;;;
|
||||||
|
classify;BusinessUnit.FAP;;;;FAP Brand/Packaging Design;;;;;
|
||||||
|
campaign;(2011);;;;;Farm Animal Products;;;;
|
||||||
|
campaign;(2006);;;;;Farmhygiene Products;;;;
|
||||||
|
skip;;;;;Global Exhibit Design Manual;;;;;
|
||||||
|
not migrated;;;;;Training Tools - MediaAssistant;;;;;
|
||||||
|
classify;BusinessUnit.General;;;Images;;;kommt komplett in Space General;;;Nach Motives-Baum unter Images
|
||||||
|
motives;;;;;Applications;;;;;
|
||||||
|
motives;;;;;Different animals together;;;;;
|
||||||
|
motives;;;;;Disease Symptoms;;;;;
|
||||||
|
motives;;;;;;Organs;;;;
|
||||||
|
motives;;;;;;Skin;;;;
|
||||||
|
motives;;;;;Examination/Sampling;;;;;
|
||||||
|
motives;;;;;Illustrations;;;;;
|
||||||
|
motives;;;;;;Animals and people;;;;
|
||||||
|
motives;;;;;;Application;;;;
|
||||||
|
motives;;;;;;Art;;;;
|
||||||
|
skip;;;;;;;Cat and DogART, Portugal;;;
|
||||||
|
skip;;;;;;;Cat and DogART, Prague;;;
|
||||||
|
skip;;;;;;;CattleART;;;
|
||||||
|
skip;;;;;;;PigART;;;
|
||||||
|
skip;;;;;;;PoultryART;;;
|
||||||
|
skip;;;;;;;SheepART;;;
|
||||||
|
motives;;;;;;Cells and microorganisms;;;;
|
||||||
|
motives;;;;;;Lifecycles & Routes of infection;;;;
|
||||||
|
motives;;;;;;Maps;;;;
|
||||||
|
motives;;;;;;Parasites;;;;
|
||||||
|
motives;;;;;;Pictograms;;;;
|
||||||
|
motives;;;;;Insects and arachnids;;;;;
|
||||||
|
motives;;;;;;Fleas;;;;
|
||||||
|
motives;;;;;;Flies;;;;
|
||||||
|
motives;;;;;;Lice;;;;
|
||||||
|
motives;;;;;;Mites;;;;
|
||||||
|
motives;;;;;;Mosquitoes;;;;
|
||||||
|
motives;;;;;;Ticks;;;;
|
||||||
|
motives;;;;;Laboratory;;;;;
|
||||||
|
motives;;;;;Microorganism;;;;;
|
||||||
|
motives;;;;;People;;;;;
|
||||||
|
motives;;;;;People with animals;;;;;
|
||||||
|
motives;;;;;Target animals;;;;;
|
||||||
|
motives;;;;;;Birds;;;;
|
||||||
|
motives;;;;;;Cats;;;;
|
||||||
|
motives;;;;;;Cattle;;;;
|
||||||
|
motives;;;;;;Dogs;;;;
|
||||||
|
motives;;;;;;Honey bees;;;;
|
||||||
|
keyword;;;;;;;Flowers;;;
|
||||||
|
motives;;;;;;Horses;;;;
|
||||||
|
motives;;;;;;Poultry;;;;
|
||||||
|
motives;;;;;;Reptiles and turtles;;;;
|
||||||
|
motives;;;;;;Sheep;;;;
|
||||||
|
motives;;;;;;Small furry animals;;;;
|
||||||
|
motives;;;;;;Swine;;;;
|
||||||
|
motives;;;;;;Zoo and other animals;;;;
|
||||||
|
motives;;;;;Worms (Helminths);;;;;
|
||||||
|
motives;;;;;;Roundworms;;;;
|
||||||
|
motives;;;;;;Tapeworms;;;;
|
||||||
|
scan;;;;Logos;;;;;;bitte den Brands zuordnen
|
||||||
|
skip;;;;Packshots;;;;;;
|
||||||
|
brand;;;;;Advantage;;;;;
|
||||||
|
brand;;;;;Advantix;;;;;
|
||||||
|
brand;;;;;Advocate;;;;;
|
||||||
|
brand;;;;;Baycox;;;;;
|
||||||
|
brand;;;;;Baytril;;;;;
|
||||||
|
brand;;;;;Bolfo/Bay-o-Pet;;;;;
|
||||||
|
brand;;;;;Byemite;;;;;
|
||||||
|
brand;;;;;Catosal;;;;;
|
||||||
|
brand;;;;;Clavobay;;;;;
|
||||||
|
brand;;;;;Droncit;;;;;
|
||||||
|
brand;;;;;Drontal;;;;;
|
||||||
|
brand;;;;;Procox;;;;;
|
||||||
|
brand;;;;;Profender;;;;;
|
||||||
|
brand;;;;;Seresto;;;;;
|
||||||
|
brand;;;;;Veraflox;;;;;
|
||||||
|
scan;;;;Video Library;;-> alles was nicht brand-related ist, bitte unter Space General;;;;Wenn möglich, Brand zuordnen, sonst General/unassigned
|
||||||
|
keyword;;;;;Events;;;;;
|
||||||
|
brand;;;;;;CVBD;;;;
|
||||||
|
skip;;;;;Films by Brand;;;;;
|
||||||
|
brand;;;;;;Advantage;;;;
|
||||||
|
brand;;;;;;Advantix / K9 Advantix;;;;
|
||||||
|
skip;;;;;;;No Bite;;;
|
||||||
|
skip;;;;;;;Repel & Kill - 2014;;;
|
||||||
|
brand;;;;;;Advocate/Advantage Multi;;;;
|
||||||
|
brand;;;;;;Baycox;;;;
|
||||||
|
brand;;;;;;Bayer Parasite Solutions;;;;
|
||||||
|
brand;;;;;;Catosal;;;;
|
||||||
|
brand;;;;;;Drontal;;;;
|
||||||
|
brand;;;;;;Procox;;;;
|
||||||
|
brand;;;;;;Profender Cat;;;;
|
||||||
|
brand;;;;;;Profender Dog;;;;
|
||||||
|
brand;;;;;;Seresto;;;;
|
||||||
|
brand;;;;;;Veraflox;;;;
|
||||||
|
brand;;;;;;Victrio;;;;
|
||||||
|
brand;;;;;;Zelnate;;;;
|
||||||
|
skip;;;;;Films by Indication;;;;;
|
||||||
|
keyword;;;;;;Flea;;;;
|
||||||
|
keyword;;;;;;Giardia;;;;
|
||||||
|
keyword;;;;;;Mite;;;;
|
||||||
|
keyword;;;;;;Mosquito;;;;
|
||||||
|
keyword;;;;;;Tick;;;;
|
||||||
|
keyword;;;;;;Worms;;;;
|
||||||
|
keyword;;;;;;;Aelurostrongylus abstrusus;;;
|
||||||
|
keyword;;;;;;;Angiostrongylus vasorum;;;
|
||||||
|
keyword;;;;;;;Dirofilaria immitis;;;
|
||||||
|
keyword;;;;;;;Dirofilaria repens;;;
|
||||||
|
keyword;;;;;;;Toxocara;;;
|
||||||
|
keyword;;;;;;Zoonosis;;;;
|
||||||
|
skip;;;;;TV Commercials;;;;;
|
||||||
|
brand;;;;;;Advantix / K9 Advantix;;;;
|
||||||
|
brand;;;;;;Advocate / Advantage Multi;;;;
|
||||||
|
brand;;;;;;Seresto;;;;
|
||||||
|
not migrated;;;BAH Image series;;;;;;;wird nicht migriert
|
||||||
|
skip;;;;Image series 1;;;;;;
|
||||||
|
skip;;;;Image series 2;;;;;;
|
||||||
|
classify;Status.Archived;;BAH Internal Videos;;"alle ins Archiv -> unter classification ""interne Videos""";;;;;
|
||||||
|
not migrated;;;BAH Webshop;;;;;;;wird nicht migriert
|
||||||
|
skip;;;;Advantage;;;;;;
|
||||||
|
skip;;;;Advantix;;;;;;
|
||||||
|
skip;;;;Advocate;;;;;;
|
||||||
|
skip;;;;BAH in general ;;;;;;
|
||||||
|
skip;;;;Baycox;;;;;;
|
||||||
|
skip;;;;Bayer Parasite Solution ;;;;;;
|
||||||
|
skip;;;;Bayticol;;;;;;
|
||||||
|
skip;;;;Baytril;;;;;;
|
||||||
|
skip;;;;Baytril CAP;;;;;;
|
||||||
|
skip;;;;Bayvarol;;;;;;
|
||||||
|
skip;;;;Bolfo ;;;;;;
|
||||||
|
skip;;;;Byemite ;;;;;;
|
||||||
|
skip;;;;CVBD Congress;;;;;;
|
||||||
|
skip;;;;Catosal;;;;;;
|
||||||
|
skip;;;;Cattle Art;;;;;;
|
||||||
|
skip;;;;Drontal;;;;;;
|
||||||
|
skip;;;;ESFM Congress ;;;;;;
|
||||||
|
skip;;;;Foresto ;;;;;;
|
||||||
|
skip;;;;IPVS Congress ;;;;;;
|
||||||
|
skip;;;;Kiltix;;;;;;
|
||||||
|
skip;;;;NAVC ;;;;;;
|
||||||
|
skip;;;;Pen;;;;;;
|
||||||
|
skip;;;;Perizin;;;;;;
|
||||||
|
skip;;;;Pig ART ;;;;;;
|
||||||
|
skip;;;;Procox;;;;;;
|
||||||
|
skip;;;;Profender;;;;;;
|
||||||
|
skip;;;;Renalzin;;;;;;
|
||||||
|
skip;;;;Rompun;;;;;;
|
||||||
|
skip;;;;Sebacil;;;;;;
|
||||||
|
skip;;;;Seresto;;;;;;
|
||||||
|
skip;;;;TLP Transforming LIvestock Production ;;;;;;
|
||||||
|
skip;;;;Technical Supplement ;;;;;;
|
||||||
|
skip;;;;Veraflox;;;;;;
|
||||||
|
skip;;;;Veterinary Parasitology;;;;;;
|
||||||
|
skip;;;;WAAVP Congress ;;;;;;
|
||||||
|
skip;;;;WBC Congress;;;;;;
|
||||||
|
skip;;;;Watches ;;;;;;
|
||||||
|
classify;Status.Archived;;BAH archive;;;-> muss gesondert nochmal besprochen werden;;;;
|
||||||
|
skip;;;;Advertising Media;;;;;;
|
||||||
|
classify;BusinessUnit.CAP;;;;CAP;;;;;
|
||||||
|
keyword;;;;;;Acticam;;;;Frage: Im Archiv sind brands, die es nicht mehr gibt.
|
||||||
|
brand;;;;;;Advantage;;;;D.h. wenn wir diese jetzt aufführen, sieht man doch auch brands
|
||||||
|
brand;;;;;;Advantix;;;;(die es nicht mehr gibt) in der User-Sicht? Oder? Evtl. alte Brands in Keywords
|
||||||
|
keyword;;;;;;;CVBD WebConference;;;
|
||||||
|
skip;;;;;;;;2014;;
|
||||||
|
skip;;;;;;;;2015;;
|
||||||
|
brand;;;;;;Advocate;;;;
|
||||||
|
keyword;;;;;;;Poster;;;
|
||||||
|
keyword;;;;;;BPS;;;;
|
||||||
|
brand;;;;;;Baytril;;;;
|
||||||
|
keyword;;;;;;Catosal;;;;
|
||||||
|
keyword;;;;;;Clavobay;;;;
|
||||||
|
keyword;;;;;;Dermatology;;;;
|
||||||
|
keyword;;;;;;Droncit;;;;
|
||||||
|
brand;;;;;;Drontal;;;;
|
||||||
|
keyword;;;;;;Fuciderm, Fucidin, Conoptal;;;;
|
||||||
|
keyword;;;;;;Hyonate;;;;
|
||||||
|
keyword;;;;;;Kiltix;;;;
|
||||||
|
brand;;;;;;Miscellaneous;;;;
|
||||||
|
brand;;;;;;Profender;;;;
|
||||||
|
keyword;;;;;;Renalzin;;;;
|
||||||
|
brand;;;;;;Seresto;;;;
|
||||||
|
keyword;;;;;;;2012 - Client education;;;
|
||||||
|
keyword;;;;;;;2012 - Launch;;;
|
||||||
|
keyword;;;;;;;Augmented Reality;;;
|
||||||
|
keyword;;;;;;;OTC;;;
|
||||||
|
keyword;;;;;;;POM;;;
|
||||||
|
keyword;;;;;;;Seresto Profender;;;
|
||||||
|
keyword;;;;;;;Seresto e-detailer;;;
|
||||||
|
brand;;;;;;Veraflox;;;;
|
||||||
|
classify;BusinessUnit.FAP;;;;FAP;;;;;
|
||||||
|
brand;;;;;;Baycox;;;;
|
||||||
|
keyword;;;;;;;Baycox Bovis Toolkit (Old);;;
|
||||||
|
skip;;;;;;;;Awareness Campaign;;
|
||||||
|
skip;;;;;;;;Images Baycox bovis Toolkit;;
|
||||||
|
skip;;;;;;;;Launch Campaign;;
|
||||||
|
keyword;;;;;;;Baycox Brand Communication 2009;;;
|
||||||
|
skip;;;;;;;;Key Visuals;;
|
||||||
|
skip;;;;;;;;Logos;;
|
||||||
|
keyword;;;;;;;Baycox Lamb Toolkit;;;
|
||||||
|
skip;;;;;;;;Images Baycox Lamb Toolkit;;
|
||||||
|
keyword;;;;;;;Baycox Piglet Launch Campaign - Toolkit;;;
|
||||||
|
skip;;;;;;;;Baycox Piglet Images;;
|
||||||
|
keyword;;;;;;;Baycox Poultry;;;
|
||||||
|
skip;;;;;;;;Images Baycox Poultry;;
|
||||||
|
keyword;;;;;;;The European Campaigns;;;
|
||||||
|
skip;;;;;;;;Awareness;;
|
||||||
|
skip;;;;;;;;Launch;;
|
||||||
|
brand;;;;;;Bayticol;;;;
|
||||||
|
skip;;;;;;;Images;;;
|
||||||
|
brand;;;;;;Baytril;;;;
|
||||||
|
keyword;;;;;;; Baytril International Communication Concepts;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;;Baytril - Communication Concept 2011;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;;Baytril 1nject Concept;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;;Baytril Eyecatcher Campaign;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;;Baytril MPC Brochure;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;;Baytril The right choice Toolkit;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;;Baytril against Mastitis - Technical manual;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;;Baytril max -Advertising Concept 1998;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
skip;;;;;;;;Technical Manual;;
|
||||||
|
skip;;;;;;;;;Images;
|
||||||
|
keyword;;;;;;Bayvarol;;;;
|
||||||
|
keyword;;;;;;;Bayvarol Perizin Checkmite - Toolkit;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;ByeMite ;;;;
|
||||||
|
keyword;;;;;;;ByeMite Say Goodbye to Red Mites - The Toolkit;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
skip;;;;;;;Images;;;
|
||||||
|
brand;;;;;;Catosal;;;;
|
||||||
|
keyword;;;;;;;Metabolic Moments 2011;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
keyword;;;;;;;Trust Pinkt Toolkit 2008;;;
|
||||||
|
skip;;;;;;;;Images;;
|
||||||
|
brand;;;;;;Dairy Products;;;;
|
||||||
|
brand;;;;;;Biosecurity;;;;
|
||||||
|
keyword;;;;;;Prolongal;;;;
|
||||||
|
brand;;;;;;Transforming Livestock Production;;;;
|
||||||
|
skip;;;;;;;Images;;;
|
||||||
|
;;;;Give Aways;;;;;;
|
||||||
|
;;;;Graphics/tables;;;;;;
|
||||||
|
;;;;Guidelines;;;;;;
|
||||||
|
;;;;;Advocate Guideline 2009;;;;;
|
||||||
|
;;;;;CAP Brand Design;;;;;
|
||||||
|
;;;;;;Advantage family;;;;
|
||||||
|
;;;;;;Drontal Plus;;;;
|
||||||
|
;;;;;;HOB 2000;;;;
|
||||||
|
;;;;;;Kiltix;;;;
|
||||||
|
;;;;;;Packaging Design 1996;;;;
|
||||||
|
;;;;;;Pet Care Products (OTC);;;;
|
||||||
|
;;;;;;Profender;;;;
|
||||||
|
;;;;;;Seresto;;;;
|
||||||
|
;;;;;;;Packaging Images;;;
|
||||||
|
;;;;;FAP Brand Design;;;;;
|
||||||
|
;;;;;;Farm Animal Products;;;;
|
||||||
|
;;;;;;Farmhygiene Products;;;;
|
||||||
|
;;;;;Packaging;;;;;
|
||||||
|
;;;;;;Absolut;;;;
|
||||||
|
;;;;;;Advantage;;;;
|
||||||
|
;;;;;;Advantix;;;;
|
||||||
|
;;;;;Training Tools MA;;;;;
|
||||||
|
;;;;;eDetailer Template;;;;;
|
||||||
|
;;;;Illustrations;;;;;;
|
||||||
|
;;;;Images;;;;;;
|
||||||
|
motives;;;;;Animals;;;;;
|
||||||
|
motives;;;;;;Bees;;;;
|
||||||
|
motives;;;;;;Benelux Images black/white;;;;
|
||||||
|
motives;;;;;;Cats;;;;
|
||||||
|
motives;;;;;;Cattle;;;;
|
||||||
|
motives;;;;;;Dogs;;;;
|
||||||
|
motives;;;;;;Ectoparasites in pictures;;;;
|
||||||
|
motives;;;;;;Horses;;;;
|
||||||
|
motives;;;;;;Images from Mexico;;;;
|
||||||
|
motives;;;;;;Insects and arachnids;;;;
|
||||||
|
motives;;;;;;;Red bird mite;;;
|
||||||
|
motives;;;;;;Poultry;;;;
|
||||||
|
motives;;;;;;Sheep ticks and control;;;;
|
||||||
|
motives;;;;;;Sheeps;;;;
|
||||||
|
motives;;;;;;Small furry animals;;;;
|
||||||
|
motives;;;;;;Swine;;;;
|
||||||
|
motives;;;;;;Ticks and tickborne;;;;
|
||||||
|
motives;;;;;;Worms;;;;
|
||||||
|
motives;;;;;Application;;;;;
|
||||||
|
motives;;;;;Different animals together;;;;;
|
||||||
|
motives;;;;;Disease symptoms;;;;;
|
||||||
|
motives;;;;;;Myiases;;;;
|
||||||
|
motives;;;;;Events;;;;;
|
||||||
|
motives;;;;;;CVBD symposium, Billesley 2006;;;;
|
||||||
|
motives;;;;;;WSAVA 2006, Prag;;;;
|
||||||
|
motives;;;;;Microorganisms;;;;;
|
||||||
|
motives;;;;;Microscope images;;;;;
|
||||||
|
motives;;;;;;LM images;;;;
|
||||||
|
motives;;;;;;SEM images;;;;
|
||||||
|
motives;;;;;People;;;;;
|
||||||
|
motives;;;;;People and animals;;;;;
|
||||||
|
motives;;;;;;Advantix, 2003 - Free the dog Toolkit;;;;
|
||||||
|
;;;;Logos;;;;;;
|
||||||
|
;;;;PR & Congresses;;;;;;
|
||||||
|
;;;;;Congresses;;;;;
|
||||||
|
;;;;;;Angio Forum;;;;
|
||||||
|
;;;;;;CVBD;;;;
|
||||||
|
;;;;;;ECVIM;;;;
|
||||||
|
;;;;;;ESFM;;;;
|
||||||
|
;;;;;;ESVD;;;;
|
||||||
|
;;;;;;IPVS, WBC;;;;
|
||||||
|
;;;;;Public Relations;;;;;
|
||||||
|
;;;;;;Brand PR;;;;
|
||||||
|
;;;;;;Press Releases;;;;
|
||||||
|
;;;;Packshots;;;;;;
|
||||||
|
;;;;Videos;;;;;;
|
||||||
|
;;;;;CAP;;;;;
|
||||||
|
;;;;;;Advantage;;;;
|
||||||
|
;;;;;;Advantix;;;;
|
||||||
|
;;;;;;Advocate;;;;
|
||||||
|
;;;;;;BPS;;;;
|
||||||
|
;;;;;;Baytril;;;;
|
||||||
|
;;;;;;Drontal;;;;
|
||||||
|
;;;;;;Profender;;;;
|
||||||
|
;;;;;;Renalzin;;;;
|
||||||
|
;;;;;;Rompun;;;;
|
||||||
|
;;;;;;Seresto;;;;
|
||||||
|
;;;;;;Worms;;;;
|
||||||
|
;;;;;Events;;;;;
|
||||||
|
;;;;;;Baytril Symposium 2009 Florence;;;;
|
||||||
|
;;;;;;CVBD / Zoonosis;;;;
|
||||||
|
;;;;;;GM Workshop 2011, Krefeld;;;;
|
||||||
|
;;;;;;IPVS 2010;;;;
|
||||||
|
;;;;;;Parasite Exhibition Museum;;;;
|
||||||
|
;;;;;;WBC;;;;
|
||||||
|
;;;;;FAP;;;;;
|
||||||
|
;;;;;;Baycox;;;;
|
||||||
|
;;;;;;Baytril;;;;
|
||||||
|
;;;;;;Bye Mite;;;;
|
||||||
|
;;;;;Historical films;;;;;
|
||||||
|
;;;;;Marketing Excellence;;;;;
|
||||||
|
;;;;;TV Spots;;;;;
|
||||||
|
;;;;;Webinars;;;;;
|
||||||
|
;;;;Webshop;;;;;;
|
||||||
|
;;;;;Clothes;;;;;
|
||||||
|
;;;;;Special Edition;;;;;
|
||||||
|
not migrated;;;M-CAP-Links;;;;;;;
|
||||||
|
skip;;;;AI Symposia;;;;;;
|
||||||
|
skip;;;;Advocate D repens SEM '16;;;;;;
|
||||||
|
skip;;;;AngioSEM;;;;;;
|
||||||
|
skip;;;;Baytril CC;;;;;;
|
||||||
|
skip;;;;CVBD;;;;;;
|
||||||
|
skip;;;;Veraflox Det;;;;;;
|
||||||
|
not migrated;;;Medical Care ;;;;;;;
|
||||||
|
Binary file not shown.
@@ -30,6 +30,8 @@ import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
|||||||
import org.springframework.web.client.HttpStatusCodeException;
|
import org.springframework.web.client.HttpStatusCodeException;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
import com.bayer.edam.migration.adam.Campaign;
|
||||||
|
import com.bayer.edam.migration.adam.EntityId;
|
||||||
import com.bayer.edam.migration.adam.Token;
|
import com.bayer.edam.migration.adam.Token;
|
||||||
import com.bayer.edam.migration.adam.WriteRecord;
|
import com.bayer.edam.migration.adam.WriteRecord;
|
||||||
import com.bayer.edam.migration.adam.WriteRecord.Classification;
|
import com.bayer.edam.migration.adam.WriteRecord.Classification;
|
||||||
@@ -37,6 +39,10 @@ import com.bayer.edam.migration.mam.Entry;
|
|||||||
import com.bayer.edam.migration.mam.categories.CategoryTree;
|
import com.bayer.edam.migration.mam.categories.CategoryTree;
|
||||||
import com.bayer.edam.migration.mam.categories.CategoryTree.Node;
|
import com.bayer.edam.migration.mam.categories.CategoryTree.Node;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.univocity.parsers.csv.CsvParser;
|
||||||
|
import com.univocity.parsers.csv.CsvParserSettings;
|
||||||
|
import com.univocity.parsers.csv.CsvWriter;
|
||||||
|
import com.univocity.parsers.csv.CsvWriterSettings;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@PropertySource("file:secret.properties")
|
@PropertySource("file:secret.properties")
|
||||||
@@ -49,8 +55,13 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
static final int[] selection = { 71948, /*71048, 70778, 70746, 70142,*/ 70361, /*63924, 71263, 63201, 56942, 57641, 70745, 70440, 70340,
|
static final int[] selection = { 71948, /*71048, 70778, 70746, 70142,*/ 70361, /*63924, 71263, 63201, 56942, 57641, 70745, 70440, 70340,
|
||||||
70288, 71725*/ };
|
70288, 71725*/ };
|
||||||
|
|
||||||
static final File entryLog = new File("C:\\Temp\\Migration AH\\entry.log");
|
static final String categoryJson = "C:\\Users\\gexce\\git\\mam-migration\\AH MAM Migration\\resources\\2017-10-19_categories.json";
|
||||||
static final File problemLog = new File("C:\\Temp\\Migration AH\\problem.log");
|
static final String categoryMapping = "C:\\Users\\gexce\\git\\mam-migration\\AH MAM Migration\\resources\\Media_Assistant_Categories_131017_EDITED.csv";
|
||||||
|
static final String campaignList = "C:\\Temp\\Migration AH\\files\\campaigns.csv";
|
||||||
|
|
||||||
|
static final File entryLog = new File("C:\\Temp\\Migration AH\\files\\entry.log");
|
||||||
|
static final File problemLog = new File("C:\\Temp\\Migration AH\\files\\problem.log");
|
||||||
|
|
||||||
static final String fieldSeparator = "|~|";
|
static final String fieldSeparator = "|~|";
|
||||||
static final String lineSeparator = "\r\n";
|
static final String lineSeparator = "\r\n";
|
||||||
|
|
||||||
@@ -68,18 +79,29 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
private SimpleDateFormat stringDate = new SimpleDateFormat("yyyy-MM-dd");
|
private SimpleDateFormat stringDate = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
private ObjectMapper jsonMapper = new ObjectMapper();
|
private ObjectMapper jsonMapper = new ObjectMapper();
|
||||||
|
|
||||||
|
private List<String[]> campaigns;
|
||||||
private List<String> locations = new ArrayList<String>();
|
private List<String> locations = new ArrayList<String>();
|
||||||
private CategoryTree mamCategoryTree;
|
private CategoryTree mamCategoryTree;
|
||||||
|
|
||||||
|
private CsvParserSettings parserSettings = new CsvParserSettings();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(String... strings) throws Exception {
|
public void run(String... strings) throws Exception {
|
||||||
|
|
||||||
|
parserSettings.getFormat().setLineSeparator("\r\n");
|
||||||
|
parserSettings.getFormat().setDelimiter(';');
|
||||||
|
parserSettings.getFormat().setCharToEscapeQuoteEscaping('"');
|
||||||
|
parserSettings.setHeaderExtractionEnabled(false);
|
||||||
|
|
||||||
log.info("Write log headers");
|
log.info("Write log headers");
|
||||||
FileUtils.writeStringToFile(entryLog, "Location" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
FileUtils.writeStringToFile(entryLog, "Location" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
||||||
FileUtils.writeStringToFile(problemLog, "entryId" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
FileUtils.writeStringToFile(problemLog, "entryId" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
||||||
|
|
||||||
log.info("Read categories");
|
log.info("Read categories");
|
||||||
mamCategoryTree = new CategoryTree("C:\\Temp\\Migration AH\\2017-10-19_categories.json", "C:\\Temp\\Migration AH\\Media_Assistant_Categories_131017_EDITED.csv");
|
mamCategoryTree = new CategoryTree(categoryJson, categoryMapping);
|
||||||
|
|
||||||
|
log.info("Read campaigns");
|
||||||
|
campaigns = readCsv(campaignList);
|
||||||
|
|
||||||
restTemplate = new RestTemplate(new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()));
|
restTemplate = new RestTemplate(new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()));
|
||||||
List<ClientHttpRequestInterceptor> interceptors = new ArrayList<ClientHttpRequestInterceptor>();
|
List<ClientHttpRequestInterceptor> interceptors = new ArrayList<ClientHttpRequestInterceptor>();
|
||||||
@@ -120,6 +142,9 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
// log.info("Deleted " + location + ": " + response.toString());
|
// log.info("Deleted " + location + ": " + response.toString());
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
log.info("Write campaign list to " + campaignList);
|
||||||
|
writeCsv(campaigns, campaignList);
|
||||||
|
|
||||||
invalidateAdamToken();
|
invalidateAdamToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,7 +193,52 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
record.addClassification(brandClassificationId);
|
record.addClassification(brandClassificationId);
|
||||||
}
|
}
|
||||||
else if (n.action.equals("campaign")) {
|
else if (n.action.equals("campaign")) {
|
||||||
|
String campaignName = n.name;
|
||||||
|
String campaignLabel = n.name;
|
||||||
|
String campaignYear;
|
||||||
|
if (n.parameter != null && !n.parameter.trim().equals("")) {
|
||||||
|
campaignLabel = campaignLabel + " " + n.parameter;
|
||||||
|
campaignYear = n.parameter.substring(1, 5);
|
||||||
|
} else {
|
||||||
|
campaignYear = n.name.substring(0, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Integer.parseInt(campaignYear);
|
||||||
|
|
||||||
|
// check whether campain already exists
|
||||||
|
String campaignGuid = null;
|
||||||
|
for (String[] line : campaigns) {
|
||||||
|
if (line[0].equals(campaignName)) {
|
||||||
|
campaignGuid = line[2];
|
||||||
|
log.debug("Found already existing campaign '" + campaignName + "' with guid " + campaignGuid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (campaignGuid == null) {
|
||||||
|
log.info("Create campaign " + campaignName);
|
||||||
|
|
||||||
|
Campaign campaign = new Campaign(campaignName, campaignLabel, campaignYear);
|
||||||
|
|
||||||
|
HttpEntity<Campaign> httpEntity = new HttpEntity<Campaign>(campaign, adamHeaders);
|
||||||
|
try {
|
||||||
|
EntityId campaignId = restTemplate.exchange(adamHost + "/classifications", HttpMethod.POST, httpEntity, EntityId.class).getBody();
|
||||||
|
campaignGuid = campaignId.id;
|
||||||
|
|
||||||
|
log.info("Created campaign: " + campaignName + ";" + campaignLabel + ";" + campaignGuid);
|
||||||
|
record.addClassification(new Classification(campaignGuid, 1));
|
||||||
|
|
||||||
|
// TODO better write campaign to file right away?
|
||||||
|
campaigns.add(new String[] { campaignName, campaignLabel, campaignGuid });
|
||||||
|
|
||||||
|
} catch (HttpStatusCodeException hsce) {
|
||||||
|
log.error("Could not create campaign '" + campaignName + "' for entry " + entry.id + ": " + hsce.getStatusCode().toString());
|
||||||
|
log.error(hsce.getResponseBodyAsString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException nfe) {
|
||||||
|
log.warn("Could not parse year from string " + campaignYear);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (n.action.equals("keyword")) {
|
else if (n.action.equals("keyword")) {
|
||||||
log.debug("Adding keyword " + n.name.trim());
|
log.debug("Adding keyword " + n.name.trim());
|
||||||
@@ -229,21 +299,30 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
|
|
||||||
|
|
||||||
// Create record
|
// Create record
|
||||||
// HttpEntity<WriteRecord> httpEntity = new HttpEntity<WriteRecord>(record, adamHeaders);
|
HttpEntity<WriteRecord> httpEntity = new HttpEntity<WriteRecord>(record, adamHeaders);
|
||||||
// try {
|
try {
|
||||||
// URI location = restTemplate.postForLocation(adamHost + "/records", httpEntity, WriteRecord.class);
|
URI location = restTemplate.postForLocation(adamHost + "/records", httpEntity, WriteRecord.class);
|
||||||
// log.info("Created " + location);
|
log.info("Created " + location);
|
||||||
//
|
|
||||||
// FileUtils.writeStringToFile(entryLog, location.toString() + fieldSeparator + entryJson + lineSeparator,
|
FileUtils.writeStringToFile(entryLog, location.toString() + fieldSeparator + entryJson + lineSeparator,
|
||||||
// Charset.forName("utf-8"), true);
|
Charset.forName("utf-8"), true);
|
||||||
//
|
|
||||||
// locations.add(location.toString());
|
locations.add(location.toString());
|
||||||
//
|
|
||||||
// } catch (HttpStatusCodeException hsce) {
|
} catch (HttpStatusCodeException hsce) {
|
||||||
// log.error("Skipping entry " + entry.id + ": Error while creating record " + hsce.getStatusCode().toString());
|
log.error("Skipping entry " + entry.id + ": Error while creating record " + hsce.getStatusCode().toString());
|
||||||
// log.error(hsce.getResponseBodyAsString());
|
log.error(hsce.getResponseBodyAsString());
|
||||||
// FileUtils.writeStringToFile(problemLog, entry.id + fieldSeparator + entryJson + lineSeparator, Charset.forName("utf-8"), true);
|
FileUtils.writeStringToFile(problemLog, entry.id + fieldSeparator + entryJson + lineSeparator, Charset.forName("utf-8"), true);
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the given campaign already exists and creates it, if not.
|
||||||
|
*
|
||||||
|
* @return the guid of the campaign
|
||||||
|
*/
|
||||||
|
private String getCampaign(int year, String label, String name) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private HttpHeaders createMamHeaders() {
|
private HttpHeaders createMamHeaders() {
|
||||||
@@ -282,6 +361,23 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
log.info("Logged out from adam API: " + response.toString());
|
log.info("Logged out from adam API: " + response.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String[]> readCsv(String csvFile) {
|
||||||
|
CsvParser parser = new CsvParser(parserSettings);
|
||||||
|
return parser.parseAll(new File(csvFile));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void writeCsv(List<String[]> contents, String csvFile) {
|
||||||
|
// FIXME Why oh why can't I just pass the contents list to writeRowsAndClose like here:
|
||||||
|
// https://github.com/uniVocity/univocity-parsers/blob/master/src/test/java/com/univocity/parsers/examples/WriterExamples.java
|
||||||
|
List<Object[]> csvOutputList;
|
||||||
|
csvOutputList = (List) contents;
|
||||||
|
|
||||||
|
CsvWriterSettings writerSettings = new CsvWriterSettings();
|
||||||
|
writerSettings.setFormat(parserSettings.getFormat());
|
||||||
|
CsvWriter writer = new CsvWriter(new File(csvFile), writerSettings);
|
||||||
|
writer.writeRowsAndClose(csvOutputList);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* // Quoted "Z" to indicate UTC, no timezone offset private static SimpleDateFormat outputDateFormat = new
|
* // Quoted "Z" to indicate UTC, no timezone offset private static SimpleDateFormat outputDateFormat = new
|
||||||
* SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); private static SimpleDateFormat inputDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
* SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); private static SimpleDateFormat inputDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.bayer.edam.migration.adam;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.bayer.edam.migration.adam.WriteRecord.Field;
|
||||||
|
import com.bayer.edam.migration.adam.WriteRecord.Fields;
|
||||||
|
import com.bayer.edam.migration.adam.WriteRecord.LocalizedValue;
|
||||||
|
|
||||||
|
public class Campaign {
|
||||||
|
|
||||||
|
private static String basePath = "/Definitions/Animal Health/Campaign/Global/";
|
||||||
|
|
||||||
|
public String parentNamePath;
|
||||||
|
public String name;
|
||||||
|
public String identifier = "";
|
||||||
|
public Integer sortIndex = 1;
|
||||||
|
public LocalizedValue[] labels;
|
||||||
|
|
||||||
|
public Fields fields = new Fields();
|
||||||
|
|
||||||
|
|
||||||
|
public Campaign (String name, String label, String year) {
|
||||||
|
this.parentNamePath = basePath + year;
|
||||||
|
this.name = name;
|
||||||
|
LocalizedValue labelValue = new LocalizedValue(label);
|
||||||
|
labels = new LocalizedValue[] { labelValue };
|
||||||
|
|
||||||
|
// set field "IsCampaign"
|
||||||
|
Field isCampaign = new Field("ed1b60f4069b48339128a77600bfb82a");
|
||||||
|
List<String> values = new ArrayList<String>();
|
||||||
|
values.add("70af5b79ea1c4cf387c5a77600bfb838");
|
||||||
|
LocalizedValue localizedValue = new LocalizedValue(values);
|
||||||
|
localizedValue.languageId = "00000000000000000000000000000000";
|
||||||
|
isCampaign.localizedValues.add(localizedValue);
|
||||||
|
fields.addOrUpdate.add(isCampaign);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.bayer.edam.migration.adam;
|
||||||
|
|
||||||
|
public class EntityId {
|
||||||
|
|
||||||
|
public String id;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -68,6 +68,10 @@ public class WriteRecord {
|
|||||||
fields.addOrUpdate.add(field);
|
fields.addOrUpdate.add(field);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addClassification(Classification classification) {
|
||||||
|
add(classification);
|
||||||
|
}
|
||||||
|
|
||||||
public void addClassification(String name) {
|
public void addClassification(String name) {
|
||||||
Classification classification = Definitions.classifications.get(name);
|
Classification classification = Definitions.classifications.get(name);
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public class CategoryTree {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
try {
|
try {
|
||||||
new CategoryTree("C:\\Temp\\Migration AH\\2017-10-19_categories.json", "C:\\Temp\\Migration AH\\Media_Assistant_Categories_131017_EDITED.csv");
|
new CategoryTree("C:\\Users\\gexce\\git\\mam-migration\\AH MAM Migration\\resources\\2017-10-19_categories.json", "C:\\Users\\gexce\\git\\mam-migration\\AH MAM Migration\\resources\\Media_Assistant_Categories_131017_EDITED.csv");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user