category.setDomain(attribute.getValue());
}
}
private void processImage(Element element, IFeed feed) {
IImage image = Owl.getModelFactory().createImage(feed);
/* Check wether the Attributes are to be processed by a Contribution */
processNamespaceAttributes(element, image);
/* Interpret Children */
List<?> imageChilds = element.getChildren();
for (Iterator<?> iter = imageChilds.iterator(); iter.hasNext();) {
Element child = (Element) iter.next();
String name = child.getName().toLowerCase();
/* Check wether this Element is to be processed by a Contribution */
if (processElementExtern(child, image))
continue;
/* URL */
else if ("url".equals(name)) { //$NON-NLS-1$
URI uri = URIUtils.createURI(child.getText());
if (uri != null)
image.setLink(uri);
processNamespaceAttributes(child, image);
}
/* Title */
else if ("title".equals(name)) { //$NON-NLS-1$
image.setTitle(child.getText());
processNamespaceAttributes(child, image);
}
/* Link */
else if ("link".equals(name)) { //$NON-NLS-1$
URI uri = URIUtils.createURI(child.getText());
if (uri != null)
image.setHomepage(uri);
processNamespaceAttributes(child, image);
}
/* Description */
else if ("description".equals(name)) { //$NON-NLS-1$
image.setDescription(child.getText());
processNamespaceAttributes(child, image);
}
/* Width */
else if ("width".equals(name)) {//$NON-NLS-1$
int width = StringUtils.stringToInt(child.getTextNormalize());
if (width >= 0)
image.setWidth(width);
processNamespaceAttributes(child, image);
}
/* Height */
else if ("height".equals(name)) {//$NON-NLS-1$
int height = StringUtils.stringToInt(child.getTextNormalize());
if (height >= 0)
image.setHeight(height);
processNamespaceAttributes(child, image);
}
}
}