Revision a5d6e4c0
Added by Niels Hoffmann almost 13 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationElement.java | ||
---|---|---|
19 | 19 |
import org.eclipse.swt.events.SelectionListener; |
20 | 20 |
|
21 | 21 |
import eu.etaxonomy.cdm.api.service.IMediaService; |
22 |
import eu.etaxonomy.cdm.common.mediaMetaData.ImageMetaData;
|
|
22 |
import eu.etaxonomy.cdm.common.media.ImageInfo;
|
|
23 | 23 |
import eu.etaxonomy.cdm.model.media.ImageFile; |
24 | 24 |
import eu.etaxonomy.cdm.model.media.MediaRepresentation; |
25 | 25 |
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart; |
... | ... | |
110 | 110 |
return; |
111 | 111 |
} |
112 | 112 |
try { |
113 |
ImageMetaData imageInfo = CdmStore.getService(IMediaService.class).getImageInfo(uri, 10000);
|
|
113 |
ImageInfo imageInfo = ImageInfo.NewInstance(uri, 10000);
|
|
114 | 114 |
String mimeType = imageInfo.getMimeType(); |
115 | 115 |
text_mimeType.setText(mimeType); |
116 |
|
|
117 |
|
|
116 |
text_suffix.setText(imageInfo.getSuffix()); |
|
118 | 117 |
} catch (IOException e) { |
119 | 118 |
StoreUtil.error(getClass(), e); |
120 | 119 |
} catch (HttpException e) { |
121 | 120 |
StoreUtil.error(getClass(), e); |
122 | 121 |
} |
123 |
String path = uri.getPath(); |
|
124 |
|
|
125 |
String suffix = path.substring(StringUtils.lastIndexOf(path, '.')+1); |
|
126 |
text_suffix.setText(suffix); |
|
127 | 122 |
} |
128 | 123 |
} |
129 | 124 |
|
Also available in: Unified diff
Renaming MediaMetaData to MediaInfo