|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.dicodeproject.analysis.restapi.TwitterController
@Controller @RequestMapping(value="/twitter/") public class TwitterController
| Constructor Summary | |
|---|---|
TwitterController()
|
|
| Method Summary | |
|---|---|
void |
creationDates(String dateType,
String callback,
String start,
String stop,
boolean addZeros,
javax.servlet.http.HttpServletResponse response)
Takes a date type as parameter. |
void |
export(String topic,
String minSupport,
javax.servlet.http.HttpServletResponse response)
Deprecated. |
void |
hashtag(String topic,
String day,
javax.servlet.http.HttpServletResponse response)
Returns hashtags for a certain topic and day if available This method was implemented to demonstrate the workflow and will be replaced by the generic method "metadata" |
void |
metadata(String type,
String day,
String callback,
javax.servlet.http.HttpServletResponse response)
Generic method which returns Twitter meta-data from HBase http://localhost:9889/restapi/twitter/metadata/lang.json? |
void |
setExportService(TwitterVectorExporter exportService)
|
void |
setHBaseColumn(String hbaseColumn)
|
void |
setHBaseColumnFamily(String hbaseColumnFamily)
|
void |
setHBaseTablename(String hbaseTablename)
|
void |
setHTablePoolHandler(HTablePoolHandler handler)
|
void |
setTwitterstreamTablename(String twitterstreamTablename)
|
void |
termFreqs(String terms,
String callback,
String start,
String stop,
boolean addZeros,
javax.servlet.http.HttpServletResponse response)
Takes terms as input. |
void |
vectors(String start,
String stop,
String language,
String regex,
String callback,
javax.servlet.http.HttpServletResponse response)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TwitterController()
| Method Detail |
|---|
@RequestMapping(value="hashtag/{topic}_{day}",
method=GET)
public void hashtag(@PathVariable
String topic,
@PathVariable
String day,
javax.servlet.http.HttpServletResponse response)
throws IOException
topic - day - response -
IOException
@RequestMapping(value="metadata/{type}.json",
method=GET)
public void metadata(@PathVariable
String type,
@RequestParam
String day,
@RequestParam
String callback,
javax.servlet.http.HttpServletResponse response)
throws IOException
type - day - response -
IOException
@RequestMapping(value="vectors",
method=GET)
public void vectors(@RequestParam(required=false)
String start,
@RequestParam(required=false)
String stop,
@RequestParam(required=false)
String language,
@RequestParam(required=false)
String regex,
@RequestParam
String callback,
javax.servlet.http.HttpServletResponse response)
throws IOException,
twitter4j.internal.org.json.JSONException
IOException
twitter4j.internal.org.json.JSONException
@Deprecated
@RequestMapping(value="export/{topic}_{minSupport}",
method=GET)
public void export(@PathVariable
String topic,
@PathVariable
String minSupport,
javax.servlet.http.HttpServletResponse response)
topic - minSupport - response -
IOException
@RequestMapping(value="creationDates/{dateType}",
method=GET)
public void creationDates(@PathVariable
String dateType,
@RequestParam
String callback,
@RequestParam(required=false)
String start,
@RequestParam(required=false)
String stop,
@RequestParam(required=false,defaultValue="false")
boolean addZeros,
javax.servlet.http.HttpServletResponse response)
throws IOException,
twitter4j.internal.org.json.JSONException
dateType - one of {"year", "yearMonth", "yearMonthDay", "hour"}
Returns a JSON that consists of {"categoriesLabel": String, "categories": Array, "chartData": Map},
with Map containing "creationDates" as key and a map with (date, frequency) as value.
Array contains all date values in the required range, and categoriesLabel is the label for these values e.g.
{
"categoriesLabel": "yearMonth",
"categories": ["2011-01", "2011-02"],
"chartData": {
"creationDates": {
"2011-01": 54,
"2011-02": 21
}
}
}callback - arbitrary callback parameterstart - earliest date in the resultstop - EXCLUSIVE latest date in the resultaddZeros - flag to specify if missing values should be represented by zero entriesresponse - to write the answer to
IOException - inherited from HBase Scan and HttpServletResponse.write
twitter4j.internal.org.json.JSONException - inherited from JSONObject constructor
@RequestMapping(value="termFreqs",
method=GET)
public void termFreqs(@RequestParam
String terms,
@RequestParam
String callback,
@RequestParam(required=false)
String start,
@RequestParam(required=false)
String stop,
@RequestParam(required=false,defaultValue="false")
boolean addZeros,
javax.servlet.http.HttpServletResponse response)
throws IOException,
twitter4j.internal.org.json.JSONException
terms - list of terms separated by commascallback - arbitrary callback parameterstart - earliest date in the resultstop - EXCLUSIVE latest date in the resultaddZeros - flag to specify if missing values should be represented by zero entriesresponse - to write the answer to
IOException - inherited from HBase Scan and HttpServletResponse.write
twitter4j.internal.org.json.JSONException - inherited JSONObjectpublic void setHBaseTablename(String hbaseTablename)
hbaseTablename - public void setHBaseColumnFamily(String hbaseColumnFamily)
hbaseColumnFamily - public void setHBaseColumn(String hbaseColumn)
hbaseColumn - public void setTwitterstreamTablename(String twitterstreamTablename)
twitterstreamTablename - public void setHTablePoolHandler(HTablePoolHandler handler)
handler - public void setExportService(TwitterVectorExporter exportService)
exportService -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||