You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by sb...@apache.org on 2019/03/18 19:44:34 UTC

[streams] 01/01: STREAMS-638: Update POJO models for Person

This is an automated email from the ASF dual-hosted git repository.

sblackmon pushed a commit to branch STREAMS-638
in repository https://gitbox.apache.org/repos/asf/streams.git

commit 9852da1a0db98befd0c10ce4b45e5a40d620e6c8
Author: Steve Blackmon <sb...@apache.org>
AuthorDate: Mon Mar 18 14:44:23 2019 -0500

    STREAMS-638: Update POJO models for Person
---
 .../streams/fullcontact/pojo/LocationItem.json     | 32 ++++++++++++++++++++++
 .../apache/streams/fullcontact/pojo/PersonAge.json | 21 ++++++++++++++
 .../streams/fullcontact/pojo/PersonDetails.json    | 21 ++++++++++++--
 .../fullcontact/pojo/PersonEducationItem.json      | 25 +++++++++++++++++
 .../streams/fullcontact/pojo/PersonName.json       | 20 ++++++++++++++
 .../streams/fullcontact/pojo/PersonProfile.json    |  4 +++
 .../streams/fullcontact/pojo/PersonProfiles.json   |  3 ++
 .../streams/fullcontact/pojo/PersonTopicItem.json  | 14 ++++++++++
 8 files changed, 138 insertions(+), 2 deletions(-)

diff --git a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/LocationItem.json b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/LocationItem.json
new file mode 100644
index 0000000..c4cc6d2
--- /dev/null
+++ b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/LocationItem.json
@@ -0,0 +1,32 @@
+{
+  "type": "object",
+  "$schema": "http://json-schema.org/draft-03/schema",
+  "$license": [
+    "http://www.apache.org/licenses/LICENSE-2.0"
+  ],
+  "id": "#",
+  "javaType": "org.apache.streams.fullcontact.pojo.LocationItem",
+  "properties": {
+    "city": {
+      "type": "string"
+    },
+    "country": {
+      "type": "string"
+    },
+    "countryCode": {
+      "type": "string"
+    },
+    "formatted": {
+      "type": "string"
+    },
+    "label": {
+      "type": "string"
+    },
+    "region": {
+      "type": "string"
+    },
+    "regionCode": {
+      "type": "string"
+    }
+  }
+}
\ No newline at end of file
diff --git a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonAge.json b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonAge.json
new file mode 100644
index 0000000..76aa559
--- /dev/null
+++ b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonAge.json
@@ -0,0 +1,21 @@
+{
+  "type": "object",
+  "$schema": "http://json-schema.org/draft-03/schema",
+  "$license": [
+    "http://www.apache.org/licenses/LICENSE-2.0"
+  ],
+  "id": "#",
+  "javaType": "org.apache.streams.fullcontact.pojo.PersonAge",
+  "properties": {
+    "birthday": {
+      "type": "object",
+      "$ref": "./Day.json"
+    },
+    "range": {
+      "type": "string"
+    },
+    "value": {
+      "type": "integer"
+    }
+  }
+}
\ No newline at end of file
diff --git a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonDetails.json b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonDetails.json
index 1fa1ddb..8e31eeb 100644
--- a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonDetails.json
+++ b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonDetails.json
@@ -7,10 +7,13 @@
   "id": "#",
   "javaType": "org.apache.streams.fullcontact.pojo.PersonDetails",
   "properties": {
+    "age": {
+      "$ref": "./PersonAge.json"
+    },
     "education": {
       "type": "array",
       "items": {
-        "type": "string"
+        "$ref": "./PersonEducationItem.json"
       }
     },
     "emails": {
@@ -34,6 +37,10 @@
         "$ref": "./PersonEmploymentItem.json"
       }
     },
