http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/save.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/save.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/save.json
new file mode 100644
index 0000000..06ec16f
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/save.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/save.json#";,
+    "type": "object",
+    "title": "Save",
+    "description": "Indicates that the actor has called out the object as 
being of interest primarily to him- or herself. Though this action MAY be 
shared publicly, the implication is that the object has been saved primarily 
for the actor's own benefit rather than to show it to others as would be 
indicated by the \"share\" verb.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "save"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} saved {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/schedule.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/schedule.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/schedule.json
new file mode 100644
index 0000000..a42d955
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/schedule.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/schedule.json#";,
+    "type": "object",
+    "title": "Schedule",
+    "description": "Indicates that the actor has scheduled the object. For 
instance, scheduling a meeting.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "schedule"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} scheduled {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/search.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/search.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/search.json
new file mode 100644
index 0000000..1cb8572
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/search.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/search.json#";,
+    "type": "object",
+    "title": "Search",
+    "description": "Indicates that the actor is or has searched for the 
object. If a target is specified, it indicates the context within which the 
search is or has been conducted.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "search"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} search for {object.displayName} in 
{target.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/sell.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/sell.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/sell.json
new file mode 100644
index 0000000..4ec46b6
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/sell.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/sell.json#";,
+    "type": "object",
+    "title": "Sell",
+    "description": "Indicates that the actor has sold the object. If a target 
is specified, it indicates the entity to which the object was sold.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "sell"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} sold {object.displayName} to 
{target.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/send.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/send.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/send.json
new file mode 100644
index 0000000..69f565c
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/send.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/send.json#";,
+    "type": "object",
+    "title": "Send",
+    "description": "Indicates that the actor has sent the object to the 
target.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "send"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} sent {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/share.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/share.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/share.json
new file mode 100644
index 0000000..576f5fb
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/share.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/share.json#";,
+    "type": "object",
+    "title": "Share",
+    "description": "To share an object.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "share"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} shared {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/sponsor.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/sponsor.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/sponsor.json
new file mode 100644
index 0000000..55445b7
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/sponsor.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/sponsor.json#";,
+    "type": "object",
+    "title": "Sponsor",
+    "description": "Indicates that the actor has sponsored the object. If a 
target is specified, it indicates the context within which the sponsorship is 
offered. For instance, a company can sponsor an event; or an individual can 
sponsor a project; etc.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "sponsor"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} sponsored {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/start.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/start.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/start.json
new file mode 100644
index 0000000..3e52c12
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/start.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/start.json#";,
+    "type": "object",
+    "title": "Start",
+    "description": "Indicates that the actor has started the object. For 
instance, when a person starts a project.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "start"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} started {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/stop-following.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/stop-following.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/stop-following.json
new file mode 100644
index 0000000..cd7c521
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/stop-following.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/stop-following.json#";,
+    "type": "object",
+    "title": "UnFollow",
+    "description": "Indicates that the actor has stopped following the 
object.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "stop-following"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} stopped following 
{object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/submit.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/submit.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/submit.json
new file mode 100644
index 0000000..58582ee
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/submit.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/submit.json#";,
+    "type": "object",
+    "title": "Submit",
+    "description": "Indicates that the actor has submitted the object. If a 
target is specified, it indicates the entity to which the object was 
submitted.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "submit"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} submitted {object.displayName} to 
{target.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/tag.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/tag.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/tag.json
new file mode 100644
index 0000000..6ed1632
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/tag.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/tag.json#";,
+    "type": "object",
+    "title": "Tag",
+    "description": "Indicates that the actor has associated the object with 
the target. For example, if the actor specifies that a particular user appears 
in a photo. the object is the user and the target is the photo.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "tag"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} tagged {object.displayName} as 
{target.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/terminate.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/terminate.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/terminate.json
new file mode 100644
index 0000000..9a4d94c
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/terminate.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/terminate.json#";,
+    "type": "object",
+    "title": "Terminate",
+    "description": "Indicates that the actor has terminated the object.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "terminate"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} terminated {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/tie.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/tie.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/tie.json
new file mode 100644
index 0000000..6637fb9
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/tie.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/tie.json#";,
+    "type": "object",
+    "title": "Tie",
+    "description": "Indicates that the actor has neither won or lost the 
object. This verb is generally only applicable when the object represents some 
form of competition, such as a game.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "tie"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} tied at {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unfavorite.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unfavorite.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unfavorite.json
new file mode 100644
index 0000000..2b642b4
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unfavorite.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/unfavorite.json#";,
+    "type": "object",
+    "title": "UnFavorite",
+    "description": "Indicates that the actor has removed the object from the 
collection of favorited items.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "unfavorite"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} removed {object.displayName} as a 
favorite"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unlike.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unlike.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unlike.json
new file mode 100644
index 0000000..db0b7bc
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unlike.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/unlike.json#";,
+    "type": "object",
+    "title": "UnLike",
+    "description": "Indicates that the actor has removed the object from the 
collection of liked items.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "unlike"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} no longer likes 
{object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unsatisfy.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unsatisfy.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unsatisfy.json
new file mode 100644
index 0000000..381818a
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unsatisfy.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/unsatisfy.json#";,
+    "type": "object",
+    "title": "UnSatisfy",
+    "description": "Indicates that the actor has not satisfied the object. If 
a target is specified, it indicates the context within which the object was not 
satisfied. For instance, if a person fails to satisfy the requirements of some 
particular challenge, the person is the actor; the requirement is the object 
and the challenge is the target.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "unsatisfy"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} has not satisfied 
{object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unsave.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unsave.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unsave.json
new file mode 100644
index 0000000..09f7123
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unsave.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/unsave.json#";,
+    "type": "object",
+    "title": "UnSave",
+    "description": "Indicates that the actor has removed the object from the 
collection of saved items.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "unsave"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} unsaved {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unshare.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unshare.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unshare.json
new file mode 100644
index 0000000..9aceb25
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/unshare.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/unshare.json#";,
+    "type": "object",
+    "title": "UnSave",
+    "description": "Indicates that the actor is no longer sharing the object. 
If a target is specified, it indicates the entity with whom the object is no 
longer being shared.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "unshare"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} is no longer sharing 
{object.displayName} with {target.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/update.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/update.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/update.json
new file mode 100644
index 0000000..4272bb4
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/update.json
@@ -0,0 +1,34 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/update.json#";,
+    "type": "object",
+    "title": "Update",
+    "description": "The \"update\" verb indicates that the actor has modified 
the object. Use of the \"update\" verb is generally reserved to indicate 
modifications to existing objects or data such as changing an existing user's 
profile information.",
+    "notes": "The new property value can be a scalar value or an object. See 
the property object type",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "update"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} updated {target.displayName}'s 
{object.displayName} to {object.value}"
+        },
+        "object": {
+            "type": "object",
+            "$ref": "../object.json"
+        },
+        "target": {
+            "type": "object",
+            "optional": true,
+            "$ref": "../object.json"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/use.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/use.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/use.json
new file mode 100644
index 0000000..26c69a6
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/use.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/use.json#";,
+    "type": "object",
+    "title": "Use",
+    "description": "Indicates that the actor has used the object in some 
manner.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "use"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} used {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/watch.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/watch.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/watch.json
new file mode 100644
index 0000000..08d7eb0
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/watch.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/watch.json#";,
+    "type": "object",
+    "title": "Watch",
+    "description": "Indicates that the actor has watched the object. This verb 
is typically applicable only when the object represents dynamic, visible 
content such as a movie, a television show or a public performance.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "watch"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} watched {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/win.json
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/win.json
 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/win.json
new file mode 100644
index 0000000..baedbaa
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/win.json
@@ -0,0 +1,24 @@
+{
+    "$schema": "http://json-schema.org/draft-03/schema";,
+    "$license": [
+        
"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";,
+        "http://www.apache.org/licenses/LICENSE-2.0";
+    ],
+    "id": 
"http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/win.json#";,
+    "type": "object",
+    "title": "Win",
+    "description": "Indicates that the actor has won the object.  For 
instance, if a person wins a game.",
+    "extends": {
+        "$ref": "../activity.json"
+    },
+    "properties": {
+        "verb": {
+            "type": "string",
+            "default": "win"
+        },
+        "title": {
+            "type": "string",
+            "default": "{actor.displayName} won {object.displayName}"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/streams-schema-activitystreams/src/main/xmlschema/activity.xsd
----------------------------------------------------------------------
diff --git 
a/streams-schemas/streams-schema-activitystreams/src/main/xmlschema/activity.xsd
 
b/streams-schemas/streams-schema-activitystreams/src/main/xmlschema/activity.xsd
new file mode 100644
index 0000000..1d81b44
--- /dev/null
+++ 
b/streams-schemas/streams-schema-activitystreams/src/main/xmlschema/activity.xsd
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+
+    <xs:element name="id" type="xs:string"/>
+    <xs:element name="actor" type="objectType"/>
+    <xs:element name="verb" type="verbType"/>
+    <xs:element name="object" type="objectType"/>
+    <xs:element name="target" type="objectType"/>
+    <xs:element name="object-type" type="xs:string"/>
+    <xs:element name="published" type="xs:dateTime"/>
+    <xs:element name="updated" type="xs:dateTime"/>
+    <xs:element name="provider" type="objectType"/>
+    <xs:element name="title" type="xs:string"/>
+    <xs:element name="content" type="xs:string"/>
+    <xs:element name="url" type="xs:string"/>
+
+    <xs:simpleType name="verbType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="favorite"/>
+            <xs:enumeration value="follow"/>
+            <xs:enumeration value="join"/>
+            <xs:enumeration value="like"/>
+            <xs:enumeration value="make-friend"/>
+            <xs:enumeration value="play"/>
+            <xs:enumeration value="post"/>
+            <xs:enumeration value="rsvp-yes"/>
+            <xs:enumeration value="rsvp-no"/>
+            <xs:enumeration value="rsvp-maybe"/>
+            <xs:enumeration value="save"/>
+            <xs:enumeration value="share"/>
+            <xs:enumeration value="tag"/>
+            <xs:enumeration value="update"/>
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:complexType name="objectType">
+        <xs:sequence>
+            <xs:element name="id" type="xs:string"/>
+            <xs:element name="image" type="mediaLink"/>
+            <xs:element name="displayName" type="xs:string"/>
+            <xs:element name="summary" type="xs:string"/>
+            <xs:element name="content" type="xs:string"/>
+            <xs:element name="url" type="xs:string"/>
+            <xs:element name="published" type="xs:string"/>
+            <xs:element name="updated" type="xs:string"/>
+            <xs:element name="object-type" >
+                <xs:simpleType>
+                    <xs:restriction base="xs:string">
+                        <xs:enumeration value="article"/>
+                        <xs:enumeration value="audio"/>
+                        <xs:enumeration value="badge"/>
+                        <xs:enumeration value="collection"/>
+                        <xs:enumeration value="comment"/>
+                        <xs:enumeration value="course"/>
+                        <xs:enumeration value="file"/>
+                        <xs:enumeration value="image"/>
+                        <xs:enumeration value="person"/>
+                        <xs:enumeration value="review"/>
+                        <xs:enumeration value="service"/>
+                    </xs:restriction>
+                </xs:simpleType>
+            </xs:element>
+        </xs:sequence>
+
+    </xs:complexType>
+
+    <xs:complexType name="mediaLink">
+        <xs:sequence>
+            <xs:element name="duration" type="xs:positiveInteger"/>
+            <xs:element name="height" type="xs:positiveInteger"/>
+            <xs:element name="width" type="xs:positiveInteger"/>
+            <xs:element name="url" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/pom.xml
----------------------------------------------------------------------
diff --git a/streams-util/pom.xml b/streams-util/pom.xml
index e71bce0..ca6b928 100644
--- a/streams-util/pom.xml
+++ b/streams-util/pom.xml
@@ -34,28 +34,53 @@
 
     <dependencies>
         <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
         <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
         </dependency>
         <dependency>
             <groupId>joda-time</groupId>
             <artifactId>joda-time</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.jsonschema2pojo</groupId>
+            <artifactId>jsonschema2pojo-core</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
             <groupId>com.carrotsearch.randomizedtesting</groupId>
             <artifactId>randomizedtesting-runner</artifactId>
             <version>2.1.2</version>
         </dependency>
         <dependency>
             <groupId>org.apache.streams</groupId>
+            <artifactId>streams-schema-activitystreams</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <type>test-jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.streams</groupId>
             <artifactId>streams-testing</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
@@ -63,8 +88,43 @@
         </dependency>
     </dependencies>
     <build>
+        <sourceDirectory>src/main/java</sourceDirectory>
+        <testSourceDirectory>src/test/java</testSourceDirectory>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+            </testResource>
+        </testResources>
         <plugins>
             <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-resource</goal>
+                        </goals>
+                        <configuration>
+                            <resources>
+                                <resource>
+                                    
<directory>${project.basedir}/src/main/jsonschema</directory>
+                                </resource>
+                                <resource>
+                                    <directory>src/main/xmlschema</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
                 <executions>
@@ -75,6 +135,27 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.10</version>
+                <configuration>
+                    <includes>**/*.json</includes>
+                    
<outputDirectory>${project.build.directory}/test-classes</outputDirectory>
+                    <includeGroupIds>org.apache.streams</includeGroupIds>
+                    
<includeArtifactIds>streams-schema-activitystreams</includeArtifactIds>
+                    <includeTypes>jar,test-jar</includeTypes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>unpack-schemas</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/GuidUtils.java
----------------------------------------------------------------------
diff --git a/streams-util/src/main/java/org/apache/streams/util/GuidUtils.java 
b/streams-util/src/main/java/org/apache/streams/util/GuidUtils.java
index ee2c18c..1972bc7 100644
--- a/streams-util/src/main/java/org/apache/streams/util/GuidUtils.java
+++ b/streams-util/src/main/java/org/apache/streams/util/GuidUtils.java
@@ -25,7 +25,7 @@ import com.google.common.hash.Hashing;
 import java.nio.charset.Charset;
 
 /**
- * Created by sblackmon on 12/13/13.
+ * GuidUtils contains methods for generating guids from identifiers.
  */
 public class GuidUtils {
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/RegexUtils.java
----------------------------------------------------------------------
diff --git a/streams-util/src/main/java/org/apache/streams/util/RegexUtils.java 
b/streams-util/src/main/java/org/apache/streams/util/RegexUtils.java
index c32ed5f..2831df5 100644
--- a/streams-util/src/main/java/org/apache/streams/util/RegexUtils.java
+++ b/streams-util/src/main/java/org/apache/streams/util/RegexUtils.java
@@ -27,6 +27,9 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
 
+/**
+ * RegexUtils contains methods for applying regular expressions to strings.
+ */
 public class RegexUtils {
 
     public static boolean matches(String line, String regEx) {

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/SerializationUtil.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/SerializationUtil.java 
b/streams-util/src/main/java/org/apache/streams/util/SerializationUtil.java
index 81af5f4..de324d2 100644
--- a/streams-util/src/main/java/org/apache/streams/util/SerializationUtil.java
+++ b/streams-util/src/main/java/org/apache/streams/util/SerializationUtil.java
@@ -23,7 +23,8 @@ import 
org.apache.commons.io.input.ClassLoaderObjectInputStream;
 import java.io.*;
 
 /**
- * Created by rebanks on 2/18/14.
+ * SerializationUtil contains methods for serializing, deserializing, and 
cloning
+ * documents and tasks.
  */
 public class SerializationUtil {
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/FieldType.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/FieldType.java 
b/streams-util/src/main/java/org/apache/streams/util/schema/FieldType.java
new file mode 100644
index 0000000..6a2290c
--- /dev/null
+++ b/streams-util/src/main/java/org/apache/streams/util/schema/FieldType.java
@@ -0,0 +1,14 @@
+package org.apache.streams.util.schema;
+
+/**
+ * FieldType defines xsd types that streams schema processing libraries should
+ * be able to translate.
+ */
+public enum FieldType {
+    STRING,
+    INTEGER,
+    NUMBER,
+    BOOLEAN,
+    OBJECT,
+    ARRAY
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/FieldUtil.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/FieldUtil.java 
b/streams-util/src/main/java/org/apache/streams/util/schema/FieldUtil.java
new file mode 100644
index 0000000..20435c9
--- /dev/null
+++ b/streams-util/src/main/java/org/apache/streams/util/schema/FieldUtil.java
@@ -0,0 +1,34 @@
+package org.apache.streams.util.schema;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+/**
+ * FieldUtil contains methods to assist in understanding fields defined within 
schemas.
+ */
+public class FieldUtil {
+
+    public static FieldType determineFieldType(ObjectNode fieldNode) {
+        String typeSchemaField = "type";
+        if( !fieldNode.has(typeSchemaField))
+            return null;
+        String typeSchemaFieldValue = fieldNode.get(typeSchemaField).asText();
+        if( typeSchemaFieldValue.equals("string")) {
+            return FieldType.STRING;
+        } else if( typeSchemaFieldValue.equals("integer")) {
+            return FieldType.INTEGER;
+        } else if( typeSchemaFieldValue.equals("number")) {
+            return FieldType.NUMBER;
+        } else if( typeSchemaFieldValue.equals("object")) {
+            return FieldType.OBJECT;
+        } else if( typeSchemaFieldValue.equals("boolean")) {
+            return FieldType.BOOLEAN;
+        } else if( typeSchemaFieldValue.equals("array")) {
+            return FieldType.ARRAY;
+        }
+        else return null;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/FileUtil.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/FileUtil.java 
b/streams-util/src/main/java/org/apache/streams/util/schema/FileUtil.java
new file mode 100644
index 0000000..c025513
--- /dev/null
+++ b/streams-util/src/main/java/org/apache/streams/util/schema/FileUtil.java
@@ -0,0 +1,77 @@
+package org.apache.streams.util.schema;
+
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.StandardOpenOption;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * FileUtil contains methods to assist in working with local schema files 
during
+ * source or resource generation.
+ */
+public class FileUtil {
+
+    private final static Logger LOGGER = 
LoggerFactory.getLogger(FileUtil.class);
+
+    public static String dropSourcePathPrefix(String inputFile, String 
sourceDirectory) {
+        if(Strings.isNullOrEmpty(sourceDirectory))
+            return inputFile;
+        else {
+            try {
+                if( inputFile.contains(sourceDirectory) && 
inputFile.indexOf(sourceDirectory) > 0) {
+                    return 
inputFile.substring(inputFile.indexOf(sourceDirectory)+sourceDirectory.length()+1);
+                }
+            } catch( Throwable e ) {
+                return inputFile;
+            }
+        }
+        return inputFile;
+    }
+
+    public static String swapExtension(String inputFile, String 
originalExtension, String newExtension) {
+        if(inputFile.endsWith("."+originalExtension))
+            return inputFile.replace("."+originalExtension, "."+newExtension);
+        else return inputFile;
+    }
+
+    public static String dropExtension(String inputFile) {
+        if(inputFile.contains("."))
+            return inputFile.substring(0, inputFile.lastIndexOf("."));
+        else return inputFile;
+    }
+
+    public static void writeFile(String resourceFile, String resourceContent) {
+        try {
+            File path = new File(resourceFile);
+            File dir = path.getParentFile();
+            if( !dir.exists() )
+                dir.mkdirs();
+            Files.write(Paths.get(resourceFile), resourceContent.getBytes(), 
StandardOpenOption.CREATE_NEW);
+        } catch (Exception e) {
+            LOGGER.error("Write Exception: {}", e);
+        }
+    }
+
+    public static void resolveRecursive(GenerationConfig config, List<File> 
schemaFiles) {
+
+        Preconditions.checkArgument(schemaFiles.size() > 0);
+        int i = 0;
+        while( schemaFiles.size() > i) {
+            File child = schemaFiles.get(i);
+            if (child.isDirectory()) {
+                
schemaFiles.addAll(Arrays.asList(child.listFiles(config.getFileFilter())));
+                schemaFiles.remove(child);
+            } else {
+                i += 1;
+            }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java
 
b/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java
new file mode 100644
index 0000000..d4b2c3f
--- /dev/null
+++ 
b/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java
@@ -0,0 +1,116 @@
+package org.apache.streams.util.schema;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.net.URL;
+import java.util.Iterator;
+
+/**
+ * GenerationConfig represents the common fields and field accessors for
+ * streams modules that transform schemas into generated-sources or 
generated-resources
+ */
+public interface GenerationConfig {
+
+    /**
+     * Gets the 'source' configuration option.
+     *
+     * @return The source file(s) or directory(ies) from which JSON Schema will
+     *         be read.
+     */
+    Iterator<URL> getSource();
+
+    /**
+     * Gets the 'targetDirectory' configuration option.
+     *
+     * @return The target directory into which generated types will be written
+     *         (may or may not exist before types are written)
+     */
+    File getTargetDirectory();
+
+    /**
+     * Gets the 'outputEncoding' configuration option.
+     *
+     * @return The character encoding that should be used when writing output 
files.
+     */
+    String getOutputEncoding();
+
+    /**
+     * Gets the file filter used to isolate the schema mapping files in the
+     * source directories.
+     *
+     * @return the file filter use when scanning for schema files.
+     */
+    FileFilter getFileFilter();
+
+    /**
+     * Gets the 'includeAdditionalProperties' configuration option.
+     *
+     * @return Whether to allow 'additional properties' support in objects.
+     *         Setting this to false will disable additional properties 
support,
+     *         regardless of the input schema(s).
+     */
+//    boolean isIncludeAdditionalProperties();
+
+    /**
+     * Gets the 'targetVersion' configuration option.
+     *
+     *  @return The target version for generated source files.
+     */
+//    String getTargetVersion();
+
+//    /**
+//     * Gets the `includeDynamicAccessors` configuraiton option.
+//     *
+//     * @return Whether to include dynamic getters, setters, and builders
+//     *         or to omit these methods.
+//     */
+//    boolean isIncludeDynamicAccessors();
+
+//    /**
+//     * Gets the `dateTimeType` configuration option.
+//     *         <p>
+//     *         Example values:
+//     *         <ul>
+//     *         <li><code>org.joda.time.LocalDateTime</code> (Joda)</li>
+//     *         <li><code>java.time.LocalDateTime</code> (JSR310)</li>
+//     *         <li><code>null</code> (default behavior)</li>
+//     *         </ul>
+//     *
+//     * @return The java type to use instead of {@link java.util.Date}
+//     *         when adding date type fields to generate Java types.
+//     */
+//    String getDateTimeType();
+//
+//    /**
+//     * Gets the `dateType` configuration option.
+//     *         <p>
+//     *         Example values:
+//     *         <ul>
+//     *         <li><code>org.joda.time.LocalDate</code> (Joda)</li>
+//     *         <li><code>java.time.LocalDate</code> (JSR310)</li>
+//     *         <li><code>null</code> (default behavior)</li>
+//     *         </ul>
+//     *
+//     * @return The java type to use instead of string
+//     *         when adding string type fields with a format of date (not
+//     *         date-time) to generated Java types.
+//     */
+//    String getDateType();
+//
+//    /**
+//     * Gets the `timeType` configuration option.
+//     *         <p>
+//     *         Example values:
+//     *         <ul>
+//     *         <li><code>org.joda.time.LocalTime</code> (Joda)</li>
+//     *         <li><code>java.time.LocalTime</code> (JSR310)</li>
+//     *         <li><code>null</code> (default behavior)</li>
+//     *         </ul>
+//     *
+//     * @return The java type to use instead of string
+//     *         when adding string type fields with a format of time (not
+//     *         date-time) to generated Java types.
+//     */
+//    String getTimeType();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java 
b/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java
new file mode 100644
index 0000000..fc0a3f2
--- /dev/null
+++ b/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java
@@ -0,0 +1,57 @@
+package org.apache.streams.util.schema;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+import java.net.URI;
+
+/**
+ * A JSON Schema document.
+ */
+public class Schema {
+
+    private final URI id;
+    private final URI uri;
+    private final JsonNode content;
+    private final Schema parent;
+    private final boolean generate;
+
+    public Schema(URI uri, JsonNode content, Schema parent, boolean generate) {
+        this.uri = uri;
+        this.content = content;
+        this.parent = parent;
+        this.generate = generate;
+        this.id = content.has("id") ? URI.create(content.get("id").asText()) : 
null;
+    }
+
+    public URI getId() {
+        return id;
+    }
+
+    public URI getURI() {
+        return uri;
+    }
+
+    public JsonNode getContent() {
+        return content;
+    }
+
+    public JsonNode getParentContent() {
+        if( parent != null )
+            return parent.getContent();
+        else return null;
+    }
+
+    public URI getParentURI() {
+        if( parent != null ) return parent.getURI();
+        else return null;
+    }
+
+    public boolean isGenerated() {
+        return generate;
+    }
+
+    public Schema getParent() {
+        return parent;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/SchemaStore.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/SchemaStore.java 
b/streams-util/src/main/java/org/apache/streams/util/schema/SchemaStore.java
new file mode 100644
index 0000000..07e9bef
--- /dev/null
+++ b/streams-util/src/main/java/org/apache/streams/util/schema/SchemaStore.java
@@ -0,0 +1,42 @@
+package org.apache.streams.util.schema;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.common.base.Optional;
+
+import java.net.URI;
+import java.util.Comparator;
+import java.util.Iterator;
+
+/**
+ * A SchemaStore resolves and indexes json schemas and makes their properties 
available.
+ *
+ * Implementations include
+ * - SchemaStoreImpl
+ */
+public interface SchemaStore extends Comparator<Schema> {
+    
+    Schema create(URI uri);
+
+    Schema create(Schema parent, String path);
+
+    void clearCache();
+
+    Integer getSize();
+
+    Optional<Schema> getById(URI id);
+
+    Optional<Schema> getByUri(URI uri);
+
+    Integer getFileUriCount();
+
+    Integer getHttpUriCount();
+
+    Iterator<Schema> getSchemaIterator();
+
+    ObjectNode resolveProperties(Schema schema, ObjectNode fieldNode, String 
resourceId);
+
+    ObjectNode resolveItems(Schema schema, ObjectNode fieldNode, String 
resourceId);
+
+    @Override
+    int compare(Schema left, Schema right);
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/SchemaStoreImpl.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/SchemaStoreImpl.java
 
b/streams-util/src/main/java/org/apache/streams/util/schema/SchemaStoreImpl.java
new file mode 100644
index 0000000..9585742
--- /dev/null
+++ 
b/streams-util/src/main/java/org/apache/streams/util/schema/SchemaStoreImpl.java
@@ -0,0 +1,347 @@
+package org.apache.streams.util.schema;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.common.base.Optional;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Ordering;
+import org.apache.commons.lang3.StringUtils;
+import org.jsonschema2pojo.ContentResolver;
+import org.jsonschema2pojo.FragmentResolver;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.URI;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.streams.util.schema.URIUtil.safeResolve;
+
+/**
+ * Created by steve on 4/30/16.
+ */
+public class SchemaStoreImpl extends Ordering<Schema> implements SchemaStore {
+
+    private final static Logger LOGGER = 
LoggerFactory.getLogger(SchemaStore.class);
+    private final static JsonNodeFactory NODE_FACTORY = 
JsonNodeFactory.instance;
+
+    protected Map<URI, Schema> schemas = new HashMap();
+    protected FragmentResolver fragmentResolver = new FragmentResolver();
+    protected ContentResolver contentResolver = new ContentResolver();
+
+    public SchemaStoreImpl() {
+    }
+
+    @Override
+    public synchronized Schema create(URI uri) {
+        if(!getByUri(uri).isPresent()) {
+            URI baseURI = URIUtil.removeFragment(uri);
+            JsonNode baseNode = this.contentResolver.resolve(baseURI);
+            if(uri.toString().contains("#") && !uri.toString().endsWith("#")) {
+                Schema newSchema = new Schema(baseURI, baseNode, null, true);
+                this.schemas.put(baseURI, newSchema);
+                JsonNode childContent = 
this.fragmentResolver.resolve(baseNode, '#' + 
StringUtils.substringAfter(uri.toString(), "#"));
+                this.schemas.put(uri, new Schema(uri, childContent, newSchema, 
false));
+            } else {
+                if( baseNode.has("extends") && 
baseNode.get("extends").isObject()) {
+                    URI ref = 
URI.create(((ObjectNode)baseNode.get("extends")).get("$ref").asText());
+                    URI absoluteURI;
+                    if( ref.isAbsolute())
+                        absoluteURI = ref;
+                    else
+                        absoluteURI = baseURI.resolve(ref);
+                    JsonNode parentNode = 
this.contentResolver.resolve(absoluteURI);
+                    Schema parentSchema = null;
+                    if( this.schemas.get(absoluteURI) != null ) {
+                        parentSchema = this.schemas.get(absoluteURI);
+                    } else {
+                        parentSchema = create(absoluteURI);
+                    }
+                    this.schemas.put(uri, new Schema(uri, baseNode, 
parentSchema, true));
+                } else {
+                    this.schemas.put(uri, new Schema(uri, baseNode, null, 
true));
+                }
+            }
+            List<JsonNode> refs = baseNode.findValues("$ref");
+            for( JsonNode ref : refs ) {
+                if( ref.isValueNode() ) {
+                    String refVal = ref.asText();
+                    URI refURI = null;
+                    try {
+                        refURI = URI.create(refVal);
+                    } catch( Exception e ) {
+                        LOGGER.info("Exception: {}", e.getMessage());
+                    }
+                    if (refURI != null && !getByUri(refURI).isPresent()) {
+                        if (refURI.isAbsolute())
+                            create(refURI);
+                        else
+                            create(baseURI.resolve(refURI));
+                    }
+                }
+            }
+        }
+
+        return this.schemas.get(uri);
+    }
+
+    @Override
+    public Schema create(Schema parent, String path) {
+        if(path.equals("#")) {
+            return parent;
+        } else {
+            path = StringUtils.stripEnd(path, "#?&/");
+            URI id = parent != null && parent.getId() != 
null?parent.getId().resolve(path):URI.create(path);
+            if(this.selfReferenceWithoutParentFile(parent, path)) {
+                this.schemas.put(id, new Schema(id, 
this.fragmentResolver.resolve(parent.getParentContent(), path), parent, false));
+                return this.schemas.get(id);
+            } else {
+                return this.create(id);
+            }
+        }
+    }
+
+    protected boolean selfReferenceWithoutParentFile(Schema parent, String 
path) {
+        return parent != null && (parent.getId() == null || 
parent.getId().toString().startsWith("#/")) && path.startsWith("#/");
+    }
+
+    @Override
+    public synchronized void clearCache() {
+        this.schemas.clear();
+    }
+
+    @Override
+    public Integer getSize() {
+        return schemas.size();
+    }
+
+    @Override
+    public Optional<Schema> getById(URI id) {
+        for( Schema schema : schemas.values() ) {
+            if( schema.getId() != null && schema.getId().equals(id) )
+                return Optional.of(schema);
+        }
+        return Optional.absent();
+    }
+
+    @Override
+    public Optional<Schema> getByUri(URI uri) {
+        for( Schema schema : schemas.values() ) {
+            if( schema.getURI().equals(uri) )
+                return Optional.of(schema);
+        }
+        return Optional.absent();
+    }
+
+    @Override
+    public Integer getFileUriCount() {
+        int count = 0;
+        for( Schema schema : schemas.values() ) {
+            if( schema.getURI().getScheme().equals("file") )
+                count++;
+        }
+        return count;
+    }
+
+    @Override
+    public Integer getHttpUriCount() {
+        int count = 0;
+        for( Schema schema : schemas.values() ) {
+            if( schema.getURI().getScheme().equals("http") )
+                count++;
+        }
+        return count;
+    }
+
+    @Override
+    public Iterator<Schema> getSchemaIterator() {
+        List<Schema> schemaList = Lists.newArrayList(schemas.values());
+        Collections.sort(schemaList, this);
+        return schemaList.iterator();
+    }
+
+    @Override
+    public ObjectNode resolveProperties(Schema schema, ObjectNode fieldNode, 
String resourceId) {
+        // this should return something more suitable like:
+        //   Map<String, Pair<Schema, ObjectNode>>
+        ObjectNode schemaProperties = NODE_FACTORY.objectNode();
+        ObjectNode parentProperties = NODE_FACTORY.objectNode();
+        if (fieldNode == null) {
+            ObjectNode schemaContent = (ObjectNode) schema.getContent();
+            if( schemaContent.has("properties") ) {
+                schemaProperties = (ObjectNode) 
schemaContent.get("properties");
+                if (schema.getParentContent() != null) {
+                    ObjectNode parentContent = (ObjectNode) 
schema.getParentContent();
+                    if (parentContent.has("properties")) {
+                        parentProperties = (ObjectNode) 
parentContent.get("properties");
+                    }
+                }
+            }
+        } else if (fieldNode != null && fieldNode.size() > 0) {
+            if( fieldNode.has("properties") && 
fieldNode.get("properties").isObject() && fieldNode.get("properties").size() > 
0 )
+                schemaProperties = (ObjectNode) fieldNode.get("properties");
+            URI parentURI = null;
+            if( fieldNode.has("$ref") || fieldNode.has("extends") ) {
+                JsonNode refNode = fieldNode.get("$ref");
+                JsonNode extendsNode = fieldNode.get("extends");
+                if (refNode != null && refNode.isValueNode())
+                    parentURI = URI.create(refNode.asText());
+                else if (extendsNode != null && extendsNode.isObject())
+                    parentURI = URI.create(extendsNode.get("$ref").asText());
+                ObjectNode parentContent = null;
+                URI absoluteURI;
+                if (parentURI.isAbsolute())
+                    absoluteURI = parentURI;
+                else {
+                    absoluteURI = schema.getURI().resolve(parentURI);
+                    if (!absoluteURI.isAbsolute() || (absoluteURI.isAbsolute() 
&& !getByUri(absoluteURI).isPresent() ))
+                        absoluteURI = schema.getParentURI().resolve(parentURI);
+                }
+                if (absoluteURI != null && absoluteURI.isAbsolute()) {
+                    if (getByUri(absoluteURI).isPresent())
+                        parentContent = (ObjectNode) 
getByUri(absoluteURI).get().getContent();
+                    if (parentContent != null && parentContent.isObject() && 
parentContent.has("properties")) {
+                        parentProperties = (ObjectNode) 
parentContent.get("properties");
+                    } else if (absoluteURI.getPath().endsWith("#properties")) {
+                        absoluteURI = 
URI.create(absoluteURI.toString().replace("#properties", ""));
+                        parentProperties = (ObjectNode) 
getByUri(absoluteURI).get().getContent().get("properties");
+                    }
+                }
+            }
+
+
+        }
+
+        ObjectNode resolvedProperties = NODE_FACTORY.objectNode();
+        if (parentProperties != null && parentProperties.size() > 0)
+            resolvedProperties = SchemaUtil.mergeProperties(schemaProperties, 
parentProperties);
+        else resolvedProperties = schemaProperties.deepCopy();
+
+        return resolvedProperties;
+    }
+
+    public ObjectNode resolveItems(Schema schema, ObjectNode fieldNode, String 
resourceId) {
+        ObjectNode schemaItems = NODE_FACTORY.objectNode();
+        ObjectNode parentItems = NODE_FACTORY.objectNode();
+        if (fieldNode == null) {
+            ObjectNode schemaContent = (ObjectNode) schema.getContent();
+            if( schemaContent.has("items") ) {
+                schemaItems = (ObjectNode) schemaContent.get("items");
+                if (schema.getParentContent() != null) {
+                    ObjectNode parentContent = (ObjectNode) 
schema.getParentContent();
+                    if (parentContent.has("items")) {
+                        parentItems = (ObjectNode) parentContent.get("items");
+                    }
+                }
+            }
+        } else if (fieldNode != null && fieldNode.size() > 0) {
+            if (fieldNode.has("items") && fieldNode.get("items").isObject() && 
fieldNode.get("items").size() > 0)
+                schemaItems = (ObjectNode) fieldNode.get("items");
+            URI parentURI = null;
+            if( fieldNode.has("$ref") || fieldNode.has("extends") ) {
+                JsonNode refNode = fieldNode.get("$ref");
+                JsonNode extendsNode = fieldNode.get("extends");
+                if (refNode != null && refNode.isValueNode())
+                    parentURI = URI.create(refNode.asText());
+                else if (extendsNode != null && extendsNode.isObject())
+                    parentURI = URI.create(extendsNode.get("$ref").asText());
+                ObjectNode parentContent = null;
+                URI absoluteURI;
+                if (parentURI.isAbsolute())
+                    absoluteURI = parentURI;
+                else {
+                    absoluteURI = schema.getURI().resolve(parentURI);
+                    if (!absoluteURI.isAbsolute() || (absoluteURI.isAbsolute() 
&& !getByUri(absoluteURI).isPresent() ))
+                        absoluteURI = schema.getParentURI().resolve(parentURI);
+                }
+                if (absoluteURI != null && absoluteURI.isAbsolute()) {
+                    if (getByUri(absoluteURI).isPresent())
+                        parentContent = (ObjectNode) 
getByUri(absoluteURI).get().getContent();
+                    if (parentContent != null && parentContent.isObject() && 
parentContent.has("items")) {
+                        parentItems = (ObjectNode) parentContent.get("items");
+                    } else if (absoluteURI.getPath().endsWith("#items")) {
+                        absoluteURI = 
URI.create(absoluteURI.toString().replace("#items", ""));
+                        parentItems = (ObjectNode) 
getByUri(absoluteURI).get().getContent().get("items");
+                    }
+                }
+            }
+        }
+
+        ObjectNode resolvedItems = NODE_FACTORY.objectNode();
+        if (parentItems != null && parentItems.size() > 0)
+            resolvedItems = SchemaUtil.mergeProperties(schemaItems, 
parentItems);
+        else resolvedItems = schemaItems.deepCopy();
+
+        return resolvedItems;
+    }
+
+    @Override
+    public int compare(Schema left, Schema right) {
+        // are they the same?
+        if( left.equals(right)) return 0;
+        // is one an ancestor of the other
+        Schema candidateAncestor = left;
+        while( candidateAncestor.getParent() != null ) {
+            candidateAncestor = candidateAncestor.getParent();
+            if( candidateAncestor.equals(right))
+                return 1;
+        }
+        candidateAncestor = right;
+        while( candidateAncestor.getParent() != null ) {
+            candidateAncestor = candidateAncestor.getParent();
+            if( candidateAncestor.equals(left))
+                return -1;
+        }
+        // does one have a field that reference the other?
+        for( JsonNode refNode : left.getContent().findValues("$ref") ) {
+            String refText = refNode.asText();
+            Optional<URI> resolvedURI = safeResolve(left.getURI(), refText);
+            if( resolvedURI.isPresent() && 
resolvedURI.get().equals(right.getURI()))
+                return 1;
+        }
+        for( JsonNode refNode : right.getContent().findValues("$ref") ) {
+            String refText = refNode.asText();
+            Optional<URI> resolvedURI = safeResolve(right.getURI(), refText);
+            if( resolvedURI.isPresent() && 
resolvedURI.get().equals(left.getURI()))
+                return -1;
+        }
+        // does one have a field that reference a third schema that references 
the other?
+        for( JsonNode refNode : left.getContent().findValues("$ref") ) {
+            String refText = refNode.asText();
+            Optional<URI> possibleConnectorURI = safeResolve(left.getURI(), 
refText);
+            if( possibleConnectorURI.isPresent()) {
+                Optional<Schema> possibleConnector = 
getByUri(possibleConnectorURI.get());
+                if (possibleConnector.isPresent()) {
+                    for (JsonNode connectorRefNode : 
possibleConnector.get().getContent().findValues("$ref")) {
+                        String connectorRefText = connectorRefNode.asText();
+                        Optional<URI> resolvedURI = 
safeResolve(possibleConnector.get().getURI(), connectorRefText);
+                        if (resolvedURI.isPresent() && 
resolvedURI.get().equals(right.getURI()))
+                            return 1;
+                    }
+                }
+            }
+        }
+        for( JsonNode refNode : right.getContent().findValues("$ref") ) {
+            String refText = refNode.asText();
+            Optional<URI> possibleConnectorURI = safeResolve(right.getURI(), 
refText);
+            if( possibleConnectorURI.isPresent()) {
+                Optional<Schema> possibleConnector = 
getByUri(possibleConnectorURI.get());
+                if (possibleConnector.isPresent()) {
+                    for (JsonNode connectorRefNode : 
possibleConnector.get().getContent().findValues("$ref")) {
+                        String connectorRefText = connectorRefNode.asText();
+                        Optional<URI> resolvedURI = 
safeResolve(possibleConnector.get().getURI(), connectorRefText);
+                        if (resolvedURI.isPresent() && 
resolvedURI.get().equals(left.getURI()))
+                            return -1;
+                    }
+                }
+            }
+        }
+        return 0;
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/SchemaUtil.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/SchemaUtil.java 
b/streams-util/src/main/java/org/apache/streams/util/schema/SchemaUtil.java
new file mode 100644
index 0000000..f8b0070
--- /dev/null
+++ b/streams-util/src/main/java/org/apache/streams/util/schema/SchemaUtil.java
@@ -0,0 +1,49 @@
+package org.apache.streams.util.schema;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Map;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
+/**
+ * SchemaUtil contains methods to assist in resolving schemas and schema 
fragments.
+ */
+public class SchemaUtil {
+
+    private final static Logger LOGGER = 
LoggerFactory.getLogger(SchemaUtil.class);
+    private static final JsonNodeFactory NODE_FACTORY = 
JsonNodeFactory.instance;
+    public static final String ILLEGAL_CHARACTER_REGEX = "[^0-9a-zA-Z_$]";
+
+    public static String childQualifiedName(String parentQualifiedName, String 
childSimpleName) {
+        String safeChildName = 
childSimpleName.replaceAll(ILLEGAL_CHARACTER_REGEX, "_");
+        return isEmpty(parentQualifiedName) ? safeChildName : 
parentQualifiedName + "." + safeChildName;
+    }
+
+    public static ObjectNode readSchema(URL schemaUrl) {
+
+        ObjectNode schemaNode = NODE_FACTORY.objectNode();
+        schemaNode.put("$ref", schemaUrl.toString());
+        return schemaNode;
+
+    }
+
+    public static ObjectNode mergeProperties(ObjectNode content, ObjectNode 
parent) {
+
+        ObjectNode merged = parent.deepCopy();
+        Iterator<Map.Entry<String, JsonNode>> fields = content.fields();
+        for( ; fields.hasNext(); ) {
+            Map.Entry<String, JsonNode> field = fields.next();
+            String fieldId = field.getKey();
+            merged.put(fieldId, field.getValue().deepCopy());
+        }
+        return merged;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/main/java/org/apache/streams/util/schema/URIUtil.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/main/java/org/apache/streams/util/schema/URIUtil.java 
b/streams-util/src/main/java/org/apache/streams/util/schema/URIUtil.java
new file mode 100644
index 0000000..af468e3
--- /dev/null
+++ b/streams-util/src/main/java/org/apache/streams/util/schema/URIUtil.java
@@ -0,0 +1,30 @@
+package org.apache.streams.util.schema;
+
+import com.google.common.base.Optional;
+import org.apache.commons.lang3.StringUtils;
+
+import java.net.URI;
+
+/**
+ * URIUtil contains methods to assist in resolving URIs and URI fragments.
+ */
+public class URIUtil {
+
+    public static URI removeFragment(URI id) {
+        return URI.create(StringUtils.substringBefore(id.toString(), "#"));
+    }
+
+    public static URI removeFile(URI id) {
+        return URI.create(StringUtils.substringBeforeLast(id.toString(), "/"));
+    }
+
+    public static Optional<URI> safeResolve(URI absolute, String relativePart) 
{
+        if( !absolute.isAbsolute()) return Optional.absent();
+        try {
+            return Optional.of(absolute.resolve(relativePart));
+        } catch( IllegalArgumentException e ) {
+            return Optional.absent();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/test/java/org/apache/streams/util/schema/test/SchemaOrderingTest.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/test/java/org/apache/streams/util/schema/test/SchemaOrderingTest.java
 
b/streams-util/src/test/java/org/apache/streams/util/schema/test/SchemaOrderingTest.java
new file mode 100644
index 0000000..6deaa98
--- /dev/null
+++ 
b/streams-util/src/test/java/org/apache/streams/util/schema/test/SchemaOrderingTest.java
@@ -0,0 +1,150 @@
+package org.apache.streams.util.schema.test;
+
+import com.google.common.base.Optional;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+import org.apache.streams.util.schema.Schema;
+import org.apache.streams.util.schema.SchemaStore;
+import org.apache.streams.util.schema.SchemaStoreImpl;
+import org.junit.Test;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Created by sblackmon on 5/3/16.
+ */
+public class SchemaOrderingTest {
+
+    @Test
+    public void compareVerbParent() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File update = new File("target/test-classes/verbs/update.json");
+        schemaStore.create(update.toURI());
+        File activity = new File("target/test-classes/activity.json");
+        schemaStore.create(activity.toURI());
+        assert( schemaStore.compare( 
schemaStore.getByUri(update.toURI()).get(), 
schemaStore.getByUri(activity.toURI()).get()) == 1);
+        Iterator<Schema> schemaIterator = schemaStore.getSchemaIterator();
+        assertContainsItemsEndingWithInOrder(
+                schemaIterator,
+                Lists.newArrayList(
+                        "activity.json",
+                        "update.json"
+                )
+        );
+    }
+
+    @Test
+    public void compareObjectTypeParent() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File alert = new File("target/test-classes/objectTypes/alert.json");
+        schemaStore.create(alert.toURI());
+        File object = new File("target/test-classes/object.json");
+        schemaStore.create(object.toURI());
+        assert( schemaStore.compare( 
schemaStore.getByUri(object.toURI()).get(), 
schemaStore.getByUri(alert.toURI()).get()) == -1);
+        Iterator<Schema> schemaIterator = schemaStore.getSchemaIterator();
+        assertContainsItemsEndingWithInOrder(
+                schemaIterator,
+                Lists.newArrayList(
+                        "object.json",
+                        "alert.json"
+                )
+        );
+    }
+
+    @Test
+    public void compareUnrelated() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File alert = new File("target/test-classes/objectTypes/alert.json");
+        schemaStore.create(alert.toURI());
+        File update = new File("target/test-classes/verbs/update.json");
+        schemaStore.create(update.toURI());
+        assert( schemaStore.compare( 
schemaStore.getByUri(alert.toURI()).get(), 
schemaStore.getByUri(update.toURI()).get()) == 0);
+    }
+
+    @Test
+    public void compareVerbFieldRef() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File update = new File("target/test-classes/verbs/update.json");
+        schemaStore.create(update.toURI());
+        File object = new File("target/test-classes/object.json");
+        schemaStore.create(object.toURI());
+        assert( schemaStore.compare( 
schemaStore.getByUri(update.toURI()).get(), 
schemaStore.getByUri(object.toURI()).get()) == 1);
+        Iterator<Schema> schemaIterator = schemaStore.getSchemaIterator();
+        assertContainsItemsEndingWithInOrder(
+                schemaIterator,
+                Lists.newArrayList(
+                        "object.json",
+                        "update.json"
+                )
+        );
+    }
+
+    @Test
+    public void compareObjectTypeFieldRef() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File alert = new File("target/test-classes/objectTypes/alert.json");
+        schemaStore.create(alert.toURI());
+        File media_link = new File("target/test-classes/media_link.json");
+        schemaStore.create(media_link.toURI());
+        assert( schemaStore.compare( 
schemaStore.getByUri(media_link.toURI()).get(), 
schemaStore.getByUri(alert.toURI()).get()) == -1);
+        Iterator<Schema> schemaIterator = schemaStore.getSchemaIterator();
+        assertContainsItemsEndingWithInOrder(
+                schemaIterator,
+                Lists.newArrayList(
+                        "media_link.json",
+                        "object.json",
+                        "alert.json"
+                )
+        );
+    }
+
+    @Test
+    public void compareVerbAncestorIndirect() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File update = new File("target/test-classes/verbs/update.json");
+        schemaStore.create(update.toURI());
+        File media_link = new File("target/test-classes/media_link.json");
+        schemaStore.create(media_link.toURI());
+        assert( schemaStore.getByUri(media_link.toURI()).isPresent());
+        assert( schemaStore.getByUri(update.toURI()).isPresent());
+        assert( schemaStore.compare( 
schemaStore.getByUri(media_link.toURI()).get(), 
schemaStore.getByUri(update.toURI()).get()) == -1);
+        Iterator<Schema> schemaIterator = schemaStore.getSchemaIterator();
+        assertContainsItemsEndingWithInOrder(
+                schemaIterator,
+                Lists.newArrayList(
+                        "media_link.json",
+                        "update.json"
+                )
+        );
+    }
+
+
+    public void assertContainsItemsEndingWithInOrder(Iterator<Schema> 
iterator, List<String> items) {
+        for( String item : items ) {
+            Optional<Schema> tryFind = Iterators.tryFind( iterator, new 
SchemaUriEndsWithPredicate(item) );
+            assert( tryFind.isPresent() );
+        }
+    }
+
+    public class SchemaUriEndsWithPredicate implements Predicate<Schema> {
+
+        private String endsWith;
+
+        public SchemaUriEndsWithPredicate(String endsWith) {
+            this.endsWith = endsWith;
+        }
+
+        @Override
+        public boolean apply(Schema input) {
+            return input.getURI().getPath().endsWith(endsWith);
+        }
+
+        @Override
+        public boolean equals(Object object) {
+            return false;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/test/java/org/apache/streams/util/schema/test/SchemaStoreTest.java
----------------------------------------------------------------------
diff --git 
a/streams-util/src/test/java/org/apache/streams/util/schema/test/SchemaStoreTest.java
 
b/streams-util/src/test/java/org/apache/streams/util/schema/test/SchemaStoreTest.java
new file mode 100644
index 0000000..9aa7661
--- /dev/null
+++ 
b/streams-util/src/test/java/org/apache/streams/util/schema/test/SchemaStoreTest.java
@@ -0,0 +1,71 @@
+package org.apache.streams.util.schema.test;
+
+import org.apache.streams.util.schema.Schema;
+import org.apache.streams.util.schema.SchemaStore;
+import org.apache.streams.util.schema.SchemaStoreImpl;
+import org.junit.Test;
+
+import java.io.File;
+import java.net.URI;
+
+/**
+ * Created by sblackmon on 5/2/16.
+ */
+public class SchemaStoreTest {
+
+    @Test
+    public void indexMediaLink() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File file = new File("target/test-classes/media_link.json");
+        schemaStore.create(file.toURI());
+        assert( schemaStore.getFileUriCount() == 1);
+        assert( schemaStore.getByUri(file.toURI()).isPresent());
+        assert( 
schemaStore.getById(schemaStore.getByUri(file.toURI()).get().getId()).isPresent());
+    }
+
+    @Test
+    public void indexApprove() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File file = new File("target/test-classes/verbs/approve.json");
+        schemaStore.create(file.toURI());
+        assert( schemaStore.getFileUriCount() == 4);
+        assert( schemaStore.getByUri(file.toURI()).isPresent());
+        assert( 
schemaStore.getById(schemaStore.getByUri(file.toURI()).get().getId()).isPresent());
+    }
+
+    @Test
+    public void indexCollection() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File file = new File("target/test-classes/collection.json");
+        schemaStore.create(file.toURI());
+        assert( schemaStore.getFileUriCount() == 3);
+        assert( schemaStore.getByUri(file.toURI()).isPresent());
+        assert( 
schemaStore.getById(schemaStore.getByUri(file.toURI()).get().getId()).isPresent());
+        Schema collection = schemaStore.getByUri(file.toURI()).get();
+        assert( collection.getParent() == null );
+        assert( schemaStore.getById(
+                
URI.create("http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/object.json#";
+                )).isPresent());
+    }
+
+    @Test
+    public void indexUpdate() {
+        SchemaStore schemaStore = new SchemaStoreImpl();
+        File file = new File("target/test-classes/verbs/update.json");
+        schemaStore.create(file.toURI());
+        assert( schemaStore.getFileUriCount() == 4);
+        assert( schemaStore.getByUri(file.toURI()).isPresent());
+        assert( 
schemaStore.getById(schemaStore.getByUri(file.toURI()).get().getId()).isPresent());
+        Schema update = schemaStore.getByUri(file.toURI()).get();
+        assert( update.getParent() != null );
+        assert( update.getParent().getId().getScheme().equals("http"));
+        assert( 
update.getParent().getId().getHost().equals("streams.incubator.apache.org"));
+        assert( 
update.getParent().getId().getPath().startsWith("/site/0.3-incubating-SNAPSHOT/streams-schemas"));
+        assert( 
update.getParent().getId().getPath().endsWith("activity.json"));
+    }
+
+    // test create from messed up URI
+
+    // test create from URI with messed up reference
+
+}


Reply via email to