forked from arangodb/arangodb-java-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mark
committed
Aug 3, 2016
1 parent
f256b32
commit ff73e1c
Showing
66 changed files
with
5,237 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
*.class | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
/.classpath | ||
/.project | ||
/.settings | ||
/target | ||
/.idea | ||
/*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
<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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.arangodb</groupId> | ||
<artifactId>arangodb-java-driver</artifactId> | ||
<version>3.1.0-SNAPSHOT</version> | ||
<inceptionYear>2016</inceptionYear> | ||
<packaging>jar</packaging> | ||
|
||
<name>arangodb-java-driver</name> | ||
<description>ArangoDB Java Driver</description> | ||
<url>http://maven.apache.org</url> | ||
|
||
<licenses> | ||
<license> | ||
<name>Apache License 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<slf4j-api.version>1.7.13</slf4j-api.version> | ||
<logback-classic.version>1.1.3</logback-classic.version> | ||
<hamcrest-all.version>1.3</hamcrest-all.version> | ||
<junit.version>4.12</junit.version> | ||
</properties> | ||
|
||
<developers> | ||
<developer> | ||
<id>a-brandt</id> | ||
<name>a-brandt</name> | ||
<url>https://github.com/a-brandt</url> | ||
</developer> | ||
<developer> | ||
<id>mpv1989</id> | ||
<name>Mark</name> | ||
<url>https://github.com/mpv1989</url> | ||
</developer> | ||
</developers> | ||
|
||
<distributionManagement> | ||
<snapshotRepository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
</snapshotRepository> | ||
<repository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
</distributionManagement> | ||
|
||
<!-- <profiles> --> | ||
<!-- <profile> --> | ||
<!-- <id>doclint-java8-disable</id> --> | ||
<!-- <activation> --> | ||
<!-- <jdk>[1.8,)</jdk> --> | ||
<!-- </activation> --> | ||
<!-- <properties> --> | ||
<!-- <javadoc.opts>-Xdoclint:none</javadoc.opts> --> | ||
<!-- </properties> --> | ||
<!-- </profile> --> | ||
<!-- </profiles> --> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.sonatype.plugins</groupId> | ||
<artifactId>nexus-staging-maven-plugin</artifactId> | ||
<version>1.6.5</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<serverId>ossrh</serverId> | ||
<nexusUrl>https://oss.sonatype.org/</nexusUrl> | ||
<stagingProfileId>84aff6e87e214c</stagingProfileId> | ||
<autoReleaseAfterClose>false</autoReleaseAfterClose> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.4.1</version> | ||
<executions> | ||
<execution> | ||
<id>assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<finalName> | ||
${project.artifactId}-${project.version}-standalone | ||
</finalName> | ||
<attach>false</attach> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.2</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
<compilerArgument></compilerArgument> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.7</version> | ||
<configuration> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>2.4</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.9.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
<configuration> | ||
<additionalparam>${javadoc.opts}</additionalparam> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- <plugin> --> | ||
<!-- <artifactId>maven-surefire-plugin</artifactId> --> | ||
<!-- <version>2.19.1</version> --> | ||
<!-- <configuration> --> | ||
<!-- <forkCount>0</forkCount> --> | ||
<!-- <includes> --> | ||
<!-- <include>com/arangodb/ArangoTestSuite.java</include> --> | ||
<!-- </includes> --> | ||
<!-- </configuration> --> | ||
<!-- </plugin> --> | ||
|
||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>2.8.2</version> | ||
<configuration> | ||
<uniqueVersion>false</uniqueVersion> | ||
<retryFailedDeploymentCount>10</retryFailedDeploymentCount> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>1.5</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-all</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j-api.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>${logback-classic.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-all</artifactId> | ||
<version>${hamcrest-all.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<scm> | ||
<url>https://github.com/arangodb/arangodb-java-driver2</url> | ||
<connection>scm:git:git://github.com/arangodb/arangodb-java-driver2.git</connection> | ||
<developerConnection>scm:git:git://github.com/arangodb/arangodb-java-driver2.git</developerConnection> | ||
</scm> | ||
|
||
<organization> | ||
<name>ArangoDB GmbH</name> | ||
<url>https://www.arangodb.com</url> | ||
</organization> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package com.arangodb; | ||
|
||
import java.util.Optional; | ||
|
||
import com.arangodb.internal.Constants; | ||
import com.arangodb.model.DB; | ||
import com.arangodb.model.DBCreate; | ||
import com.arangodb.model.DBDelete; | ||
|
||
/** | ||
* @author Mark - mark at arangodb.com | ||
* | ||
*/ | ||
public class ArangoDB { | ||
|
||
public static class Builder { | ||
|
||
private Optional<String> host = Optional.empty(); | ||
private Optional<Integer> port = Optional.empty(); | ||
private Optional<String> user = Optional.empty(); | ||
private Optional<String> password = Optional.empty(); | ||
|
||
public ArangoDB build() { | ||
return new ArangoDB(this); | ||
} | ||
|
||
public Builder host(final String url) { | ||
this.host = Optional.ofNullable(url); | ||
return this; | ||
} | ||
|
||
public Builder port(final int port) { | ||
this.port = Optional.of(port); | ||
return this; | ||
} | ||
|
||
public Builder user(final String user) { | ||
this.user = Optional.ofNullable(user); | ||
return this; | ||
} | ||
|
||
public Builder password(final String password) { | ||
this.password = Optional.ofNullable(password); | ||
return this; | ||
} | ||
|
||
} | ||
|
||
private ArangoDB(final Builder builder) { | ||
} | ||
|
||
public DBCreate dbCreate(final String name) { | ||
return new DBCreate(this, name); | ||
} | ||
|
||
public DBDelete dbDelete(final String name) { | ||
return new DBDelete(this, name); | ||
} | ||
|
||
public DB db() { | ||
return db(Constants.SYSTEM_COLLECTION); | ||
} | ||
|
||
public DB db(final String name) { | ||
return new DB(this, name); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.arangodb; | ||
|
||
/** | ||
* @author Mark - mark at arangodb.com | ||
* | ||
*/ | ||
public class ArangoException extends Exception { | ||
|
||
public ArangoException(final Exception e) { | ||
super(e); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.arangodb.entity; | ||
|
||
/** | ||
* @author Mark - mark at arangodb.com | ||
* | ||
*/ | ||
public class CollectionEntity { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.arangodb.internal; | ||
|
||
/** | ||
* @author Mark - mark at arangodb.com | ||
* | ||
*/ | ||
public class Connection { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.arangodb.internal; | ||
|
||
/** | ||
* @author Mark - mark at arangodb.com | ||
* | ||
*/ | ||
public class Constants { | ||
|
||
public static final String SYSTEM_COLLECTION = "_system"; | ||
public static final String DEFAULT_HOST = "127.0.0.1"; | ||
public static final int DEFAULT_PORT = 8529; | ||
public static final String DEFAULT_PROPERTY_FILE = "/arangodb.properties"; | ||
|
||
} |
Oops, something went wrong.