Project

General

Profile

Revision 274e96c0

ID274e96c00d095c18a74d73e7f9bb2c1bb0fa9cc1
Parent 8794602e
Child b154ea92

Added by Andreas Müller about 2 years ago

#7799 reduce duplicated sources

View differences:

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

Add picture from clipboard (Maximum size: 40 MB)