List of usage examples for org.apache.commons.imaging.formats.jpeg.iptc IptcRecord getValue
public String getValue()
From source file:joachimeichborn.geotag.io.jpeg.PictureMetadataReader.java
public void extractGeocoding() { if (jpegMetadata != null) { final JpegPhotoshopMetadata photoshopMetadata = jpegMetadata.getPhotoshop(); if (photoshopMetadata != null) { final Geocoding.Builder builder = new Geocoding.Builder(); final List<IptcRecord> records = photoshopMetadata.photoshopApp13Data.getRecords(); for (final IptcRecord record : records) { if (record.iptcType.equals(IptcTypes.CONTENT_LOCATION_NAME)) { builder.setLocationName(record.getValue()); } else if (record.iptcType.equals(IptcTypes.CITY)) { builder.setCity(record.getValue()); } else if (record.iptcType.equals(IptcTypes.SUBLOCATION)) { builder.setSublocation(record.getValue()); } else if (record.iptcType.equals(IptcTypes.PROVINCE_STATE)) { builder.setProvinceState(record.getValue()); } else if (record.iptcType.equals(IptcTypes.COUNTRY_PRIMARY_LOCATION_CODE)) { builder.setCountryCode(record.getValue()); } else if (record.iptcType.equals(IptcTypes.COUNTRY_PRIMARY_LOCATION_NAME)) { builder.setCountryName(record.getValue()); }/*from w ww.j a va 2 s . c om*/ } geocoding = builder.build(); } } }