Skip to content

Commit

Permalink
Merge pull request #82 from neo4j/ready-to-release
Browse files Browse the repository at this point in the history
Prepare for release
  • Loading branch information
Zhen Li committed Nov 17, 2015
2 parents 55a21ec + 3eb34f5 commit c19256d
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 33 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Connect to a Neo4j 3.0.0+ database

# Building

## Java version

If you are running Java 8:

mvn clean install
Expand All @@ -56,3 +58,12 @@ Java 8, because Neo4j-the-database needs it to run.

# For instance
export NEO4J_JAVA=$(/usr/libexec/java_home -v 1.8)

## Windows

If you are building on windows, you need to run install as admin so that Neo4j-the-database could be registered as a
windows service and then be started and stopped correctly using its powershell scripts for windows.
To be able to run powershell script on windows, you might need to enable running scripts on the system.
This can for example be achieved by executing the following from an elevated PowerShell prompt:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
1 change: 1 addition & 0 deletions driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<packaging>jar</packaging>
<name>Neo4j Java Driver</name>
<description>Access to the Neo4j graph database through Java</description>
<url>https://github.com/neo4j/neo4j-java-driver</url>

<licenses>
<license>
Expand Down
8 changes: 4 additions & 4 deletions driver/src/main/java/org/neo4j/driver/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public ConfigBuilder withLogging( Logging logging )

/**
* The max number of connections to open at any given time per Neo4j instance.
* @param size
* @param size the size of the connection pool
* @return this builder
*/
public ConfigBuilder withConnectionPoolSize( int size )
Expand Down Expand Up @@ -189,7 +189,7 @@ public ConfigBuilder withMinIdleTimeBeforeConnectionTest( long milliSecond )
* If no certificate is provided, then we will trust the first certificate received from the server.
* See {@code withKnownCerts} for more info about what will happen when no trusted certificate is
* provided.
* @param value
* @param value true to enable tls and flase to disable tls
* @return this builder
*/
public ConfigBuilder withTlsEnabled( boolean value )
Expand All @@ -200,8 +200,8 @@ public ConfigBuilder withTlsEnabled( boolean value )

