} else if (key.equals(UnmarshallerProperties.JSON_NAMESPACE_PREFIX_MAPPER)) {
if(xmlUnmarshaller.getNamespaceResolver() == null){
return null;
}
if (xmlUnmarshaller.getNamespaceResolver() instanceof PrefixMapperNamespaceResolver) {
PrefixMapperNamespaceResolver wrapper = (PrefixMapperNamespaceResolver) xmlUnmarshaller.getNamespaceResolver();
return wrapper.getPrefixMapper();
} else {
Map<String, String> nsMap = new HashMap<String, String>();
Map<String, String> prefixesToNS = xmlUnmarshaller.getNamespaceResolver().getPrefixesToNamespaces();
// Reverse the prefixesToNS map
Iterator<Entry<String, String>> namesapcesIter = prefixesToNS.entrySet().iterator();
for (int i = 0; i < prefixesToNS.size(); i++) {
Entry<String, String> nextEntry = namesapcesIter.next();
nsMap.put(nextEntry.getValue(), nextEntry.getKey());
}
return nsMap;
}
} else if (key.equals(UnmarshallerProperties.JSON_VALUE_WRAPPER)) {
return xmlUnmarshaller.getValueWrapper();
} else if (UnmarshallerProperties.ID_RESOLVER.equals(key)) {
return xmlUnmarshaller.getIDResolver();
} else if (SUN_ID_RESOLVER.equals(key) || SUN_JSE_ID_RESOLVER.equals(key)) {
IDResolverWrapper wrapper = (IDResolverWrapper) xmlUnmarshaller.getIDResolver();
if(wrapper == null){
return null;
}
return wrapper.getResolver();
} else if (UnmarshallerProperties.JSON_WRAPPER_AS_ARRAY_NAME.equals(key)) {
return xmlUnmarshaller.isWrapperAsCollectionName();
}
throw new PropertyException(key);
}