*/
public class NamespaceContextSpringBeanConverter implements SpringBeanConverter<NamespaceContext> {
@Override
public NamespaceContext convert(SpringBean springBean) {
NamespaceContext context = new ObjectFactory().createNamespaceContext();
for (Property property : springBean.getProperties()) {
if (property.getName().equals("namespaceMappings")) {
for (Entry entry : property.getMap().getEntries()) {
NamespaceContext.Namespace namespace = new NamespaceContext.Namespace();
namespace.setPrefix(entry.getKey());
namespace.setUri(entry.getValue());
context.getNamespaces().add(namespace);
}
}
}
return context;