public class USMFStatus extends GeneralJSON implements Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
USMFStatus.Link
Container object for holding link information
|
static class |
USMFStatus.User
Container object to hold user information
|
Modifier and Type | Field and Description |
---|---|
String |
application
Application used to create this posting
|
String |
category
Category of content
|
int |
comments
Number of users who "commented" this
|
String |
country_code
the ISO A2 country code
|
String |
date
Date posted
|
String |
description
Full post text / Decription
|
int |
dislikes
Number of users who "disliked" this
|
long |
duration
Duration of content (if video)
|
int |
favorites
Number of users who "favorited" this
|
double[] |
geo
Latitude/Longitude content creation location
|
long |
id
Unique ID
|
ArrayList<String> |
keywords
Related Keywords
|
int |
likes
Number of users who "liked" this
|
ArrayList<USMFStatus.Link> |
links
List of links
|
String |
location
Plain Language content creation location
|
int |
max_rating
Maximum "rating" of content
|
int |
min_rating
Minimum "rating" of content
|
int |
rates
Number of users who "rated" this
|
int |
rating
Average "rating" of content
|
USMFStatus.User |
reply_to
Reply to
|
String |
service
Service Name
|
String |
source
User friendly link to content
|
String |
text
Microblog text / Video Title / Etc
|
ArrayList<USMFStatus.User> |
to_users
List of to users
|
USMFStatus.User |
user
User object for User Fields
|
analysis, gson
Constructor and Description |
---|
USMFStatus()
Empty constructor for reading from USMF json strings.
|
USMFStatus(Class<? extends GeneralJSON> generalJSONclass)
Constructor used if the input JSON is not a USMF json string.
|
Modifier and Type | Method and Description |
---|---|
USMFStatus |
clone() |
<T extends USMFStatus> |
clone(Class<T> clazz)
Clones the tweet to the given class.
|
org.joda.time.DateTime |
createdAt() |
boolean |
equals(Object obj) |
void |
fillFromString(String line)
Used by readASCII(), and available for external use to fill this
USMFStatus with the information held in the line
|
void |
fillUSMF(USMFStatus status)
This is the method that will be called by USMFStatus to fill itself with
the matching values from the extending class.
|
void |
fromUSMF(USMFStatus status)
This is the method that will be called to allow this object
to fill itself from a USMF object.
|
Class<? extends GeneralJSON> |
getGeneralJSONClass() |
GeneralJSON |
instanceFromString(String line) |
boolean |
isInvalid() |
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
setGeneralJSONClass(Class<? extends GeneralJSON> g)
set the type of json that backs this instance (used primarily for
reading)
|
String |
toJson() |
String |
toString() |
addAnalysis, analysisToJSON, asciiHeader, binaryHeader, fillAnalysis, getAnalysis, readBinary, writeASCII, writeASCIIAnalysis, writeASCIIAnalysis, writeBinary
public long id
public double[] geo
public String application
public String description
public long duration
public int likes
public int dislikes
public int favorites
public int comments
public int rates
public int rating
public int min_rating
public int max_rating
public USMFStatus.User user
public ArrayList<USMFStatus.User> to_users
public USMFStatus.User reply_to
public ArrayList<USMFStatus.Link> links
public String country_code
public USMFStatus(Class<? extends GeneralJSON> generalJSONclass)
generalJSONclass
- : The class of the GeneralJSON extension.public USMFStatus()
public Class<? extends GeneralJSON> getGeneralJSONClass()
public void setGeneralJSONClass(Class<? extends GeneralJSON> g)
g
- public boolean isInvalid()
public void readASCII(Scanner in) throws IOException
ReadableASCII
readASCII
in interface ReadableASCII
in
- source to read from.IOException
- an error reading inputpublic void fillFromString(String line)
line
- = json string in the format specified by the constructor of
this USMFStatus (if empty constructor, expects a USMFSStatus
json string)public GeneralJSON instanceFromString(String line)
instanceFromString
in class GeneralJSON
public String toJson()
USMFStatus
to JSON using Gson
public USMFStatus clone()
public <T extends USMFStatus> T clone(Class<T> clazz)
T
- clazz
- public org.joda.time.DateTime createdAt() throws ParseException
ParseException
public void fillUSMF(USMFStatus status)
GeneralJSON
fillUSMF
in class GeneralJSON
status
- = USMFStatus to be filledpublic void fromUSMF(USMFStatus status)
GeneralJSON
fromUSMF
in class GeneralJSON
status
- = USMFStatus to be filled