Revision 274e96c0
Added by Andreas Müller over 5 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelImportBase.java | ||
---|---|---|
27 | 27 |
import eu.etaxonomy.cdm.model.common.AnnotatableEntity; |
28 | 28 |
import eu.etaxonomy.cdm.model.common.Annotation; |
29 | 29 |
import eu.etaxonomy.cdm.model.common.AnnotationType; |
30 |
import eu.etaxonomy.cdm.model.common.ISourceable; |
|
30 | 31 |
import eu.etaxonomy.cdm.model.common.IdentifiableEntity; |
32 |
import eu.etaxonomy.cdm.model.common.IdentifiableSource; |
|
31 | 33 |
import eu.etaxonomy.cdm.model.common.Language; |
32 | 34 |
import eu.etaxonomy.cdm.model.common.MarkerType; |
33 | 35 |
import eu.etaxonomy.cdm.model.common.TermType; |
... | ... | |
406 | 408 |
return sourceReference; |
407 | 409 |
} |
408 | 410 |
|
411 |
protected static <T extends IdentifiableSource> boolean importSourceExists(ISourceable<T> sourceable, String idInSource, |
|
412 |
String namespace, Reference ref) { |
|
413 |
for (T source : sourceable.getSources()){ |
|
414 |
if (CdmUtils.nullSafeEqual(namespace, source.getIdNamespace()) && |
|
415 |
CdmUtils.nullSafeEqual(idInSource, source.getIdInSource()) && |
|
416 |
CdmUtils.nullSafeEqual(ref, source.getCitation())){ |
|
417 |
return true; |
|
418 |
} |
|
419 |
} |
|
420 |
return false; |
|
421 |
} |
|
422 |
|
|
409 | 423 |
} |
Also available in: Unified diff
#7799 reduce duplicated sources