metawidgetInspectorFacade);
List<Map<String, String>> inspectionResults = metawidgetInspectorFacade.inspect(entity);
String entityId = angularResultEnhancer.fetchEntityId(entity, inspectionResults);
inspectionResults = angularResultEnhancer.enhanceResults(entity, inspectionResults);
MetadataFacet metadata = project.getFacet(MetadataFacet.class);
// TODO: Provide a 'utility' class for allowing transliteration across language naming schemes
// We need this to use contextual naming schemes instead of performing toLowerCase etc. in FTLs.
// Prepare the Freemarker data model
Map<String, Object> dataModel = new HashMap<>();
dataModel.put("entityName", entityName);
dataModel.put("pluralizedEntityName", inflector.pluralize(entityName));
dataModel.put("entityId", entityId);
dataModel.put("properties", inspectionResults);
dataModel.put("projectId", StringUtils.camelCase(metadata.getProjectName()));
dataModel.put("projectTitle", StringUtils.uncamelCase(metadata.getProjectName()));
dataModel.put("resourceRootPath", resourceRootPath);
dataModel.put("resourcePath", entityResourcePath);
dataModel.put("parentDirectories", getParentDirectories(targetDir));
// Process the Freemarker templates with the Freemarker data model and retrieve the generated resources from