refactoring, testing, documentation, CLI modes break up streams-schemas into streams-util and streams-schema-activitystreams add index.md to each plugin specify basepath of jsonschema project-wide harmonize plugin behavior, code style, docs ensure all tests pass add CLI modes
Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/6187265f Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/6187265f Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/6187265f Branch: refs/feature/STREAMS-389,398 Commit: 6187265fc0395a8051483ba3b905d976299217a3 Parents: 57f17d7 Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Authored: Wed Jun 1 12:32:14 2016 -0500 Committer: Steve Blackmon @steveblackmon <sblack...@apache.org> Committed: Wed Jun 1 12:32:32 2016 -0500 ---------------------------------------------------------------------- streams-components/streams-converters/pom.xml | 2 +- streams-components/streams-http/pom.xml | 2 +- .../streams-persist-kinesis/pom.xml | 2 +- .../streams-persist-s3/pom.xml | 6 +- .../spring/streams-cassandra-context.xml | 25 -- .../streams-persist-elasticsearch/pom.xml | 6 +- .../streams-persist-filebuffer/pom.xml | 2 +- streams-contrib/streams-persist-graph/pom.xml | 2 +- streams-contrib/streams-persist-hbase/pom.xml | 2 +- streams-contrib/streams-persist-hdfs/pom.xml | 2 +- streams-contrib/streams-persist-kafka/pom.xml | 2 +- streams-contrib/streams-persist-mongo/pom.xml | 2 +- .../streams-processor-lucene/pom.xml | 2 +- .../streams-processor-peoplepattern/pom.xml | 2 +- streams-contrib/streams-processor-tika/pom.xml | 2 +- streams-contrib/streams-processor-urls/pom.xml | 2 +- .../streams-provider-datasift/pom.xml | 2 +- .../streams-provider-facebook/pom.xml | 10 +- .../gnip-edc-instagram/pom.xml | 2 +- .../gnip-powertrack/pom.xml | 2 +- .../google-gmail/pom.xml | 2 +- .../google-gplus/pom.xml | 2 +- .../streams-provider-instagram/pom.xml | 4 +- .../streams-provider-moreover/pom.xml | 4 +- streams-contrib/streams-provider-rss/pom.xml | 2 +- .../streams-provider-sysomos/pom.xml | 4 +- .../streams-provider-twitter/pom.xml | 2 +- .../streams-provider-youtube/pom.xml | 2 +- streams-monitoring/pom.xml | 2 +- .../streams-plugin-cassandra/pom.xml | 13 +- .../StreamsCassandraGenerationConfig.java | 2 +- .../StreamsCassandraResourceGenerator.java | 42 +-- .../StreamsCassandraResourceGeneratorMojo.java | 37 +- .../src/site/markdown/index.md | 22 +- ...treamsCassandraResourceGeneratorCLITest.java | 10 +- ...reamsCassandraResourceGeneratorMojoTest.java | 9 +- .../StreamsCassandraResourceGeneratorTest.java | 58 +-- .../resources/streams-plugin-cassandra/pom.xml | 21 +- .../streams-plugin-elasticsearch/pom.xml | 13 +- .../StreamsElasticsearchGenerationConfig.java | 2 +- .../StreamsElasticsearchResourceGenerator.java | 75 ++-- ...reamsElasticsearchResourceGeneratorMojo.java | 29 +- .../src/site/markdown/index.md | 24 +- ...msElasticsearchResourceGeneratorCLITest.java | 39 ++ ...reamsElasticsearchResourceGeneratorTest.java | 59 +-- .../streams-plugin-elasticsearch/pom.xml | 23 +- streams-plugins/streams-plugin-hbase/pom.xml | 13 +- .../hbase/StreamsHbaseGenerationConfig.java | 2 +- .../hbase/StreamsHbaseResourceGenerator.java | 41 +- .../StreamsHbaseResourceGeneratorMojo.java | 28 +- .../src/site/markdown/index.md | 26 +- .../StreamsHbaseResourceGeneratorCLITest.java | 2 +- .../StreamsHbaseResourceGeneratorMojoTest.java | 2 +- .../test/StreamsHbaseResourceGeneratorTest.java | 31 +- .../test/resources/streams-plugin-hbase/pom.xml | 23 +- streams-plugins/streams-plugin-hive/pom.xml | 13 +- .../hive/StreamsHiveGenerationConfig.java | 3 +- .../hive/StreamsHiveResourceGenerator.java | 35 +- .../hive/StreamsHiveResourceGeneratorMojo.java | 38 +- .../src/site/markdown/index.md | 28 +- .../StreamsHiveResourceGeneratorCLITest.java | 2 +- .../StreamsHiveResourceGeneratorMojoTest.java | 2 +- .../test/StreamsHiveResourceGeneratorTest.java | 32 +- .../test/resources/streams-plugin-hive/pom.xml | 23 +- streams-plugins/streams-plugin-pig/pom.xml | 13 +- .../plugins/pig/StreamsPigGenerationConfig.java | 3 +- .../pig/StreamsPigResourceGenerator.java | 46 +-- .../pig/StreamsPigResourceGeneratorMojo.java | 38 +- .../src/site/markdown/index.md | 24 +- .../StreamsPigResourceGeneratorCLITest.java | 4 +- .../StreamsPigResourceGeneratorMojoTest.java | 4 +- .../test/StreamsPigResourceGeneratorTest.java | 32 +- .../test/resources/streams-plugin-pig/pom.xml | 23 +- streams-plugins/streams-plugin-pojo/pom.xml | 13 +- .../plugins/StreamsPojoSourceGenerator.java | 15 +- .../plugins/StreamsPojoSourceGeneratorMojo.java | 154 +------- .../src/site/markdown/index.md | 24 +- .../test/StreamsPojoSourceGeneratorCLITest.java | 2 +- .../StreamsPojoSourceGeneratorMojoTest.java | 2 +- .../test/StreamsPojoSourceGeneratorTest.java | 51 +-- .../test/resources/streams-plugin-pojo/pom.xml | 30 +- streams-plugins/streams-plugin-scala/pom.xml | 12 + .../streams/plugins/StreamsPojoScala.java | 371 ------------------- .../streams/plugins/StreamsPojoScalaMojo.java | 71 ---- .../plugins/StreamsScalaSourceGenerator.java | 351 ++++++++++++++++++ .../StreamsScalaSourceGeneratorMojo.java | 59 +++ .../src/site/markdown/index.md | 36 ++ .../plugins/test/StreamsPojoScalaTest.java | 55 --- .../test/StreamsScalaSourceGeneratorTest.java | 55 +++ .../streams-runtime-dropwizard/pom.xml | 2 +- streams-runtimes/streams-runtime-local/pom.xml | 2 +- streams-schemas/pom.xml | 77 +--- .../org/apache/streams/schema/FieldType.java | 13 - .../org/apache/streams/schema/FieldUtil.java | 59 --- .../org/apache/streams/schema/FileUtil.java | 76 ---- .../apache/streams/schema/GenerationConfig.java | 115 ------ .../java/org/apache/streams/schema/Schema.java | 57 --- .../org/apache/streams/schema/SchemaStore.java | 283 -------------- .../org/apache/streams/schema/SchemaUtil.java | 50 --- .../java/org/apache/streams/schema/URIUtil.java | 31 -- .../src/main/jsonschema/activity.json | 108 ------ .../src/main/jsonschema/collection.json | 47 --- .../src/main/jsonschema/media_link.json | 34 -- streams-schemas/src/main/jsonschema/object.json | 98 ----- .../src/main/jsonschema/objectTypes/alert.json | 19 - .../jsonschema/objectTypes/application.json | 19 - .../main/jsonschema/objectTypes/article.json | 19 - .../src/main/jsonschema/objectTypes/audio.json | 19 - .../src/main/jsonschema/objectTypes/badge.json | 19 - .../src/main/jsonschema/objectTypes/binary.json | 19 - .../main/jsonschema/objectTypes/bookmark.json | 19 - .../main/jsonschema/objectTypes/comment.json | 19 - .../src/main/jsonschema/objectTypes/device.json | 19 - .../src/main/jsonschema/objectTypes/event.json | 51 --- .../src/main/jsonschema/objectTypes/file.json | 25 -- .../src/main/jsonschema/objectTypes/folder.json | 19 - .../src/main/jsonschema/objectTypes/game.json | 19 - .../src/main/jsonschema/objectTypes/group.json | 19 - .../src/main/jsonschema/objectTypes/image.json | 22 -- .../src/main/jsonschema/objectTypes/issue.json | 25 -- .../src/main/jsonschema/objectTypes/job.json | 19 - .../src/main/jsonschema/objectTypes/list.json | 28 -- .../src/main/jsonschema/objectTypes/note.json | 19 - .../src/main/jsonschema/objectTypes/offer.json | 19 - .../jsonschema/objectTypes/organization.json | 19 - .../src/main/jsonschema/objectTypes/page.json | 19 - .../main/jsonschema/objectTypes/permission.json | 36 -- .../src/main/jsonschema/objectTypes/person.json | 25 -- .../jsonschema/objectTypes/photo-album.json | 19 - .../src/main/jsonschema/objectTypes/photo.json | 23 -- .../src/main/jsonschema/objectTypes/place.json | 39 -- .../main/jsonschema/objectTypes/playlist.json | 19 - .../main/jsonschema/objectTypes/process.json | 19 - .../main/jsonschema/objectTypes/product.json | 25 -- .../main/jsonschema/objectTypes/property.json | 48 --- .../main/jsonschema/objectTypes/question.json | 28 -- .../src/main/jsonschema/objectTypes/review.json | 22 -- .../src/main/jsonschema/objectTypes/role.json | 25 -- .../main/jsonschema/objectTypes/service.json | 19 - .../src/main/jsonschema/objectTypes/song.json | 19 - .../src/main/jsonschema/objectTypes/status.json | 19 - .../src/main/jsonschema/objectTypes/task.json | 40 -- .../src/main/jsonschema/objectTypes/team.json | 19 - .../src/main/jsonschema/objectTypes/video.json | 19 - .../src/main/jsonschema/verbs/accept.json | 24 -- .../src/main/jsonschema/verbs/access.json | 24 -- .../src/main/jsonschema/verbs/acknowledge.json | 24 -- .../src/main/jsonschema/verbs/add.json | 24 -- .../src/main/jsonschema/verbs/agree.json | 24 -- .../src/main/jsonschema/verbs/append.json | 24 -- .../src/main/jsonschema/verbs/approve.json | 24 -- .../src/main/jsonschema/verbs/archive.json | 24 -- .../src/main/jsonschema/verbs/assign.json | 24 -- .../src/main/jsonschema/verbs/at.json | 24 -- .../src/main/jsonschema/verbs/attach.json | 24 -- .../src/main/jsonschema/verbs/attend.json | 24 -- .../src/main/jsonschema/verbs/author.json | 24 -- .../src/main/jsonschema/verbs/authorize.json | 24 -- .../src/main/jsonschema/verbs/borrow.json | 24 -- .../src/main/jsonschema/verbs/build.json | 24 -- .../src/main/jsonschema/verbs/cancel.json | 24 -- .../src/main/jsonschema/verbs/checkin.json | 24 -- .../src/main/jsonschema/verbs/close.json | 24 -- .../src/main/jsonschema/verbs/complete.json | 24 -- .../src/main/jsonschema/verbs/confirm.json | 24 -- .../src/main/jsonschema/verbs/consume.json | 24 -- .../src/main/jsonschema/verbs/create.json | 24 -- .../src/main/jsonschema/verbs/delete.json | 24 -- .../src/main/jsonschema/verbs/deliver.json | 24 -- .../src/main/jsonschema/verbs/deny.json | 24 -- .../src/main/jsonschema/verbs/disagree.json | 24 -- .../src/main/jsonschema/verbs/dislike.json | 24 -- .../src/main/jsonschema/verbs/experience.json | 24 -- .../src/main/jsonschema/verbs/favorite.json | 24 -- .../src/main/jsonschema/verbs/find.json | 24 -- .../jsonschema/verbs/flag-as-inappropriate.json | 24 -- .../src/main/jsonschema/verbs/follow.json | 24 -- .../src/main/jsonschema/verbs/give.json | 24 -- .../src/main/jsonschema/verbs/host.json | 24 -- .../src/main/jsonschema/verbs/ignore.json | 24 -- .../src/main/jsonschema/verbs/insert.json | 24 -- .../src/main/jsonschema/verbs/install.json | 24 -- .../src/main/jsonschema/verbs/interact.json | 24 -- .../src/main/jsonschema/verbs/invite.json | 24 -- .../src/main/jsonschema/verbs/join.json | 24 -- .../src/main/jsonschema/verbs/leave.json | 24 -- .../src/main/jsonschema/verbs/like.json | 24 -- .../src/main/jsonschema/verbs/listen.json | 24 -- .../src/main/jsonschema/verbs/lose.json | 24 -- .../src/main/jsonschema/verbs/make-friend.json | 24 -- .../src/main/jsonschema/verbs/open.json | 24 -- .../src/main/jsonschema/verbs/play.json | 24 -- .../src/main/jsonschema/verbs/post.json | 24 -- .../src/main/jsonschema/verbs/present.json | 24 -- .../src/main/jsonschema/verbs/purchase.json | 24 -- .../src/main/jsonschema/verbs/qualify.json | 24 -- .../src/main/jsonschema/verbs/read.json | 24 -- .../src/main/jsonschema/verbs/receive.json | 24 -- .../src/main/jsonschema/verbs/reject.json | 24 -- .../main/jsonschema/verbs/remove-friend.json | 24 -- .../src/main/jsonschema/verbs/remove.json | 24 -- .../src/main/jsonschema/verbs/replace.json | 24 -- .../main/jsonschema/verbs/request-friend.json | 24 -- .../src/main/jsonschema/verbs/request.json | 24 -- .../src/main/jsonschema/verbs/resolve.json | 24 -- .../src/main/jsonschema/verbs/retract.json | 24 -- .../src/main/jsonschema/verbs/return.json | 24 -- .../src/main/jsonschema/verbs/rsvp-maybe.json | 24 -- .../src/main/jsonschema/verbs/rsvp-no.json | 24 -- .../src/main/jsonschema/verbs/rsvp-yes.json | 24 -- .../src/main/jsonschema/verbs/satisfy.json | 24 -- .../src/main/jsonschema/verbs/save.json | 24 -- .../src/main/jsonschema/verbs/schedule.json | 24 -- .../src/main/jsonschema/verbs/search.json | 24 -- .../src/main/jsonschema/verbs/sell.json | 24 -- .../src/main/jsonschema/verbs/send.json | 24 -- .../src/main/jsonschema/verbs/share.json | 24 -- .../src/main/jsonschema/verbs/sponsor.json | 24 -- .../src/main/jsonschema/verbs/start.json | 24 -- .../main/jsonschema/verbs/stop-following.json | 24 -- .../src/main/jsonschema/verbs/submit.json | 24 -- .../src/main/jsonschema/verbs/tag.json | 24 -- .../src/main/jsonschema/verbs/terminate.json | 24 -- .../src/main/jsonschema/verbs/tie.json | 24 -- .../src/main/jsonschema/verbs/unfavorite.json | 24 -- .../src/main/jsonschema/verbs/unlike.json | 24 -- .../src/main/jsonschema/verbs/unsatisfy.json | 24 -- .../src/main/jsonschema/verbs/unsave.json | 24 -- .../src/main/jsonschema/verbs/unshare.json | 24 -- .../src/main/jsonschema/verbs/update.json | 34 -- .../src/main/jsonschema/verbs/use.json | 24 -- .../src/main/jsonschema/verbs/watch.json | 24 -- .../src/main/jsonschema/verbs/win.json | 24 -- streams-schemas/src/main/xmlschema/activity.xsd | 94 ----- .../schema/test/SchemaOrderingTests.java | 146 -------- .../streams/schema/test/SchemaStoreTests.java | 76 ---- .../src/test/resources/activities/accept.json | 16 - .../src/test/resources/activities/access.json | 17 - .../test/resources/activities/acknowledge.json | 16 - .../src/test/resources/activities/add.json | 21 -- .../src/test/resources/activities/agree.json | 15 - .../src/test/resources/activities/append.json | 16 - .../src/test/resources/activities/approve.json | 20 - .../src/test/resources/activities/archive.json | 15 - .../src/test/resources/activities/assign.json | 20 - .../src/test/resources/activities/at.json | 15 - .../src/test/resources/activities/attach.json | 20 - .../src/test/resources/activities/attend.json | 15 - .../src/test/resources/activities/author.json | 15 - .../test/resources/activities/authorize.json | 23 -- .../src/test/resources/activities/borrow.json | 21 -- .../src/test/resources/activities/build.json | 16 - .../src/test/resources/activities/cancel.json | 16 - .../src/test/resources/activities/checkin.json | 16 - .../src/test/resources/activities/close.json | 16 - .../src/test/resources/activities/complete.json | 16 - .../src/test/resources/activities/confirm.json | 17 - .../src/test/resources/activities/consume.json | 16 - .../src/test/resources/activities/create.json | 15 - .../src/test/resources/activities/delete.json | 16 - .../src/test/resources/activities/deliver.json | 20 - .../src/test/resources/activities/deny.json | 23 -- .../src/test/resources/activities/disagree.json | 30 -- .../src/test/resources/activities/dislike.json | 15 - .../test/resources/activities/experience.json | 16 - .../src/test/resources/activities/favorite.json | 15 - .../src/test/resources/activities/find.json | 19 - .../activities/flag-as-inappropriate.json | 24 -- .../src/test/resources/activities/follow.json | 15 - .../src/test/resources/activities/give.json | 28 -- .../src/test/resources/activities/host.json | 15 - .../src/test/resources/activities/ignore.json | 15 - .../src/test/resources/activities/insert.json | 19 - .../src/test/resources/activities/install.json | 18 - .../src/test/resources/activities/interact.json | 16 - .../src/test/resources/activities/invite.json | 19 - .../src/test/resources/activities/join.json | 15 - .../src/test/resources/activities/leave.json | 15 - .../src/test/resources/activities/like.json | 22 -- .../src/test/resources/activities/listen.json | 15 - .../src/test/resources/activities/lose.json | 15 - .../test/resources/activities/make-friend.json | 15 - .../src/test/resources/activities/open.json | 15 - .../src/test/resources/activities/play.json | 15 - .../src/test/resources/activities/post.json | 25 -- .../src/test/resources/activities/present.json | 15 - .../src/test/resources/activities/purchase.json | 16 - .../src/test/resources/activities/qualify.json | 15 - .../src/test/resources/activities/read.json | 16 - .../src/test/resources/activities/receive.json | 16 - .../src/test/resources/activities/reject.json | 15 - .../resources/activities/remove-friend.json | 15 - .../src/test/resources/activities/remove.json | 23 -- .../src/test/resources/activities/replace.json | 19 - .../resources/activities/request-friend.json | 16 - .../src/test/resources/activities/request.json | 23 -- .../src/test/resources/activities/resolve.json | 15 - .../src/test/resources/activities/retract.json | 26 -- .../src/test/resources/activities/return.json | 19 - .../test/resources/activities/rsvp-maybe.json | 16 - .../src/test/resources/activities/rsvp-no.json | 16 - .../src/test/resources/activities/rsvp-yes.json | 16 - .../src/test/resources/activities/satisfy.json | 21 -- .../src/test/resources/activities/save.json | 20 - .../src/test/resources/activities/schedule.json | 15 - .../src/test/resources/activities/search.json | 21 -- .../src/test/resources/activities/sell.json | 19 - .../src/test/resources/activities/send.json | 19 - .../src/test/resources/activities/share.json | 16 - .../src/test/resources/activities/sponsor.json | 17 - .../src/test/resources/activities/start.json | 15 - .../resources/activities/stop-following.json | 15 - .../src/test/resources/activities/submit.json | 15 - .../src/test/resources/activities/tag.json | 19 - .../test/resources/activities/terminate.json | 15 - .../src/test/resources/activities/tie.json | 24 -- .../test/resources/activities/unfavorite.json | 15 - .../src/test/resources/activities/unlike.json | 15 - .../test/resources/activities/unsatisfy.json | 20 - .../src/test/resources/activities/unsave.json | 15 - .../src/test/resources/activities/unshare.json | 15 - .../src/test/resources/activities/update.json | 15 - .../src/test/resources/activities/use.json | 15 - .../src/test/resources/activities/watch.json | 16 - .../src/test/resources/activities/win.json | 15 - .../src/test/resources/media_link.json | 7 - .../src/test/resources/objects/event.json | 18 - .../src/test/resources/objects/group.json | 16 - .../src/test/resources/objects/issue.json | 9 - .../src/test/resources/objects/note.json | 12 - .../src/test/resources/objects/permission.json | 9 - .../src/test/resources/objects/place.json | 9 - .../src/test/resources/objects/task.json | 16 - .../src/test/resources/objects/video.json | 8 - .../streams-schema-activitystreams/pom.xml | 82 ++++ .../src/main/jsonschema/activity.json | 108 ++++++ .../src/main/jsonschema/collection.json | 47 +++ .../src/main/jsonschema/media_link.json | 34 ++ .../src/main/jsonschema/object.json | 98 +++++ .../src/main/jsonschema/objectTypes/alert.json | 19 + .../jsonschema/objectTypes/application.json | 19 + .../main/jsonschema/objectTypes/article.json | 19 + .../src/main/jsonschema/objectTypes/audio.json | 19 + .../src/main/jsonschema/objectTypes/badge.json | 19 + .../src/main/jsonschema/objectTypes/binary.json | 19 + .../main/jsonschema/objectTypes/bookmark.json | 19 + .../main/jsonschema/objectTypes/comment.json | 19 + .../src/main/jsonschema/objectTypes/device.json | 19 + .../src/main/jsonschema/objectTypes/event.json | 51 +++ .../src/main/jsonschema/objectTypes/file.json | 25 ++ .../src/main/jsonschema/objectTypes/folder.json | 19 + .../src/main/jsonschema/objectTypes/game.json | 19 + .../src/main/jsonschema/objectTypes/group.json | 19 + .../src/main/jsonschema/objectTypes/image.json | 22 ++ .../src/main/jsonschema/objectTypes/issue.json | 25 ++ .../src/main/jsonschema/objectTypes/job.json | 19 + .../src/main/jsonschema/objectTypes/list.json | 28 ++ .../src/main/jsonschema/objectTypes/note.json | 19 + .../src/main/jsonschema/objectTypes/offer.json | 19 + .../jsonschema/objectTypes/organization.json | 19 + .../src/main/jsonschema/objectTypes/page.json | 19 + .../main/jsonschema/objectTypes/permission.json | 36 ++ .../src/main/jsonschema/objectTypes/person.json | 25 ++ .../jsonschema/objectTypes/photo-album.json | 19 + .../src/main/jsonschema/objectTypes/photo.json | 23 ++ .../src/main/jsonschema/objectTypes/place.json | 39 ++ .../main/jsonschema/objectTypes/playlist.json | 19 + .../main/jsonschema/objectTypes/process.json | 19 + .../main/jsonschema/objectTypes/product.json | 25 ++ .../main/jsonschema/objectTypes/property.json | 48 +++ .../main/jsonschema/objectTypes/question.json | 28 ++ .../src/main/jsonschema/objectTypes/review.json | 22 ++ .../src/main/jsonschema/objectTypes/role.json | 25 ++ .../main/jsonschema/objectTypes/service.json | 19 + .../src/main/jsonschema/objectTypes/song.json | 19 + .../src/main/jsonschema/objectTypes/status.json | 19 + .../src/main/jsonschema/objectTypes/task.json | 40 ++ .../src/main/jsonschema/objectTypes/team.json | 19 + .../src/main/jsonschema/objectTypes/video.json | 19 + .../src/main/jsonschema/verbs/accept.json | 24 ++ .../src/main/jsonschema/verbs/access.json | 24 ++ .../src/main/jsonschema/verbs/acknowledge.json | 24 ++ .../src/main/jsonschema/verbs/add.json | 24 ++ .../src/main/jsonschema/verbs/agree.json | 24 ++ .../src/main/jsonschema/verbs/append.json | 24 ++ .../src/main/jsonschema/verbs/approve.json | 24 ++ .../src/main/jsonschema/verbs/archive.json | 24 ++ .../src/main/jsonschema/verbs/assign.json | 24 ++ .../src/main/jsonschema/verbs/at.json | 24 ++ .../src/main/jsonschema/verbs/attach.json | 24 ++ .../src/main/jsonschema/verbs/attend.json | 24 ++ .../src/main/jsonschema/verbs/author.json | 24 ++ .../src/main/jsonschema/verbs/authorize.json | 24 ++ .../src/main/jsonschema/verbs/borrow.json | 24 ++ .../src/main/jsonschema/verbs/build.json | 24 ++ .../src/main/jsonschema/verbs/cancel.json | 24 ++ .../src/main/jsonschema/verbs/checkin.json | 24 ++ .../src/main/jsonschema/verbs/close.json | 24 ++ .../src/main/jsonschema/verbs/complete.json | 24 ++ .../src/main/jsonschema/verbs/confirm.json | 24 ++ .../src/main/jsonschema/verbs/consume.json | 24 ++ .../src/main/jsonschema/verbs/create.json | 24 ++ .../src/main/jsonschema/verbs/delete.json | 24 ++ .../src/main/jsonschema/verbs/deliver.json | 24 ++ .../src/main/jsonschema/verbs/deny.json | 24 ++ .../src/main/jsonschema/verbs/disagree.json | 24 ++ .../src/main/jsonschema/verbs/dislike.json | 24 ++ .../src/main/jsonschema/verbs/experience.json | 24 ++ .../src/main/jsonschema/verbs/favorite.json | 24 ++ .../src/main/jsonschema/verbs/find.json | 24 ++ .../jsonschema/verbs/flag-as-inappropriate.json | 24 ++ .../src/main/jsonschema/verbs/follow.json | 24 ++ .../src/main/jsonschema/verbs/give.json | 24 ++ .../src/main/jsonschema/verbs/host.json | 24 ++ .../src/main/jsonschema/verbs/ignore.json | 24 ++ .../src/main/jsonschema/verbs/insert.json | 24 ++ .../src/main/jsonschema/verbs/install.json | 24 ++ .../src/main/jsonschema/verbs/interact.json | 24 ++ .../src/main/jsonschema/verbs/invite.json | 24 ++ .../src/main/jsonschema/verbs/join.json | 24 ++ .../src/main/jsonschema/verbs/leave.json | 24 ++ .../src/main/jsonschema/verbs/like.json | 24 ++ .../src/main/jsonschema/verbs/listen.json | 24 ++ .../src/main/jsonschema/verbs/lose.json | 24 ++ .../src/main/jsonschema/verbs/make-friend.json | 24 ++ .../src/main/jsonschema/verbs/open.json | 24 ++ .../src/main/jsonschema/verbs/play.json | 24 ++ .../src/main/jsonschema/verbs/post.json | 24 ++ .../src/main/jsonschema/verbs/present.json | 24 ++ .../src/main/jsonschema/verbs/purchase.json | 24 ++ .../src/main/jsonschema/verbs/qualify.json | 24 ++ .../src/main/jsonschema/verbs/read.json | 24 ++ .../src/main/jsonschema/verbs/receive.json | 24 ++ .../src/main/jsonschema/verbs/reject.json | 24 ++ .../main/jsonschema/verbs/remove-friend.json | 24 ++ .../src/main/jsonschema/verbs/remove.json | 24 ++ .../src/main/jsonschema/verbs/replace.json | 24 ++ .../main/jsonschema/verbs/request-friend.json | 24 ++ .../src/main/jsonschema/verbs/request.json | 24 ++ .../src/main/jsonschema/verbs/resolve.json | 24 ++ .../src/main/jsonschema/verbs/retract.json | 24 ++ .../src/main/jsonschema/verbs/return.json | 24 ++ .../src/main/jsonschema/verbs/rsvp-maybe.json | 24 ++ .../src/main/jsonschema/verbs/rsvp-no.json | 24 ++ .../src/main/jsonschema/verbs/rsvp-yes.json | 24 ++ .../src/main/jsonschema/verbs/satisfy.json | 24 ++ .../src/main/jsonschema/verbs/save.json | 24 ++ .../src/main/jsonschema/verbs/schedule.json | 24 ++ .../src/main/jsonschema/verbs/search.json | 24 ++ .../src/main/jsonschema/verbs/sell.json | 24 ++ .../src/main/jsonschema/verbs/send.json | 24 ++ .../src/main/jsonschema/verbs/share.json | 24 ++ .../src/main/jsonschema/verbs/sponsor.json | 24 ++ .../src/main/jsonschema/verbs/start.json | 24 ++ .../main/jsonschema/verbs/stop-following.json | 24 ++ .../src/main/jsonschema/verbs/submit.json | 24 ++ .../src/main/jsonschema/verbs/tag.json | 24 ++ .../src/main/jsonschema/verbs/terminate.json | 24 ++ .../src/main/jsonschema/verbs/tie.json | 24 ++ .../src/main/jsonschema/verbs/unfavorite.json | 24 ++ .../src/main/jsonschema/verbs/unlike.json | 24 ++ .../src/main/jsonschema/verbs/unsatisfy.json | 24 ++ .../src/main/jsonschema/verbs/unsave.json | 24 ++ .../src/main/jsonschema/verbs/unshare.json | 24 ++ .../src/main/jsonschema/verbs/update.json | 34 ++ .../src/main/jsonschema/verbs/use.json | 24 ++ .../src/main/jsonschema/verbs/watch.json | 24 ++ .../src/main/jsonschema/verbs/win.json | 24 ++ .../src/main/xmlschema/activity.xsd | 94 +++++ streams-util/pom.xml | 89 ++++- .../java/org/apache/streams/util/GuidUtils.java | 2 +- .../org/apache/streams/util/RegexUtils.java | 3 + .../apache/streams/util/SerializationUtil.java | 3 +- .../apache/streams/util/schema/FieldType.java | 14 + .../apache/streams/util/schema/FieldUtil.java | 34 ++ .../apache/streams/util/schema/FileUtil.java | 77 ++++ .../streams/util/schema/GenerationConfig.java | 116 ++++++ .../org/apache/streams/util/schema/Schema.java | 57 +++ .../apache/streams/util/schema/SchemaStore.java | 42 +++ .../streams/util/schema/SchemaStoreImpl.java | 347 +++++++++++++++++ .../apache/streams/util/schema/SchemaUtil.java | 49 +++ .../org/apache/streams/util/schema/URIUtil.java | 30 ++ .../util/schema/test/SchemaOrderingTest.java | 150 ++++++++ .../util/schema/test/SchemaStoreTest.java | 71 ++++ .../src/test/resources/activities/accept.json | 16 + .../src/test/resources/activities/access.json | 17 + .../test/resources/activities/acknowledge.json | 16 + .../src/test/resources/activities/add.json | 21 ++ .../src/test/resources/activities/agree.json | 15 + .../src/test/resources/activities/append.json | 16 + .../src/test/resources/activities/approve.json | 20 + .../src/test/resources/activities/archive.json | 15 + .../src/test/resources/activities/assign.json | 20 + .../src/test/resources/activities/at.json | 15 + .../src/test/resources/activities/attach.json | 20 + .../src/test/resources/activities/attend.json | 15 + .../src/test/resources/activities/author.json | 15 + .../test/resources/activities/authorize.json | 23 ++ .../src/test/resources/activities/borrow.json | 21 ++ .../src/test/resources/activities/build.json | 16 + .../src/test/resources/activities/cancel.json | 16 + .../src/test/resources/activities/checkin.json | 16 + .../src/test/resources/activities/close.json | 16 + .../src/test/resources/activities/complete.json | 16 + .../src/test/resources/activities/confirm.json | 17 + .../src/test/resources/activities/consume.json | 16 + .../src/test/resources/activities/create.json | 15 + .../src/test/resources/activities/delete.json | 16 + .../src/test/resources/activities/deliver.json | 20 + .../src/test/resources/activities/deny.json | 23 ++ .../src/test/resources/activities/disagree.json | 30 ++ .../src/test/resources/activities/dislike.json | 15 + .../test/resources/activities/experience.json | 16 + .../src/test/resources/activities/favorite.json | 15 + .../src/test/resources/activities/find.json | 19 + .../activities/flag-as-inappropriate.json | 24 ++ .../src/test/resources/activities/follow.json | 15 + .../src/test/resources/activities/give.json | 28 ++ .../src/test/resources/activities/host.json | 15 + .../src/test/resources/activities/ignore.json | 15 + .../src/test/resources/activities/insert.json | 19 + .../src/test/resources/activities/install.json | 18 + .../src/test/resources/activities/interact.json | 16 + .../src/test/resources/activities/invite.json | 19 + .../src/test/resources/activities/join.json | 15 + .../src/test/resources/activities/leave.json | 15 + .../src/test/resources/activities/like.json | 22 ++ .../src/test/resources/activities/listen.json | 15 + .../src/test/resources/activities/lose.json | 15 + .../test/resources/activities/make-friend.json | 15 + .../src/test/resources/activities/open.json | 15 + .../src/test/resources/activities/play.json | 15 + .../src/test/resources/activities/post.json | 25 ++ .../src/test/resources/activities/present.json | 15 + .../src/test/resources/activities/purchase.json | 16 + .../src/test/resources/activities/qualify.json | 15 + .../src/test/resources/activities/read.json | 16 + .../src/test/resources/activities/receive.json | 16 + .../src/test/resources/activities/reject.json | 15 + .../resources/activities/remove-friend.json | 15 + .../src/test/resources/activities/remove.json | 23 ++ .../src/test/resources/activities/replace.json | 19 + .../resources/activities/request-friend.json | 16 + .../src/test/resources/activities/request.json | 23 ++ .../src/test/resources/activities/resolve.json | 15 + .../src/test/resources/activities/retract.json | 26 ++ .../src/test/resources/activities/return.json | 19 + .../test/resources/activities/rsvp-maybe.json | 16 + .../src/test/resources/activities/rsvp-no.json | 16 + .../src/test/resources/activities/rsvp-yes.json | 16 + .../src/test/resources/activities/satisfy.json | 21 ++ .../src/test/resources/activities/save.json | 20 + .../src/test/resources/activities/schedule.json | 15 + .../src/test/resources/activities/search.json | 21 ++ .../src/test/resources/activities/sell.json | 19 + .../src/test/resources/activities/send.json | 19 + .../src/test/resources/activities/share.json | 16 + .../src/test/resources/activities/sponsor.json | 17 + .../src/test/resources/activities/start.json | 15 + .../resources/activities/stop-following.json | 15 + .../src/test/resources/activities/submit.json | 15 + .../src/test/resources/activities/tag.json | 19 + .../test/resources/activities/terminate.json | 15 + .../src/test/resources/activities/tie.json | 24 ++ .../test/resources/activities/unfavorite.json | 15 + .../src/test/resources/activities/unlike.json | 15 + .../test/resources/activities/unsatisfy.json | 20 + .../src/test/resources/activities/unsave.json | 15 + .../src/test/resources/activities/unshare.json | 15 + .../src/test/resources/activities/update.json | 15 + .../src/test/resources/activities/use.json | 15 + .../src/test/resources/activities/watch.json | 16 + .../src/test/resources/activities/win.json | 15 + streams-util/src/test/resources/media_link.json | 7 + .../src/test/resources/objects/event.json | 18 + .../src/test/resources/objects/group.json | 16 + .../src/test/resources/objects/issue.json | 9 + .../src/test/resources/objects/note.json | 12 + .../src/test/resources/objects/permission.json | 9 + .../src/test/resources/objects/place.json | 9 + .../src/test/resources/objects/task.json | 16 + .../src/test/resources/objects/video.json | 8 + streams-verbs/pom.xml | 2 +- 583 files changed, 7345 insertions(+), 7473 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-components/streams-converters/pom.xml ---------------------------------------------------------------------- diff --git a/streams-components/streams-converters/pom.xml b/streams-components/streams-converters/pom.xml index 5615027..c0d6551 100644 --- a/streams-components/streams-converters/pom.xml +++ b/streams-components/streams-converters/pom.xml @@ -128,7 +128,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.converter</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-components/streams-http/pom.xml ---------------------------------------------------------------------- diff --git a/streams-components/streams-http/pom.xml b/streams-components/streams-http/pom.xml index 486698e..88cc88e 100644 --- a/streams-components/streams-http/pom.xml +++ b/streams-components/streams-http/pom.xml @@ -163,7 +163,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.http</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml index 9d26cb5..4561514 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml +++ b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml @@ -104,7 +104,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.amazon.kinesis.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml b/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml index 7d44a1e..9ad983d 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml +++ b/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml @@ -114,9 +114,9 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/s3/S3Configuration.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/s3/S3WriterConfiguration.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/s3/S3ReaderConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/s3/S3Configuration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/s3/S3WriterConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/s3/S3ReaderConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.s3.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-persist-cassandra/src/site/resources/META_INF/spring/streams-cassandra-context.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-cassandra/src/site/resources/META_INF/spring/streams-cassandra-context.xml b/streams-contrib/streams-persist-cassandra/src/site/resources/META_INF/spring/streams-cassandra-context.xml deleted file mode 100644 index 842c918..0000000 --- a/streams-contrib/streams-persist-cassandra/src/site/resources/META_INF/spring/streams-cassandra-context.xml +++ /dev/null @@ -1,25 +0,0 @@ -<!-- - ~ 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. - --> -<beans - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://www.springframework.org/schema/beans" - xmlns:context="http://www.springframework.org/schema/context" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> - -</beans> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-persist-elasticsearch/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-elasticsearch/pom.xml b/streams-contrib/streams-persist-elasticsearch/pom.xml index d65b5f6..2f146a9 100644 --- a/streams-contrib/streams-persist-elasticsearch/pom.xml +++ b/streams-contrib/streams-persist-elasticsearch/pom.xml @@ -202,9 +202,9 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchConfiguration.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchReaderConfiguration.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchWriterConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchReaderConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchWriterConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.elasticsearch.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-persist-filebuffer/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-filebuffer/pom.xml b/streams-contrib/streams-persist-filebuffer/pom.xml index fb9532c..5c26f2c 100644 --- a/streams-contrib/streams-persist-filebuffer/pom.xml +++ b/streams-contrib/streams-persist-filebuffer/pom.xml @@ -127,7 +127,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.file.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-persist-graph/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-graph/pom.xml b/streams-contrib/streams-persist-graph/pom.xml index d28dfad..79cef1b 100644 --- a/streams-contrib/streams-persist-graph/pom.xml +++ b/streams-contrib/streams-persist-graph/pom.xml @@ -134,7 +134,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.graph.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-persist-hbase/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-hbase/pom.xml b/streams-contrib/streams-persist-hbase/pom.xml index 6d68bc7..46912e1 100644 --- a/streams-contrib/streams-persist-hbase/pom.xml +++ b/streams-contrib/streams-persist-hbase/pom.xml @@ -131,7 +131,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/hbase/HbaseConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/hbase/HbaseConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.hbase.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-persist-hdfs/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-hdfs/pom.xml b/streams-contrib/streams-persist-hdfs/pom.xml index 73f6730..303a728 100644 --- a/streams-contrib/streams-persist-hdfs/pom.xml +++ b/streams-contrib/streams-persist-hdfs/pom.xml @@ -186,7 +186,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.hdfs.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-persist-kafka/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-kafka/pom.xml b/streams-contrib/streams-persist-kafka/pom.xml index a9d25a7..e33ea2a 100644 --- a/streams-contrib/streams-persist-kafka/pom.xml +++ b/streams-contrib/streams-persist-kafka/pom.xml @@ -147,7 +147,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/kafka/KafkaConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/kafka/KafkaConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.kafka.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-persist-mongo/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-mongo/pom.xml b/streams-contrib/streams-persist-mongo/pom.xml index c20aa96..e4f6614 100644 --- a/streams-contrib/streams-persist-mongo/pom.xml +++ b/streams-contrib/streams-persist-mongo/pom.xml @@ -133,7 +133,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/mongo/MongoConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/mongo/MongoConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.mongo.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-processor-lucene/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-processor-lucene/pom.xml b/streams-contrib/streams-processor-lucene/pom.xml index d342394..d8dba13 100644 --- a/streams-contrib/streams-processor-lucene/pom.xml +++ b/streams-contrib/streams-processor-lucene/pom.xml @@ -143,7 +143,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/lucene/LuceneTaggerConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/lucene/LuceneTaggerConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.lucene</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-processor-peoplepattern/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-processor-peoplepattern/pom.xml b/streams-contrib/streams-processor-peoplepattern/pom.xml index 4e592de..1b75504 100644 --- a/streams-contrib/streams-processor-peoplepattern/pom.xml +++ b/streams-contrib/streams-processor-peoplepattern/pom.xml @@ -125,7 +125,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/peoplepattern</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/peoplepattern</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.peoplepattern</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-processor-tika/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-processor-tika/pom.xml b/streams-contrib/streams-processor-tika/pom.xml index dfe7879..9969e29 100644 --- a/streams-contrib/streams-processor-tika/pom.xml +++ b/streams-contrib/streams-processor-tika/pom.xml @@ -142,7 +142,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/tika/LinkDetails.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/tika/LinkDetails.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.tika</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-processor-urls/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-processor-urls/pom.xml b/streams-contrib/streams-processor-urls/pom.xml index 79a0b51..3256af6 100644 --- a/streams-contrib/streams-processor-urls/pom.xml +++ b/streams-contrib/streams-processor-urls/pom.xml @@ -142,7 +142,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/urls/LinkDetails.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/urls/LinkDetails.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.urls</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-datasift/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-datasift/pom.xml b/streams-contrib/streams-provider-datasift/pom.xml index ee76b08..b08828c 100644 --- a/streams-contrib/streams-provider-datasift/pom.xml +++ b/streams-contrib/streams-provider-datasift/pom.xml @@ -190,7 +190,7 @@ <configuration> <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> - <sourceDirectory>src/main/jsonschema</sourceDirectory> + <sourceDirectory>${project.basedir}/src/main/jsonschema</sourceDirectory> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.datasift</targetPackage> <useLongIntegers>true</useLongIntegers> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-facebook/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-facebook/pom.xml b/streams-contrib/streams-provider-facebook/pom.xml index 96c6d30..7b23e29 100644 --- a/streams-contrib/streams-provider-facebook/pom.xml +++ b/streams-contrib/streams-provider-facebook/pom.xml @@ -147,11 +147,11 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/org/apache/streams/facebook/FacebookConfiguration.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/facebook/FacebookUserInformationConfiguration.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/facebook/FacebookUserstreamConfiguration.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/facebook/graph/Post.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/facebook/Page.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/facebook/FacebookConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/facebook/FacebookUserInformationConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/facebook/FacebookUserstreamConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/facebook/graph/Post.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/facebook/Page.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>com.facebook</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-gnip/gnip-edc-instagram/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-gnip/gnip-edc-instagram/pom.xml b/streams-contrib/streams-provider-gnip/gnip-edc-instagram/pom.xml index 8d643c3..2b1c586 100644 --- a/streams-contrib/streams-provider-gnip/gnip-edc-instagram/pom.xml +++ b/streams-contrib/streams-provider-gnip/gnip-edc-instagram/pom.xml @@ -95,7 +95,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/com/instagram/Instagram.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/instagram/Instagram.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>com.instagram</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-gnip/gnip-powertrack/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-gnip/gnip-powertrack/pom.xml b/streams-contrib/streams-provider-gnip/gnip-powertrack/pom.xml index d318f0f..e7ffa80 100644 --- a/streams-contrib/streams-provider-gnip/gnip-powertrack/pom.xml +++ b/streams-contrib/streams-provider-gnip/gnip-powertrack/pom.xml @@ -123,7 +123,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/com/gnip/Gnip.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/gnip/Gnip.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>com.gnip</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-google/google-gmail/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-google/google-gmail/pom.xml b/streams-contrib/streams-provider-google/google-gmail/pom.xml index 5faebc6..0140c7f 100644 --- a/streams-contrib/streams-provider-google/google-gmail/pom.xml +++ b/streams-contrib/streams-provider-google/google-gmail/pom.xml @@ -152,7 +152,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/com/google/gmail</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/google/gmail</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.google.gmail.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-google/google-gplus/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-google/google-gplus/pom.xml b/streams-contrib/streams-provider-google/google-gplus/pom.xml index 737d0ff..0659b35 100644 --- a/streams-contrib/streams-provider-google/google-gplus/pom.xml +++ b/streams-contrib/streams-provider-google/google-gplus/pom.xml @@ -196,7 +196,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/com/google/gplus/GPlusConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/google/gplus/GPlusConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.google.gplus.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-instagram/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-instagram/pom.xml b/streams-contrib/streams-provider-instagram/pom.xml index a4b1e32..14874bf 100644 --- a/streams-contrib/streams-provider-instagram/pom.xml +++ b/streams-contrib/streams-provider-instagram/pom.xml @@ -157,8 +157,8 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/com/instagram/InstagramConfiguration.json</sourcePath> - <sourcePath>src/main/jsonschema/com/instagram/InstagramUserInformationConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/instagram/InstagramConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/instagram/InstagramUserInformationConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.instagram.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-moreover/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-moreover/pom.xml b/streams-contrib/streams-provider-moreover/pom.xml index fe16f7c..6203e2f 100644 --- a/streams-contrib/streams-provider-moreover/pom.xml +++ b/streams-contrib/streams-provider-moreover/pom.xml @@ -143,8 +143,8 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/com/moreover/Moreover.json</sourcePath> - <sourcePath>src/main/jsonschema/com/moreover/MoreoverConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/moreover/Moreover.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/moreover/MoreoverConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>com.moreover</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-rss/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-rss/pom.xml b/streams-contrib/streams-provider-rss/pom.xml index 97cf456..a9bfa45 100644 --- a/streams-contrib/streams-provider-rss/pom.xml +++ b/streams-contrib/streams-provider-rss/pom.xml @@ -163,7 +163,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/RssStreamConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/RssStreamConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.rss.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-sysomos/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-sysomos/pom.xml b/streams-contrib/streams-provider-sysomos/pom.xml index c27af30..1637ba2 100644 --- a/streams-contrib/streams-provider-sysomos/pom.xml +++ b/streams-contrib/streams-provider-sysomos/pom.xml @@ -139,8 +139,8 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/com/sysomos/Sysomos.json</sourcePath> - <sourcePath>src/main/jsonschema/com/sysomos/SysomosConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/sysomos/Sysomos.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/sysomos/SysomosConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>com.sysomos</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-twitter/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-twitter/pom.xml b/streams-contrib/streams-provider-twitter/pom.xml index c8d35ab..f8c02b0 100644 --- a/streams-contrib/streams-provider-twitter/pom.xml +++ b/streams-contrib/streams-provider-twitter/pom.xml @@ -163,7 +163,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.twitter.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-contrib/streams-provider-youtube/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-provider-youtube/pom.xml b/streams-contrib/streams-provider-youtube/pom.xml index 141e0aa..b51fdb9 100644 --- a/streams-contrib/streams-provider-youtube/pom.xml +++ b/streams-contrib/streams-provider-youtube/pom.xml @@ -151,7 +151,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema/com/youtube/YoutubeConfiguration.json</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema/com/youtube/YoutubeConfiguration.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.youtube.pojo</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-monitoring/pom.xml ---------------------------------------------------------------------- diff --git a/streams-monitoring/pom.xml b/streams-monitoring/pom.xml index 5fb6a5a..768cd15 100644 --- a/streams-monitoring/pom.xml +++ b/streams-monitoring/pom.xml @@ -99,7 +99,7 @@ <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> <sourcePaths> - <sourcePath>src/main/jsonschema</sourcePath> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.pojo.json</targetPackage> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/pom.xml ---------------------------------------------------------------------- diff --git a/streams-plugins/streams-plugin-cassandra/pom.xml b/streams-plugins/streams-plugin-cassandra/pom.xml index b2dbf36..d9d3f91 100644 --- a/streams-plugins/streams-plugin-cassandra/pom.xml +++ b/streams-plugins/streams-plugin-cassandra/pom.xml @@ -54,10 +54,17 @@ </dependency> <dependency> <groupId>org.apache.streams</groupId> - <artifactId>streams-schemas</artifactId> + <artifactId>streams-util</artifactId> <version>${project.version}</version> </dependency> <dependency> + <groupId>org.apache.streams</groupId> + <artifactId>streams-schema-activitystreams</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> @@ -230,9 +237,9 @@ </goals> <configuration> <includeGroupIds>org.apache.streams</includeGroupIds> - <includeArtifactIds>streams-schemas</includeArtifactIds> + <includeArtifactIds>streams-schema-activitystreams</includeArtifactIds> <includes>**/*.json</includes> - <outputDirectory>${project.build.directory}/test-classes/streams-schemas</outputDirectory> + <outputDirectory>${project.build.directory}/test-classes/streams-schema-activitystreams</outputDirectory> </configuration> </execution> </executions> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java ---------------------------------------------------------------------- diff --git a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java index 28e20e4..1950796 100644 --- a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java +++ b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java @@ -1,6 +1,6 @@ package org.apache.streams.plugins.cassandra; -import org.apache.streams.schema.GenerationConfig; +import org.apache.streams.util.schema.GenerationConfig; import org.jsonschema2pojo.DefaultGenerationConfig; import org.jsonschema2pojo.util.URLUtil; http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java ---------------------------------------------------------------------- diff --git a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java index 787ae02..7889bdc 100644 --- a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java +++ b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java @@ -7,12 +7,12 @@ import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.common.collect.Lists; -import org.apache.streams.schema.FieldType; -import org.apache.streams.schema.FieldUtil; -import org.apache.streams.schema.GenerationConfig; -import org.apache.streams.schema.Schema; -import org.apache.streams.schema.SchemaStore; -import org.apache.streams.schema.URIUtil; +import org.apache.streams.util.schema.FieldType; +import org.apache.streams.util.schema.FieldUtil; +import org.apache.streams.util.schema.GenerationConfig; +import org.apache.streams.util.schema.Schema; +import org.apache.streams.util.schema.SchemaStore; +import org.apache.streams.util.schema.SchemaStoreImpl; import org.jsonschema2pojo.util.URLUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -27,11 +27,10 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkNotNull; import static org.apache.commons.lang3.StringUtils.defaultString; -import static org.apache.streams.schema.FileUtil.dropExtension; -import static org.apache.streams.schema.FileUtil.dropSourcePathPrefix; -import static org.apache.streams.schema.FileUtil.resolveRecursive; -import static org.apache.streams.schema.FileUtil.swapExtension; -import static org.apache.streams.schema.FileUtil.writeFile; +import static org.apache.streams.util.schema.FileUtil.dropExtension; +import static org.apache.streams.util.schema.FileUtil.dropSourcePathPrefix; +import static org.apache.streams.util.schema.FileUtil.resolveRecursive; +import static org.apache.streams.util.schema.FileUtil.writeFile; /** * Created by sblackmon on 5/3/16. @@ -44,14 +43,14 @@ public class StreamsCassandraResourceGenerator implements Runnable { private StreamsCassandraGenerationConfig config; - private SchemaStore schemaStore = new SchemaStore(); + private SchemaStore schemaStore = new SchemaStoreImpl(); private int currentDepth = 0; public static void main(String[] args) { StreamsCassandraGenerationConfig config = new StreamsCassandraGenerationConfig(); - String sourceDirectory = "./target/test-classes/activities"; + String sourceDirectory = "./src/main/jsonschema"; String targetDirectory = "./target/generated-resources/cassandra"; if( args.length > 0 ) @@ -63,16 +62,7 @@ public class StreamsCassandraResourceGenerator implements Runnable { config.setTargetDirectory(targetDirectory); StreamsCassandraResourceGenerator streamsCassandraResourceGenerator = new StreamsCassandraResourceGenerator(config); - Thread thread = new Thread(streamsCassandraResourceGenerator); - thread.start(); - try { - thread.join(); - } catch (InterruptedException e) { - LOGGER.error("InterruptedException", e); - } catch (Exception e) { - LOGGER.error("Exception", e); - } - return; + streamsCassandraResourceGenerator.run(); } public StreamsCassandraResourceGenerator(StreamsCassandraGenerationConfig config) { @@ -122,15 +112,15 @@ public class StreamsCassandraResourceGenerator implements Runnable { resourcePath = dropSourcePathPrefix(resourcePath, sourcePath); } - LOGGER.info("Processing {}:", resourcePath); - String resourceId = schemaSymbol(schema); + LOGGER.info("Processing {}", resourcePath); + String resourceContent = generateResource(schema, resourceId); typesContent.append(resourceContent); - LOGGER.info("Added {}:", resourceId); + LOGGER.info("Added {}", resourceId); } } http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java ---------------------------------------------------------------------- diff --git a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java index 2e9a37f..5cf814d 100644 --- a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java +++ b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java @@ -15,10 +15,10 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.List; -@Mojo( name = "cassandra", +@Mojo( name = "generate-resources", defaultPhase = LifecyclePhase.GENERATE_RESOURCES ) -@Execute( goal = "cassandra", +@Execute( goal = "generate-resources", phase = LifecyclePhase.GENERATE_RESOURCES ) public class StreamsCassandraResourceGeneratorMojo extends AbstractMojo { @@ -30,15 +30,6 @@ public class StreamsCassandraResourceGeneratorMojo extends AbstractMojo { @Component private MavenProject project; -// @Component -// private Settings settings; -// -// @Parameter( defaultValue = "${localRepository}", readonly = true, required = true ) -// protected ArtifactRepository localRepository; -// -// @Parameter( defaultValue = "${plugin}", readonly = true ) // Maven 3 only -// private PluginDescriptor plugin; -// @Parameter( defaultValue = "${project.basedir}", readonly = true ) private File basedir; @@ -65,29 +56,7 @@ public class StreamsCassandraResourceGeneratorMojo extends AbstractMojo { StreamsCassandraResourceGenerator streamsCassandraResourceGenerator = new StreamsCassandraResourceGenerator(config); - Thread.UncaughtExceptionHandler h = new Thread.UncaughtExceptionHandler() { - public void uncaughtException(Thread th, Throwable ex) { - LOGGER.error("Exception", ex); - mojoFailureException = new MojoFailureException("Exception", ex); - } - }; - Thread.setDefaultUncaughtExceptionHandler(h); - Thread thread = new Thread(streamsCassandraResourceGenerator); - thread.setUncaughtExceptionHandler(h); - try { - thread.start(); - thread.join(); - } catch (InterruptedException e) { - LOGGER.error("InterruptedException", e); - } catch (Exception e) { - LOGGER.error("Exception", e); - mojoFailureException = new MojoFailureException("Exception", e); - } - - if( mojoFailureException != null ) - throw mojoFailureException; - - return; + streamsCassandraResourceGenerator.run(); } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md b/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md index d0c2129..0e8ecf3 100644 --- a/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md +++ b/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md @@ -3,17 +3,31 @@ org.apache.streams.plugins:streams-plugin-cassandra streams-plugin-cassandra generates resources from json schemas to assist with indexing of json data using Apache Cassandra. -#### Usage +### Usage + +##### Maven Run within a module containing a src/main/jsonschema directory mvn org.apache.streams.plugins:streams-plugin-cassandra:0.3-incubating-SNAPSHOT:cassandra -Output will be placed in target/generated-resources/cassandra by default +[streams-plugin-cassandra/pom.xml](streams-plugin-cassandra/pom.xml "streams-plugin-cassandra/pom.xml") -#### Example +##### SDK -[streams-plugin-cassandra/pom.xml](streams-plugin-cassandra/pom.xml "streams-plugin-cassandra/pom.xml") +Embed within your own java code + + StreamsCassandraGenerationConfig config = new StreamsCassandraGenerationConfig(); + config.setSourceDirectory("src/main/jsonschema"); + config.setTargetDirectory("target/generated-resources"); + StreamsCassandraResourceGenerator generator = new StreamsCassandraResourceGenerator(config); + generator.run(); + +##### CLI + +Run from CLI without Maven + + java -jar streams-plugin-cassandra-jar-with-dependencies.jar StreamsCassandraResourceGenerator src/main/jsonschema target/generated-resources #### Documentation http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java ---------------------------------------------------------------------- diff --git a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java index 465a326..74c1152 100644 --- a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java +++ b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java @@ -20,10 +20,10 @@ import static org.apache.streams.plugins.cassandra.test.StreamsCassandraResource public class StreamsCassandraResourceGeneratorCLITest { @Test - public void testStreamsHiveResourceGeneratorCLI() throws Exception { + public void testStreamsCassandraResourceGeneratorCLI() throws Exception { - String sourceDirectory = "target/test-classes/streams-schemas"; - String targetDirectory = "target/generated-resources/cassandra-cli"; + String sourceDirectory = "target/test-classes/streams-schema-activitystreams"; + String targetDirectory = "target/generated-resources/test-cli"; List<String> argsList = Lists.newArrayList(sourceDirectory, targetDirectory); StreamsCassandraResourceGenerator.main(argsList.toArray(new String[0])); @@ -39,7 +39,9 @@ public class StreamsCassandraResourceGeneratorCLITest { Collection<File> outputCollection = Lists.newArrayList(outputIterator); assert( outputCollection.size() == 1 ); - Path path = Paths.get("types.cql"); + Path path = Paths.get(testOutput.getAbsolutePath()).resolve("types.cql"); + + assert( path.toFile().exists() ); String typesCqlBytes = new String( java.nio.file.Files.readAllBytes(path)); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java ---------------------------------------------------------------------- diff --git a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java index aad069f..ee0ce99 100644 --- a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java +++ b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java @@ -52,7 +52,9 @@ public class StreamsCassandraResourceGeneratorMojoTest extends TestCase { verifier.resetStreams(); - File testOutput = new File( "./target/generated-resources/test-mojo"); + Path testOutputPath = Paths.get(testDir.getAbsolutePath()).resolve("target/generated-resources/test-mojo"); + + File testOutput = testOutputPath.toFile(); assert( testOutput != null ); assert( testOutput.exists() == true ); @@ -63,13 +65,14 @@ public class StreamsCassandraResourceGeneratorMojoTest extends TestCase { Collection<File> outputCollection = Lists.newArrayList(outputIterator); assert( outputCollection.size() == 1 ); - Path path = Paths.get("./target/generated-sources/test/types.cql"); + Path path = testOutputPath.resolve("types.cql"); + + assert( path.toFile().exists() ); String typesCqlBytes = new String( java.nio.file.Files.readAllBytes(path)); assert( StringUtils.countMatches(typesCqlBytes, "CREATE TYPE") == 133 ); - assert( !typesCqlBytes.contains("IDK")); } } \ No newline at end of file