streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robdouglas <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: STREAMS-93 | Updated the Hashtag P...
Date Thu, 22 May 2014 17:19:38 GMT
Github user robdouglas commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/25#discussion_r12961938
  
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/serializer/TwitterJsonActivitySerializer.java
---
    @@ -81,6 +87,48 @@ else if( documentSubType == Delete.class )
             throw new NotImplementedException();
         }
     
    +    public static Actor buildActorRetweet(Retweet tweet) {
    +        return buildActor(tweet.getUser());
    +    }
    +
    +    public static Actor buildActorTweet(Tweet tweet) {
    +        return buildActor(tweet.getUser());
    +    }
    +
    +    public static Actor buildActor(User user) {
    +        Actor actor = new Actor();
    +
    +        actor.setId(formatId(
    +                Optional.fromNullable(
    +                        user.getIdStr())
    +                        .or(Optional.of(user.getId().toString()))
    +                        .orNull()
    +        ));
    +        actor.setDisplayName(user.getScreenName());
    +        if (user.getUrl()!=null){
    +            actor.setUrl(user.getUrl());
    +        }
    +
    +        actor.setDisplayName(user.getName());
    +        actor.setSummary(user.getDescription());
    +
    +        Map<String, Object> extensions = new HashMap<String, Object>();
    +        extensions.put("location", user.getLocation());
    --- End diff --
    
    Would you propose taking this out then? Twitter4J will just return a String that is user
set for the actor's location


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message