Revision aea90ab7
Added by Andreas Müller almost 7 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/greece/FloraHellenicaActivator.java | ||
---|---|---|
14 | 14 |
import org.apache.log4j.Logger; |
15 | 15 |
|
16 | 16 |
import eu.etaxonomy.cdm.app.common.CdmDestinations; |
17 |
import eu.etaxonomy.cdm.common.DOI; |
|
17 | 18 |
import eu.etaxonomy.cdm.database.DbSchemaValidation; |
18 | 19 |
import eu.etaxonomy.cdm.database.ICdmDataSource; |
19 | 20 |
import eu.etaxonomy.cdm.io.common.CdmDefaultImport; |
20 | 21 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.CHECK; |
21 | 22 |
import eu.etaxonomy.cdm.io.greece.FloraHellenicaImportConfigurator; |
23 |
import eu.etaxonomy.cdm.model.agent.Person; |
|
24 |
import eu.etaxonomy.cdm.model.agent.Team; |
|
25 |
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase; |
|
26 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
27 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
|
28 |
import eu.etaxonomy.cdm.strategy.parser.TimePeriodParser; |
|
22 | 29 |
|
23 | 30 |
/** |
24 | 31 |
* |
... | ... | |
42 | 49 |
|
43 | 50 |
//feature tree uuid |
44 | 51 |
public static final UUID featureTreeUuid = UUID.fromString("9e1e0e81-7475-4b28-8619-b7f42cd760b6"); |
45 |
private static final String featureTreeTitle = "Flora Hellenica dataportal feature tree";
|
|
52 |
private static final String featureTreeTitle = "Flora of Greece dataportal feature tree";
|
|
46 | 53 |
|
47 | 54 |
//classification |
48 | 55 |
static final UUID classificationUuid = UUID.fromString("e537d69a-c2d9-4ac6-8f79-5b5e3dd5c154"); |
49 |
private static final String classificationName = "Greek Checklist";
|
|
56 |
private static final String classificationName = "Vascular plants of Greece";
|
|
50 | 57 |
|
51 | 58 |
|
52 | 59 |
//check - import |
... | ... | |
61 | 68 |
URI source = greekChecklist(); //just any |
62 | 69 |
|
63 | 70 |
//make Source |
64 |
FloraHellenicaImportConfigurator config= FloraHellenicaImportConfigurator.NewInstance(source, cdmDestination); |
|
71 |
FloraHellenicaImportConfigurator config = FloraHellenicaImportConfigurator.NewInstance(source, cdmDestination);
|
|
65 | 72 |
config.setClassificationUuid(classificationUuid); |
66 | 73 |
config.setClassificationName(classificationName); |
67 | 74 |
config.setCheck(check); |
68 |
// config.setDoDistribution(doDistribution); |
|
69 |
// config.setDoTaxa(doTaxa); |
|
70 | 75 |
config.setDbSchemaValidation(hbm2dll); |
71 |
// config.setSourceReferenceTitle(sourceReferenceTitle); |
|
72 |
// config.setDoVocabularies(doVocabularies); |
|
73 | 76 |
config.setUuidFeatureTree(featureTreeUuid); |
74 | 77 |
config.setFeatureTreeTitle(featureTreeTitle); |
75 | 78 |
config.setDoImages(doImages); |
79 |
config.setSecReference(getSecReference()); |
|
80 |
config.setSourceReference(getSourceReference()); |
|
81 |
config.setSecReference2(getSecReference2()); |
|
76 | 82 |
|
77 | 83 |
CdmDefaultImport<FloraHellenicaImportConfigurator> myImport = new CdmDefaultImport<>(); |
78 | 84 |
myImport.invoke(config); |
79 | 85 |
|
80 |
// FeatureTree tree = makeFeatureNodes(myImport.getCdmAppController().getTermService()); |
|
81 |
// myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree); |
|
82 | 86 |
} |
83 | 87 |
|
84 | 88 |
|
... | ... | |
86 | 90 |
return URI.create("file:////BGBM-PESIHPC/Greece/VPG_FINAL_WITH_SYNONYMS_21.01.2017.xlsx"); |
87 | 91 |
} |
88 | 92 |
|
93 |
private Reference secRef; |
|
94 |
private Reference getSecReference(){ |
|
95 |
if (secRef != null){ |
|
96 |
return secRef; |
|
97 |
} |
|
98 |
Reference result = ReferenceFactory.newBook(); |
|
99 |
result.setTitle("Vascular plants of Greece: An annotated checklist."); |
|
100 |
result.setDatePublished(TimePeriodParser.parseString("2013")); |
|
101 |
|
|
102 |
Team team = Team.NewInstance(); |
|
103 |
|
|
104 |
Person person = Person.NewInstance(); |
|
105 |
person.setFirstname("P."); |
|
106 |
person.setLastname("Dimopoulos"); |
|
107 |
team.addTeamMember(person); |
|
108 |
|
|
109 |
person = Person.NewInstance(); |
|
110 |
person.setFirstname("Th."); |
|
111 |
person.setLastname("Raus"); |
|
112 |
team.addTeamMember(person); |
|
113 |
|
|
114 |
person = Person.NewInstance(); |
|
115 |
person.setFirstname("E."); |
|
116 |
person.setLastname("Bergmeier"); |
|
117 |
team.addTeamMember(person); |
|
118 |
|
|
119 |
person = Person.NewInstance(); |
|
120 |
person.setFirstname("Th."); |
|
121 |
person.setLastname("Constantinidis"); |
|
122 |
team.addTeamMember(person); |
|
123 |
|
|
124 |
person = Person.NewInstance(); |
|
125 |
person.setFirstname("G."); |
|
126 |
person.setLastname("Iatrou"); |
|
127 |
team.addTeamMember(person); |
|
128 |
|
|
129 |
person = Person.NewInstance(); |
|
130 |
person.setFirstname("S."); |
|
131 |
person.setLastname("Kokkini"); |
|
132 |
team.addTeamMember(person); |
|
133 |
|
|
134 |
person = Person.NewInstance(); |
|
135 |
person.setFirstname("A."); |
|
136 |
person.setLastname("Strid"); |
|
137 |
team.addTeamMember(person); |
|
138 |
|
|
139 |
person = Person.NewInstance(); |
|
140 |
person.setFirstname("D."); |
|
141 |
person.setLastname("Tzanoudakis"); |
|
142 |
team.addTeamMember(person); |
|
143 |
|
|
144 |
result.setAuthorship(team); |
|
145 |
|
|
146 |
result.setPublisher("Berlin: Botanic Garden and Botanical Museum Berlin-Dahlem; Athens: Hellenic Botanical Society."); |
|
147 |
|
|
148 |
result.setVolume("31"); |
|
149 |
Reference englera = ReferenceFactory.newPrintSeries(); |
|
150 |
englera.setTitle("Englera"); |
|
151 |
result.setInReference(englera); |
|
152 |
secRef = result; |
|
153 |
return result; |
|
154 |
} |
|
155 |
|
|
156 |
private Reference getSecReference2(){ |
|
157 |
Reference result = ReferenceFactory.newArticle(); |
|
158 |
result.setTitle("Vascular plants of Greece: An annotated checklist. Supplement"); |
|
159 |
result.setDatePublished(TimePeriodParser.parseString("26.10.2016")); |
|
160 |
|
|
161 |
TeamOrPersonBase<?> team = getSecReference().getAuthorship(); |
|
162 |
result.setAuthorship(team); |
|
163 |
|
|
164 |
result.setPublisher("Berlin: Botanic Garden and Botanical Museum Berlin-Dahlem; Athens: Hellenic Botanical Society."); |
|
165 |
|
|
166 |
result.setVolume("46(3)"); |
|
167 |
result.setPages("301–347"); |
|
168 |
Reference journal = ReferenceFactory.newJournal(); |
|
169 |
journal.setTitle("Willdenowia"); |
|
170 |
result.setInReference(journal); |
|
171 |
result.setDoi(DOI.fromString("http://dx.doi.org/10.3372/wi.46.46303")); |
|
172 |
result.setReferenceAbstract("Supplementary information on taxonomy, nomenclature, distribution within Greece, total range, life form and ecological traits of vascular plants known to occur in Greece is presented and the revised data are quantitatively analysed. Floristic discrepancies between Vascular plants of Greece: An annotated checklist (Dimopoulos & al. 2013) and relevant influential datasets (Flora europaea, Med-Checklist, Euro+Med PlantBase, etc.) are explained and clarified. An additional quantity of synonyms and misapplied names used in previous Greek floristic literature is presented. Taxonomic and floristic novelties published after 31 October 2013 are not considered."); |
|
173 |
result.setUri(URI.create("http://www.bioone.org/doi/full/10.3372/wi.46.46303")); |
|
174 |
return result; |
|
175 |
} |
|
176 |
|
|
177 |
private Reference getSourceReference(){ |
|
178 |
Reference result = ReferenceFactory.newDatabase(); |
|
179 |
result.setTitle("Excelfile (VPG_FINAL_WITH_SYNONYMS_21.01.2017.xlsx) derived from "); |
|
180 |
result.setInReference(getSecReference()); |
|
181 |
return result; |
|
182 |
} |
|
183 |
|
|
89 | 184 |
/** |
90 | 185 |
* @param args |
91 | 186 |
*/ |
Also available in: Unified diff
ref #6286 updates for Flora Hellenica import (including new image import)