{
return null;
}
final boolean embedded = isEmbeddedKey(report, resourceKey);
final DefaultMimeRegistry mimeRegistry = new DefaultMimeRegistry();
// Determine if this key should be embedded
final Map factoryParameters = resourceKey.getFactoryParameters();
if (embedded == false &&
"true".equals(factoryParameters.get(ClassicEngineFactoryParameters.EMBED)) == false &&
RawResourceLoader.SCHEMA_NAME.equals(resourceKey.getSchema()) == false)
{
return null;
}
try
{
// Embed the key into the document bundle
String mimeType = (String) factoryParameters.get(ClassicEngineFactoryParameters.MIME_TYPE);
final String originalValue = (String) factoryParameters.get(ClassicEngineFactoryParameters.ORIGINAL_VALUE);
if (mimeType == null)
{
final ResourceData resourceData = report.getResourceManager().load(resourceKey);
final Object originalMimeType = resourceData.getAttribute(ResourceData.CONTENT_TYPE);
if (originalMimeType instanceof String)
{
mimeType = (String) originalMimeType;
}
else
{
mimeType = mimeRegistry.getMimeType(originalValue);
}
}
String pattern = (String) factoryParameters.get(ClassicEngineFactoryParameters.PATTERN);
if (pattern == null)