Revision d0c17714
Added by Andreas Müller almost 6 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelCommonNamesImport.java | ||
---|---|---|
39 | 39 |
import eu.etaxonomy.cdm.model.common.Marker; |
40 | 40 |
import eu.etaxonomy.cdm.model.common.MarkerType; |
41 | 41 |
import eu.etaxonomy.cdm.model.common.Representation; |
42 |
import eu.etaxonomy.cdm.model.common.TermType; |
|
43 | 42 |
import eu.etaxonomy.cdm.model.common.TermVocabulary; |
44 | 43 |
import eu.etaxonomy.cdm.model.description.CommonTaxonName; |
45 | 44 |
import eu.etaxonomy.cdm.model.description.DescriptionElementSource; |
... | ... | |
333 | 332 |
logger.warn("Taxon name or misapplied name reference is null for common name " + commonNameId); |
334 | 333 |
}else{ |
335 | 334 |
misappliedNameTaxon = Taxon.NewInstance(nameUsedInSource, sec); |
336 |
MarkerType misCommonNameMarker = getMarkerType(state, BerlinModelTransformer.uuidMisappliedCommonName,"Misapplied Common Name in Berlin Model", "Misapplied taxon was automatically created by Berlin Model import for a common name with a misapplied name reference", "MCN"); |
|
335 |
MarkerType misCommonNameMarker = getMarkerType(state, BerlinModelTransformer.uuidMisappliedCommonName,"Misapplied Common Name in Berlin Model", |
|
336 |
"Misapplied taxon was automatically created by Berlin Model import for a common name with a misapplied name reference", "MCN", getEuroMedMarkerTypeVoc()); |
|
337 | 337 |
Marker marker = Marker.NewInstance(misCommonNameMarker, true); |
338 | 338 |
misappliedNameTaxon.addMarker(marker); |
339 | 339 |
taxaToSave.add(misappliedNameTaxon); |
... | ... | |
380 | 380 |
|
381 | 381 |
//status |
382 | 382 |
if (isNotBlank(status)){ |
383 |
TermVocabulary<MarkerType> markerTypeVoc = getVocabulary(TermType.MarkerType, BerlinModelTransformer.uuidVocEMMarkerType, |
|
384 |
"Euro+Med marker type vocabulary", "E+M marker types", null, null, false, MarkerType.COMPLETE()); |
|
383 |
TermVocabulary<MarkerType> markerTypeVoc = getEuroMedMarkerTypeVoc(); |
|
385 | 384 |
MarkerType recommendedMarkerType = getMarkerType( state, COMMONNAME_STATUS_RECOMMENDED_UUID, "recommended","If the common name has the status recommended (see also status 'synonym', if none of them is true the default status is 'unassessed')", |
386 | 385 |
"recommended", markerTypeVoc); |
387 | 386 |
MarkerType synonymMarkerType = getMarkerType( state, COMMONNAME_STATUS_SYNONYM_UUID, "synonym","If the common name has the status synonym (see also status 'recommended', if none of them is true the default status is 'unassessed')", |
... | ... | |
426 | 425 |
|
427 | 426 |
} |
428 | 427 |
|
428 |
|
|
429 | 429 |
/** |
430 | 430 |
* @param iso6392Map |
431 | 431 |
* @param iso639_2 |
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelImportBase.java | ||
---|---|---|
29 | 29 |
import eu.etaxonomy.cdm.model.common.AnnotationType; |
30 | 30 |
import eu.etaxonomy.cdm.model.common.IdentifiableEntity; |
31 | 31 |
import eu.etaxonomy.cdm.model.common.Language; |
32 |
import eu.etaxonomy.cdm.model.common.MarkerType; |
|
33 |
import eu.etaxonomy.cdm.model.common.TermType; |
|
34 |
import eu.etaxonomy.cdm.model.common.TermVocabulary; |
|
32 | 35 |
import eu.etaxonomy.cdm.model.common.User; |
33 | 36 |
import eu.etaxonomy.cdm.model.description.DescriptionElementBase; |
34 | 37 |
import eu.etaxonomy.cdm.model.location.Country; |
... | ... | |
381 | 384 |
return null; |
382 | 385 |
} |
383 | 386 |
|
387 |
/** |
|
388 |
* @return |
|
389 |
*/ |
|
390 |
protected TermVocabulary<MarkerType> getEuroMedMarkerTypeVoc() { |
|
391 |
TermVocabulary<MarkerType> markerTypeVoc = getVocabulary(TermType.MarkerType, BerlinModelTransformer.uuidVocEMMarkerType, |
|
392 |
"Euro+Med marker type vocabulary", "E+M marker types", null, null, false, MarkerType.COMPLETE()); |
|
393 |
return markerTypeVoc; |
|
394 |
} |
|
384 | 395 |
|
385 | 396 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelOccurrenceImport.java | ||
---|---|---|
134 | 134 |
|
135 | 135 |
TermVocabulary<NamedArea> euroMedAreas = makeEmptyEuroMedVocabulary(); |
136 | 136 |
|
137 |
MarkerType eurMarkerType = getMarkerType(state, BerlinModelTransformer.uuidEurArea, "eur", "eur Area", "eur"); |
|
138 |
MarkerType euroMedAreaMarkerType = getMarkerType(state, BerlinModelTransformer.uuidEurMedArea, "EuroMedArea", "EuroMedArea", "EuroMedArea"); |
|
137 |
MarkerType eurMarkerType = getMarkerType(state, BerlinModelTransformer.uuidEurArea, "eur", "eur Area", "eur", getEuroMedMarkerTypeVoc());
|
|
138 |
MarkerType euroMedAreaMarkerType = getMarkerType(state, BerlinModelTransformer.uuidEurMedArea, "EuroMedArea", "EuroMedArea", "EuroMedArea", getEuroMedMarkerTypeVoc());
|
|
139 | 139 |
ExtensionType isoCodeExtType = getExtensionType(state, BerlinModelTransformer.uuidIsoCode, "IsoCode", "IsoCode", "iso"); |
140 | 140 |
ExtensionType tdwgCodeExtType = getExtensionType(state, BerlinModelTransformer.uuidTdwgAreaCode, "TDWG code", "TDWG Area code", "tdwg"); |
141 | 141 |
ExtensionType mclCodeExtType = getExtensionType(state, BerlinModelTransformer.uuidMclCode, "MCL code", "MedCheckList code", "mcl"); |
... | ... | |
230 | 230 |
logger.error(message); |
231 | 231 |
System.out.println(message); |
232 | 232 |
} |
233 |
MarkerType hiddenAreaMarkerType = getMarkerType(state, BerlinModelTransformer.uuidHiddenArea, "Hidden Area","Used to hide distributions for the named areas in publications", null, vocUserDefinedMarkerTypes); |
|
233 |
MarkerType hiddenAreaMarkerType = getMarkerType(state, BerlinModelTransformer.uuidHiddenArea, |
|
234 |
"Hidden Area","Used to hide distributions for the named areas in publications", null, getEuroMedMarkerTypeVoc()); |
|
234 | 235 |
|
235 | 236 |
//Add hidden area marker to Rs(C) and Rs(N) |
236 | 237 |
hideArea(euroMedAreasVoc, hiddenAreaMarkerType, BerlinModelTransformer.uuidRs); |
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelTaxonImport.java | ||
---|---|---|
272 | 272 |
|
273 | 273 |
MarkerType markerType = null; |
274 | 274 |
if (valueless.equals(extension)){ |
275 |
markerType = getMarkerType(state, BerlinModelTransformer.uuidTaxonomicallyValueless, "taxonomically valueless", valueless, "valueless"); |
|
275 |
markerType = getMarkerType(state, BerlinModelTransformer.uuidTaxonomicallyValueless, "taxonomically valueless", valueless, "valueless", getEuroMedMarkerTypeVoc());
|
|
276 | 276 |
}else if (provisional.equals(extension)){ |
277 |
markerType = getMarkerType(state, BerlinModelTransformer.uuidProbablyTaxonomicallyValueless, "probably taxonomically valueless", provisional, "provisional"); |
|
277 |
markerType = getMarkerType(state, BerlinModelTransformer.uuidProbablyTaxonomicallyValueless, "probably taxonomically valueless", provisional, "provisional", getEuroMedMarkerTypeVoc());
|
|
278 | 278 |
} |
279 | 279 |
if (markerType != null){ |
280 | 280 |
taxonBase.addMarker(Marker.NewInstance(markerType, true)); |
Also available in: Unified diff
use E+M specific vocabulary for marker types