Package org.opensextant.data.social
Class TweetUtility
java.lang.Object
org.opensextant.data.social.TweetUtility
- Author:
- ubaldino
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static GeocodinggetGeo(jodd.json.JsonObject attrs, boolean isUser) TOOD: validate available data for this schema.protected static voidTOOD: validate available data for this schema.static voidinsertMention(jodd.json.JsonArray a, String u, String id) Serialize a user screen name / ID pairing., e.g.static voidinsertMention(jodd.json.JsonArray a, Tweet.Mention m) Variation on insertMention(a, name, uid)static booleanstatic jodd.json.JsonObjectstatic jodd.json.JsonObjectObjective of this is to create a FLAT key/value map for a JSON or a simple HashMap to use.
-
Constructor Details
-
TweetUtility
public TweetUtility()
-
-
Method Details
-
isValue
-
toJSON
-
toJSON
Objective of this is to create a FLAT key/value map for a JSON or a simple HashMap to use.- Parameters:
tw- tweet objincludeGeo- include geo* fieldsformatDate- true if date should be in both text and epoch- Returns:
- JSON
-
insertGeo
TOOD: validate available data for this schema.- Parameters:
o-geo-isUser-
-
getGeo
TOOD: validate available data for this schema.- Parameters:
attrs- given attributesisUser- if attributes represent user profile- Returns:
- geocoding object populated with attribute data
-
insertMention
Serialize a user screen name / ID pairing., e.g. a mention of a friend. If just screen name or ID is available, then each item is added separately.- Parameters:
a- target arrayu- user nameid- mention
-
insertMention
Variation on insertMention(a, name, uid)
-