streams-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sblack...@apache.org
Subject [13/41] git commit: fixing imports and serialization tests after schema breakup
Date Thu, 04 Sep 2014 17:12:01 GMT
fixing imports and serialization tests after schema breakup


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/4e3d769b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/4e3d769b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/4e3d769b

Branch: refs/heads/pp
Commit: 4e3d769b3559fd116ac2d1f7c673b5325351fb50
Parents: 199881d
Author: sblackmon <sblackmon@apache.org>
Authored: Mon Aug 11 19:04:40 2014 -0500
Committer: sblackmon <sblackmon@apache.org>
Committed: Tue Aug 12 18:04:24 2014 -0500

----------------------------------------------------------------------
 .../DatasiftDefaultActivitySerializer.java      |   2 +-
 .../datasift/twitter/DatasiftTwitter.json       | 260 +------------------
 .../datasift/twitter/DatasiftTwitterMedia.json  | 126 +++++++++
 .../DatasiftTypeConverterProcessorTest.java     |   4 +-
 .../DatasiftActivitySerializerTest.java         |   3 +-
 5 files changed, 136 insertions(+), 259 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4e3d769b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftDefaultActivitySerializer.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftDefaultActivitySerializer.java
b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftDefaultActivitySerializer.java
index 615ca34..678f67b 100644
--- a/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftDefaultActivitySerializer.java
+++ b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftDefaultActivitySerializer.java
@@ -6,7 +6,7 @@ import com.google.common.collect.Lists;
 import org.apache.streams.data.ActivitySerializer;
 import org.apache.streams.datasift.Datasift;
 import org.apache.streams.datasift.interaction.Interaction;
-import org.apache.streams.datasift.interaction.Links;
+import org.apache.streams.datasift.links.Links;
 import org.apache.streams.datasift.util.StreamsDatasiftMapper;
 import org.apache.streams.pojo.json.*;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4e3d769b/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitter.json
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitter.json
b/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitter.json
index c671b2e..b11f81a 100644
--- a/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitter.json
+++ b/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitter.json
@@ -95,135 +95,8 @@
             "items" :
                 [
                     {
-                        "javaType" : "org.apache.streams.datasift.twitter.Media",
                         "type" : "object",
-                        "dynamic" : "true",
-                        "properties" :
-                        {
-                            "display_url" :
-                            {
-                                "type" : "string"
-                            },
-                            "expanded_url" :
-                            {
-                                "type" : "string"
-                            },
-                            "id" :
-                            {
-                                "type" : "integer"
-                            },
-                            "id_str" :
-                            {
-                                "type" : "string"
-                            },
-                            "media_url" :
-                            {
-                                "type" : "string"
-                            },
-                            "media_url_https" :
-                            {
-                                "type" : "string"
-                            },
-                            "sizes" :
-                            {
-                                "dynamic" : "true",
-                                "properties" :
-                                {
-                                    "large" :
-                                    {
-                                        "dynamic" : "true",
-                                        "properties" :
-                                        {
-                                            "h" :
-                                            {
-                                                "type" : "integer"
-                                            },
-                                            "resize" :
-                                            {
-                                                "type" : "string"
-                                            },
-                                            "w" :
-                                            {
-                                                "type" : "integer"
-                                            }
-                                        }
-                                    },
-                                    "medium" :
-                                    {
-                                        "dynamic" : "true",
-                                        "properties" :
-                                        {
-                                            "h" :
-                                            {
-                                                "type" : "integer"
-                                            },
-                                            "resize" :
-                                            {
-                                                "type" : "string"
-                                            },
-                                            "w" :
-                                            {
-                                                "type" : "integer"
-                                            }
-                                        }
-                                    },
-                                    "small" :
-                                    {
-                                        "dynamic" : "true",
-                                        "properties" :
-                                        {
-                                            "h" :
-                                            {
-                                                "type" : "integer"
-                                            },
-                                            "resize" :
-                                            {
-                                                "type" : "string"
-                                            },
-                                            "w" :
-                                            {
-                                                "type" : "integer"
-                                            }
-                                        }
-                                    },
-                                    "thumb" :
-                                    {
-                                        "dynamic" : "true",
-                                        "properties" :
-                                        {
-                                            "h" :
-                                            {
-                                                "type" : "integer"
-                                            },
-                                            "resize" :
-                                            {
-                                                "type" : "string"
-                                            },
-                                            "w" :
-                                            {
-                                                "type" : "integer"
-                                            }
-                                        }
-                                    }
-                                }
-                            },
-                            "source_status_id" :
-                            {
-                                "type" : "integer"
-                            },
-                            "source_status_id_str" :
-                            {
-                                "type" : "string"
-                            },
-                            "type" :
-                            {
-                                "type" : "string"
-                            },
-                            "url" :
-                            {
-                                "type" : "string"
-                            }
-                        }
+                        "$ref" : "DatasiftTwitterMedia.json"
                     }
                 ]
         },
