private ScalingType extractScaling(Map<String, ExtensionItemType> extensions) {
ScalingType scaling = null;
// look for a scaling extension
if (!(extensions == null || extensions.size() == 0 || !extensions.containsKey("Scaling"))) {
final ExtensionItemType extensionItem = extensions.get("Scaling");
assert extensionItem != null;
// get scaling
scaling = (ScalingType) extensionItem.getObjectContent();
if (scaling == null) {
throw new IllegalStateException("Scaling extension contained a null ScalingType");
}
}
return scaling;