<commit_before>package com.xml2code.java.creator;

import org.apache.log4j.Logger;

import com.xml2code.core.definition.ProjectDefinition;
import com.xml2code.core.util.LoggerUtil;
import com.xml2code.java.exception.JavaProjectCreationFailedException;
import com.xml2code.java.factory.GeneratorFactory;
import com.xml2code.java.generator.ClassGenerator;

public class ProjectCreator {

	protected static Logger LOGGER = LoggerUtil.getApplicationLogger();
	
	public static void createJavaProject(ProjectDefinition projectDef) throws JavaProjectCreationFailedException {

		String javaProjectPath = projectDef.getTargetDir() + "/Java";
		String srcPath = javaProjectPath + "/src/main/java/com/" + projectDef.getProjectName().toLowerCase();

		LoggerUtil.getApplicationLogger().info("--------------------------------");
		LoggerUtil.getApplicationLogger().info("generating domain object classes");
		LoggerUtil.getApplicationLogger().info("--------------------------------");
		generateDomain(projectDef, srcPath);
		
		LoggerUtil.getApplicationLogger().info("-----------------------------");
		LoggerUtil.getApplicationLogger().info("generating controller classes");
		LoggerUtil.getApplicationLogger().info("-----------------------------");
		generateController(projectDef, srcPath);

		LoggerUtil.getApplicationLogger().info("--------------------------------");
		LoggerUtil.getApplicationLogger().info("generating JSON REST API classes");
		LoggerUtil.getApplicationLogger().info("--------------------------------");
		generateJsonRestApi(projectDef, srcPath);
		
	}

	private static void generateDomain(ProjectDefinition projectDef, String srcPath) throws JavaProjectCreationFailedException {

		String packagePath = srcPath + "/domain";

		ClassGenerator classGenerator = GeneratorFactory.getDomainClassGenerator();

		classGenerator.generateBaseClass(projectDef, packagePath);
		classGenerator.generateImplementationClasses(projectDef, packagePath);

	}
	
	private static void generateController(ProjectDefinition projectDef, String srcPath) throws JavaProjectCreationFailedException {
		
		String packagePath = srcPath + "/controller";
		
		ClassGenerator classGenerator = GeneratorFactory.getDomainClassGenerator();

		classGenerator.generateBaseClass(projectDef, packagePath);
		classGenerator.generateImplementationClasses(projectDef, packagePath);
		
	}
	
	private static void generateJsonRestApi(ProjectDefinition projectDef, String srcPath) throws JavaProjectCreationFailedException {
		
		String packagePath = srcPath + "/rest";
		
		ClassGenerator classGenerator = GeneratorFactory.getDomainClassGenerator();

		classGenerator.generateBaseClass(projectDef, packagePath);
		classGenerator.generateImplementationClasses(projectDef, packagePath);
		
	}
	
}<commit_msg>Minor change<commit_after>package com.xml2code.java.creator;

import org.apache.log4j.Logger;

import com.xml2code.core.definition.ProjectDefinition;
import com.xml2code.core.util.LoggerUtil;
import com.xml2code.java.exception.JavaProjectCreationFailedException;
import com.xml2code.java.factory.GeneratorFactory;
import com.xml2code.java.generator.ClassGenerator;

public class ProjectCreator {

	protected static Logger LOGGER = LoggerUtil.getApplicationLogger();
	
	public static void createJavaProject(ProjectDefinition projectDef) throws JavaProjectCreationFailedException {

		String javaProjectPath = projectDef.getTargetDir() + "/Java";
		String srcPath = javaProjectPath + "/src/main/java/com/" + projectDef.getProjectName().toLowerCase();

		generateDomain(projectDef, srcPath);
		generateController(projectDef, srcPath);
		generateJsonRestApi(projectDef, srcPath);
		
	}

	private static void generateDomain(ProjectDefinition projectDef, String srcPath) throws JavaProjectCreationFailedException {

		LoggerUtil.getApplicationLogger().info("--------------------------------");
		LoggerUtil.getApplicationLogger().info("generating domain object classes");
		LoggerUtil.getApplicationLogger().info("--------------------------------");
		
		String packagePath = srcPath + "/domain";

		ClassGenerator classGenerator = GeneratorFactory.getDomainClassGenerator();

		classGenerator.generateBaseClass(projectDef, packagePath);
		classGenerator.generateImplementationClasses(projectDef, packagePath);

	}
	
	private static void generateController(ProjectDefinition projectDef, String srcPath) throws JavaProjectCreationFailedException {
		
		LoggerUtil.getApplicationLogger().info("-----------------------------");
		LoggerUtil.getApplicationLogger().info("generating controller classes");
		LoggerUtil.getApplicationLogger().info("-----------------------------");
		
		String packagePath = srcPath + "/controller";
		
		ClassGenerator classGenerator = GeneratorFactory.getControllerClassGenerator();

		classGenerator.generateBaseClass(projectDef, packagePath);
		classGenerator.generateImplementationClasses(projectDef, packagePath);
		
	}
	
	private static void generateJsonRestApi(ProjectDefinition projectDef, String srcPath) throws JavaProjectCreationFailedException {

		LoggerUtil.getApplicationLogger().info("--------------------------------");
		LoggerUtil.getApplicationLogger().info("generating JSON REST API classes");
		LoggerUtil.getApplicationLogger().info("--------------------------------");
		
		String packagePath = srcPath + "/rest";
		
		ClassGenerator classGenerator = GeneratorFactory.getJsonRestApiGenerator();

		classGenerator.generateBaseClass(projectDef, packagePath);
		classGenerator.generateImplementationClasses(projectDef, packagePath);
		
	}
	
}
{'fraction_non_alphanumeric': 0.15462064005753326, 'fraction_numerical': 0.0025170801869830997, 'mean_word_length': 4.480788177339901, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3227183', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1280, 'n_words': 245}