@@ -350,133 +223,14 @@
                 },
                 "media" :
                 {
-                    "dynamic" : "true",
-                    "properties" :
-                    {
-                        "display_url" :
-                        {
-                            "type" : "string"
-                        },
-                        "expanded_url" :
-                        {
-                            "type" : "string"
-                        },
-                        "id" :
-                        {
-                            "type" : "integer"
-                        },
-                        "id_str" :
-                        {
-                            "type" : "string"
-                        },
-                        "media_url" :
-                        {
-                            "type" : "string"
-                        },
-                        "media_url_https" :
-                        {
-                            "type" : "string"
-                        },
-                        "sizes" :
-                        {
-                            "dynamic" : "true",
-                            "properties" :
+                    "type" : "array",
+                    "items" :
+                        [
                             {
-                                "large" :
-                                {
-                                    "dynamic" : "true",
-                                    "properties" :
-                                    {
-                                        "h" :
-                                        {
-                                            "type" : "integer"
-                                        },
-                                        "resize" :
-                                        {
-                                            "type" : "string"
-                                        },
-                                        "w" :
-                                        {
-                                            "type" : "integer"
-                                        }
-                                    }
-                                },
-                                "medium" :
-                                {
-                                    "dynamic" : "true",
-                                    "properties" :
-                                    {
-                                        "h" :
-                                        {
-                                            "type" : "integer"
-                                        },
-                                        "resize" :
-                                        {
-                                            "type" : "string"
-                                        },
-                                        "w" :
-                                        {
-                                            "type" : "integer"
-                                        }
-                                    }
-                                },
-                                "small" :
-                                {
-                                    "dynamic" : "true",
-                                    "properties" :
-                                    {
-                                        "h" :
-                                        {
-                                            "type" : "integer"
-                                        },
-                                        "resize" :
-                                        {
-                                            "type" : "string"
-                                        },
-                                        "w" :
-                                        {
-                                            "type" : "integer"
-                                        }
-                                    }
-                                },
-                                "thumb" :
-                                {
-                                    "dynamic" : "true",
-                                    "properties" :
-                                    {
-                                        "h" :
-                                        {
-                                            "type" : "integer"
-                                        },
-                                        "resize" :
-                                        {
-                                            "type" : "string"
-                                        },
-                                        "w" :
-                                        {
-                                            "type" : "integer"
-                                        }
-                                    }
-                                }
+                            "type" : "object",
+                            "$ref" : "DatasiftTwitterMedia.json"
                             }
-                        },
-                        "source_status_id" :
-                        {
-                            "type" : "integer"
-                        },
-                        "source_status_id_str" :
-                        {
-                            "type" : "string"
-                        },
-                        "type" :
-                        {
-                            "type" : "string"
-                        },
-                        "url" :
-                        {
-                            "type" : "string"
-                        }
-                    }
+                        ]
                 },
                 "mention_ids" :
                 {

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4e3d769b/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitterMedia.json
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitterMedia.json
b/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitterMedia.json
new file mode 100644
index 0000000..2084932
--- /dev/null
+++ b/streams-contrib/streams-provider-datasift/src/main/jsonschema/org/apache/streams/datasift/twitter/DatasiftTwitterMedia.json
@@ -0,0 +1,126 @@
+{
+    "type" : "object",
+    "javaType" : "org.apache.streams.datasift.twitter.Media",
+    "properties" :
+    {
+        "display_url" :
+        {
+            "type" : "string"
+        },
+        "expanded_url" :
+        {
+            "type" : "string"
+        },
+        "id" :
+        {
+            "type" : "integer"
+        },
+        "id_str" :
+        {
+            "type" : "string"
+        },
+        "media_url" :
+        {
+            "type" : "string"
+        },
+        "media_url_https" :
+        {
+            "type" : "string"
+        },
+        "sizes" :
+        {
+            "properties" :
+            {
+                "large" :
+                {
+                    "properties" :
+                    {
+                        "h" :
+                        {
+                            "type" : "integer"
+                        },
+                        "resize" :
+                        {
+                            "type" : "string"
+                        },
+                        "w" :
+                        {
+                            "type" : "integer"
+                        }
+                    }
+                },
+                "medium" :
+                {
+                    "properties" :
+                    {
+                        "h" :
+                        {
+                            "type" : "integer"
+                        },
+                        "resize" :
+                        {
+                            "type" : "string"
+                        },
+                        "w" :
+                        {
+                            "type" : "integer"
+                        }
+                    }
+                },
+                "small" :
+                {
+                    "dynamic" : "true",
+                    "properties" :
+                    {
+                        "h" :
+                        {
+                            "type" : "integer"
+                        },
+                        "resize" :
+                        {
+                            "type" : "string"
+                        },
+                        "w" :
+                        {
+                            "type" : "integer"
+                        }
+                    }
+                },
+                "thumb" :
+                {
+                    "properties" :
+                    {
+                        "h" :
+                        {
+                            "type" : "integer"
+                        },
+                        "resize" :
+                        {
+                            "type" : "string"
+                        },
+                        "w" :
+                        {
+                            "type" : "integer"
+                        }
+                    }
+                }
+            }
+        },
+        "source_status_id" :
+        {
+            "type" : "integer"
+        },
+        "source_status_id_str" :
+        {
+            "type" : "string"
+        },
+        "type" :
+        {
+            "type" : "string"
+        },
+        "url" :
+        {
+            "type" : "string"
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4e3d769b/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessorTest.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessorTest.java
b/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessorTest.java
index fac0f02..015f4e9 100644
--- a/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessorTest.java
+++ b/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessorTest.java
@@ -26,9 +26,7 @@ import org.junit.Test;
 
 import java.util.List;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.*;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4e3d769b/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
b/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
index baff556..5f9feed 100644
--- a/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
+++ b/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
@@ -10,9 +10,8 @@ import org.junit.Test;
 
 import java.util.Scanner;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 public class DatasiftActivitySerializerTest {
 


Mime
View raw message