http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json new file mode 100644 index 0000000..9995099 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.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/leave.json#", + "type": "object", + "title": "Leave", + "description": "Indicates that the actor has left the object. For instance, a Person leaving a Group or checking-out of a Place.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "leave" + }, + "title": { + "type": "string", + "default": "{actor.displayName} left {object.displayName}" + } + } +}
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json new file mode 100644 index 0000000..d583305 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.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/like.json#", + "type": "object", + "title": "Like", + "description": "Indicates that the actor marked the object as an item of special interest.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "like" + }, + "title": { + "type": "string", + "default": "{actor.displayName} likes {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json new file mode 100644 index 0000000..9982ac6 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.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/listen.json#", + "type": "object", + "title": "Listen", + "description": "Indicates that the actor has listened to the object. This is typically only applicable for objects representing audio content, such as music, an audio-book, or a radio broadcast.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "listen" + }, + "title": { + "type": "string", + "default": "{actor.displayName} listened to {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json new file mode 100644 index 0000000..1d959a4 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.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/lose.json#", + "type": "object", + "title": "Lose", + "description": "Indicates that the actor has lost the object. For instance, if a person loses a game.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "lose" + }, + "title": { + "type": "string", + "default": "{actor.displayName} lost {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/make-friend.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/make-friend.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/make-friend.json new file mode 100644 index 0000000..141aba7 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/make-friend.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/make-friend.json#", + "type": "object", + "title": "Befriend", + "description": "Indicates the creation of a friendship that is reciprocated by the object.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "make-friend" + }, + "title": { + "type": "string", + "default": "{actor.displayName} is now friends with {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/open.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/open.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/open.json new file mode 100644 index 0000000..6c06529 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/open.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/open.json#", + "type": "object", + "title": "Open", + "description": "Indicates that the actor has opened the object. For instance, the object could represent a ticket being tracked in an issue management system.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "open" + }, + "title": { + "type": "string", + "default": "{actor.displayName} opened {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/play.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/play.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/play.json new file mode 100644 index 0000000..115ac11 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/play.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/play.json#", + "type": "object", + "title": "Play", + "description": "Indicates that the actor spent some time enjoying the object. For example, if the object is a video this indicates that the subject watched all or part of the video.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "play" + }, + "title": { + "type": "string", + "default": "{actor.displayName} played {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/post.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/post.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/post.json new file mode 100644 index 0000000..20a5feb --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/post.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/post.json#", + "type": "object", + "title": "Post", + "description": "To publish an object", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "post" + }, + "title": { + "type": "string", + "default": "{actor.displayName} posted {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/present.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/present.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/present.json new file mode 100644 index 0000000..0cf7154 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/present.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/present.json#", + "type": "object", + "title": "Present", + "description": "Indicates that the actor has presented the object. For instance, when a person gives a presentation at a conference.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "present" + }, + "title": { + "type": "string", + "default": "{actor.displayName} presented {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/purchase.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/purchase.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/purchase.json new file mode 100644 index 0000000..e867ad9 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/purchase.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/purchase.json#", + "type": "object", + "title": "Purchase", + "description": "Indicates that the actor has purchased the object. If a target is specified, in indicates the entity from which the object was purchased.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "purchase" + }, + "title": { + "type": "string", + "default": "{actor.displayName} purchased {object.displayName} from {target.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/qualify.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/qualify.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/qualify.json new file mode 100644 index 0000000..8bc5248 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/qualify.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/qualify.json#", + "type": "object", + "title": "Qualify", + "description": "Indicates that the actor has qualified for the object. If a target is specified, it indicates the context within which the qualification applies.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "qualify" + }, + "title": { + "type": "string", + "default": "{actor.displayName} qualified {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/read.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/read.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/read.json new file mode 100644 index 0000000..2776a4e --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/read.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/read.json#", + "type": "object", + "title": "Read", + "description": "Indicates that the actor read the object. This is typically only applicable for objects representing printed or written content, such as a book, a message or a comment.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "read" + }, + "title": { + "type": "string", + "default": "{actor.displayName} read {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/receive.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/receive.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/receive.json new file mode 100644 index 0000000..da88b34 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/receive.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/receive.json#", + "type": "object", + "title": "Receive", + "description": "Indicates that the actor is receiving an object. Examples include a person receiving a badge object. The object identifies the object being received.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "receive" + }, + "title": { + "type": "string", + "default": "{actor.displayName} received {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/reject.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/reject.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/reject.json new file mode 100644 index 0000000..d8a8bb4 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/reject.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/reject.json#", + "type": "object", + "title": "Reject", + "description": "Indicates that the actor has rejected the object.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "reject" + }, + "title": { + "type": "string", + "default": "{actor.displayName} rejected {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/remove-friend.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/remove-friend.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/remove-friend.json new file mode 100644 index 0000000..84f6b78 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/remove-friend.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/remove-friend.json#", + "type": "object", + "title": "UnFriend", + "description": "Indicates that the actor has removed the object from the collection of friends.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "remove-friend" + }, + "title": { + "type": "string", + "default": "{actor.displayName} removed friend {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/remove.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/remove.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/remove.json new file mode 100644 index 0000000..367da5d --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/remove.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/remove.json#", + "type": "object", + "title": "Remove", + "description": "Indicates that the actor has removed the object from the target.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "remove" + }, + "title": { + "type": "string", + "default": "{actor.displayName} removed {object.displayName} from {target.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/replace.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/replace.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/replace.json new file mode 100644 index 0000000..418ea94 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/replace.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/replace.json#", + "type": "object", + "title": "Replace", + "description": "Indicates that the actor has replaced the target with the object.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "replace" + }, + "title": { + "type": "string", + "default": "{actor.displayName} replaced {target.displayName} with {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/request-friend.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/request-friend.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/request-friend.json new file mode 100644 index 0000000..51333e2 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/request-friend.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/request-friend.json#", + "type": "object", + "title": "RequestFriend", + "description": "Indicates the creation of a friendship that has not yet been reciprocated by the object.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "request-friend" + }, + "title": { + "type": "string", + "default": "{actor.displayName} sent a friend request to {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/request.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/request.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/request.json new file mode 100644 index 0000000..f15104c --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/request.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/request.json#", + "type": "object", + "title": "Request", + "description": "Indicates that the actor has requested the object. If a target is specified, it indicates the entity from which the object is being requested.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "request" + }, + "title": { + "type": "string", + "default": "{actor.displayName} requested {object.displayName} from {target.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/resolve.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/resolve.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/resolve.json new file mode 100644 index 0000000..2b8365d --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/resolve.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/resolve.json#", + "type": "object", + "title": "Resolve", + "description": "Indicates that the actor has resolved the object. For instance, the object could represent a ticket being tracked in an issue management system.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "resolve" + }, + "title": { + "type": "string", + "default": "{actor.displayName} resolved {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/retract.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/retract.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/retract.json new file mode 100644 index 0000000..8ddbcbc --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/retract.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/retract.json#", + "type": "object", + "title": "Retract", + "description": "Indicates that the actor has retracted the object. For instance, if an actor wishes to retract a previously published activity, the object would be the previously published activity that is being retracted.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "retract" + }, + "title": { + "type": "string", + "default": "{actor.displayName} retracted {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/return.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/return.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/return.json new file mode 100644 index 0000000..40426cf --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/return.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/return.json#", + "type": "object", + "title": "Return", + "description": "Indicates that the actor has returned the object. If a target is specified, it indicates the entity to which the object was returned.", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "return" + }, + "title": { + "type": "string", + "default": "{actor.displayName} returned {object.displayName} to {target.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-maybe.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-maybe.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-maybe.json new file mode 100644 index 0000000..6e9e8f5 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-maybe.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/rsvp-maybe.json#", + "type": "object", + "title": "Rsvp Maybe", + "description": "To indicate that the actor may attend an event", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "rsvp-maybe" + }, + "title": { + "type": "string", + "default": "{actor.displayName} might attend {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-no.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-no.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-no.json new file mode 100644 index 0000000..6339f1e --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-no.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/rsvp-no.json#", + "type": "object", + "title": "Rsvp No", + "description": "To indicate that the actor will not attend an event", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "rsvp-no" + }, + "title": { + "type": "string", + "default": "{actor.displayName} will not attend {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-yes.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-yes.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-yes.json new file mode 100644 index 0000000..7fecc78 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/rsvp-yes.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/rsvp-yes.json#", + "type": "object", + "title": "Rsvp Yes", + "description": "To indicate that the actor will attend an event", + "extends": { + "$ref": "../activity.json" + }, + "properties": { + "verb": { + "type": "string", + "default": "rsvp-yes" + }, + "title": { + "type": "string", + "default": "{actor.displayName} is attending {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/satisfy.json ---------------------------------------------------------------------- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/satisfy.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/satisfy.json new file mode 100644 index 0000000..9c36006 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/satisfy.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/satisfy.json#", + "type": "object", + "title": "Satisfy", + "description": "Indicates that the actor has satisfied the object. If a target is specified, it indicate the context within which the object was satisfied. For instance, if a person satisfies the requirements for a 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": "satisfy" + }, + "title": { + "type": "string", + "default": "{actor.displayName} has satisfied {object.displayName}" + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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/6187265f/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; + } + } + + } +}