Example usage for org.apache.commons.lang StringUtils EMPTY

List of usage examples for org.apache.commons.lang StringUtils EMPTY

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils EMPTY.

Prototype

String EMPTY

To view the source code for org.apache.commons.lang StringUtils EMPTY.

Click Source Link

Document

The empty String "".

Usage

From source file:me.smoe.adar.analyzer.luence.AnalyzerToy.java

public static Set<String> analyzerByStandard(String sentence) throws Exception {
    Analyzer analyzer = new StandardAnalyzer();
    try {/*from   w ww.  j a va 2  s  .co  m*/
        TokenStream tokenStream = analyzer.tokenStream(StringUtils.EMPTY, new StringReader(sentence));
        tokenStream.addAttribute(CharTermAttribute.class);
        tokenStream.reset();

        Set<String> words = new HashSet<>();
        while (tokenStream.incrementToken()) {
            words.add(((CharTermAttribute) tokenStream.getAttribute(CharTermAttribute.class)).toString());
        }

        return words;
    } finally {
        analyzer.close();
    }
}

From source file:com.microsoft.alm.plugin.external.models.PendingChange.java

public PendingChange(final String serverItem, final String changeType) {
    this(serverItem, null, null, null, null, null, changeType, null, null, false, StringUtils.EMPTY);
}

From source file:com.cognifide.slice.cq.utils.PathUtils.java

public String getPagePathFromResourcePath(final String resourcePath) {
    if (StringUtils.isEmpty(resourcePath)) {
        return StringUtils.EMPTY;
    }/* w w w  . ja v a 2 s.  c om*/

    int jcrContentPosition = resourcePath.lastIndexOf("/" + JcrConstants.JCR_CONTENT);
    if (0 > jcrContentPosition) {
        return resourcePath; // we are on page path
    }
    return resourcePath.substring(0, jcrContentPosition);
}

From source file:com.amalto.core.storage.hibernate.MultiLingualIndexedBridge.java

@Override
public String objectToString(Object object) {
    if (object == null) {
        return StringUtils.EMPTY;
    }//from w  w  w.j  av a 2s. c o m
    return String.valueOf(object);
}

From source file:info.magnolia.cms.exchange.ExchangeException.java

public ExchangeException() {
    super(StringUtils.EMPTY);
}

From source file:com.pulsarang.infra.monitoring.access.AccessMonitorContext.java

public void init() {
    success = null;
    queryString = StringUtils.EMPTY;
    // ??   ???? filter interceptor ? ? ??  ?? .  
    initialized = true;
}

From source file:com.amalto.core.server.routing.NoOpService.java

@Override
public String getDescription(String twoLettersLanguageCode) {
    return StringUtils.EMPTY;
}

From source file:com.fengduo.bee.commons.util.DateViewTools.java

public static String formatFullDate(Date date) {
    if (date == null) {
        return StringUtils.EMPTY;
    }/*  w w  w .  j  a  va 2  s  . c  o m*/
    return getFormat(FULL_DATE_FORMAT_PATTERN).format(date);
}

From source file:com.zb.app.web.tools.WebUserTools.java

public static String getChugangName() {
    return current() == null ? StringUtils.EMPTY : current().getChugangName();
}

From source file:com.weibo.handler.ErrorCodeHandler.java

public ErrorCode handle(HttpStatusCodeException error) {
    ObjectMapper objectMapper = new ObjectMapper();
    ErrorCode errorCode = new ErrorCode();
    errorCode.setRequest(StringUtils.EMPTY);
    errorCode.setErrorCode(error.getStatusCode().toString());
    errorCode.setError(error.getStatusText());
    try {//from   w  ww.j a  v a2  s .c  o m
        errorCode = objectMapper.readValue(error.getResponseBodyAsByteArray(), ErrorCode.class);
    } catch (JsonParseException e) {
        log.error(ExceptionUtils.getFullStackTrace(e));
    } catch (JsonMappingException e) {
        log.error(ExceptionUtils.getFullStackTrace(e));
    } catch (IOException e) {
        log.error(ExceptionUtils.getFullStackTrace(e));
    }
    return errorCode;
}