/**
* Defines how to authenticate a server in TLS connections.
* @param tlsAuthConfig
* @return
* @param tlsAuthConfig TLS authentication config
* @return this builder
*/
public ConfigBuilder withTlsAuthConfig( TlsAuthenticationConfig tlsAuthConfig )
{
Expand Down
2 changes: 1 addition & 1 deletion driver/src/main/java/org/neo4j/driver/Identity.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public interface Identity
int hashCode();

// NOTE: This should be removed, but is kept until the Identity CIP is played
/** Return a long representation of this identity */
// Return a long representation of this identity
long asLong();
}
4 changes: 2 additions & 2 deletions driver/src/main/java/org/neo4j/driver/Path.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
* A <strong>Path</strong> is a directed sequence of relationships between two nodes. This generally
* represents a <em>traversal</em> or <em>walk</em> through a graph and maintains a direction separate
* from that of any relationships traversed.
* <p>
*
* It is allowed to be of size 0, meaning there are no relationships in it. In this case,
* it contains only a single node which is both the start and the end of the path.
* <p>
*
* <pre>
* Path routeToStockholm = ..;
*
Expand Down
2 changes: 1 addition & 1 deletion driver/src/main/java/org/neo4j/driver/Plan.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* what that part of the plan does - for instance, perform an index lookup or filter results. The Neo4j Manual contains
* a reference of the available operator types, and these may differ across Neo4j versions.
*
* For a simple view of a plan, the {@link #toString()} will give a human-readable rendering of the tree.
* For a simple view of a plan, the {@code toString} method will give a human-readable rendering of the tree.
*/
public interface Plan
{
Expand Down
14 changes: 7 additions & 7 deletions driver/src/main/java/org/neo4j/driver/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
/**
* The result of running a statement, a stream of records. The result interface can be used to iterate over all the
* records in the stream, and for each record to access the fields within it using the {@link #get(int) get} methods.
* <p>
*
* Results are valid until the next statement is run or until the end of the current transaction, whichever comes
* first.
* <p>
*
* To keep a result around while further statements are run, or to use a result outside the scope of the current
* transaction, see {@link #retain()}.
*/
Expand All @@ -33,7 +33,7 @@ public interface Result
/**
* Retrieve and store the entire result stream. This can be used if you want to
* iterate over the stream multiple times or to store the whole result for later use.
* <p>
*
* This cannot be used if you have already started iterating through the stream using {@link #next()}.
*
* @return {@link org.neo4j.driver.ReusableResult}
Expand Down Expand Up @@ -73,9 +73,9 @@ public interface Result

/**
* Retrieve the first field of the next record in the stream, and close the stream.
* <p>
*
* This is a utility for the common case of statements that are expected to yield a single output value.
* <p>
*
* <pre>
* {@code
* Record record = statement.run( "MATCH (n:User {uid:..}) RETURN n.name" ).single();
Expand All @@ -89,9 +89,9 @@ public interface Result

/**
* Summarize the result
* <p>
*
* Any remaining (unprocessed) result records will be consumed.
* <p>
*
* <pre class="doctest:ResultDocIT#summarizeUsage">
* {@code
* ResultSummary summary = session.run( "PROFILE MATCH (n:User {id: 12345}) RETURN n" ).summarize();
Expand Down
4 changes: 2 additions & 2 deletions driver/src/main/java/org/neo4j/driver/StatementRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public interface StatementRunner
{
/**
* Run a statement and return a result stream.
* <p>
*
* This method takes a set of parameters that will be injected into the
* statement by Neo4j. Using parameters is highly encouraged, it helps avoid
* dangerous cypher injection attacks and improves database performance as
* Neo4j can re-use query plans more often.
* <p>
*
* <h2>Example</h2>
* <pre class="doctest:StatementRunnerDocIT#parameterTest">
* {@code
Expand Down
12 changes: 6 additions & 6 deletions driver/src/main/java/org/neo4j/driver/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

/**
* Represents a transaction in the Neo4j database.
* <p>
*
* This interface may seem surprising in that it does not have explicit "commit" or "rollback" methods.
* It is designed to minimize the complexity of the code you need to write to use transactions in a safe way, ensuring
* that transactions are properly rolled back even if there is an exception while the transaction is running.
* <p>
*
* <h2>Example:</h2>
* <p>
*
* <pre class="docTest:TransactionDocIT#classDoc">
* {@code
* try( Transaction tx = session.newTransaction() )
Expand All @@ -47,13 +47,13 @@ public interface Transaction extends AutoCloseable, StatementRunner

/**
* Mark this transaction as failed. When you call {@link #close()}, the transaction will get rolled back.
* <p>
*
* After this method has been called, there is nothing that can be done to "un-mark" it. This is a safety feature
* to make sure no other code calls {@link #success()} and makes a transaction commit that was meant to be rolled
* back.
* <p>
*
* Example:
* <p>
*
* <pre class="docTest:TransactionDocIT#failure">
* {@code
* try(Transaction tx = session.newTransaction() )
Expand Down
18 changes: 9 additions & 9 deletions driver/src/main/java/org/neo4j/driver/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@

/**
* Represents a value from Neo4j.
* <p>
*
* This interface describes a number of <code>isType</code> methods along with
* <code>typeValue</code> methods. The first set of these correlate with types from
* the Neo4j Type System and are used to determine which Neo4j type is represented.
* The second set of methods perform coercions to Java types (wherever possible).
* For example, a common Text value should be tested for using <code>isText</code>
* and extracted using <code>stringValue</code>.
* <p>
*
* <h2>Navigating a tree structure</h2>
* <p>
*
* Because Neo4j often handles dynamic structures, this interface is designed to help
* you handle such structures in Java. Specifically, {@link org.neo4j.driver.Value} lets you navigate arbitrary tree
* structures without having to resort to type casting.
* <p>
*
* Given a tree structure like:
* <p>
*
* <pre>
* {@code
* {
Expand All @@ -49,17 +49,17 @@
* }
* }
* </pre>
* <p>
*
* You can retrieve the name of the second user, John, like so:
* <p>
*
* <pre class="docTest:ValueDocIT#classDocTreeExample">
* {@code
* String username = value.get("users").get(1).get("name").javaString();
* }
* </pre>
* <p>
*
* You can also easily iterate over the users:
* <p>
*
* <pre class="docTest:ValueDocIT#classDocIterationExample">
* {@code
* List<String> names = new LinkedList<>();
Expand Down
31 changes: 30 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<neo4j.version>2.3-SNAPSHOT</neo4j.version>
</properties>

<groupId>org.neo4j.driver</groupId>
Expand All @@ -14,11 +13,35 @@
<packaging>pom</packaging>
<name>Neo4j Java Driver Project</name>
<description>A project for building a Java driver for the Neo4j Bolt protocol.</description>
<url>https://github.com/neo4j/neo4j-java-driver</url>

<modules>
<module>driver</module>
</modules>

<licenses>
<license>
<name>Apache License, Version 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>

<developers>
<developer>
<id>neo4j</id>
<name>The Neo4j Team</name>
<url>http://neo4j.org/</url>
<organization>Neo Technology</organization>
<organizationUrl>http://www.neotechnology.com/</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/neo4j/neo4j-java-driver.git</connection>
<developerConnection>scm:git:[email protected]:neo4j/neo4j-java-driver.git</developerConnection>
<url>https://github.com/neo4j/neo4j-java-driver</url>
</scm>

<dependencyManagement>
<dependencies>
<!-- Test dependencies -->
Expand Down Expand Up @@ -101,6 +124,12 @@
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
<execution>
<id>aggregate</id>
<goals>
Expand Down

0 comments on commit c19256d

Please sign in to comment.