if (data instanceof ContainerData) {
return new Container((ContainerData) data);
} else if (data instanceof PageData) {
return new Page((PageData) data);
} else if (data instanceof BodyData) {
BodyData bodyData = (BodyData) data;
switch (bodyData.getType()) {
case PAGE:
return new PageBody(data.getStorageId());
case SITE:
return new SiteBody(data.getStorageId());
default: