Example usage for org.apache.commons.lang3 StringEscapeUtils unescapeCsv

List of usage examples for org.apache.commons.lang3 StringEscapeUtils unescapeCsv

Introduction

In this page you can find the example usage for org.apache.commons.lang3 StringEscapeUtils unescapeCsv.

Prototype

public static final String unescapeCsv(final String input) 

Source Link

Document

Returns a String value for an unescaped CSV column.

Usage

From source file:com.github.dactiv.common.utils.EncodeUtils.java

/**
 * Csv ?.
 */
public static String unescapeCsv(String csvEscaped) {
    return StringEscapeUtils.unescapeCsv(csvEscaped);
}

From source file:com.rockagen.commons.util.CommUtil.java

/**
 * unescape CSV see StringEscapeUtils.unescapeCsv(str)
 *
 * @param str value//  ww  w. java2  s.c  o  m
 * @return string
 */
public static String unescapeCsv(String str) {
    if (isBlank(str)) {
        return str;
    }
    return StringEscapeUtils.unescapeCsv(str);
}

From source file:sentinets.ImportTweets.java

public String getRow(ParseTweet t) {
    /*/*w  w w  .  j  a v a 2 s.  c o m*/
     * Each row of format:
     * c_emo   c_hash   m_mention   url   c_url   tweet_text   c_mention   parsed_text   length   m_emo   user   published_date   c_quote   m_hash   e/p/i   s/ns/na
     */
    String row = "";

    row += t.c_emo + "\t" + t.c_hash + "\t" + t.m_mention + "\t" + t.url + "\t" + t.c_url + "\t"
            + StringEscapeUtils.unescapeCsv(t.tweet_text) + "\t" + t.c_mention + "\t" + t.parsed_text + "\t"
            + t.length + "\t" + t.m_emo + "\t" + t.user + "\t" + t.published_date + "\t" + t.c_quote + "\t"
            + t.m_hash;

    for (String key : t.pf.posCounts.keySet()) {
        row += "\t" + t.pf.posCounts.get(key);
    }

    row += "\t?\t?";

    return row;
}

From source file:sentinets.ReadTweetCorpus.java

public String getRow(ParseTweet t) {
    /*//from   w  w w .j  a v a  2s .  c  om
     * Each row of format:
     * c_emo   c_hash   m_mention   url   c_url   tweet_text   c_mention   parsed_text   length   m_emo   user   published_date   c_quote   m_hash   e/p/i   s/ns/na
     */
    String row = "";

    row += t.c_emo + "\t" + t.c_hash + "\t" + t.m_mention + "\t" + t.url + "\t" + t.c_url + "\t"
            + StringEscapeUtils.unescapeCsv(t.tweet_text) + "\t" + t.c_mention + "\t" + t.parsed_text + "\t"
            + t.length + "\t" + t.m_emo + "\t" + t.user + "\t" + t.published_date + "\t" + t.c_quote + "\t"
            + t.m_hash;

    for (String key : POS_KEYSET) {
        row += "\t" + t.pf.posCounts.get(key);
    }

    row += "\t?\t?";

    return row;
}