@Override public void processEndElement() { if (GoogleBaseNamespaces.GM_URI.equals(uri)) { if (GM_ADJUSTED_VALUE_ATTRIBUTE.equals(localName)) { attribute.getAdjustments().setValue(super.value); } else if (GM_ADJUSTED_NAME_ATTRIBUTE.equals(localName)) { attribute.getAdjustments().setName(super.value); } else if (GM_THUMBNAIL_ATTRIBUTE.equals(localName)) { Thumbnail thumbnail = new Thumbnail(); thumbnail.setUrl(super.value.trim()); if ((width > 0) && (height > 0)) { thumbnail.setSize(width, height); } attribute.getThumbnails().add(thumbnail); } // if the uri is gm but the name is not recognized, we ignore it } else { // only non-gm uris are considered sub-elements attribute.appendSubElement(localName, super.value); } }
@Override public void processEndElement() { if (GoogleBaseNamespaces.GM_URI.equals(uri)) { if (GM_ADJUSTED_VALUE_ATTRIBUTE.equals(localName)) { attribute.getAdjustments().setValue(super.value); } else if (GM_ADJUSTED_NAME_ATTRIBUTE.equals(localName)) { attribute.getAdjustments().setName(super.value); } else if (GM_THUMBNAIL_ATTRIBUTE.equals(localName)) { Thumbnail thumbnail = new Thumbnail(); thumbnail.setUrl(super.value.trim()); if ((width > 0) && (height > 0)) { thumbnail.setSize(width, height); } attribute.getThumbnails().add(thumbnail); } // if the uri is gm but the name is not recognized, we ignore it } else { // only non-gm uris are considered sub-elements attribute.appendSubElement(localName, super.value); } }