Repository: incubator-streams Updated Branches: refs/heads/blueprints [created] 2d61837df
blueprints, first commit Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/4217ac49 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/4217ac49 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/4217ac49 Branch: refs/heads/blueprints Commit: 4217ac499570b72b61178f5b144886d4fa1be4c8 Parents: eec3aa9 Author: sblackmon <[email protected]> Authored: Fri Oct 24 12:02:10 2014 -0500 Committer: sblackmon <[email protected]> Committed: Fri Oct 24 12:02:10 2014 -0500 ---------------------------------------------------------------------- .../streams-persist-blueprints/README.md | 16 ++++ .../streams-persist-blueprints/pom.xml | 95 ++++++++++++++++++++ .../BlueprintsEdgeWriterConfiguration.json | 24 +++++ .../BlueprintsVertexWriterConfiguration.json | 23 +++++ .../BlueprintsWriterConfiguration.json | 28 ++++++ streams-pojo/pom.xml | 36 -------- 6 files changed, 186 insertions(+), 36 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4217ac49/streams-contrib/streams-persist-blueprints/README.md ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-blueprints/README.md b/streams-contrib/streams-persist-blueprints/README.md new file mode 100644 index 0000000..57d18c7 --- /dev/null +++ b/streams-contrib/streams-persist-blueprints/README.md @@ -0,0 +1,16 @@ +streams-persist-mongo +===================== + +Read and write to MongoDB + +Example configuration: + + { + "mongo": { + "host": "localhost", + "port": 27017, + "db": "local", + "collection": "startup_log" + } + } + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4217ac49/streams-contrib/streams-persist-blueprints/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-blueprints/pom.xml b/streams-contrib/streams-persist-blueprints/pom.xml new file mode 100644 index 0000000..aae9183 --- /dev/null +++ b/streams-contrib/streams-persist-blueprints/pom.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>streams-contrib</artifactId> + <groupId>org.apache.streams</groupId> + <version>0.1-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>streams-persist-mongo</artifactId> + + <properties> + <mongo-driver.version>2.12.0-rc0</mongo-driver.version> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.streams</groupId> + <artifactId>streams-config</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.streams</groupId> + <artifactId>streams-core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.streams</groupId> + <artifactId>streams-pojo</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.streams</groupId> + <artifactId>streams-util</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.mongodb</groupId> + <artifactId>mongo-java-driver</artifactId> + <version>${mongo-driver.version}</version> + <exclusions> + <exclusion> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <build> + <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-source</goal> + </goals> + <configuration> + <sources> + <source>target/generated-sources/jsonschema2pojo</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.jsonschema2pojo</groupId> + <artifactId>jsonschema2pojo-maven-plugin</artifactId> + <configuration> + <addCompileSourceRoot>true</addCompileSourceRoot> + <generateBuilders>true</generateBuilders> + <sourcePaths> + <sourcePath>src/main/jsonschema/org/apache/streams/mongo/MongoConfiguration.json</sourcePath> + </sourcePaths> + <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> + <targetPackage>org.apache.streams.mongo.pojo</targetPackage> + <useLongIntegers>true</useLongIntegers> + <useJodaDates>true</useJodaDates> + </configuration> + <executions> + <execution> + <goals> + <goal>generate</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/4217ac49/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsEdgeWriterConfiguration.json ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsEdgeWriterConfiguration.json b/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsEdgeWriterConfiguration.json new file mode 100644 index 0000000..0061868 --- /dev/null +++ b/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsEdgeWriterConfiguration.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "$schema": "http://json-schema.org/draft-03/schema", + "id": "#", + "javaType" : "org.apache.streams.blueprints.BlueprintsVertexWriterConfiguration", + "extends": {"$ref":"BlueprintsWriterConfiguration.json"}, + "javaInterfaces": ["java.io.Serializable"], + "properties": { + "verbs": { + "type": "array", + "required": false, + "items": { + "type": "string" + } + }, + "objectTypes": { + "type": "array", + "required": false, + "items": { + "type": "string" + } + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4217ac49/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsVertexWriterConfiguration.json ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsVertexWriterConfiguration.json b/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsVertexWriterConfiguration.json new file mode 100644 index 0000000..441d4ba --- /dev/null +++ b/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsVertexWriterConfiguration.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "$schema": "http://json-schema.org/draft-03/schema", + "id": "#", + "javaType" : "org.apache.streams.blueprints.BlueprintsVertexWriterConfiguration", + "javaInterfaces": ["java.io.Serializable"], + "properties": { + "verbs": { + "type": "array", + "required": false, + "items": { + "type": "string" + } + }, + "objectTypes": { + "type": "array", + "required": false, + "items": { + "type": "string" + } + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4217ac49/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsWriterConfiguration.json ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsWriterConfiguration.json b/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsWriterConfiguration.json new file mode 100644 index 0000000..0dbd6be --- /dev/null +++ b/streams-contrib/streams-persist-blueprints/src/main/jsonschema/org/apache/streams/blueprints/BlueprintsWriterConfiguration.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "$schema": "http://json-schema.org/draft-03/schema", + "id": "#", + "javaType" : "org.apache.streams.blueprints.BlueprintsWriterConfiguration", + "extends": {"$ref":"BlueprintsConfiguration.json"}, + "javaInterfaces": ["java.io.Serializable"], + "properties": { + "bulk": { + "type": "boolean", + "description": "Index in large or small batches", + "default": "false" + }, + "batchSize": { + "type": "integer", + "description": "Item Count before flush", + "default": 100 + }, + "vertices": { + "type": "object", + "$ref": "./BlueprintsVertexWriterConfiguration.json" + }, + "edges": { + "type": "object", + "$ref": "./BlueprintsEdgeWriterConfiguration.json" + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4217ac49/streams-pojo/pom.xml ---------------------------------------------------------------------- diff --git a/streams-pojo/pom.xml b/streams-pojo/pom.xml index 2fc9a69..d8ba083 100644 --- a/streams-pojo/pom.xml +++ b/streams-pojo/pom.xml @@ -148,42 +148,6 @@ <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/collection.json</sourcePath> <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/media_link.json</sourcePath> <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/object.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/article.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/audio.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/bookmark.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/comment.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/event.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/file.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/folder.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/group.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/list.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/note.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/person.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/photo-album.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/photo.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/place.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/playlist.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/product.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/property.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/review.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/service.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/song.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/status.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/objectTypes/video.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/favorite.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/follow.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/join.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/like.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/make-friend.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/play.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/post.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/rsvp-maybe.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/rsvp-no.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/rsvp-yes.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/save.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/share.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/tag.json</sourcePath> - <sourcePath>src/main/jsonschema/org/apache/streams/pojo/json/verbs/update.json</sourcePath> </sourcePaths> <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> <targetPackage>org.apache.streams.pojo.json</targetPackage>
