Revision 9d43097c
Added by Andreas Müller almost 4 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/sdd/in/SDDImport.java | ||
---|---|---|
34 | 34 |
import org.springframework.transaction.TransactionStatus; |
35 | 35 |
|
36 | 36 |
import eu.etaxonomy.cdm.api.service.IDescriptionService; |
37 |
import eu.etaxonomy.cdm.common.media.ImageInfo; |
|
37 |
import eu.etaxonomy.cdm.common.media.CdmImageInfo;
|
|
38 | 38 |
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor; |
39 | 39 |
import eu.etaxonomy.cdm.io.common.ICdmImport; |
40 | 40 |
import eu.etaxonomy.cdm.io.common.ImportHelper; |
... | ... | |
1592 | 1592 |
Element elSource = elMO.getChild("Source",sddNamespace); |
1593 | 1593 |
String href = elSource.getAttributeValue("href"); |
1594 | 1594 |
|
1595 |
ImageInfo imageMetaData = null; |
|
1595 |
CdmImageInfo imageMetaData = null;
|
|
1596 | 1596 |
ImageFile image = null; |
1597 | 1597 |
|
1598 | 1598 |
if (href.substring(0,7).equals("http://")) { |
1599 | 1599 |
try{ |
1600 | 1600 |
URL url = new URL(href); |
1601 | 1601 |
|
1602 |
imageMetaData = ImageInfo.NewInstance(url.toURI(), 0); |
|
1602 |
imageMetaData = CdmImageInfo.NewInstance(url.toURI(), 0);
|
|
1603 | 1603 |
image = ImageFile.NewInstance(url.toURI(), null, imageMetaData); |
1604 | 1604 |
} catch (MalformedURLException e) { |
1605 | 1605 |
logger.error("Malformed URL", e); |
... | ... | |
1612 | 1612 |
File parent = f.getParentFile(); |
1613 | 1613 |
String fi = parent.toString() + File.separator + href; |
1614 | 1614 |
File file = new File(fi); |
1615 |
imageMetaData = ImageInfo.NewInstance(new URI(fi), 0); //file |
|
1615 |
imageMetaData = CdmImageInfo.NewInstance(new URI(fi), 0); //file
|
|
1616 | 1616 |
image = ImageFile.NewInstance(file.toURI(), null, imageMetaData); |
1617 | 1617 |
} |
1618 | 1618 |
MediaRepresentation representation = MediaRepresentation.NewInstance(imageMetaData.getMimeType(), null); |
Also available in: Unified diff
ref #9148 change the name of CDM class ImageInfo to CdmImageInfo to avoid name calsh with commons-imaging/ImageInfo