org.protege.owl.codegeneration.names.NamingUtilities Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of code-generation Show documentation
Show all versions of code-generation Show documentation
Generate Java code from an OWL ontology in the Protege Desktop editing environment.
The newest version!
package org.protege.owl.codegeneration.names;
public class NamingUtilities {
private NamingUtilities() {
}
public static String convertToJavaIdentifier(String s) {
s = s.replace(' ', '_').replace('-', '_').replaceAll("\'","");
return s;
}
/** Returns the provided string with initial letter as capital
* @param name
*/
public static String convertInitialLetterToUpperCase(String name) {
if (name == null) {
return null;
}
if (name.length() > 1) {
return Character.toUpperCase(name.charAt(0)) + name.substring(1);
} else {
return name.toUpperCase();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy