if (this.layoutDOM == null && this.profile != null) {
try {
Map portalLayouts = (Map)this.profile.get(PortalConstants.PROFILE_PORTAL_LAYOUTS);
Map copletLayouts = (Map)this.profile.get(PortalConstants.PROFILE_COPLET_LAYOUTS);
DOMBuilder builder = new DOMBuilder();
builder.startDocument();
PortalManager.streamLayoutProfile(builder, portalLayouts, copletLayouts, this.mediaType);
builder.endDocument();
this.layoutDOM = builder.getDocument();
} catch (SAXException local) {
throw new ProcessingException("Unable to get portal." + local, local);