Permalink
Browse files

Blueprints 1.0 release commit.

  • Loading branch information...
1 parent 880d432 commit 3a26e8ba36f2ca1dfec1554397ff5824d25b6d2e @okram okram committed Sep 18, 2011
Showing with 2,010 additions and 27 deletions.
  1. +2 −2 blueprints-core/pom.xml
  2. +2 −2 blueprints-dex-graph/pom.xml
  3. +2 −2 blueprints-graph-jung/pom.xml
  4. +2 −2 blueprints-graph-sail/pom.xml
  5. +2 −2 blueprints-neo4j-graph/pom.xml
  6. +0 −1 ...rints-neo4j-graph/src/main/java/com/tinkerpop/blueprints/pgm/impls/neo4j/Neo4jAutomaticIndex.java
  7. +0 −1 blueprints-neo4j-graph/src/main/java/com/tinkerpop/blueprints/pgm/impls/neo4j/Neo4jEdge.java
  8. +2 −2 blueprints-neo4jbatch-graph/pom.xml
  9. +0 −1 ...h-graph/src/main/java/com/tinkerpop/blueprints/pgm/impls/neo4jbatch/Neo4jBatchAutomaticIndex.java
  10. +2 −2 blueprints-orient-graph/pom.xml
  11. +2 −2 blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/pgm/impls/orientdb/OrientElement.java
  12. +2 −2 blueprints-rexster-graph/pom.xml
  13. +2 −2 blueprints-sail-graph/pom.xml
  14. +2 −2 blueprints-test/pom.xml
  15. +13 −0 doc/wiki/Acknowledgments.textile
  16. +93 −0 doc/wiki/Code-Examples.textile
  17. +18 −0 doc/wiki/Desired-Implementations.textile
  18. +67 −0 doc/wiki/Dex-Implementation.textile
  19. +53 −0 doc/wiki/Event-Implementation.textile
  20. +15 −0 doc/wiki/Graph-Indices-Helpers.textile
  21. +73 −0 doc/wiki/Graph-Indices.textile
  22. +22 −0 doc/wiki/Graph-Morphisms.textile
  23. +74 −0 doc/wiki/Graph-Transactions.textile
  24. +196 −0 doc/wiki/GraphML-Reader-and-Writer-Library.textile
  25. +88 −0 doc/wiki/Home.textile
  26. +5 −0 doc/wiki/Implementations.textile
  27. +298 −0 doc/wiki/JSON-Reader-and-Writer-Library.textile
  28. +63 −0 doc/wiki/JUNG-Ouplementation.textile
  29. +23 −0 doc/wiki/Neo4j-Implementation.textile
  30. +15 −0 doc/wiki/Neo4jBatch-Implementation.textile
  31. +21 −0 doc/wiki/OrientDB-Implementation.textile
  32. +7 −0 doc/wiki/Ouplementations.textile
  33. +22 −0 doc/wiki/Property-Graph-Implementations.textile
  34. +105 −0 doc/wiki/Property-Graph-Model-Test-Suite.textile
  35. +94 −0 doc/wiki/Property-Graph-Model.textile
  36. +16 −0 doc/wiki/ReadOnly-Implementation.textile
  37. +300 −0 doc/wiki/Release-Notes.textile
  38. +15 −0 doc/wiki/Rexster-Implementation.textile
  39. +75 −0 doc/wiki/Sail-Implementation.textile
  40. +181 −0 doc/wiki/Sail-Ouplementation.textile
  41. +12 −0 doc/wiki/The-Benefits-of-Blueprints.textile
  42. +22 −0 doc/wiki/TinkerGraph.textile
  43. +2 −2 pom.xml
