Class TwitterConverter
java.lang.Object
com.northconcepts.datapipeline.twitter.TwitterConverter
- All Implemented Interfaces:
ITwitterConverter
Default
ITwitterConverter, available as DEFAULT, that maps tweets, users and lists to record fields.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]entitiesToArray(TweetEntity[] entities, String entityPrefix) ReturnsentityPrefixplusITwitterConverter.entityToString(TweetEntity)for each entity, or null if there are none.entitiesToString(TweetEntity[] entities, String entityPrefix, String separator) Joins the entities' prefixed texts withseparator, or returns null if there are no entities.entityToString(TweetEntity entity) Returns the entity's text, using the expanded URL for URL entities when present, or null for a null entity.geoLocationToString(GeoLocation[][] coordinates) Formats the coordinates as comma-separated[[lat,long],...]groups, or returns null if they are null.voidtweetToRecord(Status tweet, Record record, IEntityExpansionPolicy entityExpansionPolicy) voiduserListToRecord(UserList userList, Record record, IEntityExpansionPolicy entityExpansionPolicy) voiduserToRecord(User user, Record record, IEntityExpansionPolicy entityExpansionPolicy)
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
TwitterConverter
protected TwitterConverter()
-
-
Method Details
-
tweetToRecord
public void tweetToRecord(Status tweet, Record record, IEntityExpansionPolicy entityExpansionPolicy) - Specified by:
tweetToRecordin interfaceITwitterConverter
-
userToRecord
- Specified by:
userToRecordin interfaceITwitterConverter
-
userListToRecord
public void userListToRecord(UserList userList, Record record, IEntityExpansionPolicy entityExpansionPolicy) - Specified by:
userListToRecordin interfaceITwitterConverter
-
geoLocationToString
Description copied from interface:ITwitterConverterFormats the coordinates as comma-separated[[lat,long],...]groups, or returns null if they are null.- Specified by:
geoLocationToStringin interfaceITwitterConverter
-
entitiesToArray
Description copied from interface:ITwitterConverterReturnsentityPrefixplusITwitterConverter.entityToString(TweetEntity)for each entity, or null if there are none.- Specified by:
entitiesToArrayin interfaceITwitterConverter
-
entitiesToString
Description copied from interface:ITwitterConverterJoins the entities' prefixed texts withseparator, or returns null if there are no entities.- Specified by:
entitiesToStringin interfaceITwitterConverter
-
entityToString
Description copied from interface:ITwitterConverterReturns the entity's text, using the expanded URL for URL entities when present, or null for a null entity.- Specified by:
entityToStringin interfaceITwitterConverter
-