List of usage examples for org.apache.commons.lang StringUtils upperCase
public static String upperCase(String str)
Converts a String to upper case as per String#toUpperCase() .
From source file:ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier.java
public final String getGroupCode() { return StringUtils.upperCase(groupCodeOrNull); }
From source file:com.ewcms.content.resource.web.ResourceAction.java
public String input() { context = ServletActionContext.getRequest().getContextPath(); context = StringUtils.removeEnd(context, "/"); Resource.Type resType = Resource.Type.valueOf(StringUtils.upperCase(type)); fileDesc = resType.getFileDesc();// www . j a v a2 s .c o m fileExt = resType.getFileExt(); return Action.SUCCESS; }
From source file:io.kahu.hawaii.domain.BooleanProperty.java
public boolean toBoolean() { Set<String> trueValues = new HashSet<String>( Arrays.asList(new String[] { "TRUE", "YES", "Y", "JA", "J", "1" })); return trueValues.contains(StringUtils.upperCase(getValue())); }
From source file:de.forsthaus.backend.util.IpLocator.java
/** * Other than the getters & setters, this is the only method visible to the * outside world// www. j a va2s .c om * * @param ip * The ip address to be located * @return IPLocator instance * @throws IOException * in case of any error/exception */ public static IpLocator locate(String ip) throws IOException { final String url = HOSTIP_LOOKUP_URL + ip; final URL u = new URL(url); final List<String> response = getContent(u); final Pattern splitterPattern = Pattern.compile(":"); final IpLocator ipl = new IpLocator(); for (final String token : response) { final String[] keyValue = splitterPattern.split(token); if (keyValue.length != 2) { continue; } final String key = StringUtils.upperCase(keyValue[0]); final String value = keyValue[1]; if (KEY_COUNTRY.equals(key)) { ipl.setCountry(value); } else if (KEY_CITY.equals(key)) { ipl.setCity(value); } else if (KEY_LATITUDE.equals(key)) { ipl.setLatitude(stringToFloat(value)); } else if (KEY_LONGITUDE.equals(key)) { ipl.setLongitude(stringToFloat(value)); } } return ipl; }
From source file:ch.systemsx.cisd.openbis.generic.shared.dto.identifier.DatabaseInstanceIdentifier.java
/** * Usually you should not access database instance code directly. Look for appropriate helpers. * /*from w w w . j ava 2s . c om*/ * @return local or <i>UUID</i> of the database instance. It is treated as <i>UUID</i> if it has * a canonical UUID format. */ public final String getDatabaseInstanceCode() { return StringUtils.upperCase(databaseInstanceCode); }
From source file:com.ewcms.content.resource.web.QueryAction.java
@Override protected Resultable queryResult(QueryFactory queryFactory, String cacheKey, int rows, int page, Order order) { EntityQueryable query = queryFactory.createEntityQuery(Resource.class).setPage(page).setRow(rows) .orderDesc("createTime"); query.eq("site", getSite()); if (removeEvent) { query.eq("status", Status.DELETE); } else {//w w w . ja va 2 s . c o m query.eq("type", Type.valueOf(StringUtils.upperCase(type))); query.in("status", new Status[] { Status.NORMAL, Status.RELEASED }); } String name = getParameterValue(String.class, "name"); if (isStringNotEmpty(name)) { query.likeAnywhere("name", name); } String description = getParameterValue(String.class, "description"); if (isStringNotEmpty(description)) { query.likeAnywhere("description", description); } Date fromDate = getParameterValue(Date.class, "fromDate"); Date toDate = getParameterValue(Date.class, "toDate"); if (isNotNull(fromDate) || isNotNull(toDate)) { fromDate = (fromDate == null ? MINI_DATE : fromDate); toDate = (toDate == null ? new Date(System.currentTimeMillis()) : toDate); query.between("createTime", fromDate, toDate); } return query.queryCacheResult(cacheKey); }
From source file:ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifier.java
public String getExperimentCode() { return StringUtils.upperCase(experimentCode); }
From source file:com.ewcms.content.resource.web.ResourceAction.java
/** * ?/*from w w w .j a v a 2 s . c om*/ */ public void receive() { try { logger.debug("Resource name is {} and type is {}", myUploadFileName, type); Resource.Type resType = Resource.Type.valueOf(StringUtils.upperCase(type)); Resource resource; if (isNewAdd()) { resource = resourceFac.uploadResource(myUpload, myUploadFileName, resType); } else { resource = resourceFac.updateResource(id, myUpload, myUploadFileName, resType); } renderSuccess(resource); } catch (IOException e) { logger.error("Upload resource is error:{}", e); renderError(e.toString()); } }
From source file:gov.nih.nci.caarray.application.translation.magetab.MageTabTranslationResult.java
Category getCategory(String name) {
return categoryMap.get(StringUtils.upperCase(name));
}
From source file:gov.nih.nci.caarray.application.translation.magetab.MageTabTranslationResult.java
void addCategory(String name, Category cat) { categoryMap.put(StringUtils.upperCase(name), cat); }