Java Code Examples for org.apache.commons.lang3.StringUtils.isAllUpperCase()

The following are Jave code examples for showing how to use isAllUpperCase() of the org.apache.commons.lang3.StringUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: RDF2PT   File: SimpleIRIConverter.java   Source Code and License Vote up 5 votes
private String splitCamelCase(String s) {
		// we only split if it contains a vowel
		if(!(s.matches(".*[aeiou].*"))){
			return s;
		}
		
		StringBuilder sb = new StringBuilder();
		for (String token : s.split(" ")) {
			String[] tokenSplit = StringUtils.splitByCharacterTypeCamelCase(token);
			
			String noVowels = "";
			for (String t : tokenSplit) {
				if(t.matches(".*[aeiou].*") || !StringUtils.isAllUpperCase(t)){
					if(!noVowels.isEmpty()){
						sb.append(noVowels).append(" ");
						noVowels = "";
					}
					sb.append(t).append(" ");
				} else {
					noVowels += t;
				}
//				sb = new StringBuilder(sb.toString().trim());
			}
			sb.append(noVowels);
//			sb.append(" ");
		}
		return sb.toString().trim();
		//	    	return s.replaceAll(
		//	    	      String.format("%s|%s|%s",
		//	    	         "(?<=[A-Z])(?=[A-Z][a-z])",
		//	    	         "(?<=[^A-Z])(?=[A-Z])",
		//	    	         "(?<=[A-Za-z])(?=[^A-Za-z])"
		//	    	      ),
		//	    	      " "
		//	    	   );
	}
 
Example 2
Project: vscrawler   File: IsAllUpperCase.java   Source Code and License Vote up 4 votes
@Override
protected boolean handle(CharSequence str) {
    return StringUtils.isAllUpperCase(str);
}