+    "gender": {
+      "type": "string",
+      "description": "Gender of the contact."
+    },
     "interests": {
       "type": "array",
       "description": "The Affinities Data Add-on enables API consumers to better understand the interests of a contact. The data returned includes a list of interests that have been attributed to the contact, along with the level of affinity for the given interest and the category that the interest is within.",
@@ -44,9 +51,12 @@
     "locations": {
       "type": "array",
       "items": {
-        "type": "string"
+        "$ref": "./LocationItem.json"
       }
     },
+    "name": {
+      "$ref": "./PersonName.json"
+    },
     "phones": {
       "type": "array",
       "items": {
@@ -79,6 +89,13 @@
     "profiles": {
       "$ref": "./PersonProfiles.json"
     },
+    "topics": {
+      "type": "array",
+      "description": "The Topics Data Add-on includes a list of topics or subjects that the contact is associated with. This information is determined based off of several indicators of the contact's online and social presence.",
+      "items": {
+        "$ref": "./PersonInterestItem.json"
+      }
+    },
     "urls": {
       "type": "array",
       "description": "Additionally, any profile pictures and URLs to other websites associated width the contact will be returned.",
diff --git a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonEducationItem.json b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonEducationItem.json
new file mode 100644
index 0000000..1abc019
--- /dev/null
+++ b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonEducationItem.json
@@ -0,0 +1,25 @@
+{
+  "type": "object",
+  "$schema": "http://json-schema.org/draft-03/schema",
+  "$license": [
+    "http://www.apache.org/licenses/LICENSE-2.0"
+  ],
+  "id": "#",
+  "javaType": "org.apache.streams.fullcontact.pojo.PersonEducation",
+  "properties": {
+    "degree": {
+      "type": "string"
+    },
+    "name": {
+      "type": "string"
+    },
+    "start": {
+      "type": "object",
+      "$ref": "./Day.json"
+    },
+    "end": {
+      "type": "object",
+      "$ref": "./Day.json"
+    }
+  }
+}
\ No newline at end of file
diff --git a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonName.json b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonName.json
new file mode 100644
index 0000000..686e6c9
--- /dev/null
+++ b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonName.json
@@ -0,0 +1,20 @@
+{
+  "type": "object",
+  "$schema": "http://json-schema.org/draft-03/schema",
+  "$license": [
+    "http://www.apache.org/licenses/LICENSE-2.0"
+  ],
+  "id": "#",
+  "javaType": "org.apache.streams.fullcontact.pojo.PersonName",
+  "properties": {
+    "family": {
+      "type": "string"
+    },
+    "given": {
+      "type": "string"
+    },
+    "middle": {
+      "type": "string"
+    }
+  }
+}
\ No newline at end of file
diff --git a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonProfile.json b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonProfile.json
index 1f1d707..3fa7680 100644
--- a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonProfile.json
+++ b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonProfile.json
@@ -19,6 +19,10 @@
       "type": "integer",
       "description": "Number of profiles or topics the user is following, if applicable."
     },
+    "score": {
+      "type": "integer",
+      "description": "Only present on klout profiles."
+    },
     "service": {
       "type": "string"
     },
diff --git a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonProfiles.json b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonProfiles.json
index 897be88..0ece148 100644
--- a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonProfiles.json
+++ b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonProfiles.json
@@ -53,6 +53,9 @@
     "getsatisfaction": {
       "$ref": "./PersonProfile.json"
     },
+    "github": {
+      "$ref": "./PersonProfile.json"
+    },
     "goodreads": {
       "$ref": "./PersonProfile.json"
     },
diff --git a/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonTopicItem.json b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonTopicItem.json
new file mode 100644
index 0000000..1adb3da
--- /dev/null
+++ b/streams-contrib/streams-processor-fullcontact/src/main/jsonschema/org/apache/streams/fullcontact/pojo/PersonTopicItem.json
@@ -0,0 +1,14 @@
+{
+  "type": "object",
+  "$schema": "http://json-schema.org/draft-03/schema",
+  "$license": [
+    "http://www.apache.org/licenses/LICENSE-2.0"
+  ],
+  "id": "#",
+  "javaType": "org.apache.streams.fullcontact.pojo.PersonTopicItem",
+  "properties": {
+    "name": {
+      "type": "string"
+    }
+  }
+}
\ No newline at end of file