Project

General

Profile

Revision f98c2d3d

IDf98c2d3dc186fe3e723b5d6356e83f7326910190
Parent 8643e56e
Child 62e62a2f

Added by Andreas Müller about 2 years ago

cleanup

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/CdmImportBase.java
449 449
			//TODO matching still experimental
450 450
			if (namedArea == null && (matchMode.equals(TermMatchMode.UUID_LABEL) || matchMode.equals(TermMatchMode.UUID_LABEL_ABBREVLABEL ))){
451 451
				//TODO test
452
				Pager<NamedArea> areaPager = (Pager)getTermService().findByTitleWithRestrictions(clazz, label, null, null, null, null, null, null);
452
				Pager<NamedArea> areaPager = getTermService().findByTitleWithRestrictions(clazz, label, null, null, null, null, null, null);
453 453
				namedArea = findBestMatchingArea(areaPager, uuid, label, text, labelAbbrev, vocabularyPreference);
454 454
			}
455 455
			if (namedArea == null && (matchMode.equals(TermMatchMode.UUID_ABBREVLABEL) || matchMode.equals(TermMatchMode.UUID_LABEL_ABBREVLABEL))){
......
1332 1332
	 * @throws MalformedURLException
1333 1333
	 */
1334 1334
	protected Media getImageMedia(String uriString, String uriStrThumb, boolean readMediaData) throws MalformedURLException {
1335
		if( uriString == null){
1335

  
1336
	    if( uriString == null){
1336 1337
			return null;
1337 1338
		} else {
1338 1339
			uriString = uriString.replace(" ", "%20");  //replace whitespace
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/dwca/in/DwcTaxonStreamItem2CdmTaxonConverter.java
36 36
import eu.etaxonomy.cdm.model.common.Annotation;
37 37
import eu.etaxonomy.cdm.model.common.CdmBase;
38 38
import eu.etaxonomy.cdm.model.common.DefinedTerm;
39
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
39 40
import eu.etaxonomy.cdm.model.common.Extension;
40 41
import eu.etaxonomy.cdm.model.common.ExtensionType;
41 42
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
......
449 450
					String message = "LSID is malformed and can't be handled as LSID: %s";
450 451
					message = String.format(message, identifier);
451 452
					fireWarningEvent(message, csvTaxonRecord, 4);
452
					Identifier.NewInstance(taxonBase, identifier, DefinedTerm.getTermByClassAndUUID(DefinedTerm.class, DefinedTerm.uuidLsid));
453
					Identifier.NewInstance(taxonBase, identifier, DefinedTermBase.getTermByClassAndUUID(DefinedTerm.class, DefinedTerm.uuidLsid));
453 454
				}
454 455
			}else{
455 456
				Identifier.NewInstance(taxonBase, identifier, null);
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/Identifier.java
68 68
    	return new Identifier<T>(identifier, type);
69 69
    }
70 70

  
71
    public static <T extends IdentifiableEntity<?>> Identifier<T> NewInstance(IdentifiableEntity identifiableEntity,
71
    public static <T extends IdentifiableEntity<?>> Identifier<T> NewInstance(T identifiableEntity,
72 72
            String identifier, DefinedTerm type){
73 73
        Identifier<T> result = new Identifier<T>(identifier, type);
74 74
        identifiableEntity.addIdentifier(result);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)