public static String capitalize(String longname) {
		String name = longname;
		if (name.contains(".")) {
			name = name.substring(0, name.lastIndexOf("."));
		}
		name = name.toLowerCase();
		// System.out.println(name);
		final StringBuilder result = new StringBuilder(name.length());
		String[] words = name.split("_");
		for (int i = 0, l = words.length; i < l; ++i) {
			result.append(Character.toUpperCase(words[i].charAt(0))).append(
					words[i].substring(1));
		}
		return remove1(result.toString());
	}