streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sieverssj <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: Streams 105
Date Wed, 02 Jul 2014 19:20:06 GMT
Github user sieverssj commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/47#discussion_r14477763
  
    --- Diff: streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftTweetActivitySerializer.java
---
    @@ -167,24 +143,40 @@ public Actor retweetBuildActor(Actor actor, org.apache.streams.datasift.twitter.
             if(actor.getImage() == null && profileUrl == null) {
                 profileUrl = user.getProfileImageUrl();
             }
    -        profileImage.setUrl(profileUrl);
    -        actor.setImage(profileImage);
    +
    +        if(profileUrl != null) {
    +            profileImage.setUrl(profileUrl);
    +            actor.setImage(profileImage);
    +        }
     
             actor.setAdditionalProperty("extensions", extensions);
             return actor;
         }
     
    +    /**
    +     * Adds location attributes from the given Twitter object
    +     *
    +     * @param activity
    +     * @param twitter
    +     */
         public void addLocationExtension(Activity activity, Twitter twitter) {
             Map<String, Object> extensions = ensureExtensions(activity);
             Map<String, Object> location = Maps.newHashMap();
             double[] coordiantes = new double[] { twitter.getGeo().getLongitude(), twitter.getGeo().getLatitude()
};
             Map<String, Object> coords = Maps.newHashMap();
             coords.put("coordinates", coordiantes);
    -        coords.put("type", "geo_point");
    +        coords.put("type", "point");
    --- End diff --
    
    Needs to be "Point".  See http://geojson.org/geojson-spec.html#point


---
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