Skip to content

Commit

Permalink
Blueprints oscar release.
Browse files Browse the repository at this point in the history
  • Loading branch information
okram committed Apr 4, 2011
1 parent 8b6096a commit e6e7963
Show file tree
Hide file tree
Showing 37 changed files with 1,306 additions and 37 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.textile
Expand Up @@ -24,10 +24,12 @@ h3. Version 0.6 (Oscar -- April 4, 2011)
```

* Refactored to create a Maven multiproject with one module per major Blueprints component
* Added @DexGraph@ implementation (Sparsity Technologies)
* Added @DexGraph@ implementation ("Sparsity Technologies":http://www.sparsity-technologies.com/)
* Bumped to OrientDB 1.0rc1-SNAPSHOT
* Bumped to Neo4j 1.3M05
* Fixed equals() and hashCode() bug in @ReadOnlyGraph@
* Bumped to supporting JUNG 2.0.1
* Added @Index.count()@ method to Blueprints core API.

==<hr/>==

Expand Down
4 changes: 2 additions & 2 deletions blueprints-core/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<url>http://blueprints.tinkerpop.com</url>
<name>Blueprints-Core</name>
Expand Down
8 changes: 4 additions & 4 deletions blueprints-dex-graph/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-dex-graph</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<name>Blueprints-DexGraph</name>
<description>Blueprints property graph implementation for the DEX graph database</description>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</dependency>
<!-- GRAPHDB SUPPORT -->
<dependency>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-test</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
8 changes: 4 additions & 4 deletions blueprints-graph-jung/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-graph-jung</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<name>Blueprints-GraphJung</name>
<description>JUNG (Java Universal Network/Graph Framework) utility for Blueprints property graphs</description>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</dependency>
<!-- JUNG SUPPORT -->
<dependency>
Expand All @@ -42,7 +42,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-test</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
12 changes: 6 additions & 6 deletions blueprints-graph-sail/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-graph-sail</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<name>Blueprints-GraphSail</name>
<description>Sesame Sail implementation for Blueprints property graphs</description>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</dependency>
<!-- SESAME SUPPORT -->
<dependency>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-test</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -55,13 +55,13 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-orient-graph</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-neo4j-graph</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
8 changes: 4 additions & 4 deletions blueprints-neo4j-graph/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-neo4j-graph</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<name>Blueprints-Neo4jGraph</name>
<description>Blueprints property graph implementation for the Neo4j graph database</description>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</dependency>
<!-- GRAPHDB SUPPORT -->
<dependency>
Expand All @@ -32,7 +32,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-test</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
8 changes: 4 additions & 4 deletions blueprints-orient-graph/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-orient-graph</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<name>Blueprints-OrientGraph</name>
<description>Blueprints property graph implementation for the OrientDB graph database</description>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</dependency>
<!-- GRAPHDB SUPPORT -->
<dependency>
Expand All @@ -37,7 +37,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-test</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
8 changes: 4 additions & 4 deletions blueprints-rexster-graph/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-rexster-graph</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<name>Blueprints-RexsterGraph</name>
<description>Blueprints property graph implementation for Rexster</description>
Expand All @@ -19,13 +19,13 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</dependency>
<!-- TESTING -->
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-test</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
8 changes: 4 additions & 4 deletions blueprints-sail-graph/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-sail-graph</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<name>Blueprints-SailGraph</name>
<description>Blueprints property graph implementation for Sesame Sail</description>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</dependency>
<!-- SESAME SUPPORT -->
<dependency>
Expand Down Expand Up @@ -60,7 +60,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-test</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions blueprints-test/pom.xml
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</parent>
<artifactId>blueprints-test</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
<packaging>jar</packaging>
<name>Blueprints-Test</name>
<description>Reusable test suites for Blueprints</description>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>0.6-SNAPSHOT</version>
<version>0.6</version>
</dependency>
<!-- TESTING -->
<dependency>
Expand Down
8 changes: 8 additions & 0 deletions doc/wiki/Acknowledgments.textile
@@ -0,0 +1,8 @@
This section provides a list of the people that have contributed in some way to the creation of Blueprints.

# "Marko A. Rodriguez":http://markorodriguez.com -- designed, developed, tested, and documented Blueprints.
# "Luca Garulli":http://orientechnologies.com -- developed the OrientDB implementation.
# "Joshua Shinavier":http://fortytwo.net -- developed Blueprints Sail (@GraphSail@).
# "Darrick Weibe":http://github.com/pangloss -- tests, bug fixes, and transaction work.

Please review Blueprints' "pom.xml":http://github.com/tinkerpop/blueprints/blob/master/pom.xml. Blueprints would not be possible without the work done by others to create these useful packages.
93 changes: 93 additions & 0 deletions doc/wiki/Code-Examples.textile
@@ -0,0 +1,93 @@
This section will provide a collection of code examples that work with the Blueprints graph API. The in-memory [[TinkerGraph]] database will be used throughout the examples. Please feel free to alter the graph constructor to work with different graph databases. These code examples can be found in the main Blueprints distribution "at this location":https://github.com/tinkerpop/blueprints/blob/master/blueprints-test/src/test/java/com/tinkerpop/blueprints/pgm/impls/tg/CodeExamples.java.

# "Create a Simple Graph":#create
# "Iterate through the Elements of a Graph":#elements
# "Iterate through the Edges of a Vertex":#edge
# "Use Indices to Get a Vertex by its Property":#index

h2(#create). Create a Simple Graph

Create a graph. Add two vertices. Set the @name@ property of each vertex. Create an @knows@ edge between the two vertices. Print the components of the graph.

```java
Graph graph = new TinkerGraph();
Vertex a = graph.addVertex(null);
Vertex b = graph.addVertex(null);
a.setProperty("name", "marko");
b.setProperty("name", "peter");
Edge e = graph.addEdge(null, a, b, "knows");
System.out.println(e.getOutVertex().getProperty("name") + "--" + e.getLabel() + "-->" + e.getInVertex().getProperty("name"));
```

The @System.out@ after the code executes is:

bc. marko--knows-->peter

h2(#elements). Iterate through the Elements of a Graph

Load the TinkerPop play graph diagrammed in [[Property Graph Model]]. Iterate through all the vertices and print them to @System.out@. Iterate through all the edges and print them to @System.out@.

```java
public void testIteratingGraph() {
Graph graph = TinkerGraphFactory.createTinkerGraph();
System.out.println("Vertices of " + graph);
for (Vertex vertex : graph.getVertices()) {
System.out.println(vertex);
}
System.out.println("Edges of " + graph);
for (Edge edge : graph.getEdges()) {
System.out.println(edge);
}
}
```

The @System.out@ after the code executes is:

bc. Vertices of tinkergraph[vertices:6 edges:6]
v[3]
v[2]
v[1]
v[6]
v[5]
v[4]
Edges of tinkergraph[vertices:6 edges:6]
e[10][4-created->5]
e[7][1-knows->2]
e[9][1-created->3]
e[8][1-knows->4]
e[11][4-created->3]
e[12][6-created->3]

h2(#edge). Iterate through the Edges of a Vertex

Load the TinkerPop play graph diagrammed in [[Property Graph Model]]. Get vertex @1@ from the graph by its @id@. Print some information about the vertex. Iterate through the outgoing edges of the vertex and print the edges.

```java
Graph graph = TinkerGraphFactory.createTinkerGraph();
Vertex a = graph.getVertex("1");
System.out.println("vertex " + a.getId() + " has name " + a.getProperty("name"));
for(Edge e : a.getOutEdges()) {
System.out.println(e);
}
```

The @System.out@ after the code executes is:

bc. vertex 1 has name marko
e[7][1-knows->2]
e[9][1-created->3]
e[8][1-knows->4]

h2(#index). Use Indices to Get a Vertex by its Property

Load the TinkerPop play graph diagrammed in [[Property Graph Model]]. [[TinkerGraph]] implements the @IndexableGraph@ interface. Get the standard vertex index and then get all vertices named @marko@. Given that there is only one, we can simple next the first vertex out of the returned iterable. Print some information about the vertex.

```java
Graph graph = TinkerGraphFactory.createTinkerGraph();
Vertex a = ((IndexableGraph)graph).getIndex(Index.VERTICES, Vertex.class).get("name", "marko").iterator().next();
System.out.println("vertex " + a.getId() + " has age " + a.getProperty("age"));
```

The @System.out@ after the code executes is:

bc. vertex 1 has age 29

0 comments on commit e6e7963

Please sign in to comment.