Revision 370503cf
Added by Niels Hoffmann almost 13 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelFactsImport.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.cdm.io.berlinModel.in; |
11 | 11 |
|
12 | 12 |
import java.io.IOException; |
13 |
import java.net.MalformedURLException; |
|
14 | 13 |
import java.net.URI; |
15 | 14 |
import java.net.URISyntaxException; |
16 |
import java.net.URL; |
|
17 | 15 |
import java.sql.ResultSet; |
18 | 16 |
import java.sql.SQLException; |
19 | 17 |
import java.util.Collection; |
... | ... | |
27 | 25 |
import org.springframework.stereotype.Component; |
28 | 26 |
|
29 | 27 |
import eu.etaxonomy.cdm.common.CdmUtils; |
30 |
import eu.etaxonomy.cdm.common.mediaMetaData.ImageMetaData;
|
|
28 |
import eu.etaxonomy.cdm.common.media.ImageInfo;
|
|
31 | 29 |
import eu.etaxonomy.cdm.io.berlinModel.BerlinModelTransformer; |
32 | 30 |
import eu.etaxonomy.cdm.io.berlinModel.in.validation.BerlinModelFactsImportValidator; |
33 | 31 |
import eu.etaxonomy.cdm.io.common.IOValidator; |
... | ... | |
441 | 439 |
TaxonDescription taxonDescription = null; |
442 | 440 |
Reference sourceRef = state.getConfig().getSourceReference(); |
443 | 441 |
Integer size = null; |
444 |
ImageMetaData imageMetaData = ImageMetaData.newInstance();
|
|
442 |
ImageInfo imageMetaData = null;
|
|
445 | 443 |
URI uri; |
446 | 444 |
try { |
447 | 445 |
uri = new URI(fact.trim()); |
... | ... | |
450 | 448 |
return null; |
451 | 449 |
} |
452 | 450 |
try { |
453 |
imageMetaData.readMetaData(uri, 0);
|
|
451 |
imageMetaData = ImageInfo.NewInstance(uri, 0);
|
|
454 | 452 |
} catch (IOException e) { |
455 | 453 |
logger.error("IOError reading image metadata." , e); |
456 | 454 |
} catch (HttpException e) { |
Also available in: Unified diff
Refactored MediaMetaData and family. Renamed it to MediaInfo. API is now less confusing and more consistent.