ScriptAsset asset = new ScriptAsset();
setAssetIdentity(policy, asset);
final ScriptEncoding scriptEncoding = metaData.getScriptEncoding();
if (scriptEncoding != null) {
asset.setProgrammingLanguage((String) ENCODING.get(scriptEncoding));
// use the first mime type if there is any
final Iterator iter = scriptEncoding.mimeTypes();
if (iter.hasNext()) {
asset.setMimeType((String) iter.next());
}
}
asset.setCharacterSet(metaData.getCharacterSet());