View
@@ -6,11 +6,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-core</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<url>http://blueprints.tinkerpop.com</url>
<name>Blueprints-Core</name>
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-dex-graph</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-DexGraph</name>
<description>Blueprints property graph implementation for the DEX graph database</description>
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-graph-jung</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-GraphJung</name>
<description>Blueprints property graphs outplementation for the JUNG (Java Universal Network/Graph Framework)
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-graph-sail</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-GraphSail</name>
<description>Blueprints property graphs outplementation for Sesame RDS Sail</description>
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-neo4j-graph</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-Neo4jGraph</name>
<description>Blueprints property graph implementation for the Neo4j graph database</description>
@@ -1,7 +1,6 @@
package com.tinkerpop.blueprints.pgm.impls.neo4j;
import com.tinkerpop.blueprints.pgm.AutomaticIndex;
-import com.tinkerpop.blueprints.pgm.TransactionalGraph;
import org.neo4j.graphdb.PropertyContainer;
import java.util.HashSet;
@@ -3,7 +3,6 @@
import com.tinkerpop.blueprints.pgm.AutomaticIndex;
import com.tinkerpop.blueprints.pgm.Edge;
-import com.tinkerpop.blueprints.pgm.TransactionalGraph;
import com.tinkerpop.blueprints.pgm.Vertex;
import com.tinkerpop.blueprints.pgm.impls.StringFactory;
import org.neo4j.graphdb.Relationship;
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-neo4jbatch-graph</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-Neo4jBatchGraph</name>
<description>Blueprints property graph implementation for the Neo4j batch inserter</description>
@@ -2,7 +2,6 @@
import com.tinkerpop.blueprints.pgm.AutomaticIndex;
import com.tinkerpop.blueprints.pgm.Element;
-import com.tinkerpop.blueprints.pgm.Index;
import org.neo4j.graphdb.index.BatchInserterIndex;
import java.util.HashMap;
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-orient-graph</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-OrientGraph</name>
<description>Blueprints property graph implementation for the OrientDB graph database</description>
@@ -29,7 +29,7 @@ public void setProperty(final String key, final Object value) {
if (key.equals(StringFactory.ID) || (key.equals(StringFactory.LABEL) && this instanceof Edge))
throw new RuntimeException(key + StringFactory.PROPERTY_EXCEPTION_MESSAGE);
- this.graph.autoStartTransaction();
+ this.graph.autoStartTransaction();
try {
final Object oldValue = this.getProperty(key);
@@ -65,7 +65,7 @@ public Object removeProperty(final String key) {
return oldValue;
} catch (RuntimeException e) {
- this.graph.autoStopTransaction(TransactionalGraph.Conclusion.FAILURE);
+ this.graph.autoStopTransaction(TransactionalGraph.Conclusion.FAILURE);
throw e;
} catch (Exception e) {
this.graph.autoStopTransaction(TransactionalGraph.Conclusion.FAILURE);
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-rexster-graph</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-RexsterGraph</name>
<description>Blueprints property graph implementation for Rexster</description>
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-sail-graph</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-SailGraph</name>
<description>Blueprints property graph implementation for Sesame RDF Sail</description>
View
@@ -5,11 +5,11 @@
<parent>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>blueprints-test</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>jar</packaging>
<name>Blueprints-Test</name>
<description>Reusable test suites for Blueprints</description>
@@ -0,0 +1,13 @@
+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 implementatio (@OrientGraph@).
+# "Joshua Shinavier":http://fortytwo.net -- developed Blueprints Sail (@GraphSail@).
+# "Darrick Weibe":http://github.com/pangloss -- tests, bug fixes, and transaction work.
+# "Stephen Mallette":http://stephen.genoprime.com -- develops @RexsterGraph@.
+# "Sergio Gómez Villamor":http://personals.ac.upc.edu/sgomez -- developed the Dex implementation (@DexGraph@).
+# "Pierre De Wilde":http://www.linkedin.com/in/pierredewilde -- designs and tests new features.
+
+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.
+
+<small>YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: <a href="http://www.yourkit.com/java/profiler/index.jsp">YourKit Java Profiler</a> and <a href="http://www.yourkit.com/.net/profiler/index.jsp">YourKit .NET Profiler</a>.</small>
@@ -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,0 +1,18 @@
+!https://github.com/tinkerpop/blueprints/raw/master/doc/images/blueprints-bob-the-builder.png!
+
+It is a time consuming process to maintain Blueprints implementations as graph database/framework versions and features change. Many developers focusing on a particular implementation is an ideal way of ensuring that Blueprints has wide reach and is always consistent with the latest developments. If there is a graph database/framework that is currently not supported by Blueprints and you are an expert with that system, please contribute an implementation. To get a feel of what is required, see [[Property Graph Model]] and [[Property Graph Model Test Suite]].
+
+Below is a list of desired implementations. This list is not intended to be exhaustive. Please feel free to add to the list.
+
+* "db4o":http://developer.db4o.com
+* "Versant Object Database":http://www.versant.com
+* "InfiniteGraph":http://www.infinitegraph.com/ (currently in development)
+* "InfoGrid":http://infogrid.org/
+* "sones":http://www.sones.com/
+* "vertexdb":http://www.dekorte.com/projects/opensource/vertexdb/
+* "Redis":http://code.google.com/p/redis/ (see "Blueredis":https://github.com/dmitriid/blueredis)
+* Sail-based RDF Stores (very easy to do as only a @Sail@ constructor is needed)
+** "4Store":http://4store.org/
+** "AllegroGraph":http://www.franz.com/agraph/allegrograph/
+** "OpenVirtuoso":http://virtuoso.openlinksw.com/
+** "OWLim":http://www.ontotext.com/owlim/
@@ -0,0 +1,67 @@
+[[http://www.sparsity-technologies.com/images/sparsity_logo_web.png]]
+
+```xml
+<dependency>
+ <groupId>com.tinkerpop.blueprints</groupId>
+ <artifactId>blueprints-dex-graph</artifactId>
+ <version>??</version>
+</dependency>
+```
+
+```java
+Graph graph = new DexGraph("/tmp/graph.dex");
+```
+
+"DEX":http://www.sparsity-technologies.com/dex is a graph database developed by "Sparsity Technologies":http://www.sparsity-technologies.com/. For a fine summary of the DEX graph database, please review the following "presentations":http://www.sparsity-technologies.com/dex_tutorials. The software can be downloaded from "here":http://www.sparsity-technologies.com/dex_downloads and be used with the default evaluation license (which restricts the amount of information DEX can deal with).
+
+DEX natively supports the property graph data model defined by Blueprints. However, there are a few peculiarities.
+
+# *No user defined element identifiers*: DEX is the gatekeeper and creator of vertex and edge identifiers. Thus, when creating a new vertex or edge instance, the provided object identifier is ignored.
+# *Vertices are labeled too*: When adding vertices, the user can set @DEXGraph#LABEL@ to be used as the label of the vertex to be created. Also, the label of a vertex (or even an element) can be retrieved through the @DEXElement#LABEL_PROPERTY@ property.
+
+@DexGraph@ implements @IndexableGraph@. However, the use of indices is limited when working with DEX and is explained as follows:
+
+# There is no support to create indices.
+# By default, there is an @AutomaticIndex@ for each existing label which corresponds to the name of the index. Also, each index contains a key for each existing property.
+
+*Memory configuration*
+
+DEX memory is not managed by the JVM heap, so an specific memory configuration must be set for DEX in order to set the maximum amount of memory to be used by a DEX application.
+
+Specifically, users should set @dex.io.cache.maxsize@ as is explained [[here|http://www.sparsity-technologies.com/downloads/javadoc/edu/upc/dama/dex/utils/DEXConfig.html]].
+
+*Managment of @Iterable@ collections*
+
+As before, since DEX resources are not managed by the JVM heap, DEX-based blueprints applications should take into account the management of @Iterable@ collections and explicitly close them in order to free native resources.
+
+For example, if we execute a long traversal like this:
+
+```java
+for (final Vertex vertex : graph.getVertices()) {
+ for (final Edge edge : vertex.getOutEdges()) {
+ final Vertex vertex2 = edge.getInVertex();
+ for (final Edge edge2 : vertex2.getOutEdges()) {
+ ...
+ }
+ }
+}
+```
+
+all retrieved collections won't be closed until the graph database is stopped. Of course, keep active this amount of resources will have a negative impact in the performance. To avoid this, we should implement something like this:
+
+```java
+DexIterable<Vertex> vv = (DexIterable<Vertex>)graph.getVertices();
+for (final Vertex vertex : vv) {
+ DexIterable<Edge> ee = (DexIterable<Edge>)vertex.getOutEdges();
+ for (final Edge edge : ee) {
+ final Vertex vertex2 = edge.getInVertex();
+ DexIterable<Edge> ee2 = (DexIterable<Edge>)vertex2.getOutEdges();
+ for (final Edge edge2 : ee2) {
+ ...
+ }
+ ee2.close();
+ }
+ ee.close();
+}
+vv.close();
+```
Oops, something went wrong.

0 comments on commit 3a26e8b

Please sign in to comment.