Package seekfeel.datareaders

Source Code of seekfeel.datareaders.TweetReader

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package seekfeel.datareaders;
import java.util.ArrayList;
import seekfeel.dataholders.DataUnit;
import seekfeel.dataholders.TweetUnit;
import seekfeel.utilities.FilesReader;

/**
*
* @author Ahmed
*/
public class TweetReader implements Reader {
  @Override
    public ArrayList<DataUnit> getData(String filePath) {
        ArrayList<String> theTweets;
        ArrayList<DataUnit> tweets = new ArrayList<DataUnit>();
        theTweets = FilesReader.getAllLines(filePath);
        for (String stTweet : theTweets) {
            tweets.add(new TweetUnit(stTweet));
        }
        return tweets;
    }
}
TOP

Related Classes of seekfeel.datareaders.TweetReader

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.