diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 96a57d376..8013333d3 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -67,6 +67,7 @@ jobs:
- name: Info
run: mvn -version
- name: Test
+ working-directory: driver
run: mvn --no-transfer-progress test -DargLine="-Duser.language=${{matrix.user-language}}"
test-ssl:
@@ -101,6 +102,7 @@ jobs:
- name: Info
run: mvn -version
- name: Test
+ working-directory: driver
run: mvn --no-transfer-progress -Dgroups=ssl -DSslTest=true test
# test encodeURIComponent() and normalize('NFC') comparing to Javascript behavior
@@ -117,6 +119,7 @@ jobs:
- name: Info
run: mvn -version
- name: Test
+ working-directory: driver
run: mvn -e --no-transfer-progress test -Dtest=com.arangodb.util.UnicodeUtilsTest
test-jwt:
@@ -164,6 +167,7 @@ jobs:
- name: Info
run: mvn -version
- name: Test
+ working-directory: driver
run: mvn --no-transfer-progress test -DargLine="-Duser.language=${{matrix.user-language}}"
jackson-test:
@@ -207,6 +211,7 @@ jobs:
- name: Info
run: mvn -version
- name: Test
+ working-directory: driver
run: mvn --no-transfer-progress test -Dadb.jackson.version=${{matrix.jackson-version}}
sonar:
@@ -260,5 +265,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ working-directory: driver
run: mvn -B --no-transfer-progress -Dgpg.skip=true verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=arangodb_arangodb-java-driver
diff --git a/.github/workflows/native.yml b/.github/workflows/native.yml
index 3112392fb..d847b8861 100644
--- a/.github/workflows/native.yml
+++ b/.github/workflows/native.yml
@@ -40,6 +40,7 @@ jobs:
- name: Info
run: mvn -version
- name: Test Native
+ working-directory: driver
run: mvn -Pnative --no-transfer-progress test
test-native-ssl:
@@ -74,4 +75,5 @@ jobs:
- name: Info
run: mvn -version
- name: Test Native
+ working-directory: driver
run: mvn -Pnative --no-transfer-progress -Dgroups=ssl -DSslTest=true test
diff --git a/.gitignore b/.gitignore
index bdc7bc636..7cdb4ecd7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
/.classpath
/.project
/.settings
-/target
+**/target
/.idea
/*.iml
/bin
@@ -10,5 +10,5 @@
/docker/jwtSecret
/docker/data
-/test-results-native/
+**/test-results-native
.flattened-pom.xml
diff --git a/README.md b/README.md
index b3f6600df..d50d4ec1d 100644
--- a/README.md
+++ b/README.md
@@ -9,9 +9,9 @@ The official [ArangoDB](https://www.arangodb.com/) Java Driver.
## Learn more
-- [ChangeLog](ChangeLog.md)
-- [Examples](src/test/java/com/arangodb/example)
-- [Examples Async](src/test/java/com/arangodb/async/example)
+- [ChangeLog](driver/ChangeLog.md)
+- [Examples](driver/src/test/java/com/arangodb/example)
+- [Examples Async](driver/src/test/java/com/arangodb/async/example)
- [Tutorial](https://www.arangodb.com/docs/stable/drivers/java-tutorial.html)
- [Documentation](https://www.arangodb.com/docs/stable/drivers/java.html)
- [JavaDoc](http://arangodb.github.io/arangodb-java-driver/)
diff --git a/ChangeLog.md b/driver/ChangeLog.md
similarity index 100%
rename from ChangeLog.md
rename to driver/ChangeLog.md
diff --git a/dev-README.md b/driver/dev-README.md
similarity index 100%
rename from dev-README.md
rename to driver/dev-README.md
diff --git a/driver/pom.xml b/driver/pom.xml
new file mode 100644
index 000000000..f44e0a0f2
--- /dev/null
+++ b/driver/pom.xml
@@ -0,0 +1,398 @@
+
+
+ 4.0.0
+
+
+ arangodb-java-driver-parent
+ com.arangodb
+ 7.0.0-SNAPSHOT
+
+
+ arangodb-java-driver
+ arangodb-java-driver
+ ArangoDB Java Driver
+ https://github.com/arangodb/arangodb-java-driver
+
+
+ 2.13.3
+ arangodb-1
+ https://sonarcloud.io
+ false
+
+
+
+
+ doclint-java8-disable
+
+ [1.8,)
+
+
+ none
+
+
+
+ no-graalvm
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ com/arangodb/util/UnicodeUtilsTest.java
+
+
+
+
+
+
+
+ native
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.0.0-M5
+
+
+ org.graalvm.buildtools
+ native-maven-plugin
+ 0.9.16
+ true
+
+
+ test-native
+
+ generateTestResourceConfig
+ test
+
+ test
+
+
+
+ true
+ false
+
+ --no-fallback
+
+
+ ${SslTest}
+
+
+
+
+
+
+
+
+
+
+ ossrh
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.13
+ true
+
+ ossrh
+ https://oss.sonatype.org/
+ 84aff6e87e214c
+ false
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.10.1
+
+
+ -Xlint:unchecked
+ -Xlint:deprecation
+
+ true
+ 1.8
+ 1.8
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.3.0
+
+ UTF-8
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.4.0
+
+
+ attach-javadocs
+
+ jar
+
+
+ com.arangodb.internal
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.0.0-M7
+
+
+ **/*Test.java
+ **/*Example.java
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ 3.0.0
+
+ 10
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.0.1
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+ org.codehaus.mojo
+ flatten-maven-plugin
+ 1.2.7
+
+ oss
+
+
+
+
+ flatten
+ process-resources
+
+ flatten
+
+
+
+
+ flatten.clean
+ clean
+
+ clean
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.8
+
+
+
+ prepare-agent
+
+
+
+ report
+ prepare-package
+
+ report
+
+
+
+
+
+ com.github.spotbugs
+ spotbugs-maven-plugin
+ 4.7.1.1
+
+ spotbugs/spotbugs-exclude.xml
+
+
+
+ compile
+
+ check
+
+
+
+
+
+ com.github.spotbugs
+ spotbugs
+ 4.7.1
+
+
+
+
+
+
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.36
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+ io.vertx
+ vertx-web-client
+
+
+ com.arangodb
+ jackson-dataformat-velocypack
+ 3.0.1
+ true
+
+
+ jakarta.json.bind
+ jakarta.json.bind-api
+ 2.0.0
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+ provided
+
+
+ ch.qos.logback
+ logback-classic
+ 1.2.11
+ test
+
+
+ org.junit.platform
+ junit-platform-launcher
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ test
+
+
+ org.assertj
+ assertj-core
+ 3.23.1
+ test
+
+
+ org.reflections
+ reflections
+ 0.10.2
+ test
+
+
+ org.graalvm.sdk
+ graal-sdk
+ 22.2.0
+ test
+
+
+ org.eclipse
+ yasson
+ 2.0.4
+ test
+
+
+
+
+
+
+ com.fasterxml.jackson
+ jackson-bom
+ ${adb.jackson.version}
+ import
+ pom
+
+
+ io.vertx
+ vertx-stack-depchain
+ 4.3.4
+ pom
+ import
+
+
+ io.netty
+ netty-bom
+ 4.1.82.Final
+ pom
+ import
+
+
+ org.junit
+ junit-bom
+ 5.9.1
+ pom
+ import
+
+
+
+
+
+ https://github.com/arangodb/arangodb-java-driver
+ scm:git:git://github.com/arangodb/arangodb-java-driver.git
+ scm:git:git://github.com/arangodb/arangodb-java-driver.git
+
+
+
diff --git a/spotbugs/spotbugs-exclude.xml b/driver/spotbugs/spotbugs-exclude.xml
similarity index 100%
rename from spotbugs/spotbugs-exclude.xml
rename to driver/spotbugs/spotbugs-exclude.xml
diff --git a/src/main/java/com/arangodb/ArangoCollection.java b/driver/src/main/java/com/arangodb/ArangoCollection.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoCollection.java
rename to driver/src/main/java/com/arangodb/ArangoCollection.java
diff --git a/src/main/java/com/arangodb/ArangoCursor.java b/driver/src/main/java/com/arangodb/ArangoCursor.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoCursor.java
rename to driver/src/main/java/com/arangodb/ArangoCursor.java
diff --git a/src/main/java/com/arangodb/ArangoDB.java b/driver/src/main/java/com/arangodb/ArangoDB.java
similarity index 99%
rename from src/main/java/com/arangodb/ArangoDB.java
rename to driver/src/main/java/com/arangodb/ArangoDB.java
index 60181e2f1..d7de287d3 100644
--- a/src/main/java/com/arangodb/ArangoDB.java
+++ b/driver/src/main/java/com/arangodb/ArangoDB.java
@@ -605,7 +605,7 @@ public ArangoDB build() {
final int max = maxConnections != null ? Math.max(1, maxConnections) : protocolMaxConnections;
- final ConnectionFactory connectionFactory = (protocol == null || Protocol.VST == protocol)
+ final ConnectionFactory connectionFactory = Protocol.VST == protocol
? new VstConnectionFactorySync(timeout, connectionTtl, keepAliveInterval, useSsl, sslContext)
: new HttpConnectionFactory(timeout, user, password, useSsl, sslContext, verifyHost, serde,
protocol, connectionTtl);
diff --git a/src/main/java/com/arangodb/ArangoDBException.java b/driver/src/main/java/com/arangodb/ArangoDBException.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoDBException.java
rename to driver/src/main/java/com/arangodb/ArangoDBException.java
diff --git a/src/main/java/com/arangodb/ArangoDBMultipleException.java b/driver/src/main/java/com/arangodb/ArangoDBMultipleException.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoDBMultipleException.java
rename to driver/src/main/java/com/arangodb/ArangoDBMultipleException.java
diff --git a/src/main/java/com/arangodb/ArangoDatabase.java b/driver/src/main/java/com/arangodb/ArangoDatabase.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoDatabase.java
rename to driver/src/main/java/com/arangodb/ArangoDatabase.java
diff --git a/src/main/java/com/arangodb/ArangoEdgeCollection.java b/driver/src/main/java/com/arangodb/ArangoEdgeCollection.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoEdgeCollection.java
rename to driver/src/main/java/com/arangodb/ArangoEdgeCollection.java
diff --git a/src/main/java/com/arangodb/ArangoGraph.java b/driver/src/main/java/com/arangodb/ArangoGraph.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoGraph.java
rename to driver/src/main/java/com/arangodb/ArangoGraph.java
diff --git a/src/main/java/com/arangodb/ArangoIterable.java b/driver/src/main/java/com/arangodb/ArangoIterable.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoIterable.java
rename to driver/src/main/java/com/arangodb/ArangoIterable.java
diff --git a/src/main/java/com/arangodb/ArangoIterator.java b/driver/src/main/java/com/arangodb/ArangoIterator.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoIterator.java
rename to driver/src/main/java/com/arangodb/ArangoIterator.java
diff --git a/src/main/java/com/arangodb/ArangoMetrics.java b/driver/src/main/java/com/arangodb/ArangoMetrics.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoMetrics.java
rename to driver/src/main/java/com/arangodb/ArangoMetrics.java
diff --git a/src/main/java/com/arangodb/ArangoRoute.java b/driver/src/main/java/com/arangodb/ArangoRoute.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoRoute.java
rename to driver/src/main/java/com/arangodb/ArangoRoute.java
diff --git a/src/main/java/com/arangodb/ArangoSearch.java b/driver/src/main/java/com/arangodb/ArangoSearch.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoSearch.java
rename to driver/src/main/java/com/arangodb/ArangoSearch.java
diff --git a/src/main/java/com/arangodb/ArangoSerdeAccessor.java b/driver/src/main/java/com/arangodb/ArangoSerdeAccessor.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoSerdeAccessor.java
rename to driver/src/main/java/com/arangodb/ArangoSerdeAccessor.java
diff --git a/src/main/java/com/arangodb/ArangoVertexCollection.java b/driver/src/main/java/com/arangodb/ArangoVertexCollection.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoVertexCollection.java
rename to driver/src/main/java/com/arangodb/ArangoVertexCollection.java
diff --git a/src/main/java/com/arangodb/ArangoView.java b/driver/src/main/java/com/arangodb/ArangoView.java
similarity index 100%
rename from src/main/java/com/arangodb/ArangoView.java
rename to driver/src/main/java/com/arangodb/ArangoView.java
diff --git a/src/main/java/com/arangodb/ContentType.java b/driver/src/main/java/com/arangodb/ContentType.java
similarity index 100%
rename from src/main/java/com/arangodb/ContentType.java
rename to driver/src/main/java/com/arangodb/ContentType.java
diff --git a/src/main/java/com/arangodb/DbName.java b/driver/src/main/java/com/arangodb/DbName.java
similarity index 100%
rename from src/main/java/com/arangodb/DbName.java
rename to driver/src/main/java/com/arangodb/DbName.java
diff --git a/src/main/java/com/arangodb/Function.java b/driver/src/main/java/com/arangodb/Function.java
similarity index 100%
rename from src/main/java/com/arangodb/Function.java
rename to driver/src/main/java/com/arangodb/Function.java
diff --git a/src/main/java/com/arangodb/Protocol.java b/driver/src/main/java/com/arangodb/Protocol.java
similarity index 100%
rename from src/main/java/com/arangodb/Protocol.java
rename to driver/src/main/java/com/arangodb/Protocol.java
diff --git a/src/main/java/com/arangodb/QueueTimeMetrics.java b/driver/src/main/java/com/arangodb/QueueTimeMetrics.java
similarity index 100%
rename from src/main/java/com/arangodb/QueueTimeMetrics.java
rename to driver/src/main/java/com/arangodb/QueueTimeMetrics.java
diff --git a/src/main/java/com/arangodb/Request.java b/driver/src/main/java/com/arangodb/Request.java
similarity index 100%
rename from src/main/java/com/arangodb/Request.java
rename to driver/src/main/java/com/arangodb/Request.java
diff --git a/src/main/java/com/arangodb/RequestType.java b/driver/src/main/java/com/arangodb/RequestType.java
similarity index 100%
rename from src/main/java/com/arangodb/RequestType.java
rename to driver/src/main/java/com/arangodb/RequestType.java
diff --git a/src/main/java/com/arangodb/Response.java b/driver/src/main/java/com/arangodb/Response.java
similarity index 100%
rename from src/main/java/com/arangodb/Response.java
rename to driver/src/main/java/com/arangodb/Response.java
diff --git a/src/main/java/com/arangodb/SearchAlias.java b/driver/src/main/java/com/arangodb/SearchAlias.java
similarity index 100%
rename from src/main/java/com/arangodb/SearchAlias.java
rename to driver/src/main/java/com/arangodb/SearchAlias.java
diff --git a/src/main/java/com/arangodb/async/ArangoCollectionAsync.java b/driver/src/main/java/com/arangodb/async/ArangoCollectionAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoCollectionAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoCollectionAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoCursorAsync.java b/driver/src/main/java/com/arangodb/async/ArangoCursorAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoCursorAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoCursorAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoDBAsync.java b/driver/src/main/java/com/arangodb/async/ArangoDBAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoDBAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoDBAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoDatabaseAsync.java b/driver/src/main/java/com/arangodb/async/ArangoDatabaseAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoDatabaseAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoDatabaseAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoEdgeCollectionAsync.java b/driver/src/main/java/com/arangodb/async/ArangoEdgeCollectionAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoEdgeCollectionAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoEdgeCollectionAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoGraphAsync.java b/driver/src/main/java/com/arangodb/async/ArangoGraphAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoGraphAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoGraphAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoRouteAsync.java b/driver/src/main/java/com/arangodb/async/ArangoRouteAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoRouteAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoRouteAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoSearchAsync.java b/driver/src/main/java/com/arangodb/async/ArangoSearchAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoSearchAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoSearchAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoVertexCollectionAsync.java b/driver/src/main/java/com/arangodb/async/ArangoVertexCollectionAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoVertexCollectionAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoVertexCollectionAsync.java
diff --git a/src/main/java/com/arangodb/async/ArangoViewAsync.java b/driver/src/main/java/com/arangodb/async/ArangoViewAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/ArangoViewAsync.java
rename to driver/src/main/java/com/arangodb/async/ArangoViewAsync.java
diff --git a/src/main/java/com/arangodb/async/SearchAliasAsync.java b/driver/src/main/java/com/arangodb/async/SearchAliasAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/SearchAliasAsync.java
rename to driver/src/main/java/com/arangodb/async/SearchAliasAsync.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoCollectionAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoCollectionAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoCollectionAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoCollectionAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoCursorAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoCursorAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoCursorAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoCursorAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoDBAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoDBAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoDBAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoDBAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoDatabaseAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoDatabaseAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoDatabaseAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoDatabaseAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoEdgeCollectionAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoEdgeCollectionAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoEdgeCollectionAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoEdgeCollectionAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoExecutorAsync.java b/driver/src/main/java/com/arangodb/async/internal/ArangoExecutorAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoExecutorAsync.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoExecutorAsync.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoGraphAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoGraphAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoGraphAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoGraphAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoRouteAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoRouteAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoRouteAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoRouteAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoSearchAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoSearchAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoSearchAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoSearchAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoVertexCollectionAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoVertexCollectionAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoVertexCollectionAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoVertexCollectionAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ArangoViewAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/ArangoViewAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ArangoViewAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/ArangoViewAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/ExceptionUtil.java b/driver/src/main/java/com/arangodb/async/internal/ExceptionUtil.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/ExceptionUtil.java
rename to driver/src/main/java/com/arangodb/async/internal/ExceptionUtil.java
diff --git a/src/main/java/com/arangodb/async/internal/SearchAliasAsyncImpl.java b/driver/src/main/java/com/arangodb/async/internal/SearchAliasAsyncImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/SearchAliasAsyncImpl.java
rename to driver/src/main/java/com/arangodb/async/internal/SearchAliasAsyncImpl.java
diff --git a/src/main/java/com/arangodb/async/internal/utils/CompletableFutureUtils.java b/driver/src/main/java/com/arangodb/async/internal/utils/CompletableFutureUtils.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/utils/CompletableFutureUtils.java
rename to driver/src/main/java/com/arangodb/async/internal/utils/CompletableFutureUtils.java
diff --git a/src/main/java/com/arangodb/async/internal/velocystream/VstCommunicationAsync.java b/driver/src/main/java/com/arangodb/async/internal/velocystream/VstCommunicationAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/velocystream/VstCommunicationAsync.java
rename to driver/src/main/java/com/arangodb/async/internal/velocystream/VstCommunicationAsync.java
diff --git a/src/main/java/com/arangodb/async/internal/velocystream/VstConnectionAsync.java b/driver/src/main/java/com/arangodb/async/internal/velocystream/VstConnectionAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/velocystream/VstConnectionAsync.java
rename to driver/src/main/java/com/arangodb/async/internal/velocystream/VstConnectionAsync.java
diff --git a/src/main/java/com/arangodb/async/internal/velocystream/VstConnectionFactoryAsync.java b/driver/src/main/java/com/arangodb/async/internal/velocystream/VstConnectionFactoryAsync.java
similarity index 100%
rename from src/main/java/com/arangodb/async/internal/velocystream/VstConnectionFactoryAsync.java
rename to driver/src/main/java/com/arangodb/async/internal/velocystream/VstConnectionFactoryAsync.java
diff --git a/src/main/java/com/arangodb/entity/AbstractBaseDocument.java b/driver/src/main/java/com/arangodb/entity/AbstractBaseDocument.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/AbstractBaseDocument.java
rename to driver/src/main/java/com/arangodb/entity/AbstractBaseDocument.java
diff --git a/src/main/java/com/arangodb/entity/AqlExecutionExplainEntity.java b/driver/src/main/java/com/arangodb/entity/AqlExecutionExplainEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/AqlExecutionExplainEntity.java
rename to driver/src/main/java/com/arangodb/entity/AqlExecutionExplainEntity.java
diff --git a/src/main/java/com/arangodb/entity/AqlFunctionEntity.java b/driver/src/main/java/com/arangodb/entity/AqlFunctionEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/AqlFunctionEntity.java
rename to driver/src/main/java/com/arangodb/entity/AqlFunctionEntity.java
diff --git a/src/main/java/com/arangodb/entity/AqlParseEntity.java b/driver/src/main/java/com/arangodb/entity/AqlParseEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/AqlParseEntity.java
rename to driver/src/main/java/com/arangodb/entity/AqlParseEntity.java
diff --git a/src/main/java/com/arangodb/entity/ArangoDBEngine.java b/driver/src/main/java/com/arangodb/entity/ArangoDBEngine.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/ArangoDBEngine.java
rename to driver/src/main/java/com/arangodb/entity/ArangoDBEngine.java
diff --git a/src/main/java/com/arangodb/entity/ArangoDBVersion.java b/driver/src/main/java/com/arangodb/entity/ArangoDBVersion.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/ArangoDBVersion.java
rename to driver/src/main/java/com/arangodb/entity/ArangoDBVersion.java
diff --git a/src/main/java/com/arangodb/entity/BaseDocument.java b/driver/src/main/java/com/arangodb/entity/BaseDocument.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/BaseDocument.java
rename to driver/src/main/java/com/arangodb/entity/BaseDocument.java
index 62207db9e..db6de1d47 100644
--- a/src/main/java/com/arangodb/entity/BaseDocument.java
+++ b/driver/src/main/java/com/arangodb/entity/BaseDocument.java
@@ -1,51 +1,51 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-import java.io.Serializable;
-import java.util.Map;
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- */
-public final class BaseDocument extends AbstractBaseDocument implements Serializable {
-
- private static final long serialVersionUID = 733033350470L;
-
- public BaseDocument() {
- super();
- }
-
- public BaseDocument(final String key) {
- super(key);
- }
-
- public BaseDocument(final Map properties) {
- super(properties);
- }
-
- @Override
- public String toString() {
- return "BaseDocument" + super.toString();
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ */
+public final class BaseDocument extends AbstractBaseDocument implements Serializable {
+
+ private static final long serialVersionUID = 733033350470L;
+
+ public BaseDocument() {
+ super();
+ }
+
+ public BaseDocument(final String key) {
+ super(key);
+ }
+
+ public BaseDocument(final Map properties) {
+ super(properties);
+ }
+
+ @Override
+ public String toString() {
+ return "BaseDocument" + super.toString();
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/BaseEdgeDocument.java b/driver/src/main/java/com/arangodb/entity/BaseEdgeDocument.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/BaseEdgeDocument.java
rename to driver/src/main/java/com/arangodb/entity/BaseEdgeDocument.java
index 625fcaf1d..28b582447 100644
--- a/src/main/java/com/arangodb/entity/BaseEdgeDocument.java
+++ b/driver/src/main/java/com/arangodb/entity/BaseEdgeDocument.java
@@ -1,93 +1,93 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-import com.arangodb.internal.DocumentFields;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import java.io.Serializable;
-import java.util.Map;
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- */
-public final class BaseEdgeDocument extends AbstractBaseDocument implements Serializable {
-
- private static final long serialVersionUID = 356629614444L;
-
- private static final String[] META_PROPS = new String[]{
- DocumentFields.ID,
- DocumentFields.KEY,
- DocumentFields.REV,
- DocumentFields.FROM,
- DocumentFields.TO
- };
-
- public BaseEdgeDocument() {
- super();
- }
-
- public BaseEdgeDocument(final String from, final String to) {
- super();
- setFrom(from);
- setTo(to);
- }
-
- public BaseEdgeDocument(final String key, final String from, final String to) {
- super(key);
- setFrom(from);
- setTo(to);
- }
-
- public BaseEdgeDocument(final Map properties) {
- super(properties);
- }
-
- @JsonIgnore
- public String getFrom() {
- return (String) getAttribute(DocumentFields.FROM);
- }
-
- public void setFrom(final String from) {
- addAttribute(DocumentFields.FROM, from);
- }
-
- @JsonIgnore
- public String getTo() {
- return (String) getAttribute(DocumentFields.TO);
- }
-
- public void setTo(final String to) {
- addAttribute(DocumentFields.TO, to);
- }
-
- @Override
- protected String[] getMetaProps() {
- return META_PROPS;
- }
-
- @Override
- public String toString() {
- return "BaseEdgeDocument" + super.toString();
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+import com.arangodb.internal.DocumentFields;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ */
+public final class BaseEdgeDocument extends AbstractBaseDocument implements Serializable {
+
+ private static final long serialVersionUID = 356629614444L;
+
+ private static final String[] META_PROPS = new String[]{
+ DocumentFields.ID,
+ DocumentFields.KEY,
+ DocumentFields.REV,
+ DocumentFields.FROM,
+ DocumentFields.TO
+ };
+
+ public BaseEdgeDocument() {
+ super();
+ }
+
+ public BaseEdgeDocument(final String from, final String to) {
+ super();
+ setFrom(from);
+ setTo(to);
+ }
+
+ public BaseEdgeDocument(final String key, final String from, final String to) {
+ super(key);
+ setFrom(from);
+ setTo(to);
+ }
+
+ public BaseEdgeDocument(final Map properties) {
+ super(properties);
+ }
+
+ @JsonIgnore
+ public String getFrom() {
+ return (String) getAttribute(DocumentFields.FROM);
+ }
+
+ public void setFrom(final String from) {
+ addAttribute(DocumentFields.FROM, from);
+ }
+
+ @JsonIgnore
+ public String getTo() {
+ return (String) getAttribute(DocumentFields.TO);
+ }
+
+ public void setTo(final String to) {
+ addAttribute(DocumentFields.TO, to);
+ }
+
+ @Override
+ protected String[] getMetaProps() {
+ return META_PROPS;
+ }
+
+ @Override
+ public String toString() {
+ return "BaseEdgeDocument" + super.toString();
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/CollectionEntity.java b/driver/src/main/java/com/arangodb/entity/CollectionEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/CollectionEntity.java
rename to driver/src/main/java/com/arangodb/entity/CollectionEntity.java
diff --git a/src/main/java/com/arangodb/entity/CollectionPropertiesEntity.java b/driver/src/main/java/com/arangodb/entity/CollectionPropertiesEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/CollectionPropertiesEntity.java
rename to driver/src/main/java/com/arangodb/entity/CollectionPropertiesEntity.java
diff --git a/src/main/java/com/arangodb/entity/CollectionRevisionEntity.java b/driver/src/main/java/com/arangodb/entity/CollectionRevisionEntity.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/CollectionRevisionEntity.java
rename to driver/src/main/java/com/arangodb/entity/CollectionRevisionEntity.java
index a65db6d7a..645849eba 100644
--- a/src/main/java/com/arangodb/entity/CollectionRevisionEntity.java
+++ b/driver/src/main/java/com/arangodb/entity/CollectionRevisionEntity.java
@@ -1,36 +1,36 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class CollectionRevisionEntity extends CollectionEntity {
-
- private String revision;
-
- public String getRevision() {
- return revision;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class CollectionRevisionEntity extends CollectionEntity {
+
+ private String revision;
+
+ public String getRevision() {
+ return revision;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/CollectionStatus.java b/driver/src/main/java/com/arangodb/entity/CollectionStatus.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/CollectionStatus.java
rename to driver/src/main/java/com/arangodb/entity/CollectionStatus.java
diff --git a/src/main/java/com/arangodb/entity/CollectionType.java b/driver/src/main/java/com/arangodb/entity/CollectionType.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/CollectionType.java
rename to driver/src/main/java/com/arangodb/entity/CollectionType.java
diff --git a/src/main/java/com/arangodb/entity/CursorWarning.java b/driver/src/main/java/com/arangodb/entity/CursorWarning.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/CursorWarning.java
rename to driver/src/main/java/com/arangodb/entity/CursorWarning.java
diff --git a/src/main/java/com/arangodb/entity/DatabaseEntity.java b/driver/src/main/java/com/arangodb/entity/DatabaseEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/DatabaseEntity.java
rename to driver/src/main/java/com/arangodb/entity/DatabaseEntity.java
diff --git a/src/main/java/com/arangodb/entity/DocumentCreateEntity.java b/driver/src/main/java/com/arangodb/entity/DocumentCreateEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/DocumentCreateEntity.java
rename to driver/src/main/java/com/arangodb/entity/DocumentCreateEntity.java
diff --git a/src/main/java/com/arangodb/entity/DocumentDeleteEntity.java b/driver/src/main/java/com/arangodb/entity/DocumentDeleteEntity.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/DocumentDeleteEntity.java
rename to driver/src/main/java/com/arangodb/entity/DocumentDeleteEntity.java
index 77d12d8b6..26af4f671 100644
--- a/src/main/java/com/arangodb/entity/DocumentDeleteEntity.java
+++ b/driver/src/main/java/com/arangodb/entity/DocumentDeleteEntity.java
@@ -1,50 +1,50 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-import com.arangodb.internal.serde.UserData;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class DocumentDeleteEntity extends DocumentEntity {
-
- private T oldDocument;
-
- public DocumentDeleteEntity() {
- super();
- }
-
- /**
- * @return If the query parameter returnOld is true, then the complete previous revision of the document is
- * returned.
- */
- public T getOld() {
- return oldDocument;
- }
-
- @UserData
- public void setOld(final T oldDocument) {
- this.oldDocument = oldDocument;
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+import com.arangodb.internal.serde.UserData;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class DocumentDeleteEntity extends DocumentEntity {
+
+ private T oldDocument;
+
+ public DocumentDeleteEntity() {
+ super();
+ }
+
+ /**
+ * @return If the query parameter returnOld is true, then the complete previous revision of the document is
+ * returned.
+ */
+ public T getOld() {
+ return oldDocument;
+ }
+
+ @UserData
+ public void setOld(final T oldDocument) {
+ this.oldDocument = oldDocument;
+ }
+}
diff --git a/src/main/java/com/arangodb/entity/DocumentEntity.java b/driver/src/main/java/com/arangodb/entity/DocumentEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/DocumentEntity.java
rename to driver/src/main/java/com/arangodb/entity/DocumentEntity.java
diff --git a/src/main/java/com/arangodb/entity/DocumentImportEntity.java b/driver/src/main/java/com/arangodb/entity/DocumentImportEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/DocumentImportEntity.java
rename to driver/src/main/java/com/arangodb/entity/DocumentImportEntity.java
diff --git a/src/main/java/com/arangodb/entity/DocumentUpdateEntity.java b/driver/src/main/java/com/arangodb/entity/DocumentUpdateEntity.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/DocumentUpdateEntity.java
rename to driver/src/main/java/com/arangodb/entity/DocumentUpdateEntity.java
index c64d62d38..0fa122454 100644
--- a/src/main/java/com/arangodb/entity/DocumentUpdateEntity.java
+++ b/driver/src/main/java/com/arangodb/entity/DocumentUpdateEntity.java
@@ -1,72 +1,72 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-import com.arangodb.internal.serde.UserData;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @param
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class DocumentUpdateEntity extends DocumentEntity {
-
- @JsonProperty("_oldRev")
- private String oldRev;
- private T newDocument;
- private T oldDocument;
-
- public DocumentUpdateEntity() {
- super();
- }
-
- public String getOldRev() {
- return oldRev;
- }
-
- /**
- * @return If the query parameter returnNew is true, then the complete new document is returned.
- */
- public T getNew() {
- return newDocument;
- }
-
- @UserData
- public void setNew(final T newDocument) {
- this.newDocument = newDocument;
- }
-
- /**
- * @return If the query parameter returnOld is true, then the complete previous revision of the document is
- * returned.
- */
- public T getOld() {
- return oldDocument;
- }
-
- @UserData
- public void setOld(final T oldDocument) {
- this.oldDocument = oldDocument;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+import com.arangodb.internal.serde.UserData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * @param
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class DocumentUpdateEntity extends DocumentEntity {
+
+ @JsonProperty("_oldRev")
+ private String oldRev;
+ private T newDocument;
+ private T oldDocument;
+
+ public DocumentUpdateEntity() {
+ super();
+ }
+
+ public String getOldRev() {
+ return oldRev;
+ }
+
+ /**
+ * @return If the query parameter returnNew is true, then the complete new document is returned.
+ */
+ public T getNew() {
+ return newDocument;
+ }
+
+ @UserData
+ public void setNew(final T newDocument) {
+ this.newDocument = newDocument;
+ }
+
+ /**
+ * @return If the query parameter returnOld is true, then the complete previous revision of the document is
+ * returned.
+ */
+ public T getOld() {
+ return oldDocument;
+ }
+
+ @UserData
+ public void setOld(final T oldDocument) {
+ this.oldDocument = oldDocument;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/EdgeDefinition.java b/driver/src/main/java/com/arangodb/entity/EdgeDefinition.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/EdgeDefinition.java
rename to driver/src/main/java/com/arangodb/entity/EdgeDefinition.java
index a450726b0..45b76c795 100644
--- a/src/main/java/com/arangodb/entity/EdgeDefinition.java
+++ b/driver/src/main/java/com/arangodb/entity/EdgeDefinition.java
@@ -1,92 +1,92 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class EdgeDefinition {
-
- private final Options options = new Options();
- private String collection;
- private Collection from;
- private Collection to;
-
- public String getCollection() {
- return collection;
- }
-
- public EdgeDefinition collection(final String collection) {
- this.collection = collection;
- return this;
- }
-
- public Collection getFrom() {
- return from;
- }
-
- public EdgeDefinition from(final String... from) {
- this.from = Arrays.asList(from);
- return this;
- }
-
- public Collection getTo() {
- return to;
- }
-
- public EdgeDefinition to(final String... to) {
- this.to = Arrays.asList(to);
- return this;
- }
-
- public Collection getSatellites() {
- return options.satellites;
- }
-
- public Options getOptions() {
- return options;
- }
-
- /**
- * @param satellites collection names that will be used to create SatelliteCollections
- * for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
- * must be a valid collection name. The collection type cannot be modified later.
- * @return this
- * @since ArangoDB 3.9.0
- */
- public EdgeDefinition satellites(final String... satellites) {
- options.satellites = Arrays.asList(satellites);
- return this;
- }
-
- public static final class Options {
- private Collection satellites = Collections.emptyList();
-
- public Collection getSatellites() {
- return satellites;
- }
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class EdgeDefinition {
+
+ private final Options options = new Options();
+ private String collection;
+ private Collection from;
+ private Collection to;
+
+ public String getCollection() {
+ return collection;
+ }
+
+ public EdgeDefinition collection(final String collection) {
+ this.collection = collection;
+ return this;
+ }
+
+ public Collection getFrom() {
+ return from;
+ }
+
+ public EdgeDefinition from(final String... from) {
+ this.from = Arrays.asList(from);
+ return this;
+ }
+
+ public Collection getTo() {
+ return to;
+ }
+
+ public EdgeDefinition to(final String... to) {
+ this.to = Arrays.asList(to);
+ return this;
+ }
+
+ public Collection getSatellites() {
+ return options.satellites;
+ }
+
+ public Options getOptions() {
+ return options;
+ }
+
+ /**
+ * @param satellites collection names that will be used to create SatelliteCollections
+ * for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
+ * must be a valid collection name. The collection type cannot be modified later.
+ * @return this
+ * @since ArangoDB 3.9.0
+ */
+ public EdgeDefinition satellites(final String... satellites) {
+ options.satellites = Arrays.asList(satellites);
+ return this;
+ }
+
+ public static final class Options {
+ private Collection satellites = Collections.emptyList();
+
+ public Collection getSatellites() {
+ return satellites;
+ }
+ }
+}
diff --git a/src/main/java/com/arangodb/entity/EdgeEntity.java b/driver/src/main/java/com/arangodb/entity/EdgeEntity.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/EdgeEntity.java
rename to driver/src/main/java/com/arangodb/entity/EdgeEntity.java
index 48107a1e1..39d9017db 100644
--- a/src/main/java/com/arangodb/entity/EdgeEntity.java
+++ b/driver/src/main/java/com/arangodb/entity/EdgeEntity.java
@@ -1,32 +1,32 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- */
-public final class EdgeEntity extends DocumentEntity {
-
- public EdgeEntity() {
- super();
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class EdgeEntity extends DocumentEntity {
+
+ public EdgeEntity() {
+ super();
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/EdgeUpdateEntity.java b/driver/src/main/java/com/arangodb/entity/EdgeUpdateEntity.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/EdgeUpdateEntity.java
rename to driver/src/main/java/com/arangodb/entity/EdgeUpdateEntity.java
index 67b72e76b..495cf229d 100644
--- a/src/main/java/com/arangodb/entity/EdgeUpdateEntity.java
+++ b/driver/src/main/java/com/arangodb/entity/EdgeUpdateEntity.java
@@ -1,42 +1,42 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class EdgeUpdateEntity extends DocumentEntity {
-
- @JsonProperty("_oldRev")
- private String oldRev;
-
- public EdgeUpdateEntity() {
- super();
- }
-
- public String getOldRev() {
- return oldRev;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class EdgeUpdateEntity extends DocumentEntity {
+
+ @JsonProperty("_oldRev")
+ private String oldRev;
+
+ public EdgeUpdateEntity() {
+ super();
+ }
+
+ public String getOldRev() {
+ return oldRev;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/ErrorEntity.java b/driver/src/main/java/com/arangodb/entity/ErrorEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/ErrorEntity.java
rename to driver/src/main/java/com/arangodb/entity/ErrorEntity.java
diff --git a/src/main/java/com/arangodb/entity/From.java b/driver/src/main/java/com/arangodb/entity/From.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/From.java
rename to driver/src/main/java/com/arangodb/entity/From.java
diff --git a/src/main/java/com/arangodb/entity/GraphEntity.java b/driver/src/main/java/com/arangodb/entity/GraphEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/GraphEntity.java
rename to driver/src/main/java/com/arangodb/entity/GraphEntity.java
diff --git a/src/main/java/com/arangodb/entity/Id.java b/driver/src/main/java/com/arangodb/entity/Id.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/Id.java
rename to driver/src/main/java/com/arangodb/entity/Id.java
diff --git a/src/main/java/com/arangodb/entity/IndexEntity.java b/driver/src/main/java/com/arangodb/entity/IndexEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/IndexEntity.java
rename to driver/src/main/java/com/arangodb/entity/IndexEntity.java
diff --git a/src/main/java/com/arangodb/entity/IndexType.java b/driver/src/main/java/com/arangodb/entity/IndexType.java
similarity index 94%
rename from src/main/java/com/arangodb/entity/IndexType.java
rename to driver/src/main/java/com/arangodb/entity/IndexType.java
index 3fbd025c3..d3303b5f5 100644
--- a/src/main/java/com/arangodb/entity/IndexType.java
+++ b/driver/src/main/java/com/arangodb/entity/IndexType.java
@@ -1,59 +1,59 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- * @author Heiko Kernbach
- */
-public enum IndexType {
-
- primary,
-
- hash,
-
- skiplist,
-
- persistent,
-
- geo,
-
- geo1,
-
- geo2,
-
- /**
- * @deprecated since ArangoDB 3.10, use ArangoSearch or Inverted indexes instead.
- */
- @Deprecated
- fulltext,
-
- edge,
-
- ttl,
-
- zkd,
-
- /**
- * @since ArangoDB 3.10
- */
- inverted
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ * @author Heiko Kernbach
+ */
+public enum IndexType {
+
+ primary,
+
+ hash,
+
+ skiplist,
+
+ persistent,
+
+ geo,
+
+ geo1,
+
+ geo2,
+
+ /**
+ * @deprecated since ArangoDB 3.10, use ArangoSearch or Inverted indexes instead.
+ */
+ @Deprecated
+ fulltext,
+
+ edge,
+
+ ttl,
+
+ zkd,
+
+ /**
+ * @since ArangoDB 3.10
+ */
+ inverted
+}
diff --git a/src/main/java/com/arangodb/entity/InvertedIndexEntity.java b/driver/src/main/java/com/arangodb/entity/InvertedIndexEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/InvertedIndexEntity.java
rename to driver/src/main/java/com/arangodb/entity/InvertedIndexEntity.java
diff --git a/src/main/java/com/arangodb/entity/InvertedIndexField.java b/driver/src/main/java/com/arangodb/entity/InvertedIndexField.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/InvertedIndexField.java
rename to driver/src/main/java/com/arangodb/entity/InvertedIndexField.java
diff --git a/src/main/java/com/arangodb/entity/InvertedIndexPrimarySort.java b/driver/src/main/java/com/arangodb/entity/InvertedIndexPrimarySort.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/InvertedIndexPrimarySort.java
rename to driver/src/main/java/com/arangodb/entity/InvertedIndexPrimarySort.java
diff --git a/src/main/java/com/arangodb/entity/Key.java b/driver/src/main/java/com/arangodb/entity/Key.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/Key.java
rename to driver/src/main/java/com/arangodb/entity/Key.java
diff --git a/src/main/java/com/arangodb/entity/KeyOptions.java b/driver/src/main/java/com/arangodb/entity/KeyOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/KeyOptions.java
rename to driver/src/main/java/com/arangodb/entity/KeyOptions.java
index 65bd435e5..7206c9dbb 100644
--- a/src/main/java/com/arangodb/entity/KeyOptions.java
+++ b/driver/src/main/java/com/arangodb/entity/KeyOptions.java
@@ -1,77 +1,77 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- */
-public final class KeyOptions {
-
- private Boolean allowUserKeys;
- private KeyType type;
- private Integer increment;
- private Integer offset;
-
- public KeyOptions() {
- super();
- }
-
- public KeyOptions(final Boolean allowUserKeys, final KeyType type, final Integer increment, final Integer offset) {
- super();
- this.allowUserKeys = allowUserKeys;
- this.type = type;
- this.increment = increment;
- this.offset = offset;
- }
-
- public Boolean getAllowUserKeys() {
- return allowUserKeys;
- }
-
- public void setAllowUserKeys(final Boolean allowUserKeys) {
- this.allowUserKeys = allowUserKeys;
- }
-
- public KeyType getType() {
- return type;
- }
-
- public void setType(final KeyType type) {
- this.type = type;
- }
-
- public Integer getIncrement() {
- return increment;
- }
-
- public void setIncrement(final Integer increment) {
- this.increment = increment;
- }
-
- public Integer getOffset() {
- return offset;
- }
-
- public void setOffset(final Integer offset) {
- this.offset = offset;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class KeyOptions {
+
+ private Boolean allowUserKeys;
+ private KeyType type;
+ private Integer increment;
+ private Integer offset;
+
+ public KeyOptions() {
+ super();
+ }
+
+ public KeyOptions(final Boolean allowUserKeys, final KeyType type, final Integer increment, final Integer offset) {
+ super();
+ this.allowUserKeys = allowUserKeys;
+ this.type = type;
+ this.increment = increment;
+ this.offset = offset;
+ }
+
+ public Boolean getAllowUserKeys() {
+ return allowUserKeys;
+ }
+
+ public void setAllowUserKeys(final Boolean allowUserKeys) {
+ this.allowUserKeys = allowUserKeys;
+ }
+
+ public KeyType getType() {
+ return type;
+ }
+
+ public void setType(final KeyType type) {
+ this.type = type;
+ }
+
+ public Integer getIncrement() {
+ return increment;
+ }
+
+ public void setIncrement(final Integer increment) {
+ this.increment = increment;
+ }
+
+ public Integer getOffset() {
+ return offset;
+ }
+
+ public void setOffset(final Integer offset) {
+ this.offset = offset;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/KeyType.java b/driver/src/main/java/com/arangodb/entity/KeyType.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/KeyType.java
rename to driver/src/main/java/com/arangodb/entity/KeyType.java
index 215ec6d0f..4ac2da4f3 100644
--- a/src/main/java/com/arangodb/entity/KeyType.java
+++ b/driver/src/main/java/com/arangodb/entity/KeyType.java
@@ -1,28 +1,28 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- */
-public enum KeyType {
- traditional, autoincrement, uuid, padded
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ */
+public enum KeyType {
+ traditional, autoincrement, uuid, padded
+}
diff --git a/src/main/java/com/arangodb/entity/License.java b/driver/src/main/java/com/arangodb/entity/License.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/License.java
rename to driver/src/main/java/com/arangodb/entity/License.java
diff --git a/src/main/java/com/arangodb/entity/LoadBalancingStrategy.java b/driver/src/main/java/com/arangodb/entity/LoadBalancingStrategy.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/LoadBalancingStrategy.java
rename to driver/src/main/java/com/arangodb/entity/LoadBalancingStrategy.java
index 9508dff48..525744fb3 100644
--- a/src/main/java/com/arangodb/entity/LoadBalancingStrategy.java
+++ b/driver/src/main/java/com/arangodb/entity/LoadBalancingStrategy.java
@@ -1,28 +1,28 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2017 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- */
-public enum LoadBalancingStrategy {
- NONE, ROUND_ROBIN, ONE_RANDOM
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2017 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ */
+public enum LoadBalancingStrategy {
+ NONE, ROUND_ROBIN, ONE_RANDOM
+}
diff --git a/src/main/java/com/arangodb/entity/LogEntriesEntity.java b/driver/src/main/java/com/arangodb/entity/LogEntriesEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/LogEntriesEntity.java
rename to driver/src/main/java/com/arangodb/entity/LogEntriesEntity.java
diff --git a/src/main/java/com/arangodb/entity/LogLevel.java b/driver/src/main/java/com/arangodb/entity/LogLevel.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/LogLevel.java
rename to driver/src/main/java/com/arangodb/entity/LogLevel.java
diff --git a/src/main/java/com/arangodb/entity/LogLevelEntity.java b/driver/src/main/java/com/arangodb/entity/LogLevelEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/LogLevelEntity.java
rename to driver/src/main/java/com/arangodb/entity/LogLevelEntity.java
diff --git a/src/main/java/com/arangodb/entity/MetaAware.java b/driver/src/main/java/com/arangodb/entity/MetaAware.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/MetaAware.java
rename to driver/src/main/java/com/arangodb/entity/MetaAware.java
diff --git a/src/main/java/com/arangodb/entity/MultiDocumentEntity.java b/driver/src/main/java/com/arangodb/entity/MultiDocumentEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/MultiDocumentEntity.java
rename to driver/src/main/java/com/arangodb/entity/MultiDocumentEntity.java
diff --git a/src/main/java/com/arangodb/entity/Permissions.java b/driver/src/main/java/com/arangodb/entity/Permissions.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/Permissions.java
rename to driver/src/main/java/com/arangodb/entity/Permissions.java
diff --git a/src/main/java/com/arangodb/entity/QueryCachePropertiesEntity.java b/driver/src/main/java/com/arangodb/entity/QueryCachePropertiesEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/QueryCachePropertiesEntity.java
rename to driver/src/main/java/com/arangodb/entity/QueryCachePropertiesEntity.java
diff --git a/src/main/java/com/arangodb/entity/QueryEntity.java b/driver/src/main/java/com/arangodb/entity/QueryEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/QueryEntity.java
rename to driver/src/main/java/com/arangodb/entity/QueryEntity.java
diff --git a/src/main/java/com/arangodb/entity/QueryExecutionState.java b/driver/src/main/java/com/arangodb/entity/QueryExecutionState.java
similarity index 95%
rename from src/main/java/com/arangodb/entity/QueryExecutionState.java
rename to driver/src/main/java/com/arangodb/entity/QueryExecutionState.java
index 987044880..aa56f92e9 100644
--- a/src/main/java/com/arangodb/entity/QueryExecutionState.java
+++ b/driver/src/main/java/com/arangodb/entity/QueryExecutionState.java
@@ -1,61 +1,61 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2018 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @author Mark Vollmary
- */
-public enum QueryExecutionState {
- @JsonProperty("initializing")
- INITIALIZING,
-
- @JsonProperty("parsing")
- PARSING,
-
- @JsonProperty("optimizing ast")
- OPTIMIZING_AST,
-
- @JsonProperty("loading collections")
- LOADING_COLLECTIONS,
-
- @JsonProperty("instantiating plan")
- INSTANTIATING_PLAN,
-
- @JsonProperty("optimizing plan")
- OPTIMIZING_PLAN,
-
- @JsonProperty("executing")
- EXECUTING,
-
- @JsonProperty("finalizing")
- FINALIZING,
-
- @JsonProperty("finished")
- FINISHED,
-
- @JsonProperty("killed")
- KILLED,
-
- @JsonProperty("invalid")
- INVALID
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2018 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * @author Mark Vollmary
+ */
+public enum QueryExecutionState {
+ @JsonProperty("initializing")
+ INITIALIZING,
+
+ @JsonProperty("parsing")
+ PARSING,
+
+ @JsonProperty("optimizing ast")
+ OPTIMIZING_AST,
+
+ @JsonProperty("loading collections")
+ LOADING_COLLECTIONS,
+
+ @JsonProperty("instantiating plan")
+ INSTANTIATING_PLAN,
+
+ @JsonProperty("optimizing plan")
+ OPTIMIZING_PLAN,
+
+ @JsonProperty("executing")
+ EXECUTING,
+
+ @JsonProperty("finalizing")
+ FINALIZING,
+
+ @JsonProperty("finished")
+ FINISHED,
+
+ @JsonProperty("killed")
+ KILLED,
+
+ @JsonProperty("invalid")
+ INVALID
+}
diff --git a/src/main/java/com/arangodb/entity/QueryOptimizerRule.java b/driver/src/main/java/com/arangodb/entity/QueryOptimizerRule.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/QueryOptimizerRule.java
rename to driver/src/main/java/com/arangodb/entity/QueryOptimizerRule.java
diff --git a/src/main/java/com/arangodb/entity/QueryTrackingPropertiesEntity.java b/driver/src/main/java/com/arangodb/entity/QueryTrackingPropertiesEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/QueryTrackingPropertiesEntity.java
rename to driver/src/main/java/com/arangodb/entity/QueryTrackingPropertiesEntity.java
diff --git a/src/main/java/com/arangodb/entity/ReplicationFactor.java b/driver/src/main/java/com/arangodb/entity/ReplicationFactor.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/ReplicationFactor.java
rename to driver/src/main/java/com/arangodb/entity/ReplicationFactor.java
diff --git a/src/main/java/com/arangodb/entity/Rev.java b/driver/src/main/java/com/arangodb/entity/Rev.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/Rev.java
rename to driver/src/main/java/com/arangodb/entity/Rev.java
diff --git a/src/main/java/com/arangodb/entity/ServerMode.java b/driver/src/main/java/com/arangodb/entity/ServerMode.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/ServerMode.java
rename to driver/src/main/java/com/arangodb/entity/ServerMode.java
index b7f95040c..4cb13610d 100644
--- a/src/main/java/com/arangodb/entity/ServerMode.java
+++ b/driver/src/main/java/com/arangodb/entity/ServerMode.java
@@ -1,28 +1,28 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2017 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- */
-public enum ServerMode {
- DEFAULT, RESILIENT
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2017 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ */
+public enum ServerMode {
+ DEFAULT, RESILIENT
+}
diff --git a/src/main/java/com/arangodb/entity/ServerRole.java b/driver/src/main/java/com/arangodb/entity/ServerRole.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/ServerRole.java
rename to driver/src/main/java/com/arangodb/entity/ServerRole.java
index 71e1b7473..a897651ff 100644
--- a/src/main/java/com/arangodb/entity/ServerRole.java
+++ b/driver/src/main/java/com/arangodb/entity/ServerRole.java
@@ -1,28 +1,28 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- */
-public enum ServerRole {
- SINGLE, AGENT, COORDINATOR, PRIMARY, SECONDARY, UNDEFINED
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ */
+public enum ServerRole {
+ SINGLE, AGENT, COORDINATOR, PRIMARY, SECONDARY, UNDEFINED
}
\ No newline at end of file
diff --git a/src/main/java/com/arangodb/entity/ShardEntity.java b/driver/src/main/java/com/arangodb/entity/ShardEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/ShardEntity.java
rename to driver/src/main/java/com/arangodb/entity/ShardEntity.java
diff --git a/src/main/java/com/arangodb/entity/ShardingStrategy.java b/driver/src/main/java/com/arangodb/entity/ShardingStrategy.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/ShardingStrategy.java
rename to driver/src/main/java/com/arangodb/entity/ShardingStrategy.java
diff --git a/src/main/java/com/arangodb/entity/StreamTransactionEntity.java b/driver/src/main/java/com/arangodb/entity/StreamTransactionEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/StreamTransactionEntity.java
rename to driver/src/main/java/com/arangodb/entity/StreamTransactionEntity.java
diff --git a/src/main/java/com/arangodb/entity/StreamTransactionStatus.java b/driver/src/main/java/com/arangodb/entity/StreamTransactionStatus.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/StreamTransactionStatus.java
rename to driver/src/main/java/com/arangodb/entity/StreamTransactionStatus.java
diff --git a/src/main/java/com/arangodb/entity/To.java b/driver/src/main/java/com/arangodb/entity/To.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/To.java
rename to driver/src/main/java/com/arangodb/entity/To.java
diff --git a/src/main/java/com/arangodb/entity/TransactionEntity.java b/driver/src/main/java/com/arangodb/entity/TransactionEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/TransactionEntity.java
rename to driver/src/main/java/com/arangodb/entity/TransactionEntity.java
diff --git a/src/main/java/com/arangodb/entity/UserEntity.java b/driver/src/main/java/com/arangodb/entity/UserEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/UserEntity.java
rename to driver/src/main/java/com/arangodb/entity/UserEntity.java
diff --git a/src/main/java/com/arangodb/entity/VertexEntity.java b/driver/src/main/java/com/arangodb/entity/VertexEntity.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/VertexEntity.java
rename to driver/src/main/java/com/arangodb/entity/VertexEntity.java
index e8348336a..4dfb6a55a 100644
--- a/src/main/java/com/arangodb/entity/VertexEntity.java
+++ b/driver/src/main/java/com/arangodb/entity/VertexEntity.java
@@ -1,32 +1,32 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-/**
- * @author Mark Vollmary
- */
-public final class VertexEntity extends DocumentEntity {
-
- public VertexEntity() {
- super();
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class VertexEntity extends DocumentEntity {
+
+ public VertexEntity() {
+ super();
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/VertexUpdateEntity.java b/driver/src/main/java/com/arangodb/entity/VertexUpdateEntity.java
similarity index 96%
rename from src/main/java/com/arangodb/entity/VertexUpdateEntity.java
rename to driver/src/main/java/com/arangodb/entity/VertexUpdateEntity.java
index c5e8f0ff2..ef19a4386 100644
--- a/src/main/java/com/arangodb/entity/VertexUpdateEntity.java
+++ b/driver/src/main/java/com/arangodb/entity/VertexUpdateEntity.java
@@ -1,41 +1,41 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.entity;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @author Mark Vollmary
- */
-public final class VertexUpdateEntity extends DocumentEntity {
-
- @JsonProperty("_oldRev")
- private String oldRev;
-
- public VertexUpdateEntity() {
- super();
- }
-
- public String getOldRev() {
- return oldRev;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class VertexUpdateEntity extends DocumentEntity {
+
+ @JsonProperty("_oldRev")
+ private String oldRev;
+
+ public VertexUpdateEntity() {
+ super();
+ }
+
+ public String getOldRev() {
+ return oldRev;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/entity/ViewEntity.java b/driver/src/main/java/com/arangodb/entity/ViewEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/ViewEntity.java
rename to driver/src/main/java/com/arangodb/entity/ViewEntity.java
diff --git a/src/main/java/com/arangodb/entity/ViewType.java b/driver/src/main/java/com/arangodb/entity/ViewType.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/ViewType.java
rename to driver/src/main/java/com/arangodb/entity/ViewType.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/AnalyzerFeature.java b/driver/src/main/java/com/arangodb/entity/arangosearch/AnalyzerFeature.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/AnalyzerFeature.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/AnalyzerFeature.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/AnalyzerType.java b/driver/src/main/java/com/arangodb/entity/arangosearch/AnalyzerType.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/AnalyzerType.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/AnalyzerType.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/ArangoSearchCompression.java b/driver/src/main/java/com/arangodb/entity/arangosearch/ArangoSearchCompression.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/ArangoSearchCompression.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/ArangoSearchCompression.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/ArangoSearchPropertiesEntity.java b/driver/src/main/java/com/arangodb/entity/arangosearch/ArangoSearchPropertiesEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/ArangoSearchPropertiesEntity.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/ArangoSearchPropertiesEntity.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/CollectionLink.java b/driver/src/main/java/com/arangodb/entity/arangosearch/CollectionLink.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/CollectionLink.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/CollectionLink.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/ConsolidationPolicy.java b/driver/src/main/java/com/arangodb/entity/arangosearch/ConsolidationPolicy.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/ConsolidationPolicy.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/ConsolidationPolicy.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/ConsolidationType.java b/driver/src/main/java/com/arangodb/entity/arangosearch/ConsolidationType.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/ConsolidationType.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/ConsolidationType.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/FieldLink.java b/driver/src/main/java/com/arangodb/entity/arangosearch/FieldLink.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/FieldLink.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/FieldLink.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/PrimarySort.java b/driver/src/main/java/com/arangodb/entity/arangosearch/PrimarySort.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/PrimarySort.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/PrimarySort.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/SearchAliasIndex.java b/driver/src/main/java/com/arangodb/entity/arangosearch/SearchAliasIndex.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/SearchAliasIndex.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/SearchAliasIndex.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/SearchAliasPropertiesEntity.java b/driver/src/main/java/com/arangodb/entity/arangosearch/SearchAliasPropertiesEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/SearchAliasPropertiesEntity.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/SearchAliasPropertiesEntity.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/StoreValuesType.java b/driver/src/main/java/com/arangodb/entity/arangosearch/StoreValuesType.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/StoreValuesType.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/StoreValuesType.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/StoredValue.java b/driver/src/main/java/com/arangodb/entity/arangosearch/StoredValue.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/StoredValue.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/StoredValue.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/AQLAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/AQLAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/AQLAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/AQLAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/AQLAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/AQLAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/AQLAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/AQLAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/ClassificationAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/ClassificationAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/ClassificationAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/ClassificationAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/ClassificationAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/ClassificationAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/ClassificationAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/ClassificationAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/CollationAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/CollationAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/CollationAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/CollationAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/CollationAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/CollationAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/CollationAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/CollationAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/DelimiterAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/DelimiterAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/DelimiterAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/DelimiterAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/DelimiterAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/DelimiterAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/DelimiterAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/DelimiterAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/EdgeNgram.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/EdgeNgram.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/EdgeNgram.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/EdgeNgram.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoAnalyzerOptions.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoAnalyzerOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoAnalyzerOptions.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoAnalyzerOptions.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoPointAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoPointAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoPointAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoPointAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoPointAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoPointAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoPointAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoPointAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/IdentityAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/IdentityAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/IdentityAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/IdentityAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/MinHashAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/MinHashAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/MinHashAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/MinHashAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/MinHashAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/MinHashAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/MinHashAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/MinHashAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/NGramAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NGramAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/NGramAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NGramAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/NGramAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NGramAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/NGramAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NGramAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/NearestNeighborsAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NearestNeighborsAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/NearestNeighborsAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NearestNeighborsAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/NearestNeighborsAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NearestNeighborsAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/NearestNeighborsAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NearestNeighborsAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/NormAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NormAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/NormAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NormAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/NormAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NormAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/NormAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/NormAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/PipelineAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/PipelineAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/PipelineAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/PipelineAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/PipelineAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/PipelineAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/PipelineAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/PipelineAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzerCase.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzerCase.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzerCase.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzerCase.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/SegmentationAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/SegmentationAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/SegmentationAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/SegmentationAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/SegmentationAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/SegmentationAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/SegmentationAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/SegmentationAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/StemAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StemAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/StemAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StemAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/StemAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StemAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/StemAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StemAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/StopwordsAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StopwordsAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/StopwordsAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StopwordsAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/StopwordsAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StopwordsAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/StopwordsAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StopwordsAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/StreamType.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StreamType.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/StreamType.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/StreamType.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/TextAnalyzer.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/TextAnalyzer.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/TextAnalyzer.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/TextAnalyzer.java
diff --git a/src/main/java/com/arangodb/entity/arangosearch/analyzer/TextAnalyzerProperties.java b/driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/TextAnalyzerProperties.java
similarity index 100%
rename from src/main/java/com/arangodb/entity/arangosearch/analyzer/TextAnalyzerProperties.java
rename to driver/src/main/java/com/arangodb/entity/arangosearch/analyzer/TextAnalyzerProperties.java
diff --git a/src/main/java/com/arangodb/internal/ArangoCollectionImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoCollectionImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoCollectionImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoCollectionImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoCursorExecute.java b/driver/src/main/java/com/arangodb/internal/ArangoCursorExecute.java
similarity index 96%
rename from src/main/java/com/arangodb/internal/ArangoCursorExecute.java
rename to driver/src/main/java/com/arangodb/internal/ArangoCursorExecute.java
index e9a6512af..7efc5eef9 100644
--- a/src/main/java/com/arangodb/internal/ArangoCursorExecute.java
+++ b/driver/src/main/java/com/arangodb/internal/ArangoCursorExecute.java
@@ -1,36 +1,36 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal;
-
-import com.arangodb.internal.cursor.entity.InternalCursorEntity;
-
-import java.util.Map;
-
-/**
- * @author Mark Vollmary
- */
-public interface ArangoCursorExecute {
-
- InternalCursorEntity next(String id, Map meta);
-
- void close(String id, Map meta);
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal;
+
+import com.arangodb.internal.cursor.entity.InternalCursorEntity;
+
+import java.util.Map;
+
+/**
+ * @author Mark Vollmary
+ */
+public interface ArangoCursorExecute {
+
+ InternalCursorEntity next(String id, Map meta);
+
+ void close(String id, Map meta);
+
+}
diff --git a/src/main/java/com/arangodb/internal/ArangoDBImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoDBImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoDBImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoDBImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoDatabaseImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoDatabaseImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoDatabaseImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoDatabaseImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoDefaults.java b/driver/src/main/java/com/arangodb/internal/ArangoDefaults.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoDefaults.java
rename to driver/src/main/java/com/arangodb/internal/ArangoDefaults.java
diff --git a/src/main/java/com/arangodb/internal/ArangoEdgeCollectionImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoEdgeCollectionImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoEdgeCollectionImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoEdgeCollectionImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoErrors.java b/driver/src/main/java/com/arangodb/internal/ArangoErrors.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoErrors.java
rename to driver/src/main/java/com/arangodb/internal/ArangoErrors.java
diff --git a/src/main/java/com/arangodb/internal/ArangoExecuteable.java b/driver/src/main/java/com/arangodb/internal/ArangoExecuteable.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoExecuteable.java
rename to driver/src/main/java/com/arangodb/internal/ArangoExecuteable.java
diff --git a/src/main/java/com/arangodb/internal/ArangoExecutor.java b/driver/src/main/java/com/arangodb/internal/ArangoExecutor.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoExecutor.java
rename to driver/src/main/java/com/arangodb/internal/ArangoExecutor.java
diff --git a/src/main/java/com/arangodb/internal/ArangoExecutorSync.java b/driver/src/main/java/com/arangodb/internal/ArangoExecutorSync.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoExecutorSync.java
rename to driver/src/main/java/com/arangodb/internal/ArangoExecutorSync.java
diff --git a/src/main/java/com/arangodb/internal/ArangoGraphImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoGraphImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoGraphImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoGraphImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoMetricsImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoMetricsImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoMetricsImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoMetricsImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoRequestParam.java b/driver/src/main/java/com/arangodb/internal/ArangoRequestParam.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoRequestParam.java
rename to driver/src/main/java/com/arangodb/internal/ArangoRequestParam.java
diff --git a/src/main/java/com/arangodb/internal/ArangoResponseField.java b/driver/src/main/java/com/arangodb/internal/ArangoResponseField.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoResponseField.java
rename to driver/src/main/java/com/arangodb/internal/ArangoResponseField.java
diff --git a/src/main/java/com/arangodb/internal/ArangoRouteImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoRouteImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoRouteImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoRouteImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoSearchImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoSearchImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoSearchImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoSearchImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoVertexCollectionImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoVertexCollectionImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoVertexCollectionImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoVertexCollectionImpl.java
diff --git a/src/main/java/com/arangodb/internal/ArangoViewImpl.java b/driver/src/main/java/com/arangodb/internal/ArangoViewImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/ArangoViewImpl.java
rename to driver/src/main/java/com/arangodb/internal/ArangoViewImpl.java
diff --git a/src/main/java/com/arangodb/internal/DocumentFields.java b/driver/src/main/java/com/arangodb/internal/DocumentFields.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/DocumentFields.java
rename to driver/src/main/java/com/arangodb/internal/DocumentFields.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoCollection.java b/driver/src/main/java/com/arangodb/internal/InternalArangoCollection.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoCollection.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoCollection.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoDB.java b/driver/src/main/java/com/arangodb/internal/InternalArangoDB.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoDB.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoDB.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoDBBuilder.java b/driver/src/main/java/com/arangodb/internal/InternalArangoDBBuilder.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoDBBuilder.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoDBBuilder.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoDatabase.java b/driver/src/main/java/com/arangodb/internal/InternalArangoDatabase.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoDatabase.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoDatabase.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoEdgeCollection.java b/driver/src/main/java/com/arangodb/internal/InternalArangoEdgeCollection.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoEdgeCollection.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoEdgeCollection.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoGraph.java b/driver/src/main/java/com/arangodb/internal/InternalArangoGraph.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoGraph.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoGraph.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoRoute.java b/driver/src/main/java/com/arangodb/internal/InternalArangoRoute.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoRoute.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoRoute.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoSearch.java b/driver/src/main/java/com/arangodb/internal/InternalArangoSearch.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoSearch.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoSearch.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoVertexCollection.java b/driver/src/main/java/com/arangodb/internal/InternalArangoVertexCollection.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoVertexCollection.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoVertexCollection.java
diff --git a/src/main/java/com/arangodb/internal/InternalArangoView.java b/driver/src/main/java/com/arangodb/internal/InternalArangoView.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalArangoView.java
rename to driver/src/main/java/com/arangodb/internal/InternalArangoView.java
diff --git a/src/main/java/com/arangodb/internal/InternalSearchAlias.java b/driver/src/main/java/com/arangodb/internal/InternalSearchAlias.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/InternalSearchAlias.java
rename to driver/src/main/java/com/arangodb/internal/InternalSearchAlias.java
diff --git a/src/main/java/com/arangodb/internal/QueueTimeMetricsImpl.java b/driver/src/main/java/com/arangodb/internal/QueueTimeMetricsImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/QueueTimeMetricsImpl.java
rename to driver/src/main/java/com/arangodb/internal/QueueTimeMetricsImpl.java
diff --git a/src/main/java/com/arangodb/internal/SearchAliasImpl.java b/driver/src/main/java/com/arangodb/internal/SearchAliasImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/SearchAliasImpl.java
rename to driver/src/main/java/com/arangodb/internal/SearchAliasImpl.java
diff --git a/src/main/java/com/arangodb/internal/cursor/AbstractArangoIterable.java b/driver/src/main/java/com/arangodb/internal/cursor/AbstractArangoIterable.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/cursor/AbstractArangoIterable.java
rename to driver/src/main/java/com/arangodb/internal/cursor/AbstractArangoIterable.java
diff --git a/src/main/java/com/arangodb/internal/cursor/ArangoCursorImpl.java b/driver/src/main/java/com/arangodb/internal/cursor/ArangoCursorImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/cursor/ArangoCursorImpl.java
rename to driver/src/main/java/com/arangodb/internal/cursor/ArangoCursorImpl.java
diff --git a/src/main/java/com/arangodb/internal/cursor/ArangoCursorIterator.java b/driver/src/main/java/com/arangodb/internal/cursor/ArangoCursorIterator.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/cursor/ArangoCursorIterator.java
rename to driver/src/main/java/com/arangodb/internal/cursor/ArangoCursorIterator.java
diff --git a/src/main/java/com/arangodb/internal/cursor/entity/InternalCursorEntity.java b/driver/src/main/java/com/arangodb/internal/cursor/entity/InternalCursorEntity.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/cursor/entity/InternalCursorEntity.java
rename to driver/src/main/java/com/arangodb/internal/cursor/entity/InternalCursorEntity.java
diff --git a/src/main/java/com/arangodb/internal/http/HttpCommunication.java b/driver/src/main/java/com/arangodb/internal/http/HttpCommunication.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/http/HttpCommunication.java
rename to driver/src/main/java/com/arangodb/internal/http/HttpCommunication.java
diff --git a/src/main/java/com/arangodb/internal/http/HttpConnection.java b/driver/src/main/java/com/arangodb/internal/http/HttpConnection.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/http/HttpConnection.java
rename to driver/src/main/java/com/arangodb/internal/http/HttpConnection.java
diff --git a/src/main/java/com/arangodb/internal/http/HttpConnectionFactory.java b/driver/src/main/java/com/arangodb/internal/http/HttpConnectionFactory.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/http/HttpConnectionFactory.java
rename to driver/src/main/java/com/arangodb/internal/http/HttpConnectionFactory.java
diff --git a/src/main/java/com/arangodb/internal/http/HttpProtocol.java b/driver/src/main/java/com/arangodb/internal/http/HttpProtocol.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/http/HttpProtocol.java
rename to driver/src/main/java/com/arangodb/internal/http/HttpProtocol.java
diff --git a/src/main/java/com/arangodb/internal/net/AccessType.java b/driver/src/main/java/com/arangodb/internal/net/AccessType.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/AccessType.java
rename to driver/src/main/java/com/arangodb/internal/net/AccessType.java
diff --git a/src/main/java/com/arangodb/internal/net/ArangoDBRedirectException.java b/driver/src/main/java/com/arangodb/internal/net/ArangoDBRedirectException.java
similarity index 96%
rename from src/main/java/com/arangodb/internal/net/ArangoDBRedirectException.java
rename to driver/src/main/java/com/arangodb/internal/net/ArangoDBRedirectException.java
index 8b7c37010..bf8e0c9cd 100644
--- a/src/main/java/com/arangodb/internal/net/ArangoDBRedirectException.java
+++ b/driver/src/main/java/com/arangodb/internal/net/ArangoDBRedirectException.java
@@ -1,42 +1,42 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2017 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal.net;
-
-import com.arangodb.ArangoDBException;
-
-/**
- * @author Mark Vollmary
- */
-public class ArangoDBRedirectException extends ArangoDBException {
-
- private static final long serialVersionUID = -94810262465567613L;
- private final String location;
-
- public ArangoDBRedirectException(final String message, final String location) {
- super(message);
- this.location = location;
- }
-
- public String getLocation() {
- return location;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2017 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal.net;
+
+import com.arangodb.ArangoDBException;
+
+/**
+ * @author Mark Vollmary
+ */
+public class ArangoDBRedirectException extends ArangoDBException {
+
+ private static final long serialVersionUID = -94810262465567613L;
+ private final String location;
+
+ public ArangoDBRedirectException(final String message, final String location) {
+ super(message);
+ this.location = location;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/internal/net/CommunicationProtocol.java b/driver/src/main/java/com/arangodb/internal/net/CommunicationProtocol.java
similarity index 96%
rename from src/main/java/com/arangodb/internal/net/CommunicationProtocol.java
rename to driver/src/main/java/com/arangodb/internal/net/CommunicationProtocol.java
index 5f1d8f16b..799fd03d3 100644
--- a/src/main/java/com/arangodb/internal/net/CommunicationProtocol.java
+++ b/driver/src/main/java/com/arangodb/internal/net/CommunicationProtocol.java
@@ -1,37 +1,37 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal.net;
-
-import com.arangodb.Request;
-import com.arangodb.Response;
-
-import java.io.Closeable;
-
-/**
- * @author Mark Vollmary
- */
-public interface CommunicationProtocol extends Closeable {
-
- Response execute(final Request request, HostHandle hostHandle);
-
- void setJwt(String jwt);
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal.net;
+
+import com.arangodb.Request;
+import com.arangodb.Response;
+
+import java.io.Closeable;
+
+/**
+ * @author Mark Vollmary
+ */
+public interface CommunicationProtocol extends Closeable {
+
+ Response execute(final Request request, HostHandle hostHandle);
+
+ void setJwt(String jwt);
+
+}
diff --git a/src/main/java/com/arangodb/internal/net/Connection.java b/driver/src/main/java/com/arangodb/internal/net/Connection.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/Connection.java
rename to driver/src/main/java/com/arangodb/internal/net/Connection.java
diff --git a/src/main/java/com/arangodb/internal/net/ConnectionFactory.java b/driver/src/main/java/com/arangodb/internal/net/ConnectionFactory.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/ConnectionFactory.java
rename to driver/src/main/java/com/arangodb/internal/net/ConnectionFactory.java
diff --git a/src/main/java/com/arangodb/internal/net/ConnectionPool.java b/driver/src/main/java/com/arangodb/internal/net/ConnectionPool.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/ConnectionPool.java
rename to driver/src/main/java/com/arangodb/internal/net/ConnectionPool.java
diff --git a/src/main/java/com/arangodb/internal/net/ConnectionPoolImpl.java b/driver/src/main/java/com/arangodb/internal/net/ConnectionPoolImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/ConnectionPoolImpl.java
rename to driver/src/main/java/com/arangodb/internal/net/ConnectionPoolImpl.java
diff --git a/src/main/java/com/arangodb/internal/net/DirtyReadHostHandler.java b/driver/src/main/java/com/arangodb/internal/net/DirtyReadHostHandler.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/DirtyReadHostHandler.java
rename to driver/src/main/java/com/arangodb/internal/net/DirtyReadHostHandler.java
diff --git a/src/main/java/com/arangodb/internal/net/ExtendedHostResolver.java b/driver/src/main/java/com/arangodb/internal/net/ExtendedHostResolver.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/ExtendedHostResolver.java
rename to driver/src/main/java/com/arangodb/internal/net/ExtendedHostResolver.java
diff --git a/src/main/java/com/arangodb/internal/net/FallbackHostHandler.java b/driver/src/main/java/com/arangodb/internal/net/FallbackHostHandler.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/FallbackHostHandler.java
rename to driver/src/main/java/com/arangodb/internal/net/FallbackHostHandler.java
diff --git a/src/main/java/com/arangodb/internal/net/Host.java b/driver/src/main/java/com/arangodb/internal/net/Host.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/Host.java
rename to driver/src/main/java/com/arangodb/internal/net/Host.java
diff --git a/src/main/java/com/arangodb/internal/net/HostDescription.java b/driver/src/main/java/com/arangodb/internal/net/HostDescription.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/HostDescription.java
rename to driver/src/main/java/com/arangodb/internal/net/HostDescription.java
diff --git a/src/main/java/com/arangodb/internal/net/HostHandle.java b/driver/src/main/java/com/arangodb/internal/net/HostHandle.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/HostHandle.java
rename to driver/src/main/java/com/arangodb/internal/net/HostHandle.java
diff --git a/src/main/java/com/arangodb/internal/net/HostHandler.java b/driver/src/main/java/com/arangodb/internal/net/HostHandler.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/HostHandler.java
rename to driver/src/main/java/com/arangodb/internal/net/HostHandler.java
diff --git a/src/main/java/com/arangodb/internal/net/HostImpl.java b/driver/src/main/java/com/arangodb/internal/net/HostImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/HostImpl.java
rename to driver/src/main/java/com/arangodb/internal/net/HostImpl.java
diff --git a/src/main/java/com/arangodb/internal/net/HostResolver.java b/driver/src/main/java/com/arangodb/internal/net/HostResolver.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/HostResolver.java
rename to driver/src/main/java/com/arangodb/internal/net/HostResolver.java
diff --git a/src/main/java/com/arangodb/internal/net/HostSet.java b/driver/src/main/java/com/arangodb/internal/net/HostSet.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/HostSet.java
rename to driver/src/main/java/com/arangodb/internal/net/HostSet.java
diff --git a/src/main/java/com/arangodb/internal/net/RandomHostHandler.java b/driver/src/main/java/com/arangodb/internal/net/RandomHostHandler.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/RandomHostHandler.java
rename to driver/src/main/java/com/arangodb/internal/net/RandomHostHandler.java
diff --git a/src/main/java/com/arangodb/internal/net/RoundRobinHostHandler.java b/driver/src/main/java/com/arangodb/internal/net/RoundRobinHostHandler.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/RoundRobinHostHandler.java
rename to driver/src/main/java/com/arangodb/internal/net/RoundRobinHostHandler.java
diff --git a/src/main/java/com/arangodb/internal/net/SimpleHostResolver.java b/driver/src/main/java/com/arangodb/internal/net/SimpleHostResolver.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/net/SimpleHostResolver.java
rename to driver/src/main/java/com/arangodb/internal/net/SimpleHostResolver.java
diff --git a/src/main/java/com/arangodb/internal/serde/InternalAnnotationIntrospector.java b/driver/src/main/java/com/arangodb/internal/serde/InternalAnnotationIntrospector.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/InternalAnnotationIntrospector.java
rename to driver/src/main/java/com/arangodb/internal/serde/InternalAnnotationIntrospector.java
diff --git a/src/main/java/com/arangodb/internal/serde/InternalDeserializers.java b/driver/src/main/java/com/arangodb/internal/serde/InternalDeserializers.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/InternalDeserializers.java
rename to driver/src/main/java/com/arangodb/internal/serde/InternalDeserializers.java
diff --git a/src/main/java/com/arangodb/internal/serde/InternalModule.java b/driver/src/main/java/com/arangodb/internal/serde/InternalModule.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/InternalModule.java
rename to driver/src/main/java/com/arangodb/internal/serde/InternalModule.java
diff --git a/src/main/java/com/arangodb/internal/serde/InternalParameterizedType.java b/driver/src/main/java/com/arangodb/internal/serde/InternalParameterizedType.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/InternalParameterizedType.java
rename to driver/src/main/java/com/arangodb/internal/serde/InternalParameterizedType.java
diff --git a/src/main/java/com/arangodb/internal/serde/InternalSerde.java b/driver/src/main/java/com/arangodb/internal/serde/InternalSerde.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/InternalSerde.java
rename to driver/src/main/java/com/arangodb/internal/serde/InternalSerde.java
diff --git a/src/main/java/com/arangodb/internal/serde/InternalSerdeImpl.java b/driver/src/main/java/com/arangodb/internal/serde/InternalSerdeImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/InternalSerdeImpl.java
rename to driver/src/main/java/com/arangodb/internal/serde/InternalSerdeImpl.java
diff --git a/src/main/java/com/arangodb/internal/serde/InternalSerializers.java b/driver/src/main/java/com/arangodb/internal/serde/InternalSerializers.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/InternalSerializers.java
rename to driver/src/main/java/com/arangodb/internal/serde/InternalSerializers.java
diff --git a/src/main/java/com/arangodb/internal/serde/JacksonSerdeImpl.java b/driver/src/main/java/com/arangodb/internal/serde/JacksonSerdeImpl.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/JacksonSerdeImpl.java
rename to driver/src/main/java/com/arangodb/internal/serde/JacksonSerdeImpl.java
diff --git a/src/main/java/com/arangodb/internal/serde/JsonMapperProvider.java b/driver/src/main/java/com/arangodb/internal/serde/JsonMapperProvider.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/JsonMapperProvider.java
rename to driver/src/main/java/com/arangodb/internal/serde/JsonMapperProvider.java
diff --git a/src/main/java/com/arangodb/internal/serde/MapperProvider.java b/driver/src/main/java/com/arangodb/internal/serde/MapperProvider.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/MapperProvider.java
rename to driver/src/main/java/com/arangodb/internal/serde/MapperProvider.java
diff --git a/src/main/java/com/arangodb/internal/serde/SerdeUtils.java b/driver/src/main/java/com/arangodb/internal/serde/SerdeUtils.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/SerdeUtils.java
rename to driver/src/main/java/com/arangodb/internal/serde/SerdeUtils.java
diff --git a/src/main/java/com/arangodb/internal/serde/UserData.java b/driver/src/main/java/com/arangodb/internal/serde/UserData.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/UserData.java
rename to driver/src/main/java/com/arangodb/internal/serde/UserData.java
diff --git a/src/main/java/com/arangodb/internal/serde/UserDataDeserializer.java b/driver/src/main/java/com/arangodb/internal/serde/UserDataDeserializer.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/UserDataDeserializer.java
rename to driver/src/main/java/com/arangodb/internal/serde/UserDataDeserializer.java
diff --git a/src/main/java/com/arangodb/internal/serde/UserDataInside.java b/driver/src/main/java/com/arangodb/internal/serde/UserDataInside.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/UserDataInside.java
rename to driver/src/main/java/com/arangodb/internal/serde/UserDataInside.java
diff --git a/src/main/java/com/arangodb/internal/serde/UserDataSerializer.java b/driver/src/main/java/com/arangodb/internal/serde/UserDataSerializer.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/UserDataSerializer.java
rename to driver/src/main/java/com/arangodb/internal/serde/UserDataSerializer.java
diff --git a/src/main/java/com/arangodb/internal/serde/VPackMapperProvider.java b/driver/src/main/java/com/arangodb/internal/serde/VPackMapperProvider.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/serde/VPackMapperProvider.java
rename to driver/src/main/java/com/arangodb/internal/serde/VPackMapperProvider.java
diff --git a/src/main/java/com/arangodb/internal/util/DocumentUtil.java b/driver/src/main/java/com/arangodb/internal/util/DocumentUtil.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/util/DocumentUtil.java
rename to driver/src/main/java/com/arangodb/internal/util/DocumentUtil.java
diff --git a/src/main/java/com/arangodb/internal/util/EncodeUtils.java b/driver/src/main/java/com/arangodb/internal/util/EncodeUtils.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/util/EncodeUtils.java
rename to driver/src/main/java/com/arangodb/internal/util/EncodeUtils.java
diff --git a/src/main/java/com/arangodb/internal/util/HostUtils.java b/driver/src/main/java/com/arangodb/internal/util/HostUtils.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/util/HostUtils.java
rename to driver/src/main/java/com/arangodb/internal/util/HostUtils.java
diff --git a/src/main/java/com/arangodb/internal/util/RequestUtils.java b/driver/src/main/java/com/arangodb/internal/util/RequestUtils.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/util/RequestUtils.java
rename to driver/src/main/java/com/arangodb/internal/util/RequestUtils.java
diff --git a/src/main/java/com/arangodb/internal/util/ResponseUtils.java b/driver/src/main/java/com/arangodb/internal/util/ResponseUtils.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/util/ResponseUtils.java
rename to driver/src/main/java/com/arangodb/internal/util/ResponseUtils.java
diff --git a/src/main/java/com/arangodb/internal/velocystream/VstCommunication.java b/driver/src/main/java/com/arangodb/internal/velocystream/VstCommunication.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/velocystream/VstCommunication.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/VstCommunication.java
diff --git a/src/main/java/com/arangodb/internal/velocystream/VstCommunicationSync.java b/driver/src/main/java/com/arangodb/internal/velocystream/VstCommunicationSync.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/velocystream/VstCommunicationSync.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/VstCommunicationSync.java
diff --git a/src/main/java/com/arangodb/internal/velocystream/VstConnectionFactorySync.java b/driver/src/main/java/com/arangodb/internal/velocystream/VstConnectionFactorySync.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/velocystream/VstConnectionFactorySync.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/VstConnectionFactorySync.java
diff --git a/src/main/java/com/arangodb/internal/velocystream/VstProtocol.java b/driver/src/main/java/com/arangodb/internal/velocystream/VstProtocol.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/velocystream/VstProtocol.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/VstProtocol.java
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/AuthenticationRequest.java b/driver/src/main/java/com/arangodb/internal/velocystream/internal/AuthenticationRequest.java
similarity index 96%
rename from src/main/java/com/arangodb/internal/velocystream/internal/AuthenticationRequest.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/internal/AuthenticationRequest.java
index 8e8310791..dd48dbc4b 100644
--- a/src/main/java/com/arangodb/internal/velocystream/internal/AuthenticationRequest.java
+++ b/driver/src/main/java/com/arangodb/internal/velocystream/internal/AuthenticationRequest.java
@@ -1,55 +1,55 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal.velocystream.internal;
-
-import com.arangodb.DbName;
-import com.arangodb.Request;
-
-/**
- * @author Mark Vollmary
- */
-public class AuthenticationRequest extends Request {
-
- private final String user;
- private final String password;
- private final String encryption;// "plain"
-
- public AuthenticationRequest(final String user, final String password, final String encryption) {
- super(DbName.of(null), null, null);
- this.user = user;
- this.password = password;
- this.encryption = encryption;
- setType(1000);
- }
-
- public String getUser() {
- return user;
- }
-
- public String getPassword() {
- return password;
- }
-
- public String getEncryption() {
- return encryption;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal.velocystream.internal;
+
+import com.arangodb.DbName;
+import com.arangodb.Request;
+
+/**
+ * @author Mark Vollmary
+ */
+public class AuthenticationRequest extends Request {
+
+ private final String user;
+ private final String password;
+ private final String encryption;// "plain"
+
+ public AuthenticationRequest(final String user, final String password, final String encryption) {
+ super(DbName.of(null), null, null);
+ this.user = user;
+ this.password = password;
+ this.encryption = encryption;
+ setType(1000);
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public String getEncryption() {
+ return encryption;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/Chunk.java b/driver/src/main/java/com/arangodb/internal/velocystream/internal/Chunk.java
similarity index 96%
rename from src/main/java/com/arangodb/internal/velocystream/internal/Chunk.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/internal/Chunk.java
index 4b0689e93..294aa18bb 100644
--- a/src/main/java/com/arangodb/internal/velocystream/internal/Chunk.java
+++ b/driver/src/main/java/com/arangodb/internal/velocystream/internal/Chunk.java
@@ -1,88 +1,88 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal.velocystream.internal;
-
-/**
- * @author Mark Vollmary
- */
-public class Chunk {
-
- private final long messageId;
- private final long messageLength;
- private final int chunkX;
- private final int contentOffset;
- private final int contentLength;
-
- public Chunk(final long messageId, final int chunkX, final long messageLength, final int contentOffset,
- final int contentLength) {
- this.messageId = messageId;
- this.chunkX = chunkX;
- this.messageLength = messageLength;
- this.contentOffset = contentOffset;
- this.contentLength = contentLength;
- }
-
- public Chunk(final long messageId, final int chunkIndex, final int numberOfChunks, final long messageLength,
- final int contentOffset, final int contentLength) {
- this(messageId, chunkX(chunkIndex, numberOfChunks), messageLength, contentOffset, contentLength);
- }
-
- private static int chunkX(final int chunkIndex, final int numberOfChunks) {
- int chunkX;
- if (numberOfChunks == 1) {
- chunkX = 3;// last byte: 0000 0011
- } else if (chunkIndex == 0) {
- chunkX = (numberOfChunks << 1) + 1;
- } else {
- chunkX = chunkIndex << 1;
- }
- return chunkX;
- }
-
- public long getMessageId() {
- return messageId;
- }
-
- public long getMessageLength() {
- return messageLength;
- }
-
- public boolean isFirstChunk() {
- return 1 == (chunkX & 0x1);
- }
-
- public int getChunk() {
- return chunkX >> 1;
- }
-
- public int getChunkX() {
- return chunkX;
- }
-
- public int getContentOffset() {
- return contentOffset;
- }
-
- public int getContentLength() {
- return contentLength;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal.velocystream.internal;
+
+/**
+ * @author Mark Vollmary
+ */
+public class Chunk {
+
+ private final long messageId;
+ private final long messageLength;
+ private final int chunkX;
+ private final int contentOffset;
+ private final int contentLength;
+
+ public Chunk(final long messageId, final int chunkX, final long messageLength, final int contentOffset,
+ final int contentLength) {
+ this.messageId = messageId;
+ this.chunkX = chunkX;
+ this.messageLength = messageLength;
+ this.contentOffset = contentOffset;
+ this.contentLength = contentLength;
+ }
+
+ public Chunk(final long messageId, final int chunkIndex, final int numberOfChunks, final long messageLength,
+ final int contentOffset, final int contentLength) {
+ this(messageId, chunkX(chunkIndex, numberOfChunks), messageLength, contentOffset, contentLength);
+ }
+
+ private static int chunkX(final int chunkIndex, final int numberOfChunks) {
+ int chunkX;
+ if (numberOfChunks == 1) {
+ chunkX = 3;// last byte: 0000 0011
+ } else if (chunkIndex == 0) {
+ chunkX = (numberOfChunks << 1) + 1;
+ } else {
+ chunkX = chunkIndex << 1;
+ }
+ return chunkX;
+ }
+
+ public long getMessageId() {
+ return messageId;
+ }
+
+ public long getMessageLength() {
+ return messageLength;
+ }
+
+ public boolean isFirstChunk() {
+ return 1 == (chunkX & 0x1);
+ }
+
+ public int getChunk() {
+ return chunkX >> 1;
+ }
+
+ public int getChunkX() {
+ return chunkX;
+ }
+
+ public int getContentOffset() {
+ return contentOffset;
+ }
+
+ public int getContentLength() {
+ return contentLength;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/ChunkStore.java b/driver/src/main/java/com/arangodb/internal/velocystream/internal/ChunkStore.java
similarity index 97%
rename from src/main/java/com/arangodb/internal/velocystream/internal/ChunkStore.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/internal/ChunkStore.java
index e636b9e68..e95be998b 100644
--- a/src/main/java/com/arangodb/internal/velocystream/internal/ChunkStore.java
+++ b/driver/src/main/java/com/arangodb/internal/velocystream/internal/ChunkStore.java
@@ -1,70 +1,70 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal.velocystream.internal;
-
-import java.nio.BufferUnderflowException;
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Mark Vollmary
- */
-public class ChunkStore {
-
- private final MessageStore messageStore;
- private final Map data;
-
- public ChunkStore(final MessageStore messageStore) {
- super();
- this.messageStore = messageStore;
- data = new HashMap<>();
- }
-
- public ByteBuffer storeChunk(final Chunk chunk) throws BufferUnderflowException, IndexOutOfBoundsException {
- final long messageId = chunk.getMessageId();
- ByteBuffer chunkBuffer = data.get(messageId);
- if (chunkBuffer == null) {
- if (!chunk.isFirstChunk()) {
- messageStore.cancel(messageId);
- return null;
- }
- final int length = (int) (chunk.getMessageLength() > 0 ? chunk.getMessageLength()
- : chunk.getContentLength());
- chunkBuffer = ByteBuffer.allocate(length);
- data.put(messageId, chunkBuffer);
- }
- return chunkBuffer;
- }
-
- public void checkCompleteness(final long messageId) {
- checkCompleteness(messageId, data.get(messageId));
- }
-
- private void checkCompleteness(final long messageId, final ByteBuffer chunkBuffer)
- throws BufferUnderflowException, IndexOutOfBoundsException {
- if (chunkBuffer.position() == chunkBuffer.limit()) {
- messageStore.consume(new Message(messageId, chunkBuffer.array()));
- data.remove(messageId);
- }
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal.velocystream.internal;
+
+import java.nio.BufferUnderflowException;
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Mark Vollmary
+ */
+public class ChunkStore {
+
+ private final MessageStore messageStore;
+ private final Map data;
+
+ public ChunkStore(final MessageStore messageStore) {
+ super();
+ this.messageStore = messageStore;
+ data = new HashMap<>();
+ }
+
+ public ByteBuffer storeChunk(final Chunk chunk) throws BufferUnderflowException, IndexOutOfBoundsException {
+ final long messageId = chunk.getMessageId();
+ ByteBuffer chunkBuffer = data.get(messageId);
+ if (chunkBuffer == null) {
+ if (!chunk.isFirstChunk()) {
+ messageStore.cancel(messageId);
+ return null;
+ }
+ final int length = (int) (chunk.getMessageLength() > 0 ? chunk.getMessageLength()
+ : chunk.getContentLength());
+ chunkBuffer = ByteBuffer.allocate(length);
+ data.put(messageId, chunkBuffer);
+ }
+ return chunkBuffer;
+ }
+
+ public void checkCompleteness(final long messageId) {
+ checkCompleteness(messageId, data.get(messageId));
+ }
+
+ private void checkCompleteness(final long messageId, final ByteBuffer chunkBuffer)
+ throws BufferUnderflowException, IndexOutOfBoundsException {
+ if (chunkBuffer.position() == chunkBuffer.limit()) {
+ messageStore.consume(new Message(messageId, chunkBuffer.array()));
+ data.remove(messageId);
+ }
+ }
+
+}
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/JwtAuthenticationRequest.java b/driver/src/main/java/com/arangodb/internal/velocystream/internal/JwtAuthenticationRequest.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/velocystream/internal/JwtAuthenticationRequest.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/internal/JwtAuthenticationRequest.java
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/Message.java b/driver/src/main/java/com/arangodb/internal/velocystream/internal/Message.java
similarity index 96%
rename from src/main/java/com/arangodb/internal/velocystream/internal/Message.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/internal/Message.java
index 5a2e74724..b2b7cc34e 100644
--- a/src/main/java/com/arangodb/internal/velocystream/internal/Message.java
+++ b/driver/src/main/java/com/arangodb/internal/velocystream/internal/Message.java
@@ -1,67 +1,67 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal.velocystream.internal;
-
-import com.arangodb.velocypack.VPackSlice;
-
-import java.nio.BufferUnderflowException;
-
-/**
- * @author Mark Vollmary
- */
-public class Message {
-
- private final long id;
- private final VPackSlice head;
- private final VPackSlice body;
-
- public Message(final long id, final byte[] chunkBuffer) throws BufferUnderflowException, IndexOutOfBoundsException {
- super();
- this.id = id;
- head = new VPackSlice(chunkBuffer);
- final int headSize = head.getByteSize();
- if (chunkBuffer.length > headSize) {
- body = new VPackSlice(chunkBuffer, headSize);
- } else {
- body = null;
- }
- }
-
- public Message(final long id, final byte[] head, final byte[] body) {
- super();
- this.id = id;
- this.head = new VPackSlice(head);
- this.body = body != null ? new VPackSlice(body) : null;
- }
-
- public long getId() {
- return id;
- }
-
- public VPackSlice getHead() {
- return head;
- }
-
- public VPackSlice getBody() {
- return body;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal.velocystream.internal;
+
+import com.arangodb.velocypack.VPackSlice;
+
+import java.nio.BufferUnderflowException;
+
+/**
+ * @author Mark Vollmary
+ */
+public class Message {
+
+ private final long id;
+ private final VPackSlice head;
+ private final VPackSlice body;
+
+ public Message(final long id, final byte[] chunkBuffer) throws BufferUnderflowException, IndexOutOfBoundsException {
+ super();
+ this.id = id;
+ head = new VPackSlice(chunkBuffer);
+ final int headSize = head.getByteSize();
+ if (chunkBuffer.length > headSize) {
+ body = new VPackSlice(chunkBuffer, headSize);
+ } else {
+ body = null;
+ }
+ }
+
+ public Message(final long id, final byte[] head, final byte[] body) {
+ super();
+ this.id = id;
+ this.head = new VPackSlice(head);
+ this.body = body != null ? new VPackSlice(body) : null;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public VPackSlice getHead() {
+ return head;
+ }
+
+ public VPackSlice getBody() {
+ return body;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/MessageStore.java b/driver/src/main/java/com/arangodb/internal/velocystream/internal/MessageStore.java
similarity index 96%
rename from src/main/java/com/arangodb/internal/velocystream/internal/MessageStore.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/internal/MessageStore.java
index d9391b9b8..62fd4ae2a 100644
--- a/src/main/java/com/arangodb/internal/velocystream/internal/MessageStore.java
+++ b/driver/src/main/java/com/arangodb/internal/velocystream/internal/MessageStore.java
@@ -1,112 +1,112 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal.velocystream.internal;
-
-import com.arangodb.ArangoDBException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.FutureTask;
-
-/**
- * @author Mark Vollmary
- */
-public class MessageStore {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(MessageStore.class);
-
- private final Map> task;
- private final Map response;
- private final Map error;
-
- public MessageStore() {
- super();
- task = new ConcurrentHashMap<>();
- response = new ConcurrentHashMap<>();
- error = new ConcurrentHashMap<>();
- }
-
- public void storeMessage(final long messageId, final FutureTask future) {
- task.put(messageId, future);
- }
-
- public void consume(final Message message) {
- final FutureTask future = task.remove(message.getId());
- if (future != null) {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug(String.format("Received Message (id=%s, head=%s, body=%s)", message.getId(),
- message.getHead(), message.getBody() != null ? message.getBody() : "{}"));
- }
- response.put(message.getId(), message);
- future.run();
- }
- }
-
- public Message get(final long messageId) {
- final Message result = response.remove(messageId);
- if (result == null) {
- final Exception e = error.remove(messageId);
- if (e != null) {
- throw new ArangoDBException(e);
- }
- }
- return result;
- }
-
- public void cancel(final long messageId) {
- final FutureTask future = task.remove(messageId);
- if (future != null) {
- LOGGER.error("Cancel Message unexpected (id={}).", messageId);
- future.cancel(true);
- }
- }
-
- public synchronized void clear(final Exception e) {
- if (!task.isEmpty()) {
- LOGGER.error(e.getMessage(), e);
- }
- for (final Entry> entry : task.entrySet()) {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug(String.format("Exceptionally complete Message (id=%s).", entry.getKey()));
- }
- error.put(entry.getKey(), e);
- entry.getValue().run();
- }
- task.clear();
- }
-
- public synchronized void clear() {
- for (final Entry> entry : task.entrySet()) {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug(String.format("Cancel Message (id=%s).", entry.getKey()));
- }
- entry.getValue().cancel(true);
- }
- task.clear();
- }
-
- public boolean isEmpty() {
- return task.isEmpty();
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal.velocystream.internal;
+
+import com.arangodb.ArangoDBException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.FutureTask;
+
+/**
+ * @author Mark Vollmary
+ */
+public class MessageStore {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(MessageStore.class);
+
+ private final Map> task;
+ private final Map response;
+ private final Map error;
+
+ public MessageStore() {
+ super();
+ task = new ConcurrentHashMap<>();
+ response = new ConcurrentHashMap<>();
+ error = new ConcurrentHashMap<>();
+ }
+
+ public void storeMessage(final long messageId, final FutureTask future) {
+ task.put(messageId, future);
+ }
+
+ public void consume(final Message message) {
+ final FutureTask future = task.remove(message.getId());
+ if (future != null) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(String.format("Received Message (id=%s, head=%s, body=%s)", message.getId(),
+ message.getHead(), message.getBody() != null ? message.getBody() : "{}"));
+ }
+ response.put(message.getId(), message);
+ future.run();
+ }
+ }
+
+ public Message get(final long messageId) {
+ final Message result = response.remove(messageId);
+ if (result == null) {
+ final Exception e = error.remove(messageId);
+ if (e != null) {
+ throw new ArangoDBException(e);
+ }
+ }
+ return result;
+ }
+
+ public void cancel(final long messageId) {
+ final FutureTask future = task.remove(messageId);
+ if (future != null) {
+ LOGGER.error("Cancel Message unexpected (id={}).", messageId);
+ future.cancel(true);
+ }
+ }
+
+ public synchronized void clear(final Exception e) {
+ if (!task.isEmpty()) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ for (final Entry> entry : task.entrySet()) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(String.format("Exceptionally complete Message (id=%s).", entry.getKey()));
+ }
+ error.put(entry.getKey(), e);
+ entry.getValue().run();
+ }
+ task.clear();
+ }
+
+ public synchronized void clear() {
+ for (final Entry> entry : task.entrySet()) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(String.format("Cancel Message (id=%s).", entry.getKey()));
+ }
+ entry.getValue().cancel(true);
+ }
+ task.clear();
+ }
+
+ public boolean isEmpty() {
+ return task.isEmpty();
+ }
+}
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/VstConnection.java b/driver/src/main/java/com/arangodb/internal/velocystream/internal/VstConnection.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/velocystream/internal/VstConnection.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/internal/VstConnection.java
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/VstConnectionSync.java b/driver/src/main/java/com/arangodb/internal/velocystream/internal/VstConnectionSync.java
similarity index 100%
rename from src/main/java/com/arangodb/internal/velocystream/internal/VstConnectionSync.java
rename to driver/src/main/java/com/arangodb/internal/velocystream/internal/VstConnectionSync.java
diff --git a/src/main/java/com/arangodb/model/AqlFunctionCreateOptions.java b/driver/src/main/java/com/arangodb/model/AqlFunctionCreateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/AqlFunctionCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/AqlFunctionCreateOptions.java
index 23e6e5f4c..14c7fe999 100644
--- a/src/main/java/com/arangodb/model/AqlFunctionCreateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/AqlFunctionCreateOptions.java
@@ -1,81 +1,81 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class AqlFunctionCreateOptions {
-
- private String name;
- private String code;
- private Boolean isDeterministic;
-
- public AqlFunctionCreateOptions() {
- super();
- }
-
- /**
- * @param name the fully qualified name of the user functions
- * @return options
- */
- AqlFunctionCreateOptions name(final String name) {
- this.name = name;
- return this;
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * @param code a string representation of the function body
- * @return options
- */
- AqlFunctionCreateOptions code(final String code) {
- this.code = code;
- return this;
- }
-
- public String getCode() {
- return code;
- }
-
- /**
- * @param isDeterministic an optional boolean value to indicate that the function results are fully deterministic
- * (function
- * return value solely depends on the input value and return value is the same for
- * repeated calls with
- * same input)
- * @return options
- */
- public AqlFunctionCreateOptions isDeterministic(final Boolean isDeterministic) {
- this.isDeterministic = isDeterministic;
- return this;
- }
-
- public Boolean getIsDeterministic() {
- return isDeterministic;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class AqlFunctionCreateOptions {
+
+ private String name;
+ private String code;
+ private Boolean isDeterministic;
+
+ public AqlFunctionCreateOptions() {
+ super();
+ }
+
+ /**
+ * @param name the fully qualified name of the user functions
+ * @return options
+ */
+ AqlFunctionCreateOptions name(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param code a string representation of the function body
+ * @return options
+ */
+ AqlFunctionCreateOptions code(final String code) {
+ this.code = code;
+ return this;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * @param isDeterministic an optional boolean value to indicate that the function results are fully deterministic
+ * (function
+ * return value solely depends on the input value and return value is the same for
+ * repeated calls with
+ * same input)
+ * @return options
+ */
+ public AqlFunctionCreateOptions isDeterministic(final Boolean isDeterministic) {
+ this.isDeterministic = isDeterministic;
+ return this;
+ }
+
+ public Boolean getIsDeterministic() {
+ return isDeterministic;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/AqlFunctionDeleteOptions.java b/driver/src/main/java/com/arangodb/model/AqlFunctionDeleteOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/AqlFunctionDeleteOptions.java
rename to driver/src/main/java/com/arangodb/model/AqlFunctionDeleteOptions.java
index f821c7e78..42affff7a 100644
--- a/src/main/java/com/arangodb/model/AqlFunctionDeleteOptions.java
+++ b/driver/src/main/java/com/arangodb/model/AqlFunctionDeleteOptions.java
@@ -1,52 +1,52 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class AqlFunctionDeleteOptions {
-
- private Boolean group;
-
- public AqlFunctionDeleteOptions() {
- super();
- }
-
- public Boolean getGroup() {
- return group;
- }
-
- /**
- * @param group If set to true, then the function name provided in name is treated as a namespace prefix, and all
- * functions in the specified namespace will be deleted. If set to false, the function name provided in
- * name must be fully qualified, including any namespaces.
- * @return options
- */
- public AqlFunctionDeleteOptions group(final Boolean group) {
- this.group = group;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class AqlFunctionDeleteOptions {
+
+ private Boolean group;
+
+ public AqlFunctionDeleteOptions() {
+ super();
+ }
+
+ public Boolean getGroup() {
+ return group;
+ }
+
+ /**
+ * @param group If set to true, then the function name provided in name is treated as a namespace prefix, and all
+ * functions in the specified namespace will be deleted. If set to false, the function name provided in
+ * name must be fully qualified, including any namespaces.
+ * @return options
+ */
+ public AqlFunctionDeleteOptions group(final Boolean group) {
+ this.group = group;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/AqlFunctionGetOptions.java b/driver/src/main/java/com/arangodb/model/AqlFunctionGetOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/AqlFunctionGetOptions.java
rename to driver/src/main/java/com/arangodb/model/AqlFunctionGetOptions.java
index a043bb60e..87146d99d 100644
--- a/src/main/java/com/arangodb/model/AqlFunctionGetOptions.java
+++ b/driver/src/main/java/com/arangodb/model/AqlFunctionGetOptions.java
@@ -1,50 +1,50 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class AqlFunctionGetOptions {
-
- private String namespace;
-
- public AqlFunctionGetOptions() {
- super();
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- /**
- * @param namespace Returns all registered AQL user functions from namespace
- * @return options
- */
- public AqlFunctionGetOptions namespace(final String namespace) {
- this.namespace = namespace;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class AqlFunctionGetOptions {
+
+ private String namespace;
+
+ public AqlFunctionGetOptions() {
+ super();
+ }
+
+ public String getNamespace() {
+ return namespace;
+ }
+
+ /**
+ * @param namespace Returns all registered AQL user functions from namespace
+ * @return options
+ */
+ public AqlFunctionGetOptions namespace(final String namespace) {
+ this.namespace = namespace;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/AqlQueryExplainOptions.java b/driver/src/main/java/com/arangodb/model/AqlQueryExplainOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/AqlQueryExplainOptions.java
rename to driver/src/main/java/com/arangodb/model/AqlQueryExplainOptions.java
index a0f58805d..0c7d4bfff 100644
--- a/src/main/java/com/arangodb/model/AqlQueryExplainOptions.java
+++ b/driver/src/main/java/com/arangodb/model/AqlQueryExplainOptions.java
@@ -1,137 +1,137 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.internal.serde.UserDataInside;
-
-import java.util.Collection;
-import java.util.Map;
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- * @see API Documentation
- */
-public final class AqlQueryExplainOptions {
-
- private Map bindVars;
- private String query;
- private Options options;
-
- public AqlQueryExplainOptions() {
- super();
- }
-
- @UserDataInside
- public Map getBindVars() {
- return bindVars;
- }
-
- /**
- * @param bindVars key/value pairs representing the bind parameters
- * @return options
- */
- AqlQueryExplainOptions bindVars(final Map bindVars) {
- this.bindVars = bindVars;
- return this;
- }
-
- public String getQuery() {
- return query;
- }
-
- /**
- * @param query the query which you want explained
- * @return options
- */
- AqlQueryExplainOptions query(final String query) {
- this.query = query;
- return this;
- }
-
- public Integer getMaxNumberOfPlans() {
- return getOptions().maxNumberOfPlans;
- }
-
- /**
- * @param maxNumberOfPlans an optional maximum number of plans that the optimizer is allowed to generate. Setting
- * this attribute
- * to a low value allows to put a cap on the amount of work the optimizer does.
- * @return options
- */
- public AqlQueryExplainOptions maxNumberOfPlans(final Integer maxNumberOfPlans) {
- getOptions().maxNumberOfPlans = maxNumberOfPlans;
- return this;
- }
-
- public Boolean getAllPlans() {
- return getOptions().allPlans;
- }
-
- /**
- * @param allPlans if set to true, all possible execution plans will be returned. The default is false, meaning
- * only the
- * optimal plan will be returned.
- * @return options
- */
- public AqlQueryExplainOptions allPlans(final Boolean allPlans) {
- getOptions().allPlans = allPlans;
- return this;
- }
-
- public Collection getRules() {
- return getOptions().getOptimizer().rules;
- }
-
- /**
- * @param rules an array of to-be-included or to-be-excluded optimizer rules can be put into this attribute, telling
- * the optimizer to include or exclude specific rules.
- * @return options
- */
- public AqlQueryExplainOptions rules(final Collection rules) {
- getOptions().getOptimizer().rules = rules;
- return this;
- }
-
- private Options getOptions() {
- if (options == null) {
- options = new Options();
- }
- return options;
- }
-
- public static final class Options {
- private Optimizer optimizer;
- private Integer maxNumberOfPlans;
- private Boolean allPlans;
-
- public Optimizer getOptimizer() {
- if (optimizer == null) {
- optimizer = new Optimizer();
- }
- return optimizer;
- }
- }
-
- public static final class Optimizer {
- private Collection rules;
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.internal.serde.UserDataInside;
+
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ * @see API Documentation
+ */
+public final class AqlQueryExplainOptions {
+
+ private Map bindVars;
+ private String query;
+ private Options options;
+
+ public AqlQueryExplainOptions() {
+ super();
+ }
+
+ @UserDataInside
+ public Map getBindVars() {
+ return bindVars;
+ }
+
+ /**
+ * @param bindVars key/value pairs representing the bind parameters
+ * @return options
+ */
+ AqlQueryExplainOptions bindVars(final Map bindVars) {
+ this.bindVars = bindVars;
+ return this;
+ }
+
+ public String getQuery() {
+ return query;
+ }
+
+ /**
+ * @param query the query which you want explained
+ * @return options
+ */
+ AqlQueryExplainOptions query(final String query) {
+ this.query = query;
+ return this;
+ }
+
+ public Integer getMaxNumberOfPlans() {
+ return getOptions().maxNumberOfPlans;
+ }
+
+ /**
+ * @param maxNumberOfPlans an optional maximum number of plans that the optimizer is allowed to generate. Setting
+ * this attribute
+ * to a low value allows to put a cap on the amount of work the optimizer does.
+ * @return options
+ */
+ public AqlQueryExplainOptions maxNumberOfPlans(final Integer maxNumberOfPlans) {
+ getOptions().maxNumberOfPlans = maxNumberOfPlans;
+ return this;
+ }
+
+ public Boolean getAllPlans() {
+ return getOptions().allPlans;
+ }
+
+ /**
+ * @param allPlans if set to true, all possible execution plans will be returned. The default is false, meaning
+ * only the
+ * optimal plan will be returned.
+ * @return options
+ */
+ public AqlQueryExplainOptions allPlans(final Boolean allPlans) {
+ getOptions().allPlans = allPlans;
+ return this;
+ }
+
+ public Collection getRules() {
+ return getOptions().getOptimizer().rules;
+ }
+
+ /**
+ * @param rules an array of to-be-included or to-be-excluded optimizer rules can be put into this attribute, telling
+ * the optimizer to include or exclude specific rules.
+ * @return options
+ */
+ public AqlQueryExplainOptions rules(final Collection rules) {
+ getOptions().getOptimizer().rules = rules;
+ return this;
+ }
+
+ private Options getOptions() {
+ if (options == null) {
+ options = new Options();
+ }
+ return options;
+ }
+
+ public static final class Options {
+ private Optimizer optimizer;
+ private Integer maxNumberOfPlans;
+ private Boolean allPlans;
+
+ public Optimizer getOptimizer() {
+ if (optimizer == null) {
+ optimizer = new Optimizer();
+ }
+ return optimizer;
+ }
+ }
+
+ public static final class Optimizer {
+ private Collection rules;
+ }
+}
diff --git a/src/main/java/com/arangodb/model/AqlQueryOptions.java b/driver/src/main/java/com/arangodb/model/AqlQueryOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/AqlQueryOptions.java
rename to driver/src/main/java/com/arangodb/model/AqlQueryOptions.java
diff --git a/src/main/java/com/arangodb/model/AqlQueryParseOptions.java b/driver/src/main/java/com/arangodb/model/AqlQueryParseOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/AqlQueryParseOptions.java
rename to driver/src/main/java/com/arangodb/model/AqlQueryParseOptions.java
index a5a4b22b1..064fa0685 100644
--- a/src/main/java/com/arangodb/model/AqlQueryParseOptions.java
+++ b/driver/src/main/java/com/arangodb/model/AqlQueryParseOptions.java
@@ -1,48 +1,48 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class AqlQueryParseOptions {
-
- private String query;
-
- public AqlQueryParseOptions() {
- super();
- }
-
- public String getQuery() {
- return query;
- }
-
- /**
- * @param query the query which you want parse
- * @return options
- */
- AqlQueryParseOptions query(final String query) {
- this.query = query;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class AqlQueryParseOptions {
+
+ private String query;
+
+ public AqlQueryParseOptions() {
+ super();
+ }
+
+ public String getQuery() {
+ return query;
+ }
+
+ /**
+ * @param query the query which you want parse
+ * @return options
+ */
+ AqlQueryParseOptions query(final String query) {
+ this.query = query;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/CollectionCountOptions.java b/driver/src/main/java/com/arangodb/model/CollectionCountOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/CollectionCountOptions.java
rename to driver/src/main/java/com/arangodb/model/CollectionCountOptions.java
diff --git a/src/main/java/com/arangodb/model/CollectionCreateOptions.java b/driver/src/main/java/com/arangodb/model/CollectionCreateOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/CollectionCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/CollectionCreateOptions.java
diff --git a/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java b/driver/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
rename to driver/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
index d83109e24..a3144b9f4 100644
--- a/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
+++ b/driver/src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
@@ -1,87 +1,87 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author Mark Vollmary
- * @see
- * API
- * Documentation
- */
-public final class CollectionPropertiesOptions {
-
- private Boolean waitForSync;
- private CollectionSchema schema;
- private List computedValues;
-
- public CollectionPropertiesOptions() {
- super();
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync If true then creating or changing a document will wait until the data has been synchronized
- * to disk.
- * @return options
- */
- public CollectionPropertiesOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public CollectionSchema getSchema() {
- return schema;
- }
-
- /**
- * @param schema object that specifies the collection level schema for documents
- * @return options
- * @since ArangoDB 3.7
- */
- public CollectionPropertiesOptions schema(final CollectionSchema schema) {
- this.schema = schema;
- return this;
- }
-
- /**
- * @param computedValues An optional list of computed values.
- * @return options
- * @since ArangoDB 3.10
- */
- public CollectionPropertiesOptions computedValues(final ComputedValue... computedValues) {
- if(this.computedValues == null) {
- this.computedValues = new ArrayList<>();
- }
- Collections.addAll(this.computedValues, computedValues);
- return this;
- }
-
- public List getComputedValues() {
- return computedValues;
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author Mark Vollmary
+ * @see
+ * API
+ * Documentation
+ */
+public final class CollectionPropertiesOptions {
+
+ private Boolean waitForSync;
+ private CollectionSchema schema;
+ private List computedValues;
+
+ public CollectionPropertiesOptions() {
+ super();
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync If true then creating or changing a document will wait until the data has been synchronized
+ * to disk.
+ * @return options
+ */
+ public CollectionPropertiesOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public CollectionSchema getSchema() {
+ return schema;
+ }
+
+ /**
+ * @param schema object that specifies the collection level schema for documents
+ * @return options
+ * @since ArangoDB 3.7
+ */
+ public CollectionPropertiesOptions schema(final CollectionSchema schema) {
+ this.schema = schema;
+ return this;
+ }
+
+ /**
+ * @param computedValues An optional list of computed values.
+ * @return options
+ * @since ArangoDB 3.10
+ */
+ public CollectionPropertiesOptions computedValues(final ComputedValue... computedValues) {
+ if(this.computedValues == null) {
+ this.computedValues = new ArrayList<>();
+ }
+ Collections.addAll(this.computedValues, computedValues);
+ return this;
+ }
+
+ public List getComputedValues() {
+ return computedValues;
+ }
+}
diff --git a/src/main/java/com/arangodb/model/CollectionRenameOptions.java b/driver/src/main/java/com/arangodb/model/CollectionRenameOptions.java
similarity index 95%
rename from src/main/java/com/arangodb/model/CollectionRenameOptions.java
rename to driver/src/main/java/com/arangodb/model/CollectionRenameOptions.java
index 11f531e28..6748f811f 100644
--- a/src/main/java/com/arangodb/model/CollectionRenameOptions.java
+++ b/driver/src/main/java/com/arangodb/model/CollectionRenameOptions.java
@@ -1,47 +1,47 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- */
-public final class CollectionRenameOptions {
-
- private String name;
-
- public CollectionRenameOptions() {
- super();
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * @param name The new name
- * @return options
- */
- CollectionRenameOptions name(final String name) {
- this.name = name;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class CollectionRenameOptions {
+
+ private String name;
+
+ public CollectionRenameOptions() {
+ super();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name The new name
+ * @return options
+ */
+ CollectionRenameOptions name(final String name) {
+ this.name = name;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/CollectionSchema.java b/driver/src/main/java/com/arangodb/model/CollectionSchema.java
similarity index 100%
rename from src/main/java/com/arangodb/model/CollectionSchema.java
rename to driver/src/main/java/com/arangodb/model/CollectionSchema.java
diff --git a/src/main/java/com/arangodb/model/CollectionTruncateOptions.java b/driver/src/main/java/com/arangodb/model/CollectionTruncateOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/CollectionTruncateOptions.java
rename to driver/src/main/java/com/arangodb/model/CollectionTruncateOptions.java
diff --git a/src/main/java/com/arangodb/model/CollectionsReadOptions.java b/driver/src/main/java/com/arangodb/model/CollectionsReadOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/CollectionsReadOptions.java
rename to driver/src/main/java/com/arangodb/model/CollectionsReadOptions.java
index 18f3ce42c..11e563fad 100644
--- a/src/main/java/com/arangodb/model/CollectionsReadOptions.java
+++ b/driver/src/main/java/com/arangodb/model/CollectionsReadOptions.java
@@ -1,49 +1,49 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class CollectionsReadOptions {
-
- private Boolean excludeSystem;
-
- public CollectionsReadOptions() {
- super();
- }
-
- public Boolean getExcludeSystem() {
- return excludeSystem;
- }
-
- /**
- * @param excludeSystem Whether or not system collections should be excluded from the result.
- * @return options
- */
- public CollectionsReadOptions excludeSystem(final Boolean excludeSystem) {
- this.excludeSystem = excludeSystem;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class CollectionsReadOptions {
+
+ private Boolean excludeSystem;
+
+ public CollectionsReadOptions() {
+ super();
+ }
+
+ public Boolean getExcludeSystem() {
+ return excludeSystem;
+ }
+
+ /**
+ * @param excludeSystem Whether or not system collections should be excluded from the result.
+ * @return options
+ */
+ public CollectionsReadOptions excludeSystem(final Boolean excludeSystem) {
+ this.excludeSystem = excludeSystem;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/ComputedValue.java b/driver/src/main/java/com/arangodb/model/ComputedValue.java
similarity index 100%
rename from src/main/java/com/arangodb/model/ComputedValue.java
rename to driver/src/main/java/com/arangodb/model/ComputedValue.java
diff --git a/src/main/java/com/arangodb/model/DBCreateOptions.java b/driver/src/main/java/com/arangodb/model/DBCreateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/DBCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/DBCreateOptions.java
index 9b018c3fa..16b82beb6 100644
--- a/src/main/java/com/arangodb/model/DBCreateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/DBCreateOptions.java
@@ -1,79 +1,79 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.DbName;
-
-import java.util.Collection;
-
-/**
- * @author Mark Vollmary
- */
-public final class DBCreateOptions {
-
- private Collection users;
- private String name;
- private DatabaseOptions options;
-
- public DBCreateOptions() {
- super();
- }
-
- public Collection getUsers() {
- return users;
- }
-
- /**
- * @param users array of user objects to initially create for the new database.
- * User information will not be changed for users that already exist.
- * If users is not specified or does not contain any users, a default user
- * root will be created with an empty string password. This ensures that the
- * new database will be accessible after it is created.
- * @return options
- */
- public DBCreateOptions users(final Collection users) {
- this.users = users;
- return this;
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * @param dbName database name
- * @return options
- */
- public DBCreateOptions name(final DbName dbName) {
- name = dbName.get();
- return this;
- }
-
- public DatabaseOptions getOptions() {
- return options;
- }
-
- public DBCreateOptions options(DatabaseOptions options) {
- this.options = options;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.DbName;
+
+import java.util.Collection;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class DBCreateOptions {
+
+ private Collection users;
+ private String name;
+ private DatabaseOptions options;
+
+ public DBCreateOptions() {
+ super();
+ }
+
+ public Collection getUsers() {
+ return users;
+ }
+
+ /**
+ * @param users array of user objects to initially create for the new database.
+ * User information will not be changed for users that already exist.
+ * If users is not specified or does not contain any users, a default user
+ * root will be created with an empty string password. This ensures that the
+ * new database will be accessible after it is created.
+ * @return options
+ */
+ public DBCreateOptions users(final Collection users) {
+ this.users = users;
+ return this;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param dbName database name
+ * @return options
+ */
+ public DBCreateOptions name(final DbName dbName) {
+ name = dbName.get();
+ return this;
+ }
+
+ public DatabaseOptions getOptions() {
+ return options;
+ }
+
+ public DBCreateOptions options(DatabaseOptions options) {
+ this.options = options;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/DatabaseOptions.java b/driver/src/main/java/com/arangodb/model/DatabaseOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/DatabaseOptions.java
rename to driver/src/main/java/com/arangodb/model/DatabaseOptions.java
diff --git a/src/main/java/com/arangodb/model/DatabaseUsersOptions.java b/driver/src/main/java/com/arangodb/model/DatabaseUsersOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/DatabaseUsersOptions.java
rename to driver/src/main/java/com/arangodb/model/DatabaseUsersOptions.java
diff --git a/src/main/java/com/arangodb/model/DocumentCreateOptions.java b/driver/src/main/java/com/arangodb/model/DocumentCreateOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/DocumentCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/DocumentCreateOptions.java
diff --git a/src/main/java/com/arangodb/model/DocumentDeleteOptions.java b/driver/src/main/java/com/arangodb/model/DocumentDeleteOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/DocumentDeleteOptions.java
rename to driver/src/main/java/com/arangodb/model/DocumentDeleteOptions.java
diff --git a/src/main/java/com/arangodb/model/DocumentExistsOptions.java b/driver/src/main/java/com/arangodb/model/DocumentExistsOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/DocumentExistsOptions.java
rename to driver/src/main/java/com/arangodb/model/DocumentExistsOptions.java
index a14dfaf16..3af420a78 100644
--- a/src/main/java/com/arangodb/model/DocumentExistsOptions.java
+++ b/driver/src/main/java/com/arangodb/model/DocumentExistsOptions.java
@@ -1,80 +1,80 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- * @see
- * API
- * Documentation
- */
-public final class DocumentExistsOptions {
-
- private String ifNoneMatch;
- private String ifMatch;
- private String streamTransactionId;
-
- public DocumentExistsOptions() {
- super();
- }
-
- public String getIfNoneMatch() {
- return ifNoneMatch;
- }
-
- /**
- * @param ifNoneMatch document revision must not contain If-None-Match
- * @return options
- */
- public DocumentExistsOptions ifNoneMatch(final String ifNoneMatch) {
- this.ifNoneMatch = ifNoneMatch;
- return this;
- }
-
- public String getIfMatch() {
- return ifMatch;
- }
-
- /**
- * @param ifMatch document revision must contain If-Match
- * @return options
- */
- public DocumentExistsOptions ifMatch(final String ifMatch) {
- this.ifMatch = ifMatch;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.0
- */
- public DocumentExistsOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ * @see
+ * API
+ * Documentation
+ */
+public final class DocumentExistsOptions {
+
+ private String ifNoneMatch;
+ private String ifMatch;
+ private String streamTransactionId;
+
+ public DocumentExistsOptions() {
+ super();
+ }
+
+ public String getIfNoneMatch() {
+ return ifNoneMatch;
+ }
+
+ /**
+ * @param ifNoneMatch document revision must not contain If-None-Match
+ * @return options
+ */
+ public DocumentExistsOptions ifNoneMatch(final String ifNoneMatch) {
+ this.ifNoneMatch = ifNoneMatch;
+ return this;
+ }
+
+ public String getIfMatch() {
+ return ifMatch;
+ }
+
+ /**
+ * @param ifMatch document revision must contain If-Match
+ * @return options
+ */
+ public DocumentExistsOptions ifMatch(final String ifMatch) {
+ this.ifMatch = ifMatch;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.0
+ */
+ public DocumentExistsOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/DocumentImportOptions.java b/driver/src/main/java/com/arangodb/model/DocumentImportOptions.java
similarity index 97%
rename from src/main/java/com/arangodb/model/DocumentImportOptions.java
rename to driver/src/main/java/com/arangodb/model/DocumentImportOptions.java
index 154a629d5..42612a8e8 100644
--- a/src/main/java/com/arangodb/model/DocumentImportOptions.java
+++ b/driver/src/main/java/com/arangodb/model/DocumentImportOptions.java
@@ -1,162 +1,162 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- */
-public final class DocumentImportOptions {
-
- private String fromPrefix;
- private String toPrefix;
- private Boolean overwrite;
- private Boolean waitForSync;
- private OnDuplicate onDuplicate;
- private Boolean complete;
- private Boolean details;
-
- public DocumentImportOptions() {
- super();
- }
-
- public String getFromPrefix() {
- return fromPrefix;
- }
-
- /**
- * @param fromPrefix An optional prefix for the values in _from attributes. If specified, the value is automatically
- * prepended to each _from input value. This allows specifying just the keys for _from.
- * @return options
- */
- public DocumentImportOptions fromPrefix(final String fromPrefix) {
- this.fromPrefix = fromPrefix;
- return this;
- }
-
- public String getToPrefix() {
- return toPrefix;
- }
-
- /**
- * @param toPrefix An optional prefix for the values in _to attributes. If specified, the value is automatically
- * prepended to each _to input value. This allows specifying just the keys for _to.
- * @return options
- */
- public DocumentImportOptions toPrefix(final String toPrefix) {
- this.toPrefix = toPrefix;
- return this;
- }
-
- public Boolean getOverwrite() {
- return overwrite;
- }
-
- /**
- * @param overwrite If this parameter has a value of true, then all data in the collection will be removed prior
- * to the
- * import. Note that any existing index definitions will be preserved.
- * @return options
- */
- public DocumentImportOptions overwrite(final Boolean overwrite) {
- this.overwrite = overwrite;
- return this;
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until documents have been synced to disk before returning.
- * @return options
- */
- public DocumentImportOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public OnDuplicate getOnDuplicate() {
- return onDuplicate;
- }
-
- /**
- * @param onDuplicate Controls what action is carried out in case of a unique key constraint violation. Possible
- * values are:
- *
- *
error: this will not import the current document because of the unique key constraint
- * violation.
- * This is the default setting.
- *
update: this will update an existing document in the database with the data specified
- * in the
- * request. Attributes of the existing document that are not present in the request will be
- * preserved.
- *
replace: this will replace an existing document in the database with the data specified
- * in the
- * request.
- *
ignore: this will not update an existing document and simply ignore the error caused by
- * the unique
- * key constraint violation. Note that update, replace and ignore will only work when the
- * import document
- * in the request contains the _key attribute. update and replace may also fail because of
- * secondary
- * unique key constraint violations.
- *
- * @return options
- */
- public DocumentImportOptions onDuplicate(final OnDuplicate onDuplicate) {
- this.onDuplicate = onDuplicate;
- return this;
- }
-
- public Boolean getComplete() {
- return complete;
- }
-
- /**
- * @param complete If set to true, it will make the whole import fail if any error occurs. Otherwise the import will
- * continue even if some documents cannot be imported.
- * @return options
- */
- public DocumentImportOptions complete(final Boolean complete) {
- this.complete = complete;
- return this;
- }
-
- public Boolean getDetails() {
- return details;
- }
-
- /**
- * @param details If set to true, the result will include an attribute details with details about documents that
- * could
- * not be imported.
- * @return options
- */
- public DocumentImportOptions details(final Boolean details) {
- this.details = details;
- return this;
- }
-
- public enum OnDuplicate {
- error, update, replace, ignore
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class DocumentImportOptions {
+
+ private String fromPrefix;
+ private String toPrefix;
+ private Boolean overwrite;
+ private Boolean waitForSync;
+ private OnDuplicate onDuplicate;
+ private Boolean complete;
+ private Boolean details;
+
+ public DocumentImportOptions() {
+ super();
+ }
+
+ public String getFromPrefix() {
+ return fromPrefix;
+ }
+
+ /**
+ * @param fromPrefix An optional prefix for the values in _from attributes. If specified, the value is automatically
+ * prepended to each _from input value. This allows specifying just the keys for _from.
+ * @return options
+ */
+ public DocumentImportOptions fromPrefix(final String fromPrefix) {
+ this.fromPrefix = fromPrefix;
+ return this;
+ }
+
+ public String getToPrefix() {
+ return toPrefix;
+ }
+
+ /**
+ * @param toPrefix An optional prefix for the values in _to attributes. If specified, the value is automatically
+ * prepended to each _to input value. This allows specifying just the keys for _to.
+ * @return options
+ */
+ public DocumentImportOptions toPrefix(final String toPrefix) {
+ this.toPrefix = toPrefix;
+ return this;
+ }
+
+ public Boolean getOverwrite() {
+ return overwrite;
+ }
+
+ /**
+ * @param overwrite If this parameter has a value of true, then all data in the collection will be removed prior
+ * to the
+ * import. Note that any existing index definitions will be preserved.
+ * @return options
+ */
+ public DocumentImportOptions overwrite(final Boolean overwrite) {
+ this.overwrite = overwrite;
+ return this;
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until documents have been synced to disk before returning.
+ * @return options
+ */
+ public DocumentImportOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public OnDuplicate getOnDuplicate() {
+ return onDuplicate;
+ }
+
+ /**
+ * @param onDuplicate Controls what action is carried out in case of a unique key constraint violation. Possible
+ * values are:
+ *
+ *
error: this will not import the current document because of the unique key constraint
+ * violation.
+ * This is the default setting.
+ *
update: this will update an existing document in the database with the data specified
+ * in the
+ * request. Attributes of the existing document that are not present in the request will be
+ * preserved.
+ *
replace: this will replace an existing document in the database with the data specified
+ * in the
+ * request.
+ *
ignore: this will not update an existing document and simply ignore the error caused by
+ * the unique
+ * key constraint violation. Note that update, replace and ignore will only work when the
+ * import document
+ * in the request contains the _key attribute. update and replace may also fail because of
+ * secondary
+ * unique key constraint violations.
+ *
+ * @return options
+ */
+ public DocumentImportOptions onDuplicate(final OnDuplicate onDuplicate) {
+ this.onDuplicate = onDuplicate;
+ return this;
+ }
+
+ public Boolean getComplete() {
+ return complete;
+ }
+
+ /**
+ * @param complete If set to true, it will make the whole import fail if any error occurs. Otherwise the import will
+ * continue even if some documents cannot be imported.
+ * @return options
+ */
+ public DocumentImportOptions complete(final Boolean complete) {
+ this.complete = complete;
+ return this;
+ }
+
+ public Boolean getDetails() {
+ return details;
+ }
+
+ /**
+ * @param details If set to true, the result will include an attribute details with details about documents that
+ * could
+ * not be imported.
+ * @return options
+ */
+ public DocumentImportOptions details(final Boolean details) {
+ this.details = details;
+ return this;
+ }
+
+ public enum OnDuplicate {
+ error, update, replace, ignore
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/DocumentReadOptions.java b/driver/src/main/java/com/arangodb/model/DocumentReadOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/DocumentReadOptions.java
rename to driver/src/main/java/com/arangodb/model/DocumentReadOptions.java
index ec711724e..f19aa3e43 100644
--- a/src/main/java/com/arangodb/model/DocumentReadOptions.java
+++ b/driver/src/main/java/com/arangodb/model/DocumentReadOptions.java
@@ -1,96 +1,96 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- * @see API
- * Documentation
- */
-public final class DocumentReadOptions {
-
- private String ifNoneMatch;
- private String ifMatch;
- private Boolean allowDirtyRead;
- private String streamTransactionId;
-
- public DocumentReadOptions() {
- super();
- }
-
- public String getIfNoneMatch() {
- return ifNoneMatch;
- }
-
- /**
- * @param ifNoneMatch document revision must not contain If-None-Match
- * @return options
- */
- public DocumentReadOptions ifNoneMatch(final String ifNoneMatch) {
- this.ifNoneMatch = ifNoneMatch;
- return this;
- }
-
- public String getIfMatch() {
- return ifMatch;
- }
-
- /**
- * @param ifMatch document revision must contain If-Match
- * @return options
- */
- public DocumentReadOptions ifMatch(final String ifMatch) {
- this.ifMatch = ifMatch;
- return this;
- }
-
- /**
- * @param allowDirtyRead Set to {@code true} allows reading from followers in an active-failover setup.
- * @return options
- * @see API
- * Documentation
- * @since ArangoDB 3.4.0
- */
- public DocumentReadOptions allowDirtyRead(final Boolean allowDirtyRead) {
- this.allowDirtyRead = allowDirtyRead;
- return this;
- }
-
- public Boolean getAllowDirtyRead() {
- return allowDirtyRead;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.0
- */
- public DocumentReadOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ * @see API
+ * Documentation
+ */
+public final class DocumentReadOptions {
+
+ private String ifNoneMatch;
+ private String ifMatch;
+ private Boolean allowDirtyRead;
+ private String streamTransactionId;
+
+ public DocumentReadOptions() {
+ super();
+ }
+
+ public String getIfNoneMatch() {
+ return ifNoneMatch;
+ }
+
+ /**
+ * @param ifNoneMatch document revision must not contain If-None-Match
+ * @return options
+ */
+ public DocumentReadOptions ifNoneMatch(final String ifNoneMatch) {
+ this.ifNoneMatch = ifNoneMatch;
+ return this;
+ }
+
+ public String getIfMatch() {
+ return ifMatch;
+ }
+
+ /**
+ * @param ifMatch document revision must contain If-Match
+ * @return options
+ */
+ public DocumentReadOptions ifMatch(final String ifMatch) {
+ this.ifMatch = ifMatch;
+ return this;
+ }
+
+ /**
+ * @param allowDirtyRead Set to {@code true} allows reading from followers in an active-failover setup.
+ * @return options
+ * @see API
+ * Documentation
+ * @since ArangoDB 3.4.0
+ */
+ public DocumentReadOptions allowDirtyRead(final Boolean allowDirtyRead) {
+ this.allowDirtyRead = allowDirtyRead;
+ return this;
+ }
+
+ public Boolean getAllowDirtyRead() {
+ return allowDirtyRead;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.0
+ */
+ public DocumentReadOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/DocumentReplaceOptions.java b/driver/src/main/java/com/arangodb/model/DocumentReplaceOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/DocumentReplaceOptions.java
rename to driver/src/main/java/com/arangodb/model/DocumentReplaceOptions.java
diff --git a/src/main/java/com/arangodb/model/DocumentUpdateOptions.java b/driver/src/main/java/com/arangodb/model/DocumentUpdateOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/DocumentUpdateOptions.java
rename to driver/src/main/java/com/arangodb/model/DocumentUpdateOptions.java
diff --git a/src/main/java/com/arangodb/model/EdgeCreateOptions.java b/driver/src/main/java/com/arangodb/model/EdgeCreateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/EdgeCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/EdgeCreateOptions.java
index 7e340bc25..2429d9405 100644
--- a/src/main/java/com/arangodb/model/EdgeCreateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/EdgeCreateOptions.java
@@ -1,63 +1,63 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class EdgeCreateOptions {
-
- private Boolean waitForSync;
- private String streamTransactionId;
-
- public EdgeCreateOptions() {
- super();
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until document has been synced to disk.
- * @return options
- */
- public EdgeCreateOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.1
- */
- public EdgeCreateOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class EdgeCreateOptions {
+
+ private Boolean waitForSync;
+ private String streamTransactionId;
+
+ public EdgeCreateOptions() {
+ super();
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until document has been synced to disk.
+ * @return options
+ */
+ public EdgeCreateOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.1
+ */
+ public EdgeCreateOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/EdgeDeleteOptions.java b/driver/src/main/java/com/arangodb/model/EdgeDeleteOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/EdgeDeleteOptions.java
rename to driver/src/main/java/com/arangodb/model/EdgeDeleteOptions.java
index a82d68ec1..6d14fbcf7 100644
--- a/src/main/java/com/arangodb/model/EdgeDeleteOptions.java
+++ b/driver/src/main/java/com/arangodb/model/EdgeDeleteOptions.java
@@ -1,77 +1,77 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class EdgeDeleteOptions {
-
- private Boolean waitForSync;
- private String ifMatch;
- private String streamTransactionId;
-
- public EdgeDeleteOptions() {
- super();
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until deletion operation has been synced to disk.
- * @return options
- */
- public EdgeDeleteOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public String getIfMatch() {
- return ifMatch;
- }
-
- /**
- * @param ifMatch remove a document based on a target revision
- * @return options
- */
- public EdgeDeleteOptions ifMatch(final String ifMatch) {
- this.ifMatch = ifMatch;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.1
- */
- public EdgeDeleteOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class EdgeDeleteOptions {
+
+ private Boolean waitForSync;
+ private String ifMatch;
+ private String streamTransactionId;
+
+ public EdgeDeleteOptions() {
+ super();
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until deletion operation has been synced to disk.
+ * @return options
+ */
+ public EdgeDeleteOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public String getIfMatch() {
+ return ifMatch;
+ }
+
+ /**
+ * @param ifMatch remove a document based on a target revision
+ * @return options
+ */
+ public EdgeDeleteOptions ifMatch(final String ifMatch) {
+ this.ifMatch = ifMatch;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.1
+ */
+ public EdgeDeleteOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/EdgeReplaceOptions.java b/driver/src/main/java/com/arangodb/model/EdgeReplaceOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/EdgeReplaceOptions.java
rename to driver/src/main/java/com/arangodb/model/EdgeReplaceOptions.java
index e30b64ffc..ebf54eafd 100644
--- a/src/main/java/com/arangodb/model/EdgeReplaceOptions.java
+++ b/driver/src/main/java/com/arangodb/model/EdgeReplaceOptions.java
@@ -1,77 +1,77 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class EdgeReplaceOptions {
-
- private Boolean waitForSync;
- private String ifMatch;
- private String streamTransactionId;
-
- public EdgeReplaceOptions() {
- super();
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until document has been synced to disk.
- * @return options
- */
- public EdgeReplaceOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public String getIfMatch() {
- return ifMatch;
- }
-
- /**
- * @param ifMatch replace a document based on target revision
- * @return options
- */
- public EdgeReplaceOptions ifMatch(final String ifMatch) {
- this.ifMatch = ifMatch;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.1
- */
- public EdgeReplaceOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class EdgeReplaceOptions {
+
+ private Boolean waitForSync;
+ private String ifMatch;
+ private String streamTransactionId;
+
+ public EdgeReplaceOptions() {
+ super();
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until document has been synced to disk.
+ * @return options
+ */
+ public EdgeReplaceOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public String getIfMatch() {
+ return ifMatch;
+ }
+
+ /**
+ * @param ifMatch replace a document based on target revision
+ * @return options
+ */
+ public EdgeReplaceOptions ifMatch(final String ifMatch) {
+ this.ifMatch = ifMatch;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.1
+ */
+ public EdgeReplaceOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/EdgeUpdateOptions.java b/driver/src/main/java/com/arangodb/model/EdgeUpdateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/EdgeUpdateOptions.java
rename to driver/src/main/java/com/arangodb/model/EdgeUpdateOptions.java
index 2ff7611fe..356f6609b 100644
--- a/src/main/java/com/arangodb/model/EdgeUpdateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/EdgeUpdateOptions.java
@@ -1,94 +1,94 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class EdgeUpdateOptions {
-
- private Boolean keepNull;
- private Boolean waitForSync;
- private String ifMatch;
- private String streamTransactionId;
-
- public EdgeUpdateOptions() {
- super();
- }
-
- public Boolean getKeepNull() {
- return keepNull;
- }
-
- /**
- * @param keepNull If the intention is to delete existing attributes with the patch command, the URL query parameter
- * keepNull can be used with a value of false. This will modify the behavior of the patch command to
- * remove any attributes from the existing document that are contained in the patch document with an
- * attribute value of null.
- * @return options
- */
- public EdgeUpdateOptions keepNull(final Boolean keepNull) {
- this.keepNull = keepNull;
- return this;
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until document has been synced to disk.
- * @return options
- */
- public EdgeUpdateOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public String getIfMatch() {
- return ifMatch;
- }
-
- /**
- * @param ifMatch replace a document based on target revision
- * @return options
- */
- public EdgeUpdateOptions ifMatch(final String ifMatch) {
- this.ifMatch = ifMatch;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.1
- */
- public EdgeUpdateOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class EdgeUpdateOptions {
+
+ private Boolean keepNull;
+ private Boolean waitForSync;
+ private String ifMatch;
+ private String streamTransactionId;
+
+ public EdgeUpdateOptions() {
+ super();
+ }
+
+ public Boolean getKeepNull() {
+ return keepNull;
+ }
+
+ /**
+ * @param keepNull If the intention is to delete existing attributes with the patch command, the URL query parameter
+ * keepNull can be used with a value of false. This will modify the behavior of the patch command to
+ * remove any attributes from the existing document that are contained in the patch document with an
+ * attribute value of null.
+ * @return options
+ */
+ public EdgeUpdateOptions keepNull(final Boolean keepNull) {
+ this.keepNull = keepNull;
+ return this;
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until document has been synced to disk.
+ * @return options
+ */
+ public EdgeUpdateOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public String getIfMatch() {
+ return ifMatch;
+ }
+
+ /**
+ * @param ifMatch replace a document based on target revision
+ * @return options
+ */
+ public EdgeUpdateOptions ifMatch(final String ifMatch) {
+ this.ifMatch = ifMatch;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.1
+ */
+ public EdgeUpdateOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/FulltextIndexOptions.java b/driver/src/main/java/com/arangodb/model/FulltextIndexOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/FulltextIndexOptions.java
rename to driver/src/main/java/com/arangodb/model/FulltextIndexOptions.java
index 84735b5b0..d476c8bba 100644
--- a/src/main/java/com/arangodb/model/FulltextIndexOptions.java
+++ b/driver/src/main/java/com/arangodb/model/FulltextIndexOptions.java
@@ -1,79 +1,79 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.IndexType;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- * @deprecated since ArangoDB 3.10, use ArangoSearch or Inverted indexes instead.
- */
-@Deprecated
-public final class FulltextIndexOptions extends IndexOptions {
-
- private final IndexType type = IndexType.fulltext;
- private Iterable fields;
- private Integer minLength;
-
- public FulltextIndexOptions() {
- super();
- }
-
- @Override
- FulltextIndexOptions getThis() {
- return this;
- }
-
- public Iterable getFields() {
- return fields;
- }
-
- /**
- * @param fields A list of attribute paths
- * @return options
- */
- FulltextIndexOptions fields(final Iterable fields) {
- this.fields = fields;
- return this;
- }
-
- public IndexType getType() {
- return type;
- }
-
- public Integer getMinLength() {
- return minLength;
- }
-
- /**
- * @param minLength Minimum character length of words to index. Will default to a server-defined value if
- * unspecified. It
- * is thus recommended to set this value explicitly when creating the index.
- * @return options
- */
- public FulltextIndexOptions minLength(final Integer minLength) {
- this.minLength = minLength;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.IndexType;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ * @deprecated since ArangoDB 3.10, use ArangoSearch or Inverted indexes instead.
+ */
+@Deprecated
+public final class FulltextIndexOptions extends IndexOptions {
+
+ private final IndexType type = IndexType.fulltext;
+ private Iterable fields;
+ private Integer minLength;
+
+ public FulltextIndexOptions() {
+ super();
+ }
+
+ @Override
+ FulltextIndexOptions getThis() {
+ return this;
+ }
+
+ public Iterable getFields() {
+ return fields;
+ }
+
+ /**
+ * @param fields A list of attribute paths
+ * @return options
+ */
+ FulltextIndexOptions fields(final Iterable fields) {
+ this.fields = fields;
+ return this;
+ }
+
+ public IndexType getType() {
+ return type;
+ }
+
+ public Integer getMinLength() {
+ return minLength;
+ }
+
+ /**
+ * @param minLength Minimum character length of words to index. Will default to a server-defined value if
+ * unspecified. It
+ * is thus recommended to set this value explicitly when creating the index.
+ * @return options
+ */
+ public FulltextIndexOptions minLength(final Integer minLength) {
+ this.minLength = minLength;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/GeoIndexOptions.java b/driver/src/main/java/com/arangodb/model/GeoIndexOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/GeoIndexOptions.java
rename to driver/src/main/java/com/arangodb/model/GeoIndexOptions.java
index d71c10555..4a95e2274 100644
--- a/src/main/java/com/arangodb/model/GeoIndexOptions.java
+++ b/driver/src/main/java/com/arangodb/model/GeoIndexOptions.java
@@ -1,94 +1,94 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.IndexType;
-
-/**
- * @author Mark Vollmary
- * @see
- * API Documentation
- */
-public final class GeoIndexOptions extends IndexOptions {
-
- private final IndexType type = IndexType.geo;
- private Iterable fields;
- private Boolean geoJson;
- private Boolean legacyPolygons;
-
- public GeoIndexOptions() {
- super();
- }
-
- @Override
- GeoIndexOptions getThis() {
- return this;
- }
-
- public Iterable getFields() {
- return fields;
- }
-
- /**
- * @param fields A list of attribute paths
- * @return options
- */
- GeoIndexOptions fields(final Iterable fields) {
- this.fields = fields;
- return this;
- }
-
- public IndexType getType() {
- return type;
- }
-
- public Boolean getGeoJson() {
- return geoJson;
- }
-
- /**
- * @param geoJson If a geo-spatial index on a location is constructed and geoJson is true, then the order within the
- * array is longitude followed by latitude. This corresponds to the format described in
- * @return options
- */
- public GeoIndexOptions geoJson(final Boolean geoJson) {
- this.geoJson = geoJson;
- return this;
- }
-
- public Boolean getLegacyPolygons() {
- return legacyPolygons;
- }
-
- /**
- * @param legacyPolygons If `true` will use the old rules (pre-3.10) for the parsing GeoJSON polygons. This
- * allows you to let old indexes produce the same, potentially wrong results as before an
- * upgrade. A geo index with `legacyPolygons` set to `false` will use the new, correct and
- * consistent method for parsing of GeoJSON polygons.
- * See Legacy Polygons.
- * @return options
- * @since ArangoDB 3.10
- */
- public GeoIndexOptions legacyPolygons(final Boolean legacyPolygons) {
- this.legacyPolygons = legacyPolygons;
- return this;
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.IndexType;
+
+/**
+ * @author Mark Vollmary
+ * @see
+ * API Documentation
+ */
+public final class GeoIndexOptions extends IndexOptions {
+
+ private final IndexType type = IndexType.geo;
+ private Iterable fields;
+ private Boolean geoJson;
+ private Boolean legacyPolygons;
+
+ public GeoIndexOptions() {
+ super();
+ }
+
+ @Override
+ GeoIndexOptions getThis() {
+ return this;
+ }
+
+ public Iterable getFields() {
+ return fields;
+ }
+
+ /**
+ * @param fields A list of attribute paths
+ * @return options
+ */
+ GeoIndexOptions fields(final Iterable fields) {
+ this.fields = fields;
+ return this;
+ }
+
+ public IndexType getType() {
+ return type;
+ }
+
+ public Boolean getGeoJson() {
+ return geoJson;
+ }
+
+ /**
+ * @param geoJson If a geo-spatial index on a location is constructed and geoJson is true, then the order within the
+ * array is longitude followed by latitude. This corresponds to the format described in
+ * @return options
+ */
+ public GeoIndexOptions geoJson(final Boolean geoJson) {
+ this.geoJson = geoJson;
+ return this;
+ }
+
+ public Boolean getLegacyPolygons() {
+ return legacyPolygons;
+ }
+
+ /**
+ * @param legacyPolygons If `true` will use the old rules (pre-3.10) for the parsing GeoJSON polygons. This
+ * allows you to let old indexes produce the same, potentially wrong results as before an
+ * upgrade. A geo index with `legacyPolygons` set to `false` will use the new, correct and
+ * consistent method for parsing of GeoJSON polygons.
+ * See Legacy Polygons.
+ * @return options
+ * @since ArangoDB 3.10
+ */
+ public GeoIndexOptions legacyPolygons(final Boolean legacyPolygons) {
+ this.legacyPolygons = legacyPolygons;
+ return this;
+ }
+}
diff --git a/src/main/java/com/arangodb/model/GraphCreateOptions.java b/driver/src/main/java/com/arangodb/model/GraphCreateOptions.java
similarity index 97%
rename from src/main/java/com/arangodb/model/GraphCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/GraphCreateOptions.java
index 1b7e3b322..a0db68f4c 100644
--- a/src/main/java/com/arangodb/model/GraphCreateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/GraphCreateOptions.java
@@ -1,272 +1,272 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.EdgeDefinition;
-import com.arangodb.entity.ReplicationFactor;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class GraphCreateOptions {
-
- private String name;
- private Collection edgeDefinitions;
- private Collection orphanCollections;
- private Boolean isSmart;
- private SmartOptions options;
-
- public GraphCreateOptions() {
- super();
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * @param name Name of the graph
- * @return options
- */
- GraphCreateOptions name(final String name) {
- this.name = name;
- return this;
- }
-
- public Collection getEdgeDefinitions() {
- return edgeDefinitions;
- }
-
- /**
- * @param edgeDefinitions An array of definitions for the edge
- * @return options
- */
- GraphCreateOptions edgeDefinitions(final Collection edgeDefinitions) {
- this.edgeDefinitions = edgeDefinitions;
- return this;
- }
-
- public Collection getOrphanCollections() {
- return orphanCollections;
- }
-
- /**
- * @param orphanCollections Additional vertex collections
- * @return options
- */
- public GraphCreateOptions orphanCollections(final String... orphanCollections) {
- this.orphanCollections = Arrays.asList(orphanCollections);
- return this;
- }
-
- public Boolean getIsSmart() {
- return isSmart;
- }
-
- /**
- * @param isSmart Define if the created graph should be smart. This only has effect in Enterprise version.
- * @return options
- */
- public GraphCreateOptions isSmart(final Boolean isSmart) {
- this.isSmart = isSmart;
- return this;
- }
-
- public Boolean getIsDisjoint() {
- return getOptions().getIsDisjoint();
- }
-
- /**
- * @param isDisjoint If set to true, a Disjoint SmartGraph will be created. This flag is not editable after
- * creation. Default: false.
- * @return options
- * @since ArangoDB 3.7
- */
- public GraphCreateOptions isDisjoint(final Boolean isDisjoint) {
- getOptions().setIsDisjoint(isDisjoint);
- return this;
- }
-
- public ReplicationFactor getReplicationFactor() {
- return getOptions().replicationFactor;
- }
-
- /**
- * @param replicationFactor (The default is 1): in a cluster, this attribute determines how many copies of each
- * shard are kept on
- * different DBServers. The value 1 means that only one copy (no synchronous
- * replication) is kept. A
- * value of k means that k-1 replicas are kept. Any two copies reside on different
- * DBServers. Replication
- * between them is synchronous, that is, every write operation to the "leader" copy will
- * be replicated to
- * all "follower" replicas, before the write operation is reported successful. If a
- * server fails, this is
- * detected automatically and one of the servers holding copies take over, usually
- * without an error being
- * reported.
- * @return options
- */
- public GraphCreateOptions replicationFactor(final ReplicationFactor replicationFactor) {
- getOptions().setReplicationFactor(replicationFactor);
- return this;
- }
-
- public GraphCreateOptions replicationFactor(int replicationFactor) {
- getOptions().setReplicationFactor(ReplicationFactor.of(replicationFactor));
- return this;
- }
-
- public Integer getWriteConcern() {
- return getOptions().getWriteConcern();
- }
-
- /**
- * @param writeConcern Write concern for new collections in the graph.
- * It determines how many copies of each shard are required to be in sync on the different
- * DB-Servers. If there are less then these many copies in the cluster a shard will refuse to
- * write. Writes to shards with enough up-to-date copies will succeed at the same time however.
- * The value of writeConcern can not be larger than replicationFactor. (cluster only)
- * @return options
- */
- public GraphCreateOptions writeConcern(final Integer writeConcern) {
- getOptions().setWriteConcern(writeConcern);
- return this;
- }
-
- public Integer getNumberOfShards() {
- return getOptions().getNumberOfShards();
- }
-
- /**
- * @param numberOfShards The number of shards that is used for every collection within this graph. Cannot be
- * modified later.
- * @return options
- */
- public GraphCreateOptions numberOfShards(final Integer numberOfShards) {
- getOptions().setNumberOfShards(numberOfShards);
- return this;
- }
-
- public String getSmartGraphAttribute() {
- return getOptions().getSmartGraphAttribute();
- }
-
- /**
- * @param smartGraphAttribute The attribute name that is used to smartly shard the vertices of a graph. Every
- * vertex in this Graph
- * has to have this attribute. Cannot be modified later.
- * @return options
- */
- public GraphCreateOptions smartGraphAttribute(final String smartGraphAttribute) {
- getOptions().setSmartGraphAttribute(smartGraphAttribute);
- return this;
- }
-
- public Collection getSatellites() {
- return getOptions().getSatellites();
- }
-
- /**
- * @param satellites collection names that will be used to create SatelliteCollections
- * for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
- * must be a valid collection name. The collection type cannot be modified later.
- * @return options
- * @since ArangoDB 3.9.0
- */
- public GraphCreateOptions satellites(final String... satellites) {
- getOptions().setSatellites(satellites);
- return this;
- }
-
- public SmartOptions getOptions() {
- if (options == null) {
- options = new SmartOptions();
- }
- return options;
- }
-
- public static final class SmartOptions {
- private ReplicationFactor replicationFactor;
- private Integer writeConcern;
- private Integer numberOfShards;
- private String smartGraphAttribute;
- private Boolean isDisjoint;
- private Collection satellites;
-
- public SmartOptions() {
- super();
- }
-
- public ReplicationFactor getReplicationFactor() {
- return replicationFactor;
- }
-
- public void setReplicationFactor(final ReplicationFactor replicationFactor) {
- this.replicationFactor = replicationFactor;
- }
-
- public Integer getWriteConcern() {
- return writeConcern;
- }
-
- public void setWriteConcern(final Integer writeConcern) {
- this.writeConcern = writeConcern;
- }
-
- public Integer getNumberOfShards() {
- return numberOfShards;
- }
-
- public void setNumberOfShards(final Integer numberOfShards) {
- this.numberOfShards = numberOfShards;
- }
-
- public String getSmartGraphAttribute() {
- return smartGraphAttribute;
- }
-
- public void setSmartGraphAttribute(final String smartGraphAttribute) {
- this.smartGraphAttribute = smartGraphAttribute;
- }
-
- public Boolean getIsDisjoint() {
- return isDisjoint;
- }
-
- public void setIsDisjoint(final Boolean isDisjoint) {
- this.isDisjoint = isDisjoint;
- }
-
- public Collection getSatellites() {
- return satellites;
- }
-
- public void setSatellites(final String... satellites) {
- this.satellites = Arrays.asList(satellites);
- }
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.EdgeDefinition;
+import com.arangodb.entity.ReplicationFactor;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class GraphCreateOptions {
+
+ private String name;
+ private Collection edgeDefinitions;
+ private Collection orphanCollections;
+ private Boolean isSmart;
+ private SmartOptions options;
+
+ public GraphCreateOptions() {
+ super();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name Name of the graph
+ * @return options
+ */
+ GraphCreateOptions name(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public Collection getEdgeDefinitions() {
+ return edgeDefinitions;
+ }
+
+ /**
+ * @param edgeDefinitions An array of definitions for the edge
+ * @return options
+ */
+ GraphCreateOptions edgeDefinitions(final Collection edgeDefinitions) {
+ this.edgeDefinitions = edgeDefinitions;
+ return this;
+ }
+
+ public Collection getOrphanCollections() {
+ return orphanCollections;
+ }
+
+ /**
+ * @param orphanCollections Additional vertex collections
+ * @return options
+ */
+ public GraphCreateOptions orphanCollections(final String... orphanCollections) {
+ this.orphanCollections = Arrays.asList(orphanCollections);
+ return this;
+ }
+
+ public Boolean getIsSmart() {
+ return isSmart;
+ }
+
+ /**
+ * @param isSmart Define if the created graph should be smart. This only has effect in Enterprise version.
+ * @return options
+ */
+ public GraphCreateOptions isSmart(final Boolean isSmart) {
+ this.isSmart = isSmart;
+ return this;
+ }
+
+ public Boolean getIsDisjoint() {
+ return getOptions().getIsDisjoint();
+ }
+
+ /**
+ * @param isDisjoint If set to true, a Disjoint SmartGraph will be created. This flag is not editable after
+ * creation. Default: false.
+ * @return options
+ * @since ArangoDB 3.7
+ */
+ public GraphCreateOptions isDisjoint(final Boolean isDisjoint) {
+ getOptions().setIsDisjoint(isDisjoint);
+ return this;
+ }
+
+ public ReplicationFactor getReplicationFactor() {
+ return getOptions().replicationFactor;
+ }
+
+ /**
+ * @param replicationFactor (The default is 1): in a cluster, this attribute determines how many copies of each
+ * shard are kept on
+ * different DBServers. The value 1 means that only one copy (no synchronous
+ * replication) is kept. A
+ * value of k means that k-1 replicas are kept. Any two copies reside on different
+ * DBServers. Replication
+ * between them is synchronous, that is, every write operation to the "leader" copy will
+ * be replicated to
+ * all "follower" replicas, before the write operation is reported successful. If a
+ * server fails, this is
+ * detected automatically and one of the servers holding copies take over, usually
+ * without an error being
+ * reported.
+ * @return options
+ */
+ public GraphCreateOptions replicationFactor(final ReplicationFactor replicationFactor) {
+ getOptions().setReplicationFactor(replicationFactor);
+ return this;
+ }
+
+ public GraphCreateOptions replicationFactor(int replicationFactor) {
+ getOptions().setReplicationFactor(ReplicationFactor.of(replicationFactor));
+ return this;
+ }
+
+ public Integer getWriteConcern() {
+ return getOptions().getWriteConcern();
+ }
+
+ /**
+ * @param writeConcern Write concern for new collections in the graph.
+ * It determines how many copies of each shard are required to be in sync on the different
+ * DB-Servers. If there are less then these many copies in the cluster a shard will refuse to
+ * write. Writes to shards with enough up-to-date copies will succeed at the same time however.
+ * The value of writeConcern can not be larger than replicationFactor. (cluster only)
+ * @return options
+ */
+ public GraphCreateOptions writeConcern(final Integer writeConcern) {
+ getOptions().setWriteConcern(writeConcern);
+ return this;
+ }
+
+ public Integer getNumberOfShards() {
+ return getOptions().getNumberOfShards();
+ }
+
+ /**
+ * @param numberOfShards The number of shards that is used for every collection within this graph. Cannot be
+ * modified later.
+ * @return options
+ */
+ public GraphCreateOptions numberOfShards(final Integer numberOfShards) {
+ getOptions().setNumberOfShards(numberOfShards);
+ return this;
+ }
+
+ public String getSmartGraphAttribute() {
+ return getOptions().getSmartGraphAttribute();
+ }
+
+ /**
+ * @param smartGraphAttribute The attribute name that is used to smartly shard the vertices of a graph. Every
+ * vertex in this Graph
+ * has to have this attribute. Cannot be modified later.
+ * @return options
+ */
+ public GraphCreateOptions smartGraphAttribute(final String smartGraphAttribute) {
+ getOptions().setSmartGraphAttribute(smartGraphAttribute);
+ return this;
+ }
+
+ public Collection getSatellites() {
+ return getOptions().getSatellites();
+ }
+
+ /**
+ * @param satellites collection names that will be used to create SatelliteCollections
+ * for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
+ * must be a valid collection name. The collection type cannot be modified later.
+ * @return options
+ * @since ArangoDB 3.9.0
+ */
+ public GraphCreateOptions satellites(final String... satellites) {
+ getOptions().setSatellites(satellites);
+ return this;
+ }
+
+ public SmartOptions getOptions() {
+ if (options == null) {
+ options = new SmartOptions();
+ }
+ return options;
+ }
+
+ public static final class SmartOptions {
+ private ReplicationFactor replicationFactor;
+ private Integer writeConcern;
+ private Integer numberOfShards;
+ private String smartGraphAttribute;
+ private Boolean isDisjoint;
+ private Collection satellites;
+
+ public SmartOptions() {
+ super();
+ }
+
+ public ReplicationFactor getReplicationFactor() {
+ return replicationFactor;
+ }
+
+ public void setReplicationFactor(final ReplicationFactor replicationFactor) {
+ this.replicationFactor = replicationFactor;
+ }
+
+ public Integer getWriteConcern() {
+ return writeConcern;
+ }
+
+ public void setWriteConcern(final Integer writeConcern) {
+ this.writeConcern = writeConcern;
+ }
+
+ public Integer getNumberOfShards() {
+ return numberOfShards;
+ }
+
+ public void setNumberOfShards(final Integer numberOfShards) {
+ this.numberOfShards = numberOfShards;
+ }
+
+ public String getSmartGraphAttribute() {
+ return smartGraphAttribute;
+ }
+
+ public void setSmartGraphAttribute(final String smartGraphAttribute) {
+ this.smartGraphAttribute = smartGraphAttribute;
+ }
+
+ public Boolean getIsDisjoint() {
+ return isDisjoint;
+ }
+
+ public void setIsDisjoint(final Boolean isDisjoint) {
+ this.isDisjoint = isDisjoint;
+ }
+
+ public Collection getSatellites() {
+ return satellites;
+ }
+
+ public void setSatellites(final String... satellites) {
+ this.satellites = Arrays.asList(satellites);
+ }
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/GraphDocumentReadOptions.java b/driver/src/main/java/com/arangodb/model/GraphDocumentReadOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/GraphDocumentReadOptions.java
rename to driver/src/main/java/com/arangodb/model/GraphDocumentReadOptions.java
diff --git a/src/main/java/com/arangodb/model/HashIndexOptions.java b/driver/src/main/java/com/arangodb/model/HashIndexOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/HashIndexOptions.java
rename to driver/src/main/java/com/arangodb/model/HashIndexOptions.java
index 633910c16..1924debe7 100644
--- a/src/main/java/com/arangodb/model/HashIndexOptions.java
+++ b/driver/src/main/java/com/arangodb/model/HashIndexOptions.java
@@ -1,121 +1,121 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.IndexType;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- * @deprecated use {@link PersistentIndexOptions} instead. Since ArangoDB 3.7 a hash index is an alias for a persistent
- * index.
- */
-@Deprecated
-public final class HashIndexOptions extends IndexOptions {
-
- private final IndexType type = IndexType.hash;
- private Iterable fields;
- private Boolean unique;
- private Boolean sparse;
- private Boolean deduplicate;
- private Boolean estimates;
-
- public HashIndexOptions() {
- super();
- }
-
- @Override
- HashIndexOptions getThis() {
- return this;
- }
-
- public Iterable getFields() {
- return fields;
- }
-
- /**
- * @param fields A list of attribute paths
- * @return options
- */
- HashIndexOptions fields(final Iterable fields) {
- this.fields = fields;
- return this;
- }
-
- public IndexType getType() {
- return type;
- }
-
- public Boolean getUnique() {
- return unique;
- }
-
- /**
- * @param unique if true, then create a unique index
- * @return options
- */
- public HashIndexOptions unique(final Boolean unique) {
- this.unique = unique;
- return this;
- }
-
- public Boolean getSparse() {
- return sparse;
- }
-
- /**
- * @param sparse if true, then create a sparse index
- * @return options
- */
- public HashIndexOptions sparse(final Boolean sparse) {
- this.sparse = sparse;
- return this;
- }
-
- public Boolean getDeduplicate() {
- return deduplicate;
- }
-
- /**
- * @param deduplicate if false, the deduplication of array values is turned off.
- * @return options
- */
- public HashIndexOptions deduplicate(final Boolean deduplicate) {
- this.deduplicate = deduplicate;
- return this;
- }
-
- /**
- * @param estimates This attribute controls whether index selectivity estimates are maintained for the index.
- * Default: {@code
- * true}
- * @since ArangoDB 3.8
- */
- public HashIndexOptions estimates(final Boolean estimates) {
- this.estimates = estimates;
- return this;
- }
-
- public Boolean getEstimates() {
- return estimates;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.IndexType;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ * @deprecated use {@link PersistentIndexOptions} instead. Since ArangoDB 3.7 a hash index is an alias for a persistent
+ * index.
+ */
+@Deprecated
+public final class HashIndexOptions extends IndexOptions {
+
+ private final IndexType type = IndexType.hash;
+ private Iterable fields;
+ private Boolean unique;
+ private Boolean sparse;
+ private Boolean deduplicate;
+ private Boolean estimates;
+
+ public HashIndexOptions() {
+ super();
+ }
+
+ @Override
+ HashIndexOptions getThis() {
+ return this;
+ }
+
+ public Iterable getFields() {
+ return fields;
+ }
+
+ /**
+ * @param fields A list of attribute paths
+ * @return options
+ */
+ HashIndexOptions fields(final Iterable fields) {
+ this.fields = fields;
+ return this;
+ }
+
+ public IndexType getType() {
+ return type;
+ }
+
+ public Boolean getUnique() {
+ return unique;
+ }
+
+ /**
+ * @param unique if true, then create a unique index
+ * @return options
+ */
+ public HashIndexOptions unique(final Boolean unique) {
+ this.unique = unique;
+ return this;
+ }
+
+ public Boolean getSparse() {
+ return sparse;
+ }
+
+ /**
+ * @param sparse if true, then create a sparse index
+ * @return options
+ */
+ public HashIndexOptions sparse(final Boolean sparse) {
+ this.sparse = sparse;
+ return this;
+ }
+
+ public Boolean getDeduplicate() {
+ return deduplicate;
+ }
+
+ /**
+ * @param deduplicate if false, the deduplication of array values is turned off.
+ * @return options
+ */
+ public HashIndexOptions deduplicate(final Boolean deduplicate) {
+ this.deduplicate = deduplicate;
+ return this;
+ }
+
+ /**
+ * @param estimates This attribute controls whether index selectivity estimates are maintained for the index.
+ * Default: {@code
+ * true}
+ * @since ArangoDB 3.8
+ */
+ public HashIndexOptions estimates(final Boolean estimates) {
+ this.estimates = estimates;
+ return this;
+ }
+
+ public Boolean getEstimates() {
+ return estimates;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/ImportType.java b/driver/src/main/java/com/arangodb/model/ImportType.java
similarity index 96%
rename from src/main/java/com/arangodb/model/ImportType.java
rename to driver/src/main/java/com/arangodb/model/ImportType.java
index 17e4d5573..3cbd123e0 100644
--- a/src/main/java/com/arangodb/model/ImportType.java
+++ b/driver/src/main/java/com/arangodb/model/ImportType.java
@@ -1,28 +1,28 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- */
-public enum ImportType {
- documents, list, auto
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ */
+public enum ImportType {
+ documents, list, auto
+}
diff --git a/src/main/java/com/arangodb/model/IndexOptions.java b/driver/src/main/java/com/arangodb/model/IndexOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/IndexOptions.java
rename to driver/src/main/java/com/arangodb/model/IndexOptions.java
index 69df19a8d..31a62c04e 100644
--- a/src/main/java/com/arangodb/model/IndexOptions.java
+++ b/driver/src/main/java/com/arangodb/model/IndexOptions.java
@@ -1,64 +1,64 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2019 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Heiko Kernbach
- *
- * This final class is used for all index similarities
- */
-public abstract class IndexOptions> {
-
- private Boolean inBackground;
- private String name;
-
- protected IndexOptions() {
- }
-
- abstract T getThis();
-
- /**
- * @param inBackground create the the index in the background
- * this is a RocksDB only flag.
- * @return options
- */
- public T inBackground(final Boolean inBackground) {
- this.inBackground = inBackground;
- return getThis();
- }
-
- public Boolean getInBackground() {
- return inBackground;
- }
-
- /**
- * @param name the name of the index
- * @return options
- */
- public T name(final String name) {
- this.name = name;
- return getThis();
- }
-
- public String getName() {
- return name;
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2019 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Heiko Kernbach
+ *
+ * This final class is used for all index similarities
+ */
+public abstract class IndexOptions> {
+
+ private Boolean inBackground;
+ private String name;
+
+ protected IndexOptions() {
+ }
+
+ abstract T getThis();
+
+ /**
+ * @param inBackground create the the index in the background
+ * this is a RocksDB only flag.
+ * @return options
+ */
+ public T inBackground(final Boolean inBackground) {
+ this.inBackground = inBackground;
+ return getThis();
+ }
+
+ public Boolean getInBackground() {
+ return inBackground;
+ }
+
+ /**
+ * @param name the name of the index
+ * @return options
+ */
+ public T name(final String name) {
+ this.name = name;
+ return getThis();
+ }
+
+ public String getName() {
+ return name;
+ }
+}
diff --git a/src/main/java/com/arangodb/model/InvertedIndexOptions.java b/driver/src/main/java/com/arangodb/model/InvertedIndexOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/InvertedIndexOptions.java
rename to driver/src/main/java/com/arangodb/model/InvertedIndexOptions.java
diff --git a/src/main/java/com/arangodb/model/LogOptions.java b/driver/src/main/java/com/arangodb/model/LogOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/LogOptions.java
rename to driver/src/main/java/com/arangodb/model/LogOptions.java
index bc5a25f17..a8d29071d 100644
--- a/src/main/java/com/arangodb/model/LogOptions.java
+++ b/driver/src/main/java/com/arangodb/model/LogOptions.java
@@ -1,152 +1,152 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.LogLevel;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class LogOptions {
-
- public static final String PROPERTY_UPTO = "upto";
- public static final String PROPERTY_LEVEL = "level";
- public static final String PROPERTY_START = "start";
- public static final String PROPERTY_SIZE = "size";
- public static final String PROPERTY_OFFSET = "offset";
- public static final String PROPERTY_SEARCH = "search";
- public static final String PROPERTY_SORT = "sort";
- private LogLevel upto;
- private LogLevel level;
- private Long start;
- private Integer size;
- private Integer offset;
- private String search;
- private SortOrder sort;
-
- public LogOptions() {
- super();
- }
-
- public LogLevel getUpto() {
- return upto;
- }
-
- /**
- * @param upto Returns all log entries up to log level upto
- * @return options
- */
- public LogOptions upto(final LogLevel upto) {
- this.upto = upto;
- return this;
- }
-
- public LogLevel getLevel() {
- return level;
- }
-
- /**
- * @param level Returns all log entries of log level level. Note that the query parameters upto and level are
- * mutually
- * exclusive
- * @return options
- */
- public LogOptions level(final LogLevel level) {
- this.level = level;
- return this;
- }
-
- public Long getStart() {
- return start;
- }
-
- /**
- * @param start Returns all log entries such that their log entry identifier (lid value) is greater or equal to
- * start
- * @return options
- */
- public LogOptions start(final Long start) {
- this.start = start;
- return this;
- }
-
- public Integer getSize() {
- return size;
- }
-
- /**
- * @param size Restricts the result to at most size log entries
- * @return options
- */
- public LogOptions size(final Integer size) {
- this.size = size;
- return this;
- }
-
- public Integer getOffset() {
- return offset;
- }
-
- /**
- * @param offset Starts to return log entries skipping the first offset log entries. offset and size can be used for
- * pagination
- * @return options
- */
- public LogOptions offset(final Integer offset) {
- this.offset = offset;
- return this;
- }
-
- public String getSearch() {
- return search;
- }
-
- /**
- * @param search Only return the log entries containing the text specified in search
- * @return options
- */
- public LogOptions search(final String search) {
- this.search = search;
- return this;
- }
-
- public SortOrder getSort() {
- return sort;
- }
-
- /**
- * @param sort Sort the log entries either ascending (if sort is asc) or descending (if sort is desc) according to
- * their lid values. Note that the lid imposes a chronological order. The default value is asc
- * @return options
- */
- public LogOptions sort(final SortOrder sort) {
- this.sort = sort;
- return this;
- }
-
- public enum SortOrder {
- asc, desc
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.LogLevel;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class LogOptions {
+
+ public static final String PROPERTY_UPTO = "upto";
+ public static final String PROPERTY_LEVEL = "level";
+ public static final String PROPERTY_START = "start";
+ public static final String PROPERTY_SIZE = "size";
+ public static final String PROPERTY_OFFSET = "offset";
+ public static final String PROPERTY_SEARCH = "search";
+ public static final String PROPERTY_SORT = "sort";
+ private LogLevel upto;
+ private LogLevel level;
+ private Long start;
+ private Integer size;
+ private Integer offset;
+ private String search;
+ private SortOrder sort;
+
+ public LogOptions() {
+ super();
+ }
+
+ public LogLevel getUpto() {
+ return upto;
+ }
+
+ /**
+ * @param upto Returns all log entries up to log level upto
+ * @return options
+ */
+ public LogOptions upto(final LogLevel upto) {
+ this.upto = upto;
+ return this;
+ }
+
+ public LogLevel getLevel() {
+ return level;
+ }
+
+ /**
+ * @param level Returns all log entries of log level level. Note that the query parameters upto and level are
+ * mutually
+ * exclusive
+ * @return options
+ */
+ public LogOptions level(final LogLevel level) {
+ this.level = level;
+ return this;
+ }
+
+ public Long getStart() {
+ return start;
+ }
+
+ /**
+ * @param start Returns all log entries such that their log entry identifier (lid value) is greater or equal to
+ * start
+ * @return options
+ */
+ public LogOptions start(final Long start) {
+ this.start = start;
+ return this;
+ }
+
+ public Integer getSize() {
+ return size;
+ }
+
+ /**
+ * @param size Restricts the result to at most size log entries
+ * @return options
+ */
+ public LogOptions size(final Integer size) {
+ this.size = size;
+ return this;
+ }
+
+ public Integer getOffset() {
+ return offset;
+ }
+
+ /**
+ * @param offset Starts to return log entries skipping the first offset log entries. offset and size can be used for
+ * pagination
+ * @return options
+ */
+ public LogOptions offset(final Integer offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ public String getSearch() {
+ return search;
+ }
+
+ /**
+ * @param search Only return the log entries containing the text specified in search
+ * @return options
+ */
+ public LogOptions search(final String search) {
+ this.search = search;
+ return this;
+ }
+
+ public SortOrder getSort() {
+ return sort;
+ }
+
+ /**
+ * @param sort Sort the log entries either ascending (if sort is asc) or descending (if sort is desc) according to
+ * their lid values. Note that the lid imposes a chronological order. The default value is asc
+ * @return options
+ */
+ public LogOptions sort(final SortOrder sort) {
+ this.sort = sort;
+ return this;
+ }
+
+ public enum SortOrder {
+ asc, desc
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/OptionsBuilder.java b/driver/src/main/java/com/arangodb/model/OptionsBuilder.java
similarity index 100%
rename from src/main/java/com/arangodb/model/OptionsBuilder.java
rename to driver/src/main/java/com/arangodb/model/OptionsBuilder.java
diff --git a/src/main/java/com/arangodb/model/OverwriteMode.java b/driver/src/main/java/com/arangodb/model/OverwriteMode.java
similarity index 100%
rename from src/main/java/com/arangodb/model/OverwriteMode.java
rename to driver/src/main/java/com/arangodb/model/OverwriteMode.java
diff --git a/src/main/java/com/arangodb/model/PersistentIndexOptions.java b/driver/src/main/java/com/arangodb/model/PersistentIndexOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/PersistentIndexOptions.java
rename to driver/src/main/java/com/arangodb/model/PersistentIndexOptions.java
index 1ad5be93c..583a2e107 100644
--- a/src/main/java/com/arangodb/model/PersistentIndexOptions.java
+++ b/driver/src/main/java/com/arangodb/model/PersistentIndexOptions.java
@@ -1,158 +1,158 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.IndexType;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-
-/**
- * @author Mark Vollmary
- * @see API
- * Documentation
- */
-public final class PersistentIndexOptions extends IndexOptions {
-
- private final IndexType type = IndexType.persistent;
- private Iterable fields;
- private Boolean unique;
- private Boolean sparse;
- private Boolean deduplicate;
- private Boolean estimates;
- private Boolean cacheEnabled;
- private Collection storedValues;
-
- public PersistentIndexOptions() {
- super();
- }
-
- @Override
- PersistentIndexOptions getThis() {
- return this;
- }
-
- public Iterable getFields() {
- return fields;
- }
-
- /**
- * @param fields A list of attribute paths
- * @return options
- */
- PersistentIndexOptions fields(final Iterable fields) {
- this.fields = fields;
- return this;
- }
-
- public IndexType getType() {
- return type;
- }
-
- public Boolean getUnique() {
- return unique;
- }
-
- /**
- * @param unique if true, then create a unique index
- * @return options
- */
- public PersistentIndexOptions unique(final Boolean unique) {
- this.unique = unique;
- return this;
- }
-
- public Boolean getSparse() {
- return sparse;
- }
-
- /**
- * @param sparse if true, then create a sparse index
- * @return options
- */
- public PersistentIndexOptions sparse(final Boolean sparse) {
- this.sparse = sparse;
- return this;
- }
-
- public Boolean getDeduplicate() {
- return deduplicate;
- }
-
- /**
- * @param deduplicate if false, the deduplication of array values is turned off. Default: {@code true}
- * @return options
- */
- public PersistentIndexOptions deduplicate(final Boolean deduplicate) {
- this.deduplicate = deduplicate;
- return this;
- }
-
- /**
- * @param estimates This attribute controls whether index selectivity estimates are maintained for the index.
- * Default: {@code
- * true}
- * @since ArangoDB 3.8
- */
- public PersistentIndexOptions estimates(final Boolean estimates) {
- this.estimates = estimates;
- return this;
- }
-
- public Boolean getEstimates() {
- return estimates;
- }
-
- /**
- * @param cacheEnabled enables in-memory caching of index entries
- * @return options
- * @since ArangoDB 3.10
- */
- public PersistentIndexOptions cacheEnabled(final Boolean cacheEnabled) {
- this.cacheEnabled = cacheEnabled;
- return this;
- }
-
- public Boolean getCacheEnabled() {
- return cacheEnabled;
- }
-
- public Collection getStoredValues() {
- return storedValues;
- }
-
- /**
- * @param storedValues (optional) array of paths to additional attributes to store in the index. These additional
- * attributes cannot be used for index lookups or for sorting, but they can be used for
- * projections. This allows an index to fully cover more queries and avoid extra document
- * lookups. The maximum number of attributes in `storedValues` is 32.
- * @return options
- */
- public PersistentIndexOptions storedValues(final String... storedValues) {
- if (this.storedValues == null) {
- this.storedValues = new HashSet<>();
- }
- Collections.addAll(this.storedValues, storedValues);
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.IndexType;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+
+/**
+ * @author Mark Vollmary
+ * @see API
+ * Documentation
+ */
+public final class PersistentIndexOptions extends IndexOptions {
+
+ private final IndexType type = IndexType.persistent;
+ private Iterable fields;
+ private Boolean unique;
+ private Boolean sparse;
+ private Boolean deduplicate;
+ private Boolean estimates;
+ private Boolean cacheEnabled;
+ private Collection storedValues;
+
+ public PersistentIndexOptions() {
+ super();
+ }
+
+ @Override
+ PersistentIndexOptions getThis() {
+ return this;
+ }
+
+ public Iterable getFields() {
+ return fields;
+ }
+
+ /**
+ * @param fields A list of attribute paths
+ * @return options
+ */
+ PersistentIndexOptions fields(final Iterable fields) {
+ this.fields = fields;
+ return this;
+ }
+
+ public IndexType getType() {
+ return type;
+ }
+
+ public Boolean getUnique() {
+ return unique;
+ }
+
+ /**
+ * @param unique if true, then create a unique index
+ * @return options
+ */
+ public PersistentIndexOptions unique(final Boolean unique) {
+ this.unique = unique;
+ return this;
+ }
+
+ public Boolean getSparse() {
+ return sparse;
+ }
+
+ /**
+ * @param sparse if true, then create a sparse index
+ * @return options
+ */
+ public PersistentIndexOptions sparse(final Boolean sparse) {
+ this.sparse = sparse;
+ return this;
+ }
+
+ public Boolean getDeduplicate() {
+ return deduplicate;
+ }
+
+ /**
+ * @param deduplicate if false, the deduplication of array values is turned off. Default: {@code true}
+ * @return options
+ */
+ public PersistentIndexOptions deduplicate(final Boolean deduplicate) {
+ this.deduplicate = deduplicate;
+ return this;
+ }
+
+ /**
+ * @param estimates This attribute controls whether index selectivity estimates are maintained for the index.
+ * Default: {@code
+ * true}
+ * @since ArangoDB 3.8
+ */
+ public PersistentIndexOptions estimates(final Boolean estimates) {
+ this.estimates = estimates;
+ return this;
+ }
+
+ public Boolean getEstimates() {
+ return estimates;
+ }
+
+ /**
+ * @param cacheEnabled enables in-memory caching of index entries
+ * @return options
+ * @since ArangoDB 3.10
+ */
+ public PersistentIndexOptions cacheEnabled(final Boolean cacheEnabled) {
+ this.cacheEnabled = cacheEnabled;
+ return this;
+ }
+
+ public Boolean getCacheEnabled() {
+ return cacheEnabled;
+ }
+
+ public Collection getStoredValues() {
+ return storedValues;
+ }
+
+ /**
+ * @param storedValues (optional) array of paths to additional attributes to store in the index. These additional
+ * attributes cannot be used for index lookups or for sorting, but they can be used for
+ * projections. This allows an index to fully cover more queries and avoid extra document
+ * lookups. The maximum number of attributes in `storedValues` is 32.
+ * @return options
+ */
+ public PersistentIndexOptions storedValues(final String... storedValues) {
+ if (this.storedValues == null) {
+ this.storedValues = new HashSet<>();
+ }
+ Collections.addAll(this.storedValues, storedValues);
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/QueueTimeSample.java b/driver/src/main/java/com/arangodb/model/QueueTimeSample.java
similarity index 100%
rename from src/main/java/com/arangodb/model/QueueTimeSample.java
rename to driver/src/main/java/com/arangodb/model/QueueTimeSample.java
diff --git a/src/main/java/com/arangodb/model/SkiplistIndexOptions.java b/driver/src/main/java/com/arangodb/model/SkiplistIndexOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/SkiplistIndexOptions.java
rename to driver/src/main/java/com/arangodb/model/SkiplistIndexOptions.java
index e608632e9..bb1cc87d4 100644
--- a/src/main/java/com/arangodb/model/SkiplistIndexOptions.java
+++ b/driver/src/main/java/com/arangodb/model/SkiplistIndexOptions.java
@@ -1,121 +1,121 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.IndexType;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- * @deprecated use {@link PersistentIndexOptions} instead. Since ArangoDB 3.7 a skiplist index is an alias for a
- * persistent index.
- */
-@Deprecated
-public final class SkiplistIndexOptions extends IndexOptions {
-
- private final IndexType type = IndexType.skiplist;
- private Iterable fields;
- private Boolean unique;
- private Boolean sparse;
- private Boolean deduplicate;
- private Boolean estimates;
-
- public SkiplistIndexOptions() {
- super();
- }
-
- @Override
- SkiplistIndexOptions getThis() {
- return this;
- }
-
- public Iterable getFields() {
- return fields;
- }
-
- /**
- * @param fields A list of attribute paths
- * @return options
- */
- SkiplistIndexOptions fields(final Iterable fields) {
- this.fields = fields;
- return this;
- }
-
- public IndexType getType() {
- return type;
- }
-
- public Boolean getUnique() {
- return unique;
- }
-
- /**
- * @param unique if true, then create a unique index
- * @return options
- */
- public SkiplistIndexOptions unique(final Boolean unique) {
- this.unique = unique;
- return this;
- }
-
- public Boolean getSparse() {
- return sparse;
- }
-
- /**
- * @param sparse if true, then create a sparse index
- * @return options
- */
- public SkiplistIndexOptions sparse(final Boolean sparse) {
- this.sparse = sparse;
- return this;
- }
-
- public Boolean getDeduplicate() {
- return deduplicate;
- }
-
- /**
- * @param deduplicate if false, the deduplication of array values is turned off.
- * @return options
- */
- public SkiplistIndexOptions deduplicate(final Boolean deduplicate) {
- this.deduplicate = deduplicate;
- return this;
- }
-
- /**
- * @param estimates This attribute controls whether index selectivity estimates are maintained for the index.
- * Default: {@code
- * true}
- * @since ArangoDB 3.8
- */
- public SkiplistIndexOptions estimates(final Boolean estimates) {
- this.estimates = estimates;
- return this;
- }
-
- public Boolean getEstimates() {
- return estimates;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.IndexType;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ * @deprecated use {@link PersistentIndexOptions} instead. Since ArangoDB 3.7 a skiplist index is an alias for a
+ * persistent index.
+ */
+@Deprecated
+public final class SkiplistIndexOptions extends IndexOptions {
+
+ private final IndexType type = IndexType.skiplist;
+ private Iterable fields;
+ private Boolean unique;
+ private Boolean sparse;
+ private Boolean deduplicate;
+ private Boolean estimates;
+
+ public SkiplistIndexOptions() {
+ super();
+ }
+
+ @Override
+ SkiplistIndexOptions getThis() {
+ return this;
+ }
+
+ public Iterable getFields() {
+ return fields;
+ }
+
+ /**
+ * @param fields A list of attribute paths
+ * @return options
+ */
+ SkiplistIndexOptions fields(final Iterable fields) {
+ this.fields = fields;
+ return this;
+ }
+
+ public IndexType getType() {
+ return type;
+ }
+
+ public Boolean getUnique() {
+ return unique;
+ }
+
+ /**
+ * @param unique if true, then create a unique index
+ * @return options
+ */
+ public SkiplistIndexOptions unique(final Boolean unique) {
+ this.unique = unique;
+ return this;
+ }
+
+ public Boolean getSparse() {
+ return sparse;
+ }
+
+ /**
+ * @param sparse if true, then create a sparse index
+ * @return options
+ */
+ public SkiplistIndexOptions sparse(final Boolean sparse) {
+ this.sparse = sparse;
+ return this;
+ }
+
+ public Boolean getDeduplicate() {
+ return deduplicate;
+ }
+
+ /**
+ * @param deduplicate if false, the deduplication of array values is turned off.
+ * @return options
+ */
+ public SkiplistIndexOptions deduplicate(final Boolean deduplicate) {
+ this.deduplicate = deduplicate;
+ return this;
+ }
+
+ /**
+ * @param estimates This attribute controls whether index selectivity estimates are maintained for the index.
+ * Default: {@code
+ * true}
+ * @since ArangoDB 3.8
+ */
+ public SkiplistIndexOptions estimates(final Boolean estimates) {
+ this.estimates = estimates;
+ return this;
+ }
+
+ public Boolean getEstimates() {
+ return estimates;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/StreamTransactionOptions.java b/driver/src/main/java/com/arangodb/model/StreamTransactionOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/StreamTransactionOptions.java
rename to driver/src/main/java/com/arangodb/model/StreamTransactionOptions.java
diff --git a/src/main/java/com/arangodb/model/TransactionCollectionOptions.java b/driver/src/main/java/com/arangodb/model/TransactionCollectionOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/TransactionCollectionOptions.java
rename to driver/src/main/java/com/arangodb/model/TransactionCollectionOptions.java
diff --git a/src/main/java/com/arangodb/model/TransactionOptions.java b/driver/src/main/java/com/arangodb/model/TransactionOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/TransactionOptions.java
rename to driver/src/main/java/com/arangodb/model/TransactionOptions.java
diff --git a/src/main/java/com/arangodb/model/TtlIndexOptions.java b/driver/src/main/java/com/arangodb/model/TtlIndexOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/TtlIndexOptions.java
rename to driver/src/main/java/com/arangodb/model/TtlIndexOptions.java
index bca69e759..65aa5af58 100644
--- a/src/main/java/com/arangodb/model/TtlIndexOptions.java
+++ b/driver/src/main/java/com/arangodb/model/TtlIndexOptions.java
@@ -1,75 +1,75 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2019 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.IndexType;
-
-/**
- * @author Heiko Kernbach
- * @see API Documentation
- */
-public final class TtlIndexOptions extends IndexOptions {
-
- private final IndexType type = IndexType.ttl;
- private Iterable fields;
- private Integer expireAfter;
-
- public TtlIndexOptions() {
- super();
- }
-
- @Override
- TtlIndexOptions getThis() {
- return this;
- }
-
- public Iterable getFields() {
- return fields;
- }
-
- /**
- * @param fields A list of attribute paths
- * @return options
- */
- TtlIndexOptions fields(final Iterable fields) {
- this.fields = fields;
- return this;
- }
-
- public IndexType getType() {
- return type;
- }
-
- /**
- * @param expireAfter The time (in seconds) after a document’s creation after which the documents count as
- * “expired”.
- * @return options
- */
- public TtlIndexOptions expireAfter(final Integer expireAfter) {
- this.expireAfter = expireAfter;
- return this;
- }
-
- public Integer getExpireAfter() {
- return expireAfter;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2019 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.IndexType;
+
+/**
+ * @author Heiko Kernbach
+ * @see API Documentation
+ */
+public final class TtlIndexOptions extends IndexOptions {
+
+ private final IndexType type = IndexType.ttl;
+ private Iterable fields;
+ private Integer expireAfter;
+
+ public TtlIndexOptions() {
+ super();
+ }
+
+ @Override
+ TtlIndexOptions getThis() {
+ return this;
+ }
+
+ public Iterable getFields() {
+ return fields;
+ }
+
+ /**
+ * @param fields A list of attribute paths
+ * @return options
+ */
+ TtlIndexOptions fields(final Iterable fields) {
+ this.fields = fields;
+ return this;
+ }
+
+ public IndexType getType() {
+ return type;
+ }
+
+ /**
+ * @param expireAfter The time (in seconds) after a document’s creation after which the documents count as
+ * “expired”.
+ * @return options
+ */
+ public TtlIndexOptions expireAfter(final Integer expireAfter) {
+ this.expireAfter = expireAfter;
+ return this;
+ }
+
+ public Integer getExpireAfter() {
+ return expireAfter;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/UserAccessOptions.java b/driver/src/main/java/com/arangodb/model/UserAccessOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/UserAccessOptions.java
rename to driver/src/main/java/com/arangodb/model/UserAccessOptions.java
index 19c597ab7..9ac9ebfb3 100644
--- a/src/main/java/com/arangodb/model/UserAccessOptions.java
+++ b/driver/src/main/java/com/arangodb/model/UserAccessOptions.java
@@ -1,45 +1,45 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import com.arangodb.entity.Permissions;
-
-/**
- * @author Mark Vollmary
- */
-public final class UserAccessOptions {
-
- private Permissions grant;
-
- public UserAccessOptions() {
- super();
- }
-
- public Permissions getGrant() {
- return grant;
- }
-
- UserAccessOptions grant(final Permissions grant) {
- this.grant = grant;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import com.arangodb.entity.Permissions;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class UserAccessOptions {
+
+ private Permissions grant;
+
+ public UserAccessOptions() {
+ super();
+ }
+
+ public Permissions getGrant() {
+ return grant;
+ }
+
+ UserAccessOptions grant(final Permissions grant) {
+ this.grant = grant;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/UserCreateOptions.java b/driver/src/main/java/com/arangodb/model/UserCreateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/UserCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/UserCreateOptions.java
index 4279e60d6..cc210b004 100644
--- a/src/main/java/com/arangodb/model/UserCreateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/UserCreateOptions.java
@@ -1,93 +1,93 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import java.util.Map;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class UserCreateOptions {
-
- private String user;
- private String passwd;
- private Boolean active;
- private Map extra;
-
- public UserCreateOptions() {
- super();
- }
-
- public String getUser() {
- return user;
- }
-
- /**
- * @param user The name of the user
- * @return options
- */
- UserCreateOptions user(final String user) {
- this.user = user;
- return this;
- }
-
- public String getPasswd() {
- return passwd;
- }
-
- /**
- * @param passwd The user password
- * @return options
- */
- UserCreateOptions passwd(final String passwd) {
- this.passwd = passwd;
- return this;
- }
-
- public Boolean getActive() {
- return active;
- }
-
- /**
- * @param active An optional flag that specifies whether the user is active. If not specified, this will default to
- * true
- * @return options
- */
- public UserCreateOptions active(final Boolean active) {
- this.active = active;
- return this;
- }
-
- public Map getExtra() {
- return extra;
- }
-
- /**
- * @param extra Optional data about the user
- * @return options
- */
- public UserCreateOptions extra(final Map extra) {
- this.extra = extra;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import java.util.Map;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class UserCreateOptions {
+
+ private String user;
+ private String passwd;
+ private Boolean active;
+ private Map extra;
+
+ public UserCreateOptions() {
+ super();
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ /**
+ * @param user The name of the user
+ * @return options
+ */
+ UserCreateOptions user(final String user) {
+ this.user = user;
+ return this;
+ }
+
+ public String getPasswd() {
+ return passwd;
+ }
+
+ /**
+ * @param passwd The user password
+ * @return options
+ */
+ UserCreateOptions passwd(final String passwd) {
+ this.passwd = passwd;
+ return this;
+ }
+
+ public Boolean getActive() {
+ return active;
+ }
+
+ /**
+ * @param active An optional flag that specifies whether the user is active. If not specified, this will default to
+ * true
+ * @return options
+ */
+ public UserCreateOptions active(final Boolean active) {
+ this.active = active;
+ return this;
+ }
+
+ public Map getExtra() {
+ return extra;
+ }
+
+ /**
+ * @param extra Optional data about the user
+ * @return options
+ */
+ public UserCreateOptions extra(final Map extra) {
+ this.extra = extra;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/UserUpdateOptions.java b/driver/src/main/java/com/arangodb/model/UserUpdateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/UserUpdateOptions.java
rename to driver/src/main/java/com/arangodb/model/UserUpdateOptions.java
index 09c3786c8..4f9077791 100644
--- a/src/main/java/com/arangodb/model/UserUpdateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/UserUpdateOptions.java
@@ -1,79 +1,79 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import java.util.Map;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class UserUpdateOptions {
-
- private String passwd;
- private Boolean active;
- private Map extra;
-
- public UserUpdateOptions() {
- super();
- }
-
- public String getPasswd() {
- return passwd;
- }
-
- /**
- * @param passwd The user password
- * @return options
- */
- public UserUpdateOptions passwd(final String passwd) {
- this.passwd = passwd;
- return this;
- }
-
- public Boolean getActive() {
- return active;
- }
-
- /**
- * @param active An optional flag that specifies whether the user is active. If not specified, this will default to
- * true
- * @return options
- */
- public UserUpdateOptions active(final Boolean active) {
- this.active = active;
- return this;
- }
-
- public Map getExtra() {
- return extra;
- }
-
- /**
- * @param extra Optional data about the user
- * @return options
- */
- public UserUpdateOptions extra(final Map extra) {
- this.extra = extra;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import java.util.Map;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class UserUpdateOptions {
+
+ private String passwd;
+ private Boolean active;
+ private Map extra;
+
+ public UserUpdateOptions() {
+ super();
+ }
+
+ public String getPasswd() {
+ return passwd;
+ }
+
+ /**
+ * @param passwd The user password
+ * @return options
+ */
+ public UserUpdateOptions passwd(final String passwd) {
+ this.passwd = passwd;
+ return this;
+ }
+
+ public Boolean getActive() {
+ return active;
+ }
+
+ /**
+ * @param active An optional flag that specifies whether the user is active. If not specified, this will default to
+ * true
+ * @return options
+ */
+ public UserUpdateOptions active(final Boolean active) {
+ this.active = active;
+ return this;
+ }
+
+ public Map getExtra() {
+ return extra;
+ }
+
+ /**
+ * @param extra Optional data about the user
+ * @return options
+ */
+ public UserUpdateOptions extra(final Map extra) {
+ this.extra = extra;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java b/driver/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java
index a832f3f88..d7ab02a70 100644
--- a/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/VertexCollectionCreateOptions.java
@@ -1,79 +1,79 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-/**
- * @author Mark Vollmary
- */
-public final class VertexCollectionCreateOptions {
-
- private final Options options = new Options();
- private String collection;
-
- public VertexCollectionCreateOptions() {
- super();
- }
-
- public String getCollection() {
- return collection;
- }
-
- /**
- * @param collection The name of the collection
- * @return options
- */
- VertexCollectionCreateOptions collection(final String collection) {
- this.collection = collection;
- return this;
- }
-
- public Options getOptions() {
- return options;
- }
-
- public Collection getSatellites() {
- return options.satellites;
- }
-
- /**
- * @param satellites collection names that will be used to create SatelliteCollections
- * for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
- * must be a valid collection name. The collection type cannot be modified later.
- * @return options
- * @since ArangoDB 3.9.0
- */
- public VertexCollectionCreateOptions satellites(final String... satellites) {
- options.satellites = Arrays.asList(satellites);
- return this;
- }
-
- public static final class Options {
- private Collection satellites;
-
- public Collection getSatellites() {
- return satellites;
- }
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ * @author Mark Vollmary
+ */
+public final class VertexCollectionCreateOptions {
+
+ private final Options options = new Options();
+ private String collection;
+
+ public VertexCollectionCreateOptions() {
+ super();
+ }
+
+ public String getCollection() {
+ return collection;
+ }
+
+ /**
+ * @param collection The name of the collection
+ * @return options
+ */
+ VertexCollectionCreateOptions collection(final String collection) {
+ this.collection = collection;
+ return this;
+ }
+
+ public Options getOptions() {
+ return options;
+ }
+
+ public Collection getSatellites() {
+ return options.satellites;
+ }
+
+ /**
+ * @param satellites collection names that will be used to create SatelliteCollections
+ * for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
+ * must be a valid collection name. The collection type cannot be modified later.
+ * @return options
+ * @since ArangoDB 3.9.0
+ */
+ public VertexCollectionCreateOptions satellites(final String... satellites) {
+ options.satellites = Arrays.asList(satellites);
+ return this;
+ }
+
+ public static final class Options {
+ private Collection satellites;
+
+ public Collection getSatellites() {
+ return satellites;
+ }
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/VertexCreateOptions.java b/driver/src/main/java/com/arangodb/model/VertexCreateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/VertexCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/VertexCreateOptions.java
index 156476a93..62397a68d 100644
--- a/src/main/java/com/arangodb/model/VertexCreateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/VertexCreateOptions.java
@@ -1,63 +1,63 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class VertexCreateOptions {
-
- private Boolean waitForSync;
- private String streamTransactionId;
-
- public VertexCreateOptions() {
- super();
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until document has been synced to disk.
- * @return options
- */
- public VertexCreateOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.1
- */
- public VertexCreateOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class VertexCreateOptions {
+
+ private Boolean waitForSync;
+ private String streamTransactionId;
+
+ public VertexCreateOptions() {
+ super();
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until document has been synced to disk.
+ * @return options
+ */
+ public VertexCreateOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.1
+ */
+ public VertexCreateOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/VertexDeleteOptions.java b/driver/src/main/java/com/arangodb/model/VertexDeleteOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/VertexDeleteOptions.java
rename to driver/src/main/java/com/arangodb/model/VertexDeleteOptions.java
index e43c6d016..98af70ace 100644
--- a/src/main/java/com/arangodb/model/VertexDeleteOptions.java
+++ b/driver/src/main/java/com/arangodb/model/VertexDeleteOptions.java
@@ -1,77 +1,77 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class VertexDeleteOptions {
-
- private Boolean waitForSync;
- private String ifMatch;
- private String streamTransactionId;
-
- public VertexDeleteOptions() {
- super();
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until deletion operation has been synced to disk.
- * @return options
- */
- public VertexDeleteOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public String getIfMatch() {
- return ifMatch;
- }
-
- /**
- * @param ifMatch remove a document based on a target revision
- * @return options
- */
- public VertexDeleteOptions ifMatch(final String ifMatch) {
- this.ifMatch = ifMatch;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.1
- */
- public VertexDeleteOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class VertexDeleteOptions {
+
+ private Boolean waitForSync;
+ private String ifMatch;
+ private String streamTransactionId;
+
+ public VertexDeleteOptions() {
+ super();
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until deletion operation has been synced to disk.
+ * @return options
+ */
+ public VertexDeleteOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public String getIfMatch() {
+ return ifMatch;
+ }
+
+ /**
+ * @param ifMatch remove a document based on a target revision
+ * @return options
+ */
+ public VertexDeleteOptions ifMatch(final String ifMatch) {
+ this.ifMatch = ifMatch;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.1
+ */
+ public VertexDeleteOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/VertexReplaceOptions.java b/driver/src/main/java/com/arangodb/model/VertexReplaceOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/VertexReplaceOptions.java
rename to driver/src/main/java/com/arangodb/model/VertexReplaceOptions.java
index 9111f11e0..0efe64298 100644
--- a/src/main/java/com/arangodb/model/VertexReplaceOptions.java
+++ b/driver/src/main/java/com/arangodb/model/VertexReplaceOptions.java
@@ -1,77 +1,77 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class VertexReplaceOptions {
-
- private Boolean waitForSync;
- private String ifMatch;
- private String streamTransactionId;
-
- public VertexReplaceOptions() {
- super();
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until document has been synced to disk.
- * @return options
- */
- public VertexReplaceOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public String getIfMatch() {
- return ifMatch;
- }
-
- /**
- * @param ifMatch replace a document based on target revision
- * @return options
- */
- public VertexReplaceOptions ifMatch(final String ifMatch) {
- this.ifMatch = ifMatch;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.1
- */
- public VertexReplaceOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class VertexReplaceOptions {
+
+ private Boolean waitForSync;
+ private String ifMatch;
+ private String streamTransactionId;
+
+ public VertexReplaceOptions() {
+ super();
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until document has been synced to disk.
+ * @return options
+ */
+ public VertexReplaceOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public String getIfMatch() {
+ return ifMatch;
+ }
+
+ /**
+ * @param ifMatch replace a document based on target revision
+ * @return options
+ */
+ public VertexReplaceOptions ifMatch(final String ifMatch) {
+ this.ifMatch = ifMatch;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.1
+ */
+ public VertexReplaceOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+
+}
diff --git a/src/main/java/com/arangodb/model/VertexUpdateOptions.java b/driver/src/main/java/com/arangodb/model/VertexUpdateOptions.java
similarity index 96%
rename from src/main/java/com/arangodb/model/VertexUpdateOptions.java
rename to driver/src/main/java/com/arangodb/model/VertexUpdateOptions.java
index a66e9b450..62554a193 100644
--- a/src/main/java/com/arangodb/model/VertexUpdateOptions.java
+++ b/driver/src/main/java/com/arangodb/model/VertexUpdateOptions.java
@@ -1,93 +1,93 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.model;
-
-/**
- * @author Mark Vollmary
- * @see API Documentation
- */
-public final class VertexUpdateOptions {
-
- private Boolean keepNull;
- private Boolean waitForSync;
- private String ifMatch;
- private String streamTransactionId;
-
- public VertexUpdateOptions() {
- super();
- }
-
- public Boolean getKeepNull() {
- return keepNull;
- }
-
- /**
- * @param keepNull If the intention is to delete existing attributes with the patch command, the URL query parameter
- * keepNull can be used with a value of false. This will modify the behavior of the patch command to
- * remove any attributes from the existing document that are contained in the patch document with an
- * attribute value of null.
- * @return options
- */
- public VertexUpdateOptions keepNull(final Boolean keepNull) {
- this.keepNull = keepNull;
- return this;
- }
-
- public Boolean getWaitForSync() {
- return waitForSync;
- }
-
- /**
- * @param waitForSync Wait until document has been synced to disk.
- * @return options
- */
- public VertexUpdateOptions waitForSync(final Boolean waitForSync) {
- this.waitForSync = waitForSync;
- return this;
- }
-
- public String getIfMatch() {
- return ifMatch;
- }
-
- /**
- * @param ifMatch replace a document based on target revision
- * @return options
- */
- public VertexUpdateOptions ifMatch(final String ifMatch) {
- this.ifMatch = ifMatch;
- return this;
- }
-
- public String getStreamTransactionId() {
- return streamTransactionId;
- }
-
- /**
- * @param streamTransactionId If set, the operation will be executed within the transaction.
- * @return options
- * @since ArangoDB 3.5.1
- */
- public VertexUpdateOptions streamTransactionId(final String streamTransactionId) {
- this.streamTransactionId = streamTransactionId;
- return this;
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.model;
+
+/**
+ * @author Mark Vollmary
+ * @see API Documentation
+ */
+public final class VertexUpdateOptions {
+
+ private Boolean keepNull;
+ private Boolean waitForSync;
+ private String ifMatch;
+ private String streamTransactionId;
+
+ public VertexUpdateOptions() {
+ super();
+ }
+
+ public Boolean getKeepNull() {
+ return keepNull;
+ }
+
+ /**
+ * @param keepNull If the intention is to delete existing attributes with the patch command, the URL query parameter
+ * keepNull can be used with a value of false. This will modify the behavior of the patch command to
+ * remove any attributes from the existing document that are contained in the patch document with an
+ * attribute value of null.
+ * @return options
+ */
+ public VertexUpdateOptions keepNull(final Boolean keepNull) {
+ this.keepNull = keepNull;
+ return this;
+ }
+
+ public Boolean getWaitForSync() {
+ return waitForSync;
+ }
+
+ /**
+ * @param waitForSync Wait until document has been synced to disk.
+ * @return options
+ */
+ public VertexUpdateOptions waitForSync(final Boolean waitForSync) {
+ this.waitForSync = waitForSync;
+ return this;
+ }
+
+ public String getIfMatch() {
+ return ifMatch;
+ }
+
+ /**
+ * @param ifMatch replace a document based on target revision
+ * @return options
+ */
+ public VertexUpdateOptions ifMatch(final String ifMatch) {
+ this.ifMatch = ifMatch;
+ return this;
+ }
+
+ public String getStreamTransactionId() {
+ return streamTransactionId;
+ }
+
+ /**
+ * @param streamTransactionId If set, the operation will be executed within the transaction.
+ * @return options
+ * @since ArangoDB 3.5.1
+ */
+ public VertexUpdateOptions streamTransactionId(final String streamTransactionId) {
+ this.streamTransactionId = streamTransactionId;
+ return this;
+ }
+}
diff --git a/src/main/java/com/arangodb/model/ViewCreateOptions.java b/driver/src/main/java/com/arangodb/model/ViewCreateOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/ViewCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/ViewCreateOptions.java
diff --git a/src/main/java/com/arangodb/model/ViewRenameOptions.java b/driver/src/main/java/com/arangodb/model/ViewRenameOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/ViewRenameOptions.java
rename to driver/src/main/java/com/arangodb/model/ViewRenameOptions.java
diff --git a/src/main/java/com/arangodb/model/ZKDIndexOptions.java b/driver/src/main/java/com/arangodb/model/ZKDIndexOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/ZKDIndexOptions.java
rename to driver/src/main/java/com/arangodb/model/ZKDIndexOptions.java
diff --git a/src/main/java/com/arangodb/model/arangosearch/AnalyzerDeleteOptions.java b/driver/src/main/java/com/arangodb/model/arangosearch/AnalyzerDeleteOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/arangosearch/AnalyzerDeleteOptions.java
rename to driver/src/main/java/com/arangodb/model/arangosearch/AnalyzerDeleteOptions.java
diff --git a/src/main/java/com/arangodb/model/arangosearch/ArangoSearchCreateOptions.java b/driver/src/main/java/com/arangodb/model/arangosearch/ArangoSearchCreateOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/arangosearch/ArangoSearchCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/arangosearch/ArangoSearchCreateOptions.java
diff --git a/src/main/java/com/arangodb/model/arangosearch/ArangoSearchOptionsBuilder.java b/driver/src/main/java/com/arangodb/model/arangosearch/ArangoSearchOptionsBuilder.java
similarity index 100%
rename from src/main/java/com/arangodb/model/arangosearch/ArangoSearchOptionsBuilder.java
rename to driver/src/main/java/com/arangodb/model/arangosearch/ArangoSearchOptionsBuilder.java
diff --git a/src/main/java/com/arangodb/model/arangosearch/ArangoSearchPropertiesOptions.java b/driver/src/main/java/com/arangodb/model/arangosearch/ArangoSearchPropertiesOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/arangosearch/ArangoSearchPropertiesOptions.java
rename to driver/src/main/java/com/arangodb/model/arangosearch/ArangoSearchPropertiesOptions.java
diff --git a/src/main/java/com/arangodb/model/arangosearch/SearchAliasCreateOptions.java b/driver/src/main/java/com/arangodb/model/arangosearch/SearchAliasCreateOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/arangosearch/SearchAliasCreateOptions.java
rename to driver/src/main/java/com/arangodb/model/arangosearch/SearchAliasCreateOptions.java
diff --git a/src/main/java/com/arangodb/model/arangosearch/SearchAliasOptionsBuilder.java b/driver/src/main/java/com/arangodb/model/arangosearch/SearchAliasOptionsBuilder.java
similarity index 100%
rename from src/main/java/com/arangodb/model/arangosearch/SearchAliasOptionsBuilder.java
rename to driver/src/main/java/com/arangodb/model/arangosearch/SearchAliasOptionsBuilder.java
diff --git a/src/main/java/com/arangodb/model/arangosearch/SearchAliasPropertiesOptions.java b/driver/src/main/java/com/arangodb/model/arangosearch/SearchAliasPropertiesOptions.java
similarity index 100%
rename from src/main/java/com/arangodb/model/arangosearch/SearchAliasPropertiesOptions.java
rename to driver/src/main/java/com/arangodb/model/arangosearch/SearchAliasPropertiesOptions.java
diff --git a/src/main/java/com/arangodb/serde/ArangoSerde.java b/driver/src/main/java/com/arangodb/serde/ArangoSerde.java
similarity index 100%
rename from src/main/java/com/arangodb/serde/ArangoSerde.java
rename to driver/src/main/java/com/arangodb/serde/ArangoSerde.java
diff --git a/src/main/java/com/arangodb/serde/JacksonSerde.java b/driver/src/main/java/com/arangodb/serde/JacksonSerde.java
similarity index 100%
rename from src/main/java/com/arangodb/serde/JacksonSerde.java
rename to driver/src/main/java/com/arangodb/serde/JacksonSerde.java
diff --git a/src/main/java/com/arangodb/util/RawBytes.java b/driver/src/main/java/com/arangodb/util/RawBytes.java
similarity index 100%
rename from src/main/java/com/arangodb/util/RawBytes.java
rename to driver/src/main/java/com/arangodb/util/RawBytes.java
diff --git a/src/main/java/com/arangodb/util/RawData.java b/driver/src/main/java/com/arangodb/util/RawData.java
similarity index 100%
rename from src/main/java/com/arangodb/util/RawData.java
rename to driver/src/main/java/com/arangodb/util/RawData.java
diff --git a/src/main/java/com/arangodb/util/RawJson.java b/driver/src/main/java/com/arangodb/util/RawJson.java
similarity index 100%
rename from src/main/java/com/arangodb/util/RawJson.java
rename to driver/src/main/java/com/arangodb/util/RawJson.java
diff --git a/src/main/java/com/arangodb/util/UnicodeUtils.java b/driver/src/main/java/com/arangodb/util/UnicodeUtils.java
similarity index 100%
rename from src/main/java/com/arangodb/util/UnicodeUtils.java
rename to driver/src/main/java/com/arangodb/util/UnicodeUtils.java
diff --git a/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/native-image.properties b/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/native-image.properties
similarity index 100%
rename from src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/native-image.properties
rename to driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/native-image.properties
diff --git a/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/reflect-config.json b/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/reflect-config.json
similarity index 100%
rename from src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/reflect-config.json
rename to driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/reflect-config.json
diff --git a/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/resource-config.json b/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/resource-config.json
similarity index 100%
rename from src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/resource-config.json
rename to driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/resource-config.json
diff --git a/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/serialization-config.json b/driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/serialization-config.json
similarity index 100%
rename from src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/serialization-config.json
rename to driver/src/main/resources/META-INF/native-image/com.arangodb/arangodb-java-driver/serialization-config.json
diff --git a/src/main/resources/vertx/vertx-version.txt b/driver/src/main/resources/vertx/vertx-version.txt
similarity index 100%
rename from src/main/resources/vertx/vertx-version.txt
rename to driver/src/main/resources/vertx/vertx-version.txt
diff --git a/src/test/java/com/arangodb/ArangoCollectionTest.java b/driver/src/test/java/com/arangodb/ArangoCollectionTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoCollectionTest.java
rename to driver/src/test/java/com/arangodb/ArangoCollectionTest.java
diff --git a/src/test/java/com/arangodb/ArangoCursorTest.java b/driver/src/test/java/com/arangodb/ArangoCursorTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoCursorTest.java
rename to driver/src/test/java/com/arangodb/ArangoCursorTest.java
diff --git a/src/test/java/com/arangodb/ArangoDBTest.java b/driver/src/test/java/com/arangodb/ArangoDBTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoDBTest.java
rename to driver/src/test/java/com/arangodb/ArangoDBTest.java
diff --git a/src/test/java/com/arangodb/ArangoDatabaseTest.java b/driver/src/test/java/com/arangodb/ArangoDatabaseTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoDatabaseTest.java
rename to driver/src/test/java/com/arangodb/ArangoDatabaseTest.java
diff --git a/src/test/java/com/arangodb/ArangoDocumentUtilTest.java b/driver/src/test/java/com/arangodb/ArangoDocumentUtilTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoDocumentUtilTest.java
rename to driver/src/test/java/com/arangodb/ArangoDocumentUtilTest.java
diff --git a/src/test/java/com/arangodb/ArangoEdgeCollectionTest.java b/driver/src/test/java/com/arangodb/ArangoEdgeCollectionTest.java
similarity index 97%
rename from src/test/java/com/arangodb/ArangoEdgeCollectionTest.java
rename to driver/src/test/java/com/arangodb/ArangoEdgeCollectionTest.java
index d99bf927b..d25ed0e69 100644
--- a/src/test/java/com/arangodb/ArangoEdgeCollectionTest.java
+++ b/driver/src/test/java/com/arangodb/ArangoEdgeCollectionTest.java
@@ -1,445 +1,445 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb;
-
-import com.arangodb.entity.*;
-import com.arangodb.model.*;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.UUID;
-import java.util.stream.Stream;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.catchThrowable;
-
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- */
-class ArangoEdgeCollectionTest extends BaseJunit5 {
-
- private static final String GRAPH_NAME = "EdgeCollectionTest_graph";
- private static final String VERTEX_COLLECTION_NAME = "EdgeCollectionTest_vertex_collection";
- private static final String EDGE_COLLECTION_NAME = "EdgeCollectionTest_edge_collection";
-
- private static Stream args() {
- return dbsStream()
- .map(db -> new Object[]{
- db.graph(GRAPH_NAME).vertexCollection(VERTEX_COLLECTION_NAME),
- db.graph(GRAPH_NAME).edgeCollection(EDGE_COLLECTION_NAME)
- })
- .map(Arguments::of);
- }
-
- @BeforeAll
- static void init() {
- initCollections(VERTEX_COLLECTION_NAME);
- initEdgeCollections(EDGE_COLLECTION_NAME);
- initGraph(
- GRAPH_NAME,
- Collections.singletonList(new EdgeDefinition()
- .collection(EDGE_COLLECTION_NAME)
- .from(VERTEX_COLLECTION_NAME)
- .to(VERTEX_COLLECTION_NAME)
- ),
- null
- );
- }
-
- private BaseEdgeDocument createEdgeValue(ArangoVertexCollection vertices) {
- final VertexEntity v1 = vertices.insertVertex(new BaseDocument());
- final VertexEntity v2 = vertices.insertVertex(new BaseDocument());
-
- final BaseEdgeDocument value = new BaseEdgeDocument();
- value.setFrom(v1.getId());
- value.setTo(v2.getId());
- return value;
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void insertEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument value = createEdgeValue(vertices);
- final EdgeEntity edge = edges.insertEdge(value);
- assertThat(edge).isNotNull();
- final BaseEdgeDocument document = edges.getEdge(edge.getKey(), BaseEdgeDocument.class);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(edge.getKey());
- assertThat(document.getFrom()).isNotNull();
- assertThat(document.getTo()).isNotNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void insertEdgeUpdateRev(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument value = createEdgeValue(vertices);
- final EdgeEntity edge = edges.insertEdge(value);
- assertThat(value.getRevision()).isNull();
- assertThat(edge.getRev()).isNotNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void insertEdgeViolatingUniqueConstraint(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- edges.graph().db().collection(EDGE_COLLECTION_NAME)
- .ensurePersistentIndex(Arrays.asList("_from", "_to"), new PersistentIndexOptions().unique(true));
-
- BaseEdgeDocument edge = createEdgeValue(vertices);
- edges.insertEdge(edge);
-
- try {
- edges.insertEdge(edge);
- } catch (ArangoDBException e) {
- assertThat(e.getResponseCode()).isEqualTo(409);
- assertThat(e.getErrorNum()).isEqualTo(1210);
- }
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void getEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument value = createEdgeValue(vertices);
- final EdgeEntity edge = edges.insertEdge(value);
- final BaseEdgeDocument document = edges
- .getEdge(edge.getKey(), BaseEdgeDocument.class);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(edge.getKey());
- assertThat(document.getFrom()).isNotNull();
- assertThat(document.getTo()).isNotNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void getEdgeIfMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument value = createEdgeValue(vertices);
- final EdgeEntity edge = edges.insertEdge(value);
- final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifMatch(edge.getRev());
- final BaseDocument document = edges.getEdge(edge.getKey(),
- BaseDocument.class, options);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(edge.getKey());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void getEdgeIfMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument value = createEdgeValue(vertices);
- final EdgeEntity edge = edges.insertEdge(value);
- final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifMatch("no");
- final BaseEdgeDocument edge2 = edges.getEdge(edge.getKey(),
- BaseEdgeDocument.class, options);
- assertThat(edge2).isNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void getEdgeIfNoneMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument value = createEdgeValue(vertices);
- final EdgeEntity edge = edges.insertEdge(value);
- final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifNoneMatch("no");
- final BaseDocument document = edges.getEdge(edge.getKey(),
- BaseDocument.class, options);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(edge.getKey());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void getEdgeIfNoneMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument value = createEdgeValue(vertices);
- final EdgeEntity edge = edges.insertEdge(value);
- final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifNoneMatch(edge.getRev());
- final BaseEdgeDocument edge2 = edges.getEdge(edge.getKey(),
- BaseEdgeDocument.class, options);
- assertThat(edge2).isNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void replaceEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- doc.addAttribute("a", "test");
- final EdgeEntity createResult = edges.insertEdge(doc);
- doc.removeAttribute("a");
- doc.addAttribute("b", "test");
- final EdgeUpdateEntity replaceResult = edges
- .replaceEdge(createResult.getKey(), doc);
- assertThat(replaceResult).isNotNull();
- assertThat(replaceResult.getId()).isEqualTo(createResult.getId());
- assertThat(replaceResult.getRev()).isNotEqualTo(replaceResult.getOldRev());
- assertThat(replaceResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseEdgeDocument readResult = edges
- .getEdge(createResult.getKey(), BaseEdgeDocument.class);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getRevision()).isEqualTo(replaceResult.getRev());
- assertThat(readResult.getProperties().keySet()).doesNotContain("a");
- assertThat(readResult.getAttribute("b")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void replaceEdgeUpdateRev(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- final EdgeEntity createResult = edges.insertEdge(doc);
- final EdgeUpdateEntity replaceResult = edges
- .replaceEdge(createResult.getKey(), doc);
- assertThat(doc.getRevision()).isNull();
- assertThat(createResult.getRev()).isNotNull();
- assertThat(replaceResult.getRev())
- .isNotNull()
- .isNotEqualTo(createResult.getRev());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void replaceEdgeIfMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- doc.addAttribute("a", "test");
- final EdgeEntity createResult = edges.insertEdge(doc);
- doc.removeAttribute("a");
- doc.addAttribute("b", "test");
- final EdgeReplaceOptions options = new EdgeReplaceOptions().ifMatch(createResult.getRev());
- final EdgeUpdateEntity replaceResult = edges
- .replaceEdge(createResult.getKey(), doc, options);
- assertThat(replaceResult).isNotNull();
- assertThat(replaceResult.getId()).isEqualTo(createResult.getId());
- assertThat(replaceResult.getRev()).isNotEqualTo(replaceResult.getOldRev());
- assertThat(replaceResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseEdgeDocument readResult = edges
- .getEdge(createResult.getKey(), BaseEdgeDocument.class);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getRevision()).isEqualTo(replaceResult.getRev());
- assertThat(readResult.getProperties().keySet()).doesNotContain("a");
- assertThat(readResult.getAttribute("b")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void replaceEdgeIfMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- doc.addAttribute("a", "test");
- final EdgeEntity createResult = edges.insertEdge(doc);
- doc.removeAttribute("a");
- doc.addAttribute("b", "test");
- final EdgeReplaceOptions options = new EdgeReplaceOptions().ifMatch("no");
- Throwable thrown = catchThrowable(() -> edges.replaceEdge(createResult.getKey(), doc, options));
- assertThat(thrown).isInstanceOf(ArangoDBException.class);
- ArangoDBException e = (ArangoDBException) thrown;
- assertThat(e.getResponseCode()).isEqualTo(412);
- assertThat(e.getErrorNum()).isEqualTo(1200);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void updateEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- doc.addAttribute("a", "test");
- doc.addAttribute("c", "test");
- final EdgeEntity createResult = edges.insertEdge(doc);
- doc.updateAttribute("a", "test1");
- doc.addAttribute("b", "test");
- doc.updateAttribute("c", null);
- final EdgeUpdateEntity updateResult = edges
- .updateEdge(createResult.getKey(), doc);
- assertThat(updateResult).isNotNull();
- assertThat(updateResult.getId()).isEqualTo(createResult.getId());
- assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
- assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseEdgeDocument readResult = edges
- .getEdge(createResult.getKey(), BaseEdgeDocument.class);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getAttribute("a")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("a"))).isEqualTo("test1");
- assertThat(readResult.getAttribute("b")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
- assertThat(readResult.getRevision()).isEqualTo(updateResult.getRev());
- assertThat(readResult.getProperties()).containsKey("c");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void updateEdgeUpdateRev(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- final EdgeEntity createResult = edges.insertEdge(doc);
- final EdgeUpdateEntity updateResult = edges
- .updateEdge(createResult.getKey(), doc);
- assertThat(doc.getRevision()).isNull();
- assertThat(createResult.getRev()).isNotNull();
- assertThat(updateResult.getRev())
- .isNotNull()
- .isNotEqualTo(createResult.getRev());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void updateEdgeIfMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- doc.addAttribute("a", "test");
- doc.addAttribute("c", "test");
- final EdgeEntity createResult = edges.insertEdge(doc);
- doc.updateAttribute("a", "test1");
- doc.addAttribute("b", "test");
- doc.updateAttribute("c", null);
- final EdgeUpdateOptions options = new EdgeUpdateOptions().ifMatch(createResult.getRev());
- final EdgeUpdateEntity updateResult = edges
- .updateEdge(createResult.getKey(), doc, options);
- assertThat(updateResult).isNotNull();
- assertThat(updateResult.getId()).isEqualTo(createResult.getId());
- assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
- assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseEdgeDocument readResult = edges
- .getEdge(createResult.getKey(), BaseEdgeDocument.class);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getAttribute("a")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("a"))).isEqualTo("test1");
- assertThat(readResult.getAttribute("b")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
- assertThat(readResult.getRevision()).isEqualTo(updateResult.getRev());
- assertThat(readResult.getProperties()).containsKey("c");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void updateEdgeIfMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- doc.addAttribute("a", "test");
- doc.addAttribute("c", "test");
- final EdgeEntity createResult = edges.insertEdge(doc);
- doc.updateAttribute("a", "test1");
- doc.addAttribute("b", "test");
- doc.updateAttribute("c", null);
- final EdgeUpdateOptions options = new EdgeUpdateOptions().ifMatch("no");
- Throwable thrown = catchThrowable(() -> edges.updateEdge(createResult.getKey(), doc, options));
- assertThat(thrown).isInstanceOf(ArangoDBException.class);
- ArangoDBException e = (ArangoDBException) thrown;
- assertThat(e.getResponseCode()).isEqualTo(412);
- assertThat(e.getErrorNum()).isEqualTo(1200);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void updateEdgeKeepNullTrue(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- doc.addAttribute("a", "test");
- final EdgeEntity createResult = edges.insertEdge(doc);
- doc.updateAttribute("a", null);
- final EdgeUpdateOptions options = new EdgeUpdateOptions().keepNull(true);
- final EdgeUpdateEntity updateResult = edges
- .updateEdge(createResult.getKey(), doc, options);
- assertThat(updateResult).isNotNull();
- assertThat(updateResult.getId()).isEqualTo(createResult.getId());
- assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
- assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseEdgeDocument readResult = edges
- .getEdge(createResult.getKey(), BaseEdgeDocument.class);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getProperties().keySet()).hasSize(6);
- assertThat(readResult.getProperties()).containsKey("a");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void updateEdgeKeepNullFalse(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- doc.addAttribute("a", "test");
- final EdgeEntity createResult = edges.insertEdge(doc);
- doc.updateAttribute("a", null);
- final EdgeUpdateOptions options = new EdgeUpdateOptions().keepNull(false);
- final EdgeUpdateEntity updateResult = edges
- .updateEdge(createResult.getKey(), doc, options);
- assertThat(updateResult).isNotNull();
- assertThat(updateResult.getId()).isEqualTo(createResult.getId());
- assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
- assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseEdgeDocument readResult = edges
- .getEdge(createResult.getKey(), BaseEdgeDocument.class);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getId()).isEqualTo(createResult.getId());
- assertThat(readResult.getRevision()).isNotNull();
- assertThat(readResult.getProperties().keySet()).doesNotContain("a");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void deleteEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- final EdgeEntity createResult = edges.insertEdge(doc);
- edges.deleteEdge(createResult.getKey());
- final BaseEdgeDocument edge = edges
- .getEdge(createResult.getKey(), BaseEdgeDocument.class);
- assertThat(edge).isNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void deleteEdgeIfMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- final EdgeEntity createResult = edges.insertEdge(doc);
- final EdgeDeleteOptions options = new EdgeDeleteOptions().ifMatch(createResult.getRev());
- edges.deleteEdge(createResult.getKey(), options);
- final BaseEdgeDocument edge = edges
- .getEdge(createResult.getKey(), BaseEdgeDocument.class);
- assertThat(edge).isNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void deleteEdgeIfMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument doc = createEdgeValue(vertices);
- final EdgeEntity createResult = edges.insertEdge(doc);
- final EdgeDeleteOptions options = new EdgeDeleteOptions().ifMatch("no");
- Throwable thrown = catchThrowable(() -> edges.deleteEdge(createResult.getKey(), options));
- assertThat(thrown).isInstanceOf(ArangoDBException.class);
- ArangoDBException e = (ArangoDBException) thrown;
- assertThat(e.getResponseCode()).isEqualTo(412);
- assertThat(e.getErrorNum()).isEqualTo(1200);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("args")
- void edgeKeyWithSpecialChars(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
- final BaseEdgeDocument value = createEdgeValue(vertices);
- final String key = "_-:.@()+,=;$!*'%" + UUID.randomUUID();
- value.setKey(key);
- final EdgeEntity edge = edges.insertEdge(value);
- assertThat(edge).isNotNull();
- final BaseEdgeDocument document = edges.getEdge(edge.getKey(), BaseEdgeDocument.class);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(key);
- assertThat(document.getFrom()).isNotNull();
- assertThat(document.getTo()).isNotNull();
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb;
+
+import com.arangodb.entity.*;
+import com.arangodb.model.*;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.UUID;
+import java.util.stream.Stream;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.catchThrowable;
+
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ */
+class ArangoEdgeCollectionTest extends BaseJunit5 {
+
+ private static final String GRAPH_NAME = "EdgeCollectionTest_graph";
+ private static final String VERTEX_COLLECTION_NAME = "EdgeCollectionTest_vertex_collection";
+ private static final String EDGE_COLLECTION_NAME = "EdgeCollectionTest_edge_collection";
+
+ private static Stream args() {
+ return dbsStream()
+ .map(db -> new Object[]{
+ db.graph(GRAPH_NAME).vertexCollection(VERTEX_COLLECTION_NAME),
+ db.graph(GRAPH_NAME).edgeCollection(EDGE_COLLECTION_NAME)
+ })
+ .map(Arguments::of);
+ }
+
+ @BeforeAll
+ static void init() {
+ initCollections(VERTEX_COLLECTION_NAME);
+ initEdgeCollections(EDGE_COLLECTION_NAME);
+ initGraph(
+ GRAPH_NAME,
+ Collections.singletonList(new EdgeDefinition()
+ .collection(EDGE_COLLECTION_NAME)
+ .from(VERTEX_COLLECTION_NAME)
+ .to(VERTEX_COLLECTION_NAME)
+ ),
+ null
+ );
+ }
+
+ private BaseEdgeDocument createEdgeValue(ArangoVertexCollection vertices) {
+ final VertexEntity v1 = vertices.insertVertex(new BaseDocument());
+ final VertexEntity v2 = vertices.insertVertex(new BaseDocument());
+
+ final BaseEdgeDocument value = new BaseEdgeDocument();
+ value.setFrom(v1.getId());
+ value.setTo(v2.getId());
+ return value;
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void insertEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument value = createEdgeValue(vertices);
+ final EdgeEntity edge = edges.insertEdge(value);
+ assertThat(edge).isNotNull();
+ final BaseEdgeDocument document = edges.getEdge(edge.getKey(), BaseEdgeDocument.class);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(edge.getKey());
+ assertThat(document.getFrom()).isNotNull();
+ assertThat(document.getTo()).isNotNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void insertEdgeUpdateRev(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument value = createEdgeValue(vertices);
+ final EdgeEntity edge = edges.insertEdge(value);
+ assertThat(value.getRevision()).isNull();
+ assertThat(edge.getRev()).isNotNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void insertEdgeViolatingUniqueConstraint(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ edges.graph().db().collection(EDGE_COLLECTION_NAME)
+ .ensurePersistentIndex(Arrays.asList("_from", "_to"), new PersistentIndexOptions().unique(true));
+
+ BaseEdgeDocument edge = createEdgeValue(vertices);
+ edges.insertEdge(edge);
+
+ try {
+ edges.insertEdge(edge);
+ } catch (ArangoDBException e) {
+ assertThat(e.getResponseCode()).isEqualTo(409);
+ assertThat(e.getErrorNum()).isEqualTo(1210);
+ }
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void getEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument value = createEdgeValue(vertices);
+ final EdgeEntity edge = edges.insertEdge(value);
+ final BaseEdgeDocument document = edges
+ .getEdge(edge.getKey(), BaseEdgeDocument.class);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(edge.getKey());
+ assertThat(document.getFrom()).isNotNull();
+ assertThat(document.getTo()).isNotNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void getEdgeIfMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument value = createEdgeValue(vertices);
+ final EdgeEntity edge = edges.insertEdge(value);
+ final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifMatch(edge.getRev());
+ final BaseDocument document = edges.getEdge(edge.getKey(),
+ BaseDocument.class, options);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(edge.getKey());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void getEdgeIfMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument value = createEdgeValue(vertices);
+ final EdgeEntity edge = edges.insertEdge(value);
+ final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifMatch("no");
+ final BaseEdgeDocument edge2 = edges.getEdge(edge.getKey(),
+ BaseEdgeDocument.class, options);
+ assertThat(edge2).isNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void getEdgeIfNoneMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument value = createEdgeValue(vertices);
+ final EdgeEntity edge = edges.insertEdge(value);
+ final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifNoneMatch("no");
+ final BaseDocument document = edges.getEdge(edge.getKey(),
+ BaseDocument.class, options);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(edge.getKey());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void getEdgeIfNoneMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument value = createEdgeValue(vertices);
+ final EdgeEntity edge = edges.insertEdge(value);
+ final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifNoneMatch(edge.getRev());
+ final BaseEdgeDocument edge2 = edges.getEdge(edge.getKey(),
+ BaseEdgeDocument.class, options);
+ assertThat(edge2).isNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void replaceEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ doc.addAttribute("a", "test");
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ doc.removeAttribute("a");
+ doc.addAttribute("b", "test");
+ final EdgeUpdateEntity replaceResult = edges
+ .replaceEdge(createResult.getKey(), doc);
+ assertThat(replaceResult).isNotNull();
+ assertThat(replaceResult.getId()).isEqualTo(createResult.getId());
+ assertThat(replaceResult.getRev()).isNotEqualTo(replaceResult.getOldRev());
+ assertThat(replaceResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseEdgeDocument readResult = edges
+ .getEdge(createResult.getKey(), BaseEdgeDocument.class);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getRevision()).isEqualTo(replaceResult.getRev());
+ assertThat(readResult.getProperties().keySet()).doesNotContain("a");
+ assertThat(readResult.getAttribute("b")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void replaceEdgeUpdateRev(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ final EdgeUpdateEntity replaceResult = edges
+ .replaceEdge(createResult.getKey(), doc);
+ assertThat(doc.getRevision()).isNull();
+ assertThat(createResult.getRev()).isNotNull();
+ assertThat(replaceResult.getRev())
+ .isNotNull()
+ .isNotEqualTo(createResult.getRev());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void replaceEdgeIfMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ doc.addAttribute("a", "test");
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ doc.removeAttribute("a");
+ doc.addAttribute("b", "test");
+ final EdgeReplaceOptions options = new EdgeReplaceOptions().ifMatch(createResult.getRev());
+ final EdgeUpdateEntity replaceResult = edges
+ .replaceEdge(createResult.getKey(), doc, options);
+ assertThat(replaceResult).isNotNull();
+ assertThat(replaceResult.getId()).isEqualTo(createResult.getId());
+ assertThat(replaceResult.getRev()).isNotEqualTo(replaceResult.getOldRev());
+ assertThat(replaceResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseEdgeDocument readResult = edges
+ .getEdge(createResult.getKey(), BaseEdgeDocument.class);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getRevision()).isEqualTo(replaceResult.getRev());
+ assertThat(readResult.getProperties().keySet()).doesNotContain("a");
+ assertThat(readResult.getAttribute("b")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void replaceEdgeIfMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ doc.addAttribute("a", "test");
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ doc.removeAttribute("a");
+ doc.addAttribute("b", "test");
+ final EdgeReplaceOptions options = new EdgeReplaceOptions().ifMatch("no");
+ Throwable thrown = catchThrowable(() -> edges.replaceEdge(createResult.getKey(), doc, options));
+ assertThat(thrown).isInstanceOf(ArangoDBException.class);
+ ArangoDBException e = (ArangoDBException) thrown;
+ assertThat(e.getResponseCode()).isEqualTo(412);
+ assertThat(e.getErrorNum()).isEqualTo(1200);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void updateEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ doc.addAttribute("a", "test");
+ doc.addAttribute("c", "test");
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ doc.updateAttribute("a", "test1");
+ doc.addAttribute("b", "test");
+ doc.updateAttribute("c", null);
+ final EdgeUpdateEntity updateResult = edges
+ .updateEdge(createResult.getKey(), doc);
+ assertThat(updateResult).isNotNull();
+ assertThat(updateResult.getId()).isEqualTo(createResult.getId());
+ assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
+ assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseEdgeDocument readResult = edges
+ .getEdge(createResult.getKey(), BaseEdgeDocument.class);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getAttribute("a")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("a"))).isEqualTo("test1");
+ assertThat(readResult.getAttribute("b")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
+ assertThat(readResult.getRevision()).isEqualTo(updateResult.getRev());
+ assertThat(readResult.getProperties()).containsKey("c");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void updateEdgeUpdateRev(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ final EdgeUpdateEntity updateResult = edges
+ .updateEdge(createResult.getKey(), doc);
+ assertThat(doc.getRevision()).isNull();
+ assertThat(createResult.getRev()).isNotNull();
+ assertThat(updateResult.getRev())
+ .isNotNull()
+ .isNotEqualTo(createResult.getRev());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void updateEdgeIfMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ doc.addAttribute("a", "test");
+ doc.addAttribute("c", "test");
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ doc.updateAttribute("a", "test1");
+ doc.addAttribute("b", "test");
+ doc.updateAttribute("c", null);
+ final EdgeUpdateOptions options = new EdgeUpdateOptions().ifMatch(createResult.getRev());
+ final EdgeUpdateEntity updateResult = edges
+ .updateEdge(createResult.getKey(), doc, options);
+ assertThat(updateResult).isNotNull();
+ assertThat(updateResult.getId()).isEqualTo(createResult.getId());
+ assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
+ assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseEdgeDocument readResult = edges
+ .getEdge(createResult.getKey(), BaseEdgeDocument.class);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getAttribute("a")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("a"))).isEqualTo("test1");
+ assertThat(readResult.getAttribute("b")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
+ assertThat(readResult.getRevision()).isEqualTo(updateResult.getRev());
+ assertThat(readResult.getProperties()).containsKey("c");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void updateEdgeIfMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ doc.addAttribute("a", "test");
+ doc.addAttribute("c", "test");
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ doc.updateAttribute("a", "test1");
+ doc.addAttribute("b", "test");
+ doc.updateAttribute("c", null);
+ final EdgeUpdateOptions options = new EdgeUpdateOptions().ifMatch("no");
+ Throwable thrown = catchThrowable(() -> edges.updateEdge(createResult.getKey(), doc, options));
+ assertThat(thrown).isInstanceOf(ArangoDBException.class);
+ ArangoDBException e = (ArangoDBException) thrown;
+ assertThat(e.getResponseCode()).isEqualTo(412);
+ assertThat(e.getErrorNum()).isEqualTo(1200);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void updateEdgeKeepNullTrue(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ doc.addAttribute("a", "test");
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ doc.updateAttribute("a", null);
+ final EdgeUpdateOptions options = new EdgeUpdateOptions().keepNull(true);
+ final EdgeUpdateEntity updateResult = edges
+ .updateEdge(createResult.getKey(), doc, options);
+ assertThat(updateResult).isNotNull();
+ assertThat(updateResult.getId()).isEqualTo(createResult.getId());
+ assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
+ assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseEdgeDocument readResult = edges
+ .getEdge(createResult.getKey(), BaseEdgeDocument.class);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getProperties().keySet()).hasSize(6);
+ assertThat(readResult.getProperties()).containsKey("a");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void updateEdgeKeepNullFalse(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ doc.addAttribute("a", "test");
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ doc.updateAttribute("a", null);
+ final EdgeUpdateOptions options = new EdgeUpdateOptions().keepNull(false);
+ final EdgeUpdateEntity updateResult = edges
+ .updateEdge(createResult.getKey(), doc, options);
+ assertThat(updateResult).isNotNull();
+ assertThat(updateResult.getId()).isEqualTo(createResult.getId());
+ assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
+ assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseEdgeDocument readResult = edges
+ .getEdge(createResult.getKey(), BaseEdgeDocument.class);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getId()).isEqualTo(createResult.getId());
+ assertThat(readResult.getRevision()).isNotNull();
+ assertThat(readResult.getProperties().keySet()).doesNotContain("a");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void deleteEdge(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ edges.deleteEdge(createResult.getKey());
+ final BaseEdgeDocument edge = edges
+ .getEdge(createResult.getKey(), BaseEdgeDocument.class);
+ assertThat(edge).isNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void deleteEdgeIfMatch(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ final EdgeDeleteOptions options = new EdgeDeleteOptions().ifMatch(createResult.getRev());
+ edges.deleteEdge(createResult.getKey(), options);
+ final BaseEdgeDocument edge = edges
+ .getEdge(createResult.getKey(), BaseEdgeDocument.class);
+ assertThat(edge).isNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void deleteEdgeIfMatchFail(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument doc = createEdgeValue(vertices);
+ final EdgeEntity createResult = edges.insertEdge(doc);
+ final EdgeDeleteOptions options = new EdgeDeleteOptions().ifMatch("no");
+ Throwable thrown = catchThrowable(() -> edges.deleteEdge(createResult.getKey(), options));
+ assertThat(thrown).isInstanceOf(ArangoDBException.class);
+ ArangoDBException e = (ArangoDBException) thrown;
+ assertThat(e.getResponseCode()).isEqualTo(412);
+ assertThat(e.getErrorNum()).isEqualTo(1200);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("args")
+ void edgeKeyWithSpecialChars(ArangoVertexCollection vertices, ArangoEdgeCollection edges) {
+ final BaseEdgeDocument value = createEdgeValue(vertices);
+ final String key = "_-:.@()+,=;$!*'%" + UUID.randomUUID();
+ value.setKey(key);
+ final EdgeEntity edge = edges.insertEdge(value);
+ assertThat(edge).isNotNull();
+ final BaseEdgeDocument document = edges.getEdge(edge.getKey(), BaseEdgeDocument.class);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(key);
+ assertThat(document.getFrom()).isNotNull();
+ assertThat(document.getTo()).isNotNull();
+ }
+
+}
diff --git a/src/test/java/com/arangodb/ArangoGraphTest.java b/driver/src/test/java/com/arangodb/ArangoGraphTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoGraphTest.java
rename to driver/src/test/java/com/arangodb/ArangoGraphTest.java
diff --git a/src/test/java/com/arangodb/ArangoRouteTest.java b/driver/src/test/java/com/arangodb/ArangoRouteTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoRouteTest.java
rename to driver/src/test/java/com/arangodb/ArangoRouteTest.java
diff --git a/src/test/java/com/arangodb/ArangoSearchTest.java b/driver/src/test/java/com/arangodb/ArangoSearchTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoSearchTest.java
rename to driver/src/test/java/com/arangodb/ArangoSearchTest.java
diff --git a/src/test/java/com/arangodb/ArangoSslTest.java b/driver/src/test/java/com/arangodb/ArangoSslTest.java
similarity index 97%
rename from src/test/java/com/arangodb/ArangoSslTest.java
rename to driver/src/test/java/com/arangodb/ArangoSslTest.java
index 9155e0419..068e812eb 100644
--- a/src/test/java/com/arangodb/ArangoSslTest.java
+++ b/driver/src/test/java/com/arangodb/ArangoSslTest.java
@@ -1,100 +1,100 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb;
-
-import com.arangodb.entity.ArangoDBVersion;
-import org.junit.jupiter.api.Tag;
-import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.EnumSource;
-
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLHandshakeException;
-import javax.net.ssl.TrustManagerFactory;
-import java.security.KeyStore;
-import java.util.List;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.catchThrowable;
-
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- */
-@Tag("ssl")
-@EnabledIfSystemProperty(named = "SslTest", matches = "true")
-class ArangoSslTest {
-
- /*
- * a SSL trust store
- *
- * create the trust store for the self signed certificate:
- * keytool -import -alias "my arangodb server cert" -file UnitTests/server.pem -keystore example.truststore
- *
- * Documentation:
- * https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/conn/ssl/SSLSocketFactory.html
- */
- private static final String SSL_TRUSTSTORE = "/example.truststore";
- private static final String SSL_TRUSTSTORE_PASSWORD = "12345678";
-
- @ParameterizedTest
- @EnumSource(Protocol.class)
- void connect(Protocol protocol) throws Exception {
- final KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
- ks.load(this.getClass().getResourceAsStream(SSL_TRUSTSTORE), SSL_TRUSTSTORE_PASSWORD.toCharArray());
-
- final KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
- kmf.init(ks, SSL_TRUSTSTORE_PASSWORD.toCharArray());
-
- final TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
- tmf.init(ks);
-
- final SSLContext sc = SSLContext.getInstance("TLS");
- sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
-
- final ArangoDB arangoDB = new ArangoDB.Builder()
- .useProtocol(protocol)
- .host("localhost", 8529)
- .useSsl(true)
- .sslContext(sc).build();
- final ArangoDBVersion version = arangoDB.getVersion();
- assertThat(version).isNotNull();
- }
-
- @ParameterizedTest
- @EnumSource(Protocol.class)
- void connectWithoutValidSslContext(Protocol protocol) {
- final ArangoDB arangoDB = new ArangoDB.Builder()
- .useProtocol(protocol)
- .host("localhost", 8529)
- .useSsl(true)
- .build();
- Throwable thrown = catchThrowable(arangoDB::getVersion);
- assertThat(thrown).isInstanceOf(ArangoDBException.class);
- ArangoDBException ex = (ArangoDBException) thrown;
- assertThat(ex.getCause()).isInstanceOf(ArangoDBMultipleException.class);
- List exceptions = ((ArangoDBMultipleException) ex.getCause()).getExceptions();
- exceptions.forEach(e -> assertThat(e).isInstanceOf(SSLHandshakeException.class));
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb;
+
+import com.arangodb.entity.ArangoDBVersion;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
+
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLHandshakeException;
+import javax.net.ssl.TrustManagerFactory;
+import java.security.KeyStore;
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.catchThrowable;
+
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ */
+@Tag("ssl")
+@EnabledIfSystemProperty(named = "SslTest", matches = "true")
+class ArangoSslTest {
+
+ /*
+ * a SSL trust store
+ *
+ * create the trust store for the self signed certificate:
+ * keytool -import -alias "my arangodb server cert" -file UnitTests/server.pem -keystore example.truststore
+ *
+ * Documentation:
+ * https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/conn/ssl/SSLSocketFactory.html
+ */
+ private static final String SSL_TRUSTSTORE = "/example.truststore";
+ private static final String SSL_TRUSTSTORE_PASSWORD = "12345678";
+
+ @ParameterizedTest
+ @EnumSource(Protocol.class)
+ void connect(Protocol protocol) throws Exception {
+ final KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
+ ks.load(this.getClass().getResourceAsStream(SSL_TRUSTSTORE), SSL_TRUSTSTORE_PASSWORD.toCharArray());
+
+ final KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
+ kmf.init(ks, SSL_TRUSTSTORE_PASSWORD.toCharArray());
+
+ final TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+ tmf.init(ks);
+
+ final SSLContext sc = SSLContext.getInstance("TLS");
+ sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+
+ final ArangoDB arangoDB = new ArangoDB.Builder()
+ .useProtocol(protocol)
+ .host("localhost", 8529)
+ .useSsl(true)
+ .sslContext(sc).build();
+ final ArangoDBVersion version = arangoDB.getVersion();
+ assertThat(version).isNotNull();
+ }
+
+ @ParameterizedTest
+ @EnumSource(Protocol.class)
+ void connectWithoutValidSslContext(Protocol protocol) {
+ final ArangoDB arangoDB = new ArangoDB.Builder()
+ .useProtocol(protocol)
+ .host("localhost", 8529)
+ .useSsl(true)
+ .build();
+ Throwable thrown = catchThrowable(arangoDB::getVersion);
+ assertThat(thrown).isInstanceOf(ArangoDBException.class);
+ ArangoDBException ex = (ArangoDBException) thrown;
+ assertThat(ex.getCause()).isInstanceOf(ArangoDBMultipleException.class);
+ List exceptions = ((ArangoDBMultipleException) ex.getCause()).getExceptions();
+ exceptions.forEach(e -> assertThat(e).isInstanceOf(SSLHandshakeException.class));
+ }
+
+}
diff --git a/src/test/java/com/arangodb/ArangoVertexCollectionTest.java b/driver/src/test/java/com/arangodb/ArangoVertexCollectionTest.java
similarity index 97%
rename from src/test/java/com/arangodb/ArangoVertexCollectionTest.java
rename to driver/src/test/java/com/arangodb/ArangoVertexCollectionTest.java
index 7861f9217..5b5504d80 100644
--- a/src/test/java/com/arangodb/ArangoVertexCollectionTest.java
+++ b/driver/src/test/java/com/arangodb/ArangoVertexCollectionTest.java
@@ -1,480 +1,480 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb;
-
-import com.arangodb.entity.BaseDocument;
-import com.arangodb.entity.VertexEntity;
-import com.arangodb.entity.VertexUpdateEntity;
-import com.arangodb.model.*;
-import com.arangodb.util.RawJson;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.UUID;
-import java.util.stream.Stream;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.catchThrowable;
-
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- */
-class ArangoVertexCollectionTest extends BaseJunit5 {
-
- private static final String GRAPH_NAME = "ArangoVertexCollectionTest_graph";
- private static final String COLLECTION_NAME = "ArangoVertexCollectionTest_vertex_collection";
-
- private static Stream vertices() {
- return dbsStream()
- .map(db -> db.graph(GRAPH_NAME).vertexCollection(COLLECTION_NAME))
- .map(Arguments::of);
- }
-
- @BeforeAll
- static void init() {
- initCollections(COLLECTION_NAME);
- initGraph(
- GRAPH_NAME,
- null,
- new GraphCreateOptions().orphanCollections(COLLECTION_NAME)
- );
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void dropVertexCollection(ArangoVertexCollection vertices) {
- ArangoGraph graph = vertices.graph();
- vertices.drop();
- final Collection vertexCollections = graph.getVertexCollections();
- assertThat(vertexCollections).isEmpty();
-
- // revert
- graph.addVertexCollection(COLLECTION_NAME);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void insertVertex(ArangoVertexCollection vertices) {
- final VertexEntity vertex = vertices
- .insertVertex(new BaseDocument(), null);
- assertThat(vertex).isNotNull();
- ArangoCollection collection = vertices.graph().db().collection(vertices.name());
- final BaseDocument document = collection
- .getDocument(vertex.getKey(), BaseDocument.class, null);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(vertex.getKey());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void insertVertexViolatingUniqueConstraint(ArangoVertexCollection vertices) {
- ArangoCollection collection = vertices.graph().db().collection(vertices.name());
- collection
- .ensureSkiplistIndex(Collections.singletonList("field"),
- new SkiplistIndexOptions().unique(true).sparse(true));
-
- VertexEntity inserted = vertices.insertVertex(RawJson.of("{\"field\": 99}"));
-
- try {
- vertices.insertVertex(RawJson.of("{\"field\": 99}"));
- } catch (ArangoDBException e) {
- assertThat(e.getResponseCode()).isEqualTo(409);
- assertThat(e.getErrorNum()).isEqualTo(1210);
- }
-
- // revert
- vertices.deleteVertex(inserted.getKey());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void duplicateInsertSameObjectVertex(ArangoVertexCollection vertices) {
-
- // #########################################################
- // Create a new BaseDocument
- // #########################################################
-
- UUID uuid = UUID.randomUUID();
- BaseDocument bd = new BaseDocument(UUID.randomUUID().toString());
- bd.setKey(uuid.toString());
- bd.addAttribute("name", "Paul");
-
- vertices.insertVertex(bd);
-
- UUID uuid2 = UUID.randomUUID();
- BaseDocument bd2 = new BaseDocument(UUID.randomUUID().toString());
- bd2.setKey(uuid2.toString());
- bd2.addAttribute("name", "Paul");
-
- vertices.insertVertex(bd2);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void insertVertexUpdateRev(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- final VertexEntity vertex = vertices.insertVertex(doc, null);
- assertThat(doc.getRevision()).isNull();
- assertThat(vertex.getRev()).isNotNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void getVertex(ArangoVertexCollection vertices) {
- final VertexEntity vertex = vertices
- .insertVertex(new BaseDocument(), null);
- final BaseDocument document = vertices
- .getVertex(vertex.getKey(), BaseDocument.class, null);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(vertex.getKey());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void getVertexIfMatch(ArangoVertexCollection vertices) {
- final VertexEntity vertex = vertices
- .insertVertex(new BaseDocument(), null);
- final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifMatch(vertex.getRev());
- final BaseDocument document = vertices
- .getVertex(vertex.getKey(), BaseDocument.class, options);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(vertex.getKey());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void getVertexIfMatchFail(ArangoVertexCollection vertices) {
- final VertexEntity vertex = vertices
- .insertVertex(new BaseDocument(), null);
- final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifMatch("no");
- final BaseDocument vertex2 = vertices
- .getVertex(vertex.getKey(), BaseDocument.class, options);
- assertThat(vertex2).isNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void getVertexIfNoneMatch(ArangoVertexCollection vertices) {
- final VertexEntity vertex = vertices
- .insertVertex(new BaseDocument(), null);
- final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifNoneMatch("no");
- final BaseDocument document = vertices
- .getVertex(vertex.getKey(), BaseDocument.class, options);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(vertex.getKey());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void getVertexIfNoneMatchFail(ArangoVertexCollection vertices) {
- final VertexEntity vertex = vertices
- .insertVertex(new BaseDocument(), null);
- final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifNoneMatch(vertex.getRev());
- final BaseDocument vertex2 = vertices
- .getVertex(vertex.getKey(), BaseDocument.class, options);
- assertThat(vertex2).isNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void replaceVertex(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- doc.addAttribute("a", "test");
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.removeAttribute("a");
- doc.addAttribute("b", "test");
- final VertexUpdateEntity replaceResult = vertices
- .replaceVertex(createResult.getKey(), doc, null);
- assertThat(replaceResult).isNotNull();
- assertThat(replaceResult.getId()).isEqualTo(createResult.getId());
- assertThat(replaceResult.getRev()).isNotEqualTo(replaceResult.getOldRev());
- assertThat(replaceResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseDocument readResult = vertices
- .getVertex(createResult.getKey(), BaseDocument.class, null);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getRevision()).isEqualTo(replaceResult.getRev());
- assertThat(readResult.getProperties().keySet()).doesNotContain("a");
- assertThat(readResult.getAttribute("b")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void replaceVertexUpdateRev(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- final VertexUpdateEntity replaceResult = vertices
- .replaceVertex(createResult.getKey(), doc, null);
- assertThat(doc.getRevision()).isNull();
- assertThat(createResult.getRev()).isNotNull();
- assertThat(replaceResult.getRev())
- .isNotNull()
- .isNotEqualTo(createResult.getRev());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void replaceVertexIfMatch(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- doc.addAttribute("a", "test");
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.removeAttribute("a");
- doc.addAttribute("b", "test");
- final VertexReplaceOptions options = new VertexReplaceOptions().ifMatch(createResult.getRev());
- final VertexUpdateEntity replaceResult = vertices
- .replaceVertex(createResult.getKey(), doc, options);
- assertThat(replaceResult).isNotNull();
- assertThat(replaceResult.getId()).isEqualTo(createResult.getId());
- assertThat(replaceResult.getRev()).isNotEqualTo(replaceResult.getOldRev());
- assertThat(replaceResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseDocument readResult = vertices
- .getVertex(createResult.getKey(), BaseDocument.class, null);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getRevision()).isEqualTo(replaceResult.getRev());
- assertThat(readResult.getProperties().keySet()).doesNotContain("a");
- assertThat(readResult.getAttribute("b")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void replaceVertexIfMatchFail(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- doc.addAttribute("a", "test");
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.removeAttribute("a");
- doc.addAttribute("b", "test");
- final VertexReplaceOptions options = new VertexReplaceOptions().ifMatch("no");
- Throwable thrown = catchThrowable(() -> vertices.replaceVertex(createResult.getKey(), doc, options));
- assertThat(thrown).isInstanceOf(ArangoDBException.class);
- ArangoDBException e = (ArangoDBException) thrown;
- assertThat(e.getResponseCode()).isEqualTo(412);
- assertThat(e.getErrorNum()).isEqualTo(1200);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void updateVertex(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- doc.addAttribute("a", "test");
- doc.addAttribute("c", "test");
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.updateAttribute("a", "test1");
- doc.addAttribute("b", "test");
- doc.updateAttribute("c", null);
- final VertexUpdateEntity updateResult = vertices
- .updateVertex(createResult.getKey(), doc, null);
- assertThat(updateResult).isNotNull();
- assertThat(updateResult.getId()).isEqualTo(createResult.getId());
- assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
- assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseDocument readResult = vertices
- .getVertex(createResult.getKey(), BaseDocument.class, null);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getAttribute("a")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("a"))).isEqualTo("test1");
- assertThat(readResult.getAttribute("b")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
- assertThat(readResult.getRevision()).isEqualTo(updateResult.getRev());
- assertThat(readResult.getProperties()).containsKey("c");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void updateVertexUpdateRev(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.addAttribute("foo", "bar");
- final VertexUpdateEntity updateResult = vertices
- .updateVertex(createResult.getKey(), doc, null);
- assertThat(doc.getRevision()).isNull();
- assertThat(createResult.getRev()).isNotNull();
- assertThat(updateResult.getRev())
- .isNotNull()
- .isNotEqualTo(createResult.getRev());
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void updateVertexIfMatch(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- doc.addAttribute("a", "test");
- doc.addAttribute("c", "test");
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.updateAttribute("a", "test1");
- doc.addAttribute("b", "test");
- doc.updateAttribute("c", null);
- final VertexUpdateOptions options = new VertexUpdateOptions().ifMatch(createResult.getRev());
- final VertexUpdateEntity updateResult = vertices
- .updateVertex(createResult.getKey(), doc, options);
- assertThat(updateResult).isNotNull();
- assertThat(updateResult.getId()).isEqualTo(createResult.getId());
- assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
- assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseDocument readResult = vertices
- .getVertex(createResult.getKey(), BaseDocument.class, null);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getAttribute("a")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("a"))).isEqualTo("test1");
- assertThat(readResult.getAttribute("b")).isNotNull();
- assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
- assertThat(readResult.getRevision()).isEqualTo(updateResult.getRev());
- assertThat(readResult.getProperties()).containsKey("c");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void updateVertexIfMatchFail(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- doc.addAttribute("a", "test");
- doc.addAttribute("c", "test");
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.updateAttribute("a", "test1");
- doc.addAttribute("b", "test");
- doc.updateAttribute("c", null);
- final VertexUpdateOptions options = new VertexUpdateOptions().ifMatch("no");
-
- Throwable thrown = catchThrowable(() -> vertices.updateVertex(createResult.getKey(), doc, options));
- assertThat(thrown).isInstanceOf(ArangoDBException.class);
- ArangoDBException e = (ArangoDBException) thrown;
- assertThat(e.getResponseCode()).isEqualTo(412);
- assertThat(e.getErrorNum()).isEqualTo(1200);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void updateVertexKeepNullTrue(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- doc.addAttribute("a", "test");
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.updateAttribute("a", null);
- final VertexUpdateOptions options = new VertexUpdateOptions().keepNull(true);
- final VertexUpdateEntity updateResult = vertices
- .updateVertex(createResult.getKey(), doc, options);
- assertThat(updateResult).isNotNull();
- assertThat(updateResult.getId()).isEqualTo(createResult.getId());
- assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
- assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseDocument readResult = vertices
- .getVertex(createResult.getKey(), BaseDocument.class, null);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getProperties().keySet()).hasSize(4);
- assertThat(readResult.getProperties()).containsKey("a");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void updateVertexKeepNullFalse(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- doc.addAttribute("a", "test");
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- doc.updateAttribute("a", null);
- final VertexUpdateOptions options = new VertexUpdateOptions().keepNull(false);
- final VertexUpdateEntity updateResult = vertices
- .updateVertex(createResult.getKey(), doc, options);
- assertThat(updateResult).isNotNull();
- assertThat(updateResult.getId()).isEqualTo(createResult.getId());
- assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
- assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
-
- final BaseDocument readResult = vertices
- .getVertex(createResult.getKey(), BaseDocument.class, null);
- assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
- assertThat(readResult.getId()).isEqualTo(createResult.getId());
- assertThat(readResult.getRevision()).isNotNull();
- assertThat(readResult.getProperties().keySet()).doesNotContain("a");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void deleteVertex(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- vertices.deleteVertex(createResult.getKey(), null);
- final BaseDocument vertex = vertices
- .getVertex(createResult.getKey(), BaseDocument.class, null);
- assertThat(vertex).isNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void deleteVertexIfMatch(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- final VertexDeleteOptions options = new VertexDeleteOptions().ifMatch(createResult.getRev());
- vertices.deleteVertex(createResult.getKey(), options);
- final BaseDocument vertex = vertices
- .getVertex(createResult.getKey(), BaseDocument.class, null);
- assertThat(vertex).isNull();
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void deleteVertexIfMatchFail(ArangoVertexCollection vertices) {
- final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
- final VertexEntity createResult = vertices
- .insertVertex(doc, null);
- final VertexDeleteOptions options = new VertexDeleteOptions().ifMatch("no");
- Throwable thrown = catchThrowable(() -> vertices.deleteVertex(createResult.getKey(), options));
- assertThat(thrown).isInstanceOf(ArangoDBException.class);
- ArangoDBException e = (ArangoDBException) thrown;
- assertThat(e.getResponseCode()).isEqualTo(412);
- assertThat(e.getErrorNum()).isEqualTo(1200);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("vertices")
- void vertexKeyWithSpecialChars(ArangoVertexCollection vertices) {
- final String key = "_-:.@()+,=;$!*'%" + UUID.randomUUID();
- final VertexEntity vertex = vertices
- .insertVertex(new BaseDocument(key), null);
- assertThat(vertex).isNotNull();
- ArangoCollection collection = vertices.graph().db().collection(vertices.name());
- final BaseDocument document = collection
- .getDocument(vertex.getKey(), BaseDocument.class, null);
- assertThat(document).isNotNull();
- assertThat(document.getKey()).isEqualTo(key);
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb;
+
+import com.arangodb.entity.BaseDocument;
+import com.arangodb.entity.VertexEntity;
+import com.arangodb.entity.VertexUpdateEntity;
+import com.arangodb.model.*;
+import com.arangodb.util.RawJson;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.UUID;
+import java.util.stream.Stream;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.catchThrowable;
+
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ */
+class ArangoVertexCollectionTest extends BaseJunit5 {
+
+ private static final String GRAPH_NAME = "ArangoVertexCollectionTest_graph";
+ private static final String COLLECTION_NAME = "ArangoVertexCollectionTest_vertex_collection";
+
+ private static Stream vertices() {
+ return dbsStream()
+ .map(db -> db.graph(GRAPH_NAME).vertexCollection(COLLECTION_NAME))
+ .map(Arguments::of);
+ }
+
+ @BeforeAll
+ static void init() {
+ initCollections(COLLECTION_NAME);
+ initGraph(
+ GRAPH_NAME,
+ null,
+ new GraphCreateOptions().orphanCollections(COLLECTION_NAME)
+ );
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void dropVertexCollection(ArangoVertexCollection vertices) {
+ ArangoGraph graph = vertices.graph();
+ vertices.drop();
+ final Collection vertexCollections = graph.getVertexCollections();
+ assertThat(vertexCollections).isEmpty();
+
+ // revert
+ graph.addVertexCollection(COLLECTION_NAME);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void insertVertex(ArangoVertexCollection vertices) {
+ final VertexEntity vertex = vertices
+ .insertVertex(new BaseDocument(), null);
+ assertThat(vertex).isNotNull();
+ ArangoCollection collection = vertices.graph().db().collection(vertices.name());
+ final BaseDocument document = collection
+ .getDocument(vertex.getKey(), BaseDocument.class, null);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(vertex.getKey());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void insertVertexViolatingUniqueConstraint(ArangoVertexCollection vertices) {
+ ArangoCollection collection = vertices.graph().db().collection(vertices.name());
+ collection
+ .ensureSkiplistIndex(Collections.singletonList("field"),
+ new SkiplistIndexOptions().unique(true).sparse(true));
+
+ VertexEntity inserted = vertices.insertVertex(RawJson.of("{\"field\": 99}"));
+
+ try {
+ vertices.insertVertex(RawJson.of("{\"field\": 99}"));
+ } catch (ArangoDBException e) {
+ assertThat(e.getResponseCode()).isEqualTo(409);
+ assertThat(e.getErrorNum()).isEqualTo(1210);
+ }
+
+ // revert
+ vertices.deleteVertex(inserted.getKey());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void duplicateInsertSameObjectVertex(ArangoVertexCollection vertices) {
+
+ // #########################################################
+ // Create a new BaseDocument
+ // #########################################################
+
+ UUID uuid = UUID.randomUUID();
+ BaseDocument bd = new BaseDocument(UUID.randomUUID().toString());
+ bd.setKey(uuid.toString());
+ bd.addAttribute("name", "Paul");
+
+ vertices.insertVertex(bd);
+
+ UUID uuid2 = UUID.randomUUID();
+ BaseDocument bd2 = new BaseDocument(UUID.randomUUID().toString());
+ bd2.setKey(uuid2.toString());
+ bd2.addAttribute("name", "Paul");
+
+ vertices.insertVertex(bd2);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void insertVertexUpdateRev(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ final VertexEntity vertex = vertices.insertVertex(doc, null);
+ assertThat(doc.getRevision()).isNull();
+ assertThat(vertex.getRev()).isNotNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void getVertex(ArangoVertexCollection vertices) {
+ final VertexEntity vertex = vertices
+ .insertVertex(new BaseDocument(), null);
+ final BaseDocument document = vertices
+ .getVertex(vertex.getKey(), BaseDocument.class, null);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(vertex.getKey());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void getVertexIfMatch(ArangoVertexCollection vertices) {
+ final VertexEntity vertex = vertices
+ .insertVertex(new BaseDocument(), null);
+ final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifMatch(vertex.getRev());
+ final BaseDocument document = vertices
+ .getVertex(vertex.getKey(), BaseDocument.class, options);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(vertex.getKey());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void getVertexIfMatchFail(ArangoVertexCollection vertices) {
+ final VertexEntity vertex = vertices
+ .insertVertex(new BaseDocument(), null);
+ final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifMatch("no");
+ final BaseDocument vertex2 = vertices
+ .getVertex(vertex.getKey(), BaseDocument.class, options);
+ assertThat(vertex2).isNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void getVertexIfNoneMatch(ArangoVertexCollection vertices) {
+ final VertexEntity vertex = vertices
+ .insertVertex(new BaseDocument(), null);
+ final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifNoneMatch("no");
+ final BaseDocument document = vertices
+ .getVertex(vertex.getKey(), BaseDocument.class, options);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(vertex.getKey());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void getVertexIfNoneMatchFail(ArangoVertexCollection vertices) {
+ final VertexEntity vertex = vertices
+ .insertVertex(new BaseDocument(), null);
+ final GraphDocumentReadOptions options = new GraphDocumentReadOptions().ifNoneMatch(vertex.getRev());
+ final BaseDocument vertex2 = vertices
+ .getVertex(vertex.getKey(), BaseDocument.class, options);
+ assertThat(vertex2).isNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void replaceVertex(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ doc.addAttribute("a", "test");
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.removeAttribute("a");
+ doc.addAttribute("b", "test");
+ final VertexUpdateEntity replaceResult = vertices
+ .replaceVertex(createResult.getKey(), doc, null);
+ assertThat(replaceResult).isNotNull();
+ assertThat(replaceResult.getId()).isEqualTo(createResult.getId());
+ assertThat(replaceResult.getRev()).isNotEqualTo(replaceResult.getOldRev());
+ assertThat(replaceResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseDocument readResult = vertices
+ .getVertex(createResult.getKey(), BaseDocument.class, null);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getRevision()).isEqualTo(replaceResult.getRev());
+ assertThat(readResult.getProperties().keySet()).doesNotContain("a");
+ assertThat(readResult.getAttribute("b")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void replaceVertexUpdateRev(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ final VertexUpdateEntity replaceResult = vertices
+ .replaceVertex(createResult.getKey(), doc, null);
+ assertThat(doc.getRevision()).isNull();
+ assertThat(createResult.getRev()).isNotNull();
+ assertThat(replaceResult.getRev())
+ .isNotNull()
+ .isNotEqualTo(createResult.getRev());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void replaceVertexIfMatch(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ doc.addAttribute("a", "test");
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.removeAttribute("a");
+ doc.addAttribute("b", "test");
+ final VertexReplaceOptions options = new VertexReplaceOptions().ifMatch(createResult.getRev());
+ final VertexUpdateEntity replaceResult = vertices
+ .replaceVertex(createResult.getKey(), doc, options);
+ assertThat(replaceResult).isNotNull();
+ assertThat(replaceResult.getId()).isEqualTo(createResult.getId());
+ assertThat(replaceResult.getRev()).isNotEqualTo(replaceResult.getOldRev());
+ assertThat(replaceResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseDocument readResult = vertices
+ .getVertex(createResult.getKey(), BaseDocument.class, null);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getRevision()).isEqualTo(replaceResult.getRev());
+ assertThat(readResult.getProperties().keySet()).doesNotContain("a");
+ assertThat(readResult.getAttribute("b")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void replaceVertexIfMatchFail(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ doc.addAttribute("a", "test");
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.removeAttribute("a");
+ doc.addAttribute("b", "test");
+ final VertexReplaceOptions options = new VertexReplaceOptions().ifMatch("no");
+ Throwable thrown = catchThrowable(() -> vertices.replaceVertex(createResult.getKey(), doc, options));
+ assertThat(thrown).isInstanceOf(ArangoDBException.class);
+ ArangoDBException e = (ArangoDBException) thrown;
+ assertThat(e.getResponseCode()).isEqualTo(412);
+ assertThat(e.getErrorNum()).isEqualTo(1200);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void updateVertex(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ doc.addAttribute("a", "test");
+ doc.addAttribute("c", "test");
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.updateAttribute("a", "test1");
+ doc.addAttribute("b", "test");
+ doc.updateAttribute("c", null);
+ final VertexUpdateEntity updateResult = vertices
+ .updateVertex(createResult.getKey(), doc, null);
+ assertThat(updateResult).isNotNull();
+ assertThat(updateResult.getId()).isEqualTo(createResult.getId());
+ assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
+ assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseDocument readResult = vertices
+ .getVertex(createResult.getKey(), BaseDocument.class, null);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getAttribute("a")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("a"))).isEqualTo("test1");
+ assertThat(readResult.getAttribute("b")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
+ assertThat(readResult.getRevision()).isEqualTo(updateResult.getRev());
+ assertThat(readResult.getProperties()).containsKey("c");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void updateVertexUpdateRev(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.addAttribute("foo", "bar");
+ final VertexUpdateEntity updateResult = vertices
+ .updateVertex(createResult.getKey(), doc, null);
+ assertThat(doc.getRevision()).isNull();
+ assertThat(createResult.getRev()).isNotNull();
+ assertThat(updateResult.getRev())
+ .isNotNull()
+ .isNotEqualTo(createResult.getRev());
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void updateVertexIfMatch(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ doc.addAttribute("a", "test");
+ doc.addAttribute("c", "test");
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.updateAttribute("a", "test1");
+ doc.addAttribute("b", "test");
+ doc.updateAttribute("c", null);
+ final VertexUpdateOptions options = new VertexUpdateOptions().ifMatch(createResult.getRev());
+ final VertexUpdateEntity updateResult = vertices
+ .updateVertex(createResult.getKey(), doc, options);
+ assertThat(updateResult).isNotNull();
+ assertThat(updateResult.getId()).isEqualTo(createResult.getId());
+ assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
+ assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseDocument readResult = vertices
+ .getVertex(createResult.getKey(), BaseDocument.class, null);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getAttribute("a")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("a"))).isEqualTo("test1");
+ assertThat(readResult.getAttribute("b")).isNotNull();
+ assertThat(String.valueOf(readResult.getAttribute("b"))).isEqualTo("test");
+ assertThat(readResult.getRevision()).isEqualTo(updateResult.getRev());
+ assertThat(readResult.getProperties()).containsKey("c");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void updateVertexIfMatchFail(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ doc.addAttribute("a", "test");
+ doc.addAttribute("c", "test");
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.updateAttribute("a", "test1");
+ doc.addAttribute("b", "test");
+ doc.updateAttribute("c", null);
+ final VertexUpdateOptions options = new VertexUpdateOptions().ifMatch("no");
+
+ Throwable thrown = catchThrowable(() -> vertices.updateVertex(createResult.getKey(), doc, options));
+ assertThat(thrown).isInstanceOf(ArangoDBException.class);
+ ArangoDBException e = (ArangoDBException) thrown;
+ assertThat(e.getResponseCode()).isEqualTo(412);
+ assertThat(e.getErrorNum()).isEqualTo(1200);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void updateVertexKeepNullTrue(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ doc.addAttribute("a", "test");
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.updateAttribute("a", null);
+ final VertexUpdateOptions options = new VertexUpdateOptions().keepNull(true);
+ final VertexUpdateEntity updateResult = vertices
+ .updateVertex(createResult.getKey(), doc, options);
+ assertThat(updateResult).isNotNull();
+ assertThat(updateResult.getId()).isEqualTo(createResult.getId());
+ assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
+ assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseDocument readResult = vertices
+ .getVertex(createResult.getKey(), BaseDocument.class, null);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getProperties().keySet()).hasSize(4);
+ assertThat(readResult.getProperties()).containsKey("a");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void updateVertexKeepNullFalse(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ doc.addAttribute("a", "test");
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ doc.updateAttribute("a", null);
+ final VertexUpdateOptions options = new VertexUpdateOptions().keepNull(false);
+ final VertexUpdateEntity updateResult = vertices
+ .updateVertex(createResult.getKey(), doc, options);
+ assertThat(updateResult).isNotNull();
+ assertThat(updateResult.getId()).isEqualTo(createResult.getId());
+ assertThat(updateResult.getRev()).isNotEqualTo(updateResult.getOldRev());
+ assertThat(updateResult.getOldRev()).isEqualTo(createResult.getRev());
+
+ final BaseDocument readResult = vertices
+ .getVertex(createResult.getKey(), BaseDocument.class, null);
+ assertThat(readResult.getKey()).isEqualTo(createResult.getKey());
+ assertThat(readResult.getId()).isEqualTo(createResult.getId());
+ assertThat(readResult.getRevision()).isNotNull();
+ assertThat(readResult.getProperties().keySet()).doesNotContain("a");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void deleteVertex(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ vertices.deleteVertex(createResult.getKey(), null);
+ final BaseDocument vertex = vertices
+ .getVertex(createResult.getKey(), BaseDocument.class, null);
+ assertThat(vertex).isNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void deleteVertexIfMatch(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ final VertexDeleteOptions options = new VertexDeleteOptions().ifMatch(createResult.getRev());
+ vertices.deleteVertex(createResult.getKey(), options);
+ final BaseDocument vertex = vertices
+ .getVertex(createResult.getKey(), BaseDocument.class, null);
+ assertThat(vertex).isNull();
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void deleteVertexIfMatchFail(ArangoVertexCollection vertices) {
+ final BaseDocument doc = new BaseDocument(UUID.randomUUID().toString());
+ final VertexEntity createResult = vertices
+ .insertVertex(doc, null);
+ final VertexDeleteOptions options = new VertexDeleteOptions().ifMatch("no");
+ Throwable thrown = catchThrowable(() -> vertices.deleteVertex(createResult.getKey(), options));
+ assertThat(thrown).isInstanceOf(ArangoDBException.class);
+ ArangoDBException e = (ArangoDBException) thrown;
+ assertThat(e.getResponseCode()).isEqualTo(412);
+ assertThat(e.getErrorNum()).isEqualTo(1200);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("vertices")
+ void vertexKeyWithSpecialChars(ArangoVertexCollection vertices) {
+ final String key = "_-:.@()+,=;$!*'%" + UUID.randomUUID();
+ final VertexEntity vertex = vertices
+ .insertVertex(new BaseDocument(key), null);
+ assertThat(vertex).isNotNull();
+ ArangoCollection collection = vertices.graph().db().collection(vertices.name());
+ final BaseDocument document = collection
+ .getDocument(vertex.getKey(), BaseDocument.class, null);
+ assertThat(document).isNotNull();
+ assertThat(document.getKey()).isEqualTo(key);
+ }
+
+}
diff --git a/src/test/java/com/arangodb/ArangoViewTest.java b/driver/src/test/java/com/arangodb/ArangoViewTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ArangoViewTest.java
rename to driver/src/test/java/com/arangodb/ArangoViewTest.java
diff --git a/src/test/java/com/arangodb/BaseJunit5.java b/driver/src/test/java/com/arangodb/BaseJunit5.java
similarity index 100%
rename from src/test/java/com/arangodb/BaseJunit5.java
rename to driver/src/test/java/com/arangodb/BaseJunit5.java
diff --git a/src/test/java/com/arangodb/ConcurrencyTests.java b/driver/src/test/java/com/arangodb/ConcurrencyTests.java
similarity index 100%
rename from src/test/java/com/arangodb/ConcurrencyTests.java
rename to driver/src/test/java/com/arangodb/ConcurrencyTests.java
diff --git a/src/test/java/com/arangodb/DocumentTest.java b/driver/src/test/java/com/arangodb/DocumentTest.java
similarity index 97%
rename from src/test/java/com/arangodb/DocumentTest.java
rename to driver/src/test/java/com/arangodb/DocumentTest.java
index 3293316c5..0ce14ff53 100644
--- a/src/test/java/com/arangodb/DocumentTest.java
+++ b/driver/src/test/java/com/arangodb/DocumentTest.java
@@ -1,138 +1,138 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb;
-
-import com.arangodb.entity.BaseDocument;
-import com.arangodb.entity.DocumentCreateEntity;
-import com.arangodb.util.RawJson;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import java.util.Map;
-import java.util.UUID;
-import java.util.stream.Stream;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-
-/**
- * @author Mark Vollmary
- * @author Michele Rastelli
- */
-class DocumentTest extends BaseJunit5 {
-
- private static final String COLLECTION_NAME = "DocumentTest_collection";
-
- private static Stream cols() {
- return dbsStream()
- .map(db -> db.collection(COLLECTION_NAME))
- .map(Arguments::of);
- }
-
-
- @BeforeAll
- static void init() {
- initCollections(COLLECTION_NAME);
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("cols")
- void insertAsJson(ArangoCollection collection) {
- //@formatter:off
- final RawJson json = RawJson.of(
- "{"
- + "\"article\": {"
- + "\"artist\": \"PREGARDIEN/RHEINISCHE KANTOREI/DAS\","
- + "\"releaseDate\": \"1970-01-01\","
- + "\"composer\": \"BACH\","
- + "\"format\": \"CD\","
- + "\"vat\": \"H\","
- + "\"carriers\": 1,"
- + "\"label\": \"CAPRICCIO\","
- + "\"title\": \"BACH ST MATTHEW PASSION BWV244\","
- + "\"barcode\": ["
- + "\"4006408600466\""
- + "],"
- + "\"conductor\": \"MAX, H.\""
- + "},"
- + "\"stock\": {"
- + "\"status\": \"RMV\","
- + "\"lastUpdate\": \"2016-11-01 00:00\""
- + "}"
- + "}"
- );
- //@formatter:on
- final DocumentCreateEntity> createResult = collection.insertDocument(json);
- final BaseDocument doc = collection.getDocument(createResult.getKey(), BaseDocument.class);
- assertThat(doc).isNotNull();
- final Object article = doc.getAttribute("article");
- assertThat(article).isNotNull();
- final Object artist = ((Map) article).get("artist");
- assertThat(artist).isNotNull();
- assertThat(artist.toString()).isEqualTo("PREGARDIEN/RHEINISCHE KANTOREI/DAS");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("cols")
- void insertAsBaseDocument(ArangoCollection collection) {
- final BaseDocument document = new BaseDocument(UUID.randomUUID().toString());
- {
- final BaseDocument article = new BaseDocument(UUID.randomUUID().toString());
- document.addAttribute("article", article);
- article.addAttribute("artist", "PREGARDIEN/RHEINISCHE KANTOREI/DAS");
- article.addAttribute("releaseDate", "1970-01-01");
- article.addAttribute("composer", "BACH");
- article.addAttribute("format", "CD");
- article.addAttribute("vat", "H");
- article.addAttribute("carriers", 1);
- article.addAttribute("label", "CAPRICCIO");
- article.addAttribute("title", "BACH ST MATTHEW PASSION BWV244");
- article.addAttribute("barcode", new String[]{"4006408600466"});
- article.addAttribute("conductor", "MAX, H.");
- final BaseDocument stock = new BaseDocument(UUID.randomUUID().toString());
- document.addAttribute("stock", stock);
- stock.addAttribute("status", "RMV");
- stock.addAttribute("lastUpdate", "2016-11-01 00:00");
- }
- final DocumentCreateEntity> createResult = collection.insertDocument(document);
- final BaseDocument doc = collection.getDocument(createResult.getKey(), BaseDocument.class);
- assertThat(doc).isNotNull();
- final Object article = doc.getAttribute("article");
- assertThat(article).isNotNull();
- final Object artist = ((Map) article).get("artist");
- assertThat(artist).isNotNull();
- assertThat(artist.toString()).isEqualTo("PREGARDIEN/RHEINISCHE KANTOREI/DAS");
- }
-
- @ParameterizedTest(name = "{index}")
- @MethodSource("cols")
- void documentKeyWithSpecialChars(ArangoCollection collection) {
- final String key = "_-:.@()+,=;$!*'%" + UUID.randomUUID();
- final BaseDocument document = new BaseDocument(key);
- final DocumentCreateEntity> createResult = collection.insertDocument(document);
- final BaseDocument doc = collection.getDocument(createResult.getKey(), BaseDocument.class);
- assertThat(doc).isNotNull();
- assertThat(doc.getKey()).isEqualTo(key);
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb;
+
+import com.arangodb.entity.BaseDocument;
+import com.arangodb.entity.DocumentCreateEntity;
+import com.arangodb.util.RawJson;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import java.util.Map;
+import java.util.UUID;
+import java.util.stream.Stream;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+
+/**
+ * @author Mark Vollmary
+ * @author Michele Rastelli
+ */
+class DocumentTest extends BaseJunit5 {
+
+ private static final String COLLECTION_NAME = "DocumentTest_collection";
+
+ private static Stream cols() {
+ return dbsStream()
+ .map(db -> db.collection(COLLECTION_NAME))
+ .map(Arguments::of);
+ }
+
+
+ @BeforeAll
+ static void init() {
+ initCollections(COLLECTION_NAME);
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("cols")
+ void insertAsJson(ArangoCollection collection) {
+ //@formatter:off
+ final RawJson json = RawJson.of(
+ "{"
+ + "\"article\": {"
+ + "\"artist\": \"PREGARDIEN/RHEINISCHE KANTOREI/DAS\","
+ + "\"releaseDate\": \"1970-01-01\","
+ + "\"composer\": \"BACH\","
+ + "\"format\": \"CD\","
+ + "\"vat\": \"H\","
+ + "\"carriers\": 1,"
+ + "\"label\": \"CAPRICCIO\","
+ + "\"title\": \"BACH ST MATTHEW PASSION BWV244\","
+ + "\"barcode\": ["
+ + "\"4006408600466\""
+ + "],"
+ + "\"conductor\": \"MAX, H.\""
+ + "},"
+ + "\"stock\": {"
+ + "\"status\": \"RMV\","
+ + "\"lastUpdate\": \"2016-11-01 00:00\""
+ + "}"
+ + "}"
+ );
+ //@formatter:on
+ final DocumentCreateEntity> createResult = collection.insertDocument(json);
+ final BaseDocument doc = collection.getDocument(createResult.getKey(), BaseDocument.class);
+ assertThat(doc).isNotNull();
+ final Object article = doc.getAttribute("article");
+ assertThat(article).isNotNull();
+ final Object artist = ((Map) article).get("artist");
+ assertThat(artist).isNotNull();
+ assertThat(artist.toString()).isEqualTo("PREGARDIEN/RHEINISCHE KANTOREI/DAS");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("cols")
+ void insertAsBaseDocument(ArangoCollection collection) {
+ final BaseDocument document = new BaseDocument(UUID.randomUUID().toString());
+ {
+ final BaseDocument article = new BaseDocument(UUID.randomUUID().toString());
+ document.addAttribute("article", article);
+ article.addAttribute("artist", "PREGARDIEN/RHEINISCHE KANTOREI/DAS");
+ article.addAttribute("releaseDate", "1970-01-01");
+ article.addAttribute("composer", "BACH");
+ article.addAttribute("format", "CD");
+ article.addAttribute("vat", "H");
+ article.addAttribute("carriers", 1);
+ article.addAttribute("label", "CAPRICCIO");
+ article.addAttribute("title", "BACH ST MATTHEW PASSION BWV244");
+ article.addAttribute("barcode", new String[]{"4006408600466"});
+ article.addAttribute("conductor", "MAX, H.");
+ final BaseDocument stock = new BaseDocument(UUID.randomUUID().toString());
+ document.addAttribute("stock", stock);
+ stock.addAttribute("status", "RMV");
+ stock.addAttribute("lastUpdate", "2016-11-01 00:00");
+ }
+ final DocumentCreateEntity> createResult = collection.insertDocument(document);
+ final BaseDocument doc = collection.getDocument(createResult.getKey(), BaseDocument.class);
+ assertThat(doc).isNotNull();
+ final Object article = doc.getAttribute("article");
+ assertThat(article).isNotNull();
+ final Object artist = ((Map) article).get("artist");
+ assertThat(artist).isNotNull();
+ assertThat(artist.toString()).isEqualTo("PREGARDIEN/RHEINISCHE KANTOREI/DAS");
+ }
+
+ @ParameterizedTest(name = "{index}")
+ @MethodSource("cols")
+ void documentKeyWithSpecialChars(ArangoCollection collection) {
+ final String key = "_-:.@()+,=;$!*'%" + UUID.randomUUID();
+ final BaseDocument document = new BaseDocument(key);
+ final DocumentCreateEntity> createResult = collection.insertDocument(document);
+ final BaseDocument doc = collection.getDocument(createResult.getKey(), BaseDocument.class);
+ assertThat(doc).isNotNull();
+ assertThat(doc.getKey()).isEqualTo(key);
+ }
+
+}
diff --git a/src/test/java/com/arangodb/InvertedIndexTest.java b/driver/src/test/java/com/arangodb/InvertedIndexTest.java
similarity index 100%
rename from src/test/java/com/arangodb/InvertedIndexTest.java
rename to driver/src/test/java/com/arangodb/InvertedIndexTest.java
diff --git a/src/test/java/com/arangodb/JwtAuthTest.java b/driver/src/test/java/com/arangodb/JwtAuthTest.java
similarity index 94%
rename from src/test/java/com/arangodb/JwtAuthTest.java
rename to driver/src/test/java/com/arangodb/JwtAuthTest.java
index a5b87e803..57d9f3001 100644
--- a/src/test/java/com/arangodb/JwtAuthTest.java
+++ b/driver/src/test/java/com/arangodb/JwtAuthTest.java
@@ -2,6 +2,7 @@
import com.arangodb.serde.ArangoSerde;
import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
@@ -10,6 +11,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
/**
@@ -64,13 +66,11 @@ void authenticated(Protocol protocol) {
@ParameterizedTest
@EnumSource(Protocol.class)
void updateJwt(Protocol protocol) {
+ assumeTrue(protocol != Protocol.VST, "DE-423");
ArangoDB arangoDB = getBuilder(protocol)
.jwt(jwt)
.build();
arangoDB.getVersion();
- if (protocol == Protocol.VST) {
- arangoDB.shutdown();
- }
arangoDB.updateJwt("bla");
Throwable thrown = catchThrowable(arangoDB::getVersion);
diff --git a/src/test/java/com/arangodb/ParallelTest.java b/driver/src/test/java/com/arangodb/ParallelTest.java
similarity index 100%
rename from src/test/java/com/arangodb/ParallelTest.java
rename to driver/src/test/java/com/arangodb/ParallelTest.java
diff --git a/src/test/java/com/arangodb/SerializableTest.java b/driver/src/test/java/com/arangodb/SerializableTest.java
similarity index 100%
rename from src/test/java/com/arangodb/SerializableTest.java
rename to driver/src/test/java/com/arangodb/SerializableTest.java
diff --git a/src/test/java/com/arangodb/StreamTransactionConflictsTest.java b/driver/src/test/java/com/arangodb/StreamTransactionConflictsTest.java
similarity index 100%
rename from src/test/java/com/arangodb/StreamTransactionConflictsTest.java
rename to driver/src/test/java/com/arangodb/StreamTransactionConflictsTest.java
diff --git a/src/test/java/com/arangodb/StreamTransactionGraphTest.java b/driver/src/test/java/com/arangodb/StreamTransactionGraphTest.java
similarity index 100%
rename from src/test/java/com/arangodb/StreamTransactionGraphTest.java
rename to driver/src/test/java/com/arangodb/StreamTransactionGraphTest.java
diff --git a/src/test/java/com/arangodb/StreamTransactionTest.java b/driver/src/test/java/com/arangodb/StreamTransactionTest.java
similarity index 100%
rename from src/test/java/com/arangodb/StreamTransactionTest.java
rename to driver/src/test/java/com/arangodb/StreamTransactionTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoCollectionTest.java b/driver/src/test/java/com/arangodb/async/ArangoCollectionTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoCollectionTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoCollectionTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoDBTest.java b/driver/src/test/java/com/arangodb/async/ArangoDBTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoDBTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoDBTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoDatabaseTest.java b/driver/src/test/java/com/arangodb/async/ArangoDatabaseTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoDatabaseTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoDatabaseTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoEdgeCollectionTest.java b/driver/src/test/java/com/arangodb/async/ArangoEdgeCollectionTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoEdgeCollectionTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoEdgeCollectionTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoGraphTest.java b/driver/src/test/java/com/arangodb/async/ArangoGraphTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoGraphTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoGraphTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoRouteTest.java b/driver/src/test/java/com/arangodb/async/ArangoRouteTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoRouteTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoRouteTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoSearchTest.java b/driver/src/test/java/com/arangodb/async/ArangoSearchTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoSearchTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoSearchTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoVertexCollectionTest.java b/driver/src/test/java/com/arangodb/async/ArangoVertexCollectionTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoVertexCollectionTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoVertexCollectionTest.java
diff --git a/src/test/java/com/arangodb/async/ArangoViewTest.java b/driver/src/test/java/com/arangodb/async/ArangoViewTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ArangoViewTest.java
rename to driver/src/test/java/com/arangodb/async/ArangoViewTest.java
diff --git a/src/test/java/com/arangodb/async/BaseTest.java b/driver/src/test/java/com/arangodb/async/BaseTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/BaseTest.java
rename to driver/src/test/java/com/arangodb/async/BaseTest.java
diff --git a/src/test/java/com/arangodb/async/CommunicationTest.java b/driver/src/test/java/com/arangodb/async/CommunicationTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/CommunicationTest.java
rename to driver/src/test/java/com/arangodb/async/CommunicationTest.java
diff --git a/src/test/java/com/arangodb/async/ConcurrencyTest.java b/driver/src/test/java/com/arangodb/async/ConcurrencyTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ConcurrencyTest.java
rename to driver/src/test/java/com/arangodb/async/ConcurrencyTest.java
diff --git a/src/test/java/com/arangodb/async/ConcurrencyTests.java b/driver/src/test/java/com/arangodb/async/ConcurrencyTests.java
similarity index 100%
rename from src/test/java/com/arangodb/async/ConcurrencyTests.java
rename to driver/src/test/java/com/arangodb/async/ConcurrencyTests.java
diff --git a/src/test/java/com/arangodb/async/InvertedIndexTest.java b/driver/src/test/java/com/arangodb/async/InvertedIndexTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/InvertedIndexTest.java
rename to driver/src/test/java/com/arangodb/async/InvertedIndexTest.java
diff --git a/src/test/java/com/arangodb/async/JwtAuthTest.java b/driver/src/test/java/com/arangodb/async/JwtAuthTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/JwtAuthTest.java
rename to driver/src/test/java/com/arangodb/async/JwtAuthTest.java
diff --git a/src/test/java/com/arangodb/async/StreamTransactionConflictsTest.java b/driver/src/test/java/com/arangodb/async/StreamTransactionConflictsTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/StreamTransactionConflictsTest.java
rename to driver/src/test/java/com/arangodb/async/StreamTransactionConflictsTest.java
diff --git a/src/test/java/com/arangodb/async/StreamTransactionGraphTest.java b/driver/src/test/java/com/arangodb/async/StreamTransactionGraphTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/StreamTransactionGraphTest.java
rename to driver/src/test/java/com/arangodb/async/StreamTransactionGraphTest.java
diff --git a/src/test/java/com/arangodb/async/StreamTransactionTest.java b/driver/src/test/java/com/arangodb/async/StreamTransactionTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/StreamTransactionTest.java
rename to driver/src/test/java/com/arangodb/async/StreamTransactionTest.java
diff --git a/src/test/java/com/arangodb/async/debug/ConsolidationIntervalMsecTest.java b/driver/src/test/java/com/arangodb/async/debug/ConsolidationIntervalMsecTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/debug/ConsolidationIntervalMsecTest.java
rename to driver/src/test/java/com/arangodb/async/debug/ConsolidationIntervalMsecTest.java
diff --git a/src/test/java/com/arangodb/async/example/ExampleBase.java b/driver/src/test/java/com/arangodb/async/example/ExampleBase.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/ExampleBase.java
rename to driver/src/test/java/com/arangodb/async/example/ExampleBase.java
diff --git a/src/test/java/com/arangodb/async/example/document/AqlQueryWithSpecialReturnTypesExampleTest.java b/driver/src/test/java/com/arangodb/async/example/document/AqlQueryWithSpecialReturnTypesExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/document/AqlQueryWithSpecialReturnTypesExampleTest.java
rename to driver/src/test/java/com/arangodb/async/example/document/AqlQueryWithSpecialReturnTypesExampleTest.java
diff --git a/src/test/java/com/arangodb/async/example/document/GetDocumentExampleTest.java b/driver/src/test/java/com/arangodb/async/example/document/GetDocumentExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/document/GetDocumentExampleTest.java
rename to driver/src/test/java/com/arangodb/async/example/document/GetDocumentExampleTest.java
diff --git a/src/test/java/com/arangodb/async/example/document/ImportDocumentExampleTest.java b/driver/src/test/java/com/arangodb/async/example/document/ImportDocumentExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/document/ImportDocumentExampleTest.java
rename to driver/src/test/java/com/arangodb/async/example/document/ImportDocumentExampleTest.java
diff --git a/src/test/java/com/arangodb/async/example/document/InsertDocumentExampleTest.java b/driver/src/test/java/com/arangodb/async/example/document/InsertDocumentExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/document/InsertDocumentExampleTest.java
rename to driver/src/test/java/com/arangodb/async/example/document/InsertDocumentExampleTest.java
diff --git a/src/test/java/com/arangodb/async/example/document/TestEntity.java b/driver/src/test/java/com/arangodb/async/example/document/TestEntity.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/document/TestEntity.java
rename to driver/src/test/java/com/arangodb/async/example/document/TestEntity.java
diff --git a/src/test/java/com/arangodb/async/example/graph/AQLActorsAndMoviesExampleTest.java b/driver/src/test/java/com/arangodb/async/example/graph/AQLActorsAndMoviesExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/graph/AQLActorsAndMoviesExampleTest.java
rename to driver/src/test/java/com/arangodb/async/example/graph/AQLActorsAndMoviesExampleTest.java
diff --git a/src/test/java/com/arangodb/async/example/graph/BaseGraphTest.java b/driver/src/test/java/com/arangodb/async/example/graph/BaseGraphTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/graph/BaseGraphTest.java
rename to driver/src/test/java/com/arangodb/async/example/graph/BaseGraphTest.java
diff --git a/src/test/java/com/arangodb/async/example/graph/Circle.java b/driver/src/test/java/com/arangodb/async/example/graph/Circle.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/graph/Circle.java
rename to driver/src/test/java/com/arangodb/async/example/graph/Circle.java
diff --git a/src/test/java/com/arangodb/async/example/graph/CircleEdge.java b/driver/src/test/java/com/arangodb/async/example/graph/CircleEdge.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/graph/CircleEdge.java
rename to driver/src/test/java/com/arangodb/async/example/graph/CircleEdge.java
diff --git a/src/test/java/com/arangodb/async/example/graph/GraphTraversalsInAQLExampleTest.java b/driver/src/test/java/com/arangodb/async/example/graph/GraphTraversalsInAQLExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/graph/GraphTraversalsInAQLExampleTest.java
rename to driver/src/test/java/com/arangodb/async/example/graph/GraphTraversalsInAQLExampleTest.java
diff --git a/src/test/java/com/arangodb/async/example/graph/ShortestPathInAQLExampleTest.java b/driver/src/test/java/com/arangodb/async/example/graph/ShortestPathInAQLExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/graph/ShortestPathInAQLExampleTest.java
rename to driver/src/test/java/com/arangodb/async/example/graph/ShortestPathInAQLExampleTest.java
diff --git a/src/test/java/com/arangodb/async/example/ssl/SslExampleTest.java b/driver/src/test/java/com/arangodb/async/example/ssl/SslExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/example/ssl/SslExampleTest.java
rename to driver/src/test/java/com/arangodb/async/example/ssl/SslExampleTest.java
diff --git a/src/test/java/com/arangodb/async/serde/CustomSerdeTest.java b/driver/src/test/java/com/arangodb/async/serde/CustomSerdeTest.java
similarity index 100%
rename from src/test/java/com/arangodb/async/serde/CustomSerdeTest.java
rename to driver/src/test/java/com/arangodb/async/serde/CustomSerdeTest.java
diff --git a/src/test/java/com/arangodb/example/ExampleBase.java b/driver/src/test/java/com/arangodb/example/ExampleBase.java
similarity index 96%
rename from src/test/java/com/arangodb/example/ExampleBase.java
rename to driver/src/test/java/com/arangodb/example/ExampleBase.java
index 967c57a6a..77a2bfce1 100644
--- a/src/test/java/com/arangodb/example/ExampleBase.java
+++ b/driver/src/test/java/com/arangodb/example/ExampleBase.java
@@ -1,59 +1,59 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.example;
-
-import com.arangodb.ArangoCollection;
-import com.arangodb.ArangoDB;
-import com.arangodb.ArangoDatabase;
-import com.arangodb.DbName;
-import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.BeforeAll;
-
-/**
- * @author Mark Vollmary
- */
-public class ExampleBase {
-
- protected static final String COLLECTION_NAME = "json_example_collection";
- private static final String DB_NAME = "json_example_db";
- protected static ArangoDatabase db;
- protected static ArangoCollection collection;
- private static ArangoDB arangoDB;
-
- @BeforeAll
- static void setUp() {
- arangoDB = new ArangoDB.Builder().build();
- DbName dbName = DbName.of(DB_NAME);
- if (arangoDB.db(dbName).exists())
- arangoDB.db(dbName).drop();
- arangoDB.createDatabase(dbName);
- db = arangoDB.db(dbName);
- db.createCollection(COLLECTION_NAME);
- collection = db.collection(COLLECTION_NAME);
- }
-
- @AfterAll
- static void tearDown() {
- db.drop();
- arangoDB.shutdown();
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.example;
+
+import com.arangodb.ArangoCollection;
+import com.arangodb.ArangoDB;
+import com.arangodb.ArangoDatabase;
+import com.arangodb.DbName;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+
+/**
+ * @author Mark Vollmary
+ */
+public class ExampleBase {
+
+ protected static final String COLLECTION_NAME = "json_example_collection";
+ private static final String DB_NAME = "json_example_db";
+ protected static ArangoDatabase db;
+ protected static ArangoCollection collection;
+ private static ArangoDB arangoDB;
+
+ @BeforeAll
+ static void setUp() {
+ arangoDB = new ArangoDB.Builder().build();
+ DbName dbName = DbName.of(DB_NAME);
+ if (arangoDB.db(dbName).exists())
+ arangoDB.db(dbName).drop();
+ arangoDB.createDatabase(dbName);
+ db = arangoDB.db(dbName);
+ db.createCollection(COLLECTION_NAME);
+ collection = db.collection(COLLECTION_NAME);
+ }
+
+ @AfterAll
+ static void tearDown() {
+ db.drop();
+ arangoDB.shutdown();
+ }
+
+}
diff --git a/src/test/java/com/arangodb/example/FirstProject.java b/driver/src/test/java/com/arangodb/example/FirstProject.java
similarity index 97%
rename from src/test/java/com/arangodb/example/FirstProject.java
rename to driver/src/test/java/com/arangodb/example/FirstProject.java
index 31adecc12..454bfabc7 100644
--- a/src/test/java/com/arangodb/example/FirstProject.java
+++ b/driver/src/test/java/com/arangodb/example/FirstProject.java
@@ -1,134 +1,134 @@
-package com.arangodb.example;
-
-import com.arangodb.*;
-import com.arangodb.entity.BaseDocument;
-import com.arangodb.entity.CollectionEntity;
-import com.fasterxml.jackson.databind.JsonNode;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.UUID;
-
-public class FirstProject {
-
- public static void main(final String[] args) {
- final ArangoDB arangoDB = new ArangoDB.Builder().user("root").build();
-
- // create database
- final DbName dbName = DbName.of("mydb");
- try {
- arangoDB.createDatabase(dbName);
- System.out.println("Database created: " + dbName);
- } catch (final ArangoDBException e) {
- System.err.println("Failed to create database: " + dbName + "; " + e.getMessage());
- }
-
- // create collection
- final String collectionName = "firstCollection";
- try {
- final CollectionEntity myArangoCollection = arangoDB.db(dbName).createCollection(collectionName);
- System.out.println("Collection created: " + myArangoCollection.getName());
- } catch (final ArangoDBException e) {
- System.err.println("Failed to create collection: " + collectionName + "; " + e.getMessage());
- }
-
- // creating a document
- final BaseDocument myObject = new BaseDocument(UUID.randomUUID().toString());
- myObject.setKey("myKey");
- myObject.addAttribute("a", "Foo");
- myObject.addAttribute("b", 42);
- try {
- arangoDB.db(dbName).collection(collectionName).insertDocument(myObject);
- System.out.println("Document created");
- } catch (final ArangoDBException e) {
- System.err.println("Failed to create document. " + e.getMessage());
- }
-
- // read a document
- try {
- final BaseDocument myDocument = arangoDB.db(dbName).collection(collectionName).getDocument("myKey",
- BaseDocument.class);
- System.out.println("Key: " + myDocument.getKey());
- System.out.println("Attribute a: " + myDocument.getAttribute("a"));
- System.out.println("Attribute b: " + myDocument.getAttribute("b"));
- } catch (final ArangoDBException e) {
- System.err.println("Failed to get document: myKey; " + e.getMessage());
- }
-
- // read a document as JsonNode
- try {
- final JsonNode myDocument = arangoDB.db(dbName).collection(collectionName).getDocument("myKey",
- JsonNode.class);
- System.out.println("Key: " + myDocument.get("_key").textValue());
- System.out.println("Attribute a: " + myDocument.get("a").textValue());
- System.out.println("Attribute b: " + myDocument.get("b").textValue());
- } catch (final ArangoDBException e) {
- System.err.println("Failed to get document: myKey; " + e.getMessage());
- }
-
- // update a document
- myObject.addAttribute("c", "Bar");
- try {
- arangoDB.db(dbName).collection(collectionName).updateDocument("myKey", myObject);
- } catch (final ArangoDBException e) {
- System.err.println("Failed to update document. " + e.getMessage());
- }
-
- // read the document again
- try {
- final BaseDocument myUpdatedDocument = arangoDB.db(dbName).collection(collectionName).getDocument("myKey",
- BaseDocument.class);
- System.out.println("Key: " + myUpdatedDocument.getKey());
- System.out.println("Attribute a: " + myUpdatedDocument.getAttribute("a"));
- System.out.println("Attribute b: " + myUpdatedDocument.getAttribute("b"));
- System.out.println("Attribute c: " + myUpdatedDocument.getAttribute("c"));
- } catch (final ArangoDBException e) {
- System.err.println("Failed to get document: myKey; " + e.getMessage());
- }
-
- // delete a document
- try {
- arangoDB.db(dbName).collection(collectionName).deleteDocument("myKey");
- } catch (final ArangoDBException e) {
- System.err.println("Failed to delete document. " + e.getMessage());
- }
-
- // create some documents for the next step
- final ArangoCollection collection = arangoDB.db(dbName).collection(collectionName);
- for (int i = 0; i < 10; i++) {
- final BaseDocument value = new BaseDocument(UUID.randomUUID().toString());
- value.setKey(String.valueOf(i));
- value.addAttribute("name", "Homer");
- collection.insertDocument(value);
- }
-
- // execute AQL queries
- try {
- final String query = "FOR t IN firstCollection FILTER t.name == @name RETURN t";
- final Map bindVars = Collections.singletonMap("name", "Homer");
- final ArangoCursor cursor = arangoDB.db(dbName).query(query, bindVars, null,
- BaseDocument.class);
- while (cursor.hasNext()) {
- System.out.println("Key: " + cursor.next().getKey());
- }
- } catch (final ArangoDBException e) {
- System.err.println("Failed to execute query. " + e.getMessage());
- }
-
- // delete a document with AQL
- try {
- final String query = "FOR t IN firstCollection FILTER t.name == @name "
- + "REMOVE t IN firstCollection LET removed = OLD RETURN removed";
- final Map bindVars = Collections.singletonMap("name", "Homer");
- final ArangoCursor cursor = arangoDB.db(dbName).query(query, bindVars, null,
- BaseDocument.class);
- while (cursor.hasNext()) {
- System.out.println("Removed document " + cursor.next().getKey());
- }
- } catch (final ArangoDBException e) {
- System.err.println("Failed to execute query. " + e.getMessage());
- }
-
- }
-
-}
+package com.arangodb.example;
+
+import com.arangodb.*;
+import com.arangodb.entity.BaseDocument;
+import com.arangodb.entity.CollectionEntity;
+import com.fasterxml.jackson.databind.JsonNode;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
+public class FirstProject {
+
+ public static void main(final String[] args) {
+ final ArangoDB arangoDB = new ArangoDB.Builder().user("root").build();
+
+ // create database
+ final DbName dbName = DbName.of("mydb");
+ try {
+ arangoDB.createDatabase(dbName);
+ System.out.println("Database created: " + dbName);
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to create database: " + dbName + "; " + e.getMessage());
+ }
+
+ // create collection
+ final String collectionName = "firstCollection";
+ try {
+ final CollectionEntity myArangoCollection = arangoDB.db(dbName).createCollection(collectionName);
+ System.out.println("Collection created: " + myArangoCollection.getName());
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to create collection: " + collectionName + "; " + e.getMessage());
+ }
+
+ // creating a document
+ final BaseDocument myObject = new BaseDocument(UUID.randomUUID().toString());
+ myObject.setKey("myKey");
+ myObject.addAttribute("a", "Foo");
+ myObject.addAttribute("b", 42);
+ try {
+ arangoDB.db(dbName).collection(collectionName).insertDocument(myObject);
+ System.out.println("Document created");
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to create document. " + e.getMessage());
+ }
+
+ // read a document
+ try {
+ final BaseDocument myDocument = arangoDB.db(dbName).collection(collectionName).getDocument("myKey",
+ BaseDocument.class);
+ System.out.println("Key: " + myDocument.getKey());
+ System.out.println("Attribute a: " + myDocument.getAttribute("a"));
+ System.out.println("Attribute b: " + myDocument.getAttribute("b"));
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to get document: myKey; " + e.getMessage());
+ }
+
+ // read a document as JsonNode
+ try {
+ final JsonNode myDocument = arangoDB.db(dbName).collection(collectionName).getDocument("myKey",
+ JsonNode.class);
+ System.out.println("Key: " + myDocument.get("_key").textValue());
+ System.out.println("Attribute a: " + myDocument.get("a").textValue());
+ System.out.println("Attribute b: " + myDocument.get("b").textValue());
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to get document: myKey; " + e.getMessage());
+ }
+
+ // update a document
+ myObject.addAttribute("c", "Bar");
+ try {
+ arangoDB.db(dbName).collection(collectionName).updateDocument("myKey", myObject);
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to update document. " + e.getMessage());
+ }
+
+ // read the document again
+ try {
+ final BaseDocument myUpdatedDocument = arangoDB.db(dbName).collection(collectionName).getDocument("myKey",
+ BaseDocument.class);
+ System.out.println("Key: " + myUpdatedDocument.getKey());
+ System.out.println("Attribute a: " + myUpdatedDocument.getAttribute("a"));
+ System.out.println("Attribute b: " + myUpdatedDocument.getAttribute("b"));
+ System.out.println("Attribute c: " + myUpdatedDocument.getAttribute("c"));
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to get document: myKey; " + e.getMessage());
+ }
+
+ // delete a document
+ try {
+ arangoDB.db(dbName).collection(collectionName).deleteDocument("myKey");
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to delete document. " + e.getMessage());
+ }
+
+ // create some documents for the next step
+ final ArangoCollection collection = arangoDB.db(dbName).collection(collectionName);
+ for (int i = 0; i < 10; i++) {
+ final BaseDocument value = new BaseDocument(UUID.randomUUID().toString());
+ value.setKey(String.valueOf(i));
+ value.addAttribute("name", "Homer");
+ collection.insertDocument(value);
+ }
+
+ // execute AQL queries
+ try {
+ final String query = "FOR t IN firstCollection FILTER t.name == @name RETURN t";
+ final Map bindVars = Collections.singletonMap("name", "Homer");
+ final ArangoCursor cursor = arangoDB.db(dbName).query(query, bindVars, null,
+ BaseDocument.class);
+ while (cursor.hasNext()) {
+ System.out.println("Key: " + cursor.next().getKey());
+ }
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to execute query. " + e.getMessage());
+ }
+
+ // delete a document with AQL
+ try {
+ final String query = "FOR t IN firstCollection FILTER t.name == @name "
+ + "REMOVE t IN firstCollection LET removed = OLD RETURN removed";
+ final Map bindVars = Collections.singletonMap("name", "Homer");
+ final ArangoCursor cursor = arangoDB.db(dbName).query(query, bindVars, null,
+ BaseDocument.class);
+ while (cursor.hasNext()) {
+ System.out.println("Removed document " + cursor.next().getKey());
+ }
+ } catch (final ArangoDBException e) {
+ System.err.println("Failed to execute query. " + e.getMessage());
+ }
+
+ }
+
+}
diff --git a/src/test/java/com/arangodb/example/document/AqlQueryWithSpecialReturnTypesExampleTest.java b/driver/src/test/java/com/arangodb/example/document/AqlQueryWithSpecialReturnTypesExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/example/document/AqlQueryWithSpecialReturnTypesExampleTest.java
rename to driver/src/test/java/com/arangodb/example/document/AqlQueryWithSpecialReturnTypesExampleTest.java
diff --git a/src/test/java/com/arangodb/example/document/GetDocumentExampleTest.java b/driver/src/test/java/com/arangodb/example/document/GetDocumentExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/example/document/GetDocumentExampleTest.java
rename to driver/src/test/java/com/arangodb/example/document/GetDocumentExampleTest.java
diff --git a/src/test/java/com/arangodb/example/document/InsertDocumentExampleTest.java b/driver/src/test/java/com/arangodb/example/document/InsertDocumentExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/example/document/InsertDocumentExampleTest.java
rename to driver/src/test/java/com/arangodb/example/document/InsertDocumentExampleTest.java
diff --git a/src/test/java/com/arangodb/example/document/TestEntity.java b/driver/src/test/java/com/arangodb/example/document/TestEntity.java
similarity index 95%
rename from src/test/java/com/arangodb/example/document/TestEntity.java
rename to driver/src/test/java/com/arangodb/example/document/TestEntity.java
index 6e42a3aad..8a59c2b60 100644
--- a/src/test/java/com/arangodb/example/document/TestEntity.java
+++ b/driver/src/test/java/com/arangodb/example/document/TestEntity.java
@@ -1,47 +1,47 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.example.document;
-
-/**
- * @author Mark Vollmary
- */
-public class TestEntity {
-
- private String foo;
-
- public TestEntity() {
- super();
- }
-
- public TestEntity(final String foo) {
- super();
- this.foo = foo;
- }
-
- public String getFoo() {
- return foo;
- }
-
- public void setFoo(final String foo) {
- this.foo = foo;
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.example.document;
+
+/**
+ * @author Mark Vollmary
+ */
+public class TestEntity {
+
+ private String foo;
+
+ public TestEntity() {
+ super();
+ }
+
+ public TestEntity(final String foo) {
+ super();
+ this.foo = foo;
+ }
+
+ public String getFoo() {
+ return foo;
+ }
+
+ public void setFoo(final String foo) {
+ this.foo = foo;
+ }
+
+}
diff --git a/src/test/java/com/arangodb/example/graph/AQLActorsAndMoviesExampleTest.java b/driver/src/test/java/com/arangodb/example/graph/AQLActorsAndMoviesExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/example/graph/AQLActorsAndMoviesExampleTest.java
rename to driver/src/test/java/com/arangodb/example/graph/AQLActorsAndMoviesExampleTest.java
diff --git a/src/test/java/com/arangodb/example/graph/BaseGraphTest.java b/driver/src/test/java/com/arangodb/example/graph/BaseGraphTest.java
similarity index 97%
rename from src/test/java/com/arangodb/example/graph/BaseGraphTest.java
rename to driver/src/test/java/com/arangodb/example/graph/BaseGraphTest.java
index d60239fa3..d9f5e811b 100644
--- a/src/test/java/com/arangodb/example/graph/BaseGraphTest.java
+++ b/driver/src/test/java/com/arangodb/example/graph/BaseGraphTest.java
@@ -1,111 +1,111 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.example.graph;
-
-import com.arangodb.ArangoDB;
-import com.arangodb.ArangoDBException;
-import com.arangodb.ArangoDatabase;
-import com.arangodb.DbName;
-import com.arangodb.entity.EdgeDefinition;
-import com.arangodb.entity.VertexEntity;
-import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.BeforeAll;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * @author Mark Vollmary
- */
-abstract class BaseGraphTest {
-
- private static final DbName TEST_DB = DbName.of("java_driver_graph_test_db");
- private static final String GRAPH_NAME = "traversalGraph";
- private static final String EDGE_COLLECTION_NAME = "edges";
- private static final String VERTEX_COLLECTION_NAME = "circles";
- static ArangoDatabase db;
- private static ArangoDB arangoDB;
-
- @BeforeAll
- static void init() {
- if (arangoDB == null) {
- arangoDB = new ArangoDB.Builder().build();
- }
- if (arangoDB.db(TEST_DB).exists())
- arangoDB.db(TEST_DB).drop();
- arangoDB.createDatabase(TEST_DB);
- BaseGraphTest.db = arangoDB.db(TEST_DB);
-
- final Collection edgeDefinitions = new ArrayList<>();
- final EdgeDefinition edgeDefinition = new EdgeDefinition().collection(EDGE_COLLECTION_NAME)
- .from(VERTEX_COLLECTION_NAME).to(VERTEX_COLLECTION_NAME);
- edgeDefinitions.add(edgeDefinition);
- if (!db.graph(GRAPH_NAME).exists())
- db.createGraph(GRAPH_NAME, edgeDefinitions, null);
- addExampleElements();
- }
-
- @AfterAll
- static void shutdown() {
- arangoDB.db(TEST_DB).drop();
- arangoDB.shutdown();
- arangoDB = null;
- }
-
- private static void addExampleElements() throws ArangoDBException {
-
- // Add circle circles
- final VertexEntity vA = createVertex(new Circle("A", "1"));
- final VertexEntity vB = createVertex(new Circle("B", "2"));
- final VertexEntity vC = createVertex(new Circle("C", "3"));
- final VertexEntity vD = createVertex(new Circle("D", "4"));
- final VertexEntity vE = createVertex(new Circle("E", "5"));
- final VertexEntity vF = createVertex(new Circle("F", "6"));
- final VertexEntity vG = createVertex(new Circle("G", "7"));
- final VertexEntity vH = createVertex(new Circle("H", "8"));
- final VertexEntity vI = createVertex(new Circle("I", "9"));
- final VertexEntity vJ = createVertex(new Circle("J", "10"));
- final VertexEntity vK = createVertex(new Circle("K", "11"));
-
- // Add relevant edges - left branch:
- saveEdge(new CircleEdge(vA.getId(), vB.getId(), false, true, "left_bar"));
- saveEdge(new CircleEdge(vB.getId(), vC.getId(), false, true, "left_blarg"));
- saveEdge(new CircleEdge(vC.getId(), vD.getId(), false, true, "left_blorg"));
- saveEdge(new CircleEdge(vB.getId(), vE.getId(), false, true, "left_blub"));
- saveEdge(new CircleEdge(vE.getId(), vF.getId(), false, true, "left_schubi"));
-
- // Add relevant edges - right branch:
- saveEdge(new CircleEdge(vA.getId(), vG.getId(), false, true, "right_foo"));
- saveEdge(new CircleEdge(vG.getId(), vH.getId(), false, true, "right_blob"));
- saveEdge(new CircleEdge(vH.getId(), vI.getId(), false, true, "right_blub"));
- saveEdge(new CircleEdge(vG.getId(), vJ.getId(), false, true, "right_zip"));
- saveEdge(new CircleEdge(vJ.getId(), vK.getId(), false, true, "right_zup"));
- }
-
- private static void saveEdge(final CircleEdge edge) throws ArangoDBException {
- db.graph(GRAPH_NAME).edgeCollection(EDGE_COLLECTION_NAME).insertEdge(edge);
- }
-
- private static VertexEntity createVertex(final Circle vertex) throws ArangoDBException {
- return db.graph(GRAPH_NAME).vertexCollection(VERTEX_COLLECTION_NAME).insertVertex(vertex);
- }
-
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.example.graph;
+
+import com.arangodb.ArangoDB;
+import com.arangodb.ArangoDBException;
+import com.arangodb.ArangoDatabase;
+import com.arangodb.DbName;
+import com.arangodb.entity.EdgeDefinition;
+import com.arangodb.entity.VertexEntity;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * @author Mark Vollmary
+ */
+abstract class BaseGraphTest {
+
+ private static final DbName TEST_DB = DbName.of("java_driver_graph_test_db");
+ private static final String GRAPH_NAME = "traversalGraph";
+ private static final String EDGE_COLLECTION_NAME = "edges";
+ private static final String VERTEX_COLLECTION_NAME = "circles";
+ static ArangoDatabase db;
+ private static ArangoDB arangoDB;
+
+ @BeforeAll
+ static void init() {
+ if (arangoDB == null) {
+ arangoDB = new ArangoDB.Builder().build();
+ }
+ if (arangoDB.db(TEST_DB).exists())
+ arangoDB.db(TEST_DB).drop();
+ arangoDB.createDatabase(TEST_DB);
+ BaseGraphTest.db = arangoDB.db(TEST_DB);
+
+ final Collection edgeDefinitions = new ArrayList<>();
+ final EdgeDefinition edgeDefinition = new EdgeDefinition().collection(EDGE_COLLECTION_NAME)
+ .from(VERTEX_COLLECTION_NAME).to(VERTEX_COLLECTION_NAME);
+ edgeDefinitions.add(edgeDefinition);
+ if (!db.graph(GRAPH_NAME).exists())
+ db.createGraph(GRAPH_NAME, edgeDefinitions, null);
+ addExampleElements();
+ }
+
+ @AfterAll
+ static void shutdown() {
+ arangoDB.db(TEST_DB).drop();
+ arangoDB.shutdown();
+ arangoDB = null;
+ }
+
+ private static void addExampleElements() throws ArangoDBException {
+
+ // Add circle circles
+ final VertexEntity vA = createVertex(new Circle("A", "1"));
+ final VertexEntity vB = createVertex(new Circle("B", "2"));
+ final VertexEntity vC = createVertex(new Circle("C", "3"));
+ final VertexEntity vD = createVertex(new Circle("D", "4"));
+ final VertexEntity vE = createVertex(new Circle("E", "5"));
+ final VertexEntity vF = createVertex(new Circle("F", "6"));
+ final VertexEntity vG = createVertex(new Circle("G", "7"));
+ final VertexEntity vH = createVertex(new Circle("H", "8"));
+ final VertexEntity vI = createVertex(new Circle("I", "9"));
+ final VertexEntity vJ = createVertex(new Circle("J", "10"));
+ final VertexEntity vK = createVertex(new Circle("K", "11"));
+
+ // Add relevant edges - left branch:
+ saveEdge(new CircleEdge(vA.getId(), vB.getId(), false, true, "left_bar"));
+ saveEdge(new CircleEdge(vB.getId(), vC.getId(), false, true, "left_blarg"));
+ saveEdge(new CircleEdge(vC.getId(), vD.getId(), false, true, "left_blorg"));
+ saveEdge(new CircleEdge(vB.getId(), vE.getId(), false, true, "left_blub"));
+ saveEdge(new CircleEdge(vE.getId(), vF.getId(), false, true, "left_schubi"));
+
+ // Add relevant edges - right branch:
+ saveEdge(new CircleEdge(vA.getId(), vG.getId(), false, true, "right_foo"));
+ saveEdge(new CircleEdge(vG.getId(), vH.getId(), false, true, "right_blob"));
+ saveEdge(new CircleEdge(vH.getId(), vI.getId(), false, true, "right_blub"));
+ saveEdge(new CircleEdge(vG.getId(), vJ.getId(), false, true, "right_zip"));
+ saveEdge(new CircleEdge(vJ.getId(), vK.getId(), false, true, "right_zup"));
+ }
+
+ private static void saveEdge(final CircleEdge edge) throws ArangoDBException {
+ db.graph(GRAPH_NAME).edgeCollection(EDGE_COLLECTION_NAME).insertEdge(edge);
+ }
+
+ private static VertexEntity createVertex(final Circle vertex) throws ArangoDBException {
+ return db.graph(GRAPH_NAME).vertexCollection(VERTEX_COLLECTION_NAME).insertVertex(vertex);
+ }
+
+}
diff --git a/src/test/java/com/arangodb/example/graph/Circle.java b/driver/src/test/java/com/arangodb/example/graph/Circle.java
similarity index 100%
rename from src/test/java/com/arangodb/example/graph/Circle.java
rename to driver/src/test/java/com/arangodb/example/graph/Circle.java
diff --git a/src/test/java/com/arangodb/example/graph/CircleEdge.java b/driver/src/test/java/com/arangodb/example/graph/CircleEdge.java
similarity index 100%
rename from src/test/java/com/arangodb/example/graph/CircleEdge.java
rename to driver/src/test/java/com/arangodb/example/graph/CircleEdge.java
diff --git a/src/test/java/com/arangodb/example/graph/GraphTraversalsInAQLExampleTest.java b/driver/src/test/java/com/arangodb/example/graph/GraphTraversalsInAQLExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/example/graph/GraphTraversalsInAQLExampleTest.java
rename to driver/src/test/java/com/arangodb/example/graph/GraphTraversalsInAQLExampleTest.java
diff --git a/src/test/java/com/arangodb/example/graph/ShortestPathInAQLExampleTest.java b/driver/src/test/java/com/arangodb/example/graph/ShortestPathInAQLExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/example/graph/ShortestPathInAQLExampleTest.java
rename to driver/src/test/java/com/arangodb/example/graph/ShortestPathInAQLExampleTest.java
diff --git a/src/test/java/com/arangodb/example/ssl/SslExampleTest.java b/driver/src/test/java/com/arangodb/example/ssl/SslExampleTest.java
similarity index 100%
rename from src/test/java/com/arangodb/example/ssl/SslExampleTest.java
rename to driver/src/test/java/com/arangodb/example/ssl/SslExampleTest.java
diff --git a/src/test/java/com/arangodb/internal/HostHandlerTest.java b/driver/src/test/java/com/arangodb/internal/HostHandlerTest.java
similarity index 100%
rename from src/test/java/com/arangodb/internal/HostHandlerTest.java
rename to driver/src/test/java/com/arangodb/internal/HostHandlerTest.java
diff --git a/src/test/java/com/arangodb/internal/QueueTimeMetricsImplTest.java b/driver/src/test/java/com/arangodb/internal/QueueTimeMetricsImplTest.java
similarity index 100%
rename from src/test/java/com/arangodb/internal/QueueTimeMetricsImplTest.java
rename to driver/src/test/java/com/arangodb/internal/QueueTimeMetricsImplTest.java
diff --git a/src/test/java/com/arangodb/internal/velocystream/CommunicationTest.java b/driver/src/test/java/com/arangodb/internal/velocystream/CommunicationTest.java
similarity index 97%
rename from src/test/java/com/arangodb/internal/velocystream/CommunicationTest.java
rename to driver/src/test/java/com/arangodb/internal/velocystream/CommunicationTest.java
index c9034cf9c..d08c1e4b0 100644
--- a/src/test/java/com/arangodb/internal/velocystream/CommunicationTest.java
+++ b/driver/src/test/java/com/arangodb/internal/velocystream/CommunicationTest.java
@@ -1,111 +1,111 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.internal.velocystream;
-
-import com.arangodb.ArangoDB;
-import com.arangodb.ArangoDatabase;
-import com.arangodb.entity.ArangoDBVersion;
-import org.junit.jupiter.api.Test;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-/**
- * @author Mark Vollmary
- */
-class CommunicationTest {
-
- private static final String FAST = "fast";
- private static final String SLOW = "slow";
-
- @Test
- void chunkSizeSmall() {
- final ArangoDB arangoDB = new ArangoDB.Builder().chunksize(20).build();
- final ArangoDBVersion version = arangoDB.getVersion();
- assertThat(version).isNotNull();
- }
-
- @Test
- void multiThread() throws Exception {
- final ArangoDB arangoDB = new ArangoDB.Builder().build();
- arangoDB.getUsers(); // authentication and active-failover connection redirect to master
-
- final Collection result = new ConcurrentLinkedQueue<>();
- final Thread fast = new Thread(() -> {
- arangoDB.db().query("return sleep(0.1)", null, null, null);
- result.add(FAST);
- });
- final Thread slow = new Thread(() -> {
- arangoDB.db().query("return sleep(0.5)", null, null, null);
- result.add(SLOW);
- });
- slow.start();
- fast.start();
-
- slow.join();
- fast.join();
-
- assertThat(result.size()).isEqualTo(2);
- final Iterator iterator = result.iterator();
- assertThat(iterator.next()).isEqualTo(FAST);
- assertThat(iterator.next()).isEqualTo(SLOW);
- }
-
- @Test
- void multiThreadSameDatabases() throws Exception {
- final ArangoDB arangoDB = new ArangoDB.Builder().build();
- arangoDB.getUsers(); // authentication and active-failover connection redirect to master
-
- final ArangoDatabase db = arangoDB.db();
-
- final Collection result = new ConcurrentLinkedQueue<>();
- final Thread t1 = new Thread(() -> {
- db.query("return sleep(0.1)", null, null, null);
- result.add("1");
- });
- final Thread t2 = new Thread(() -> {
- db.query("return sleep(0.1)", null, null, null);
- result.add("1");
- });
- t2.start();
- t1.start();
- t2.join();
- t1.join();
- assertThat(result.size()).isEqualTo(2);
- }
-
- @Test
- void minOneConnection() {
- final ArangoDB arangoDB = new ArangoDB.Builder().maxConnections(0).build();
- final ArangoDBVersion version = arangoDB.getVersion();
- assertThat(version).isNotNull();
- }
-
- @Test
- void defaultMaxConnection() {
- final ArangoDB arangoDB = new ArangoDB.Builder().maxConnections(null).build();
- final ArangoDBVersion version = arangoDB.getVersion();
- assertThat(version).isNotNull();
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.internal.velocystream;
+
+import com.arangodb.ArangoDB;
+import com.arangodb.ArangoDatabase;
+import com.arangodb.entity.ArangoDBVersion;
+import org.junit.jupiter.api.Test;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * @author Mark Vollmary
+ */
+class CommunicationTest {
+
+ private static final String FAST = "fast";
+ private static final String SLOW = "slow";
+
+ @Test
+ void chunkSizeSmall() {
+ final ArangoDB arangoDB = new ArangoDB.Builder().chunksize(20).build();
+ final ArangoDBVersion version = arangoDB.getVersion();
+ assertThat(version).isNotNull();
+ }
+
+ @Test
+ void multiThread() throws Exception {
+ final ArangoDB arangoDB = new ArangoDB.Builder().build();
+ arangoDB.getUsers(); // authentication and active-failover connection redirect to master
+
+ final Collection result = new ConcurrentLinkedQueue<>();
+ final Thread fast = new Thread(() -> {
+ arangoDB.db().query("return sleep(0.1)", null, null, null);
+ result.add(FAST);
+ });
+ final Thread slow = new Thread(() -> {
+ arangoDB.db().query("return sleep(0.5)", null, null, null);
+ result.add(SLOW);
+ });
+ slow.start();
+ fast.start();
+
+ slow.join();
+ fast.join();
+
+ assertThat(result.size()).isEqualTo(2);
+ final Iterator iterator = result.iterator();
+ assertThat(iterator.next()).isEqualTo(FAST);
+ assertThat(iterator.next()).isEqualTo(SLOW);
+ }
+
+ @Test
+ void multiThreadSameDatabases() throws Exception {
+ final ArangoDB arangoDB = new ArangoDB.Builder().build();
+ arangoDB.getUsers(); // authentication and active-failover connection redirect to master
+
+ final ArangoDatabase db = arangoDB.db();
+
+ final Collection result = new ConcurrentLinkedQueue<>();
+ final Thread t1 = new Thread(() -> {
+ db.query("return sleep(0.1)", null, null, null);
+ result.add("1");
+ });
+ final Thread t2 = new Thread(() -> {
+ db.query("return sleep(0.1)", null, null, null);
+ result.add("1");
+ });
+ t2.start();
+ t1.start();
+ t2.join();
+ t1.join();
+ assertThat(result.size()).isEqualTo(2);
+ }
+
+ @Test
+ void minOneConnection() {
+ final ArangoDB arangoDB = new ArangoDB.Builder().maxConnections(0).build();
+ final ArangoDBVersion version = arangoDB.getVersion();
+ assertThat(version).isNotNull();
+ }
+
+ @Test
+ void defaultMaxConnection() {
+ final ArangoDB arangoDB = new ArangoDB.Builder().maxConnections(null).build();
+ final ArangoDBVersion version = arangoDB.getVersion();
+ assertThat(version).isNotNull();
+ }
+}
diff --git a/src/test/java/com/arangodb/mapping/annotations/AnnotatedEntity.java b/driver/src/test/java/com/arangodb/mapping/annotations/AnnotatedEntity.java
similarity index 100%
rename from src/test/java/com/arangodb/mapping/annotations/AnnotatedEntity.java
rename to driver/src/test/java/com/arangodb/mapping/annotations/AnnotatedEntity.java
diff --git a/src/test/java/com/arangodb/mapping/annotations/ArangoAnnotationsTest.java b/driver/src/test/java/com/arangodb/mapping/annotations/ArangoAnnotationsTest.java
similarity index 100%
rename from src/test/java/com/arangodb/mapping/annotations/ArangoAnnotationsTest.java
rename to driver/src/test/java/com/arangodb/mapping/annotations/ArangoAnnotationsTest.java
diff --git a/src/test/java/com/arangodb/serde/CustomSerdeTest.java b/driver/src/test/java/com/arangodb/serde/CustomSerdeTest.java
similarity index 100%
rename from src/test/java/com/arangodb/serde/CustomSerdeTest.java
rename to driver/src/test/java/com/arangodb/serde/CustomSerdeTest.java
diff --git a/src/test/java/com/arangodb/serde/CustomTypeHintTest.java b/driver/src/test/java/com/arangodb/serde/CustomTypeHintTest.java
similarity index 100%
rename from src/test/java/com/arangodb/serde/CustomTypeHintTest.java
rename to driver/src/test/java/com/arangodb/serde/CustomTypeHintTest.java
diff --git a/src/test/java/com/arangodb/serde/JsonbSerde.java b/driver/src/test/java/com/arangodb/serde/JsonbSerde.java
similarity index 100%
rename from src/test/java/com/arangodb/serde/JsonbSerde.java
rename to driver/src/test/java/com/arangodb/serde/JsonbSerde.java
diff --git a/src/test/java/com/arangodb/serde/JsonbSerdeImpl.java b/driver/src/test/java/com/arangodb/serde/JsonbSerdeImpl.java
similarity index 100%
rename from src/test/java/com/arangodb/serde/JsonbSerdeImpl.java
rename to driver/src/test/java/com/arangodb/serde/JsonbSerdeImpl.java
diff --git a/src/test/java/com/arangodb/serde/SerdeTest.java b/driver/src/test/java/com/arangodb/serde/SerdeTest.java
similarity index 100%
rename from src/test/java/com/arangodb/serde/SerdeTest.java
rename to driver/src/test/java/com/arangodb/serde/SerdeTest.java
diff --git a/src/test/java/com/arangodb/util/MapBuilder.java b/driver/src/test/java/com/arangodb/util/MapBuilder.java
similarity index 100%
rename from src/test/java/com/arangodb/util/MapBuilder.java
rename to driver/src/test/java/com/arangodb/util/MapBuilder.java
diff --git a/src/test/java/com/arangodb/util/MapBuilderTest.java b/driver/src/test/java/com/arangodb/util/MapBuilderTest.java
similarity index 96%
rename from src/test/java/com/arangodb/util/MapBuilderTest.java
rename to driver/src/test/java/com/arangodb/util/MapBuilderTest.java
index 53633d646..0496a685a 100644
--- a/src/test/java/com/arangodb/util/MapBuilderTest.java
+++ b/driver/src/test/java/com/arangodb/util/MapBuilderTest.java
@@ -1,43 +1,43 @@
-/*
- * DISCLAIMER
- *
- * Copyright 2016 ArangoDB GmbH, Cologne, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Copyright holder is ArangoDB GmbH, Cologne, Germany
- */
-
-package com.arangodb.util;
-
-
-import org.junit.jupiter.api.Test;
-
-import java.util.Map;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-
-/**
- * @author Mark Vollmary
- */
-class MapBuilderTest {
-
- @Test
- void build() {
- final Map map = new MapBuilder().put("foo", "bar").get();
- assertThat(map).hasSize(1);
- assertThat(map.get("foo")).isNotNull();
- assertThat(map).containsEntry("foo", "bar");
- }
-}
+/*
+ * DISCLAIMER
+ *
+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
+ */
+
+package com.arangodb.util;
+
+
+import org.junit.jupiter.api.Test;
+
+import java.util.Map;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+
+/**
+ * @author Mark Vollmary
+ */
+class MapBuilderTest {
+
+ @Test
+ void build() {
+ final Map map = new MapBuilder().put("foo", "bar").get();
+ assertThat(map).hasSize(1);
+ assertThat(map.get("foo")).isNotNull();
+ assertThat(map).containsEntry("foo", "bar");
+ }
+}
diff --git a/src/test/java/com/arangodb/util/TestUtils.java b/driver/src/test/java/com/arangodb/util/TestUtils.java
similarity index 100%
rename from src/test/java/com/arangodb/util/TestUtils.java
rename to driver/src/test/java/com/arangodb/util/TestUtils.java
diff --git a/src/test/java/com/arangodb/util/UnicodeUtilsTest.java b/driver/src/test/java/com/arangodb/util/UnicodeUtilsTest.java
similarity index 100%
rename from src/test/java/com/arangodb/util/UnicodeUtilsTest.java
rename to driver/src/test/java/com/arangodb/util/UnicodeUtilsTest.java
diff --git a/src/test/java/helper/NativeImageHelper.java b/driver/src/test/java/helper/NativeImageHelper.java
similarity index 100%
rename from src/test/java/helper/NativeImageHelper.java
rename to driver/src/test/java/helper/NativeImageHelper.java
diff --git a/src/test/java/perf/Benchmark.java b/driver/src/test/java/perf/Benchmark.java
similarity index 100%
rename from src/test/java/perf/Benchmark.java
rename to driver/src/test/java/perf/Benchmark.java
diff --git a/src/test/java/perf/SimpleSyncPerfTest.java b/driver/src/test/java/perf/SimpleSyncPerfTest.java
similarity index 100%
rename from src/test/java/perf/SimpleSyncPerfTest.java
rename to driver/src/test/java/perf/SimpleSyncPerfTest.java
diff --git a/src/test/java/perf/SyncBenchmarkTest.java b/driver/src/test/java/perf/SyncBenchmarkTest.java
similarity index 100%
rename from src/test/java/perf/SyncBenchmarkTest.java
rename to driver/src/test/java/perf/SyncBenchmarkTest.java
diff --git a/src/test/resources/META-INF/native-image/native-image.properties b/driver/src/test/resources/META-INF/native-image/native-image.properties
similarity index 100%
rename from src/test/resources/META-INF/native-image/native-image.properties
rename to driver/src/test/resources/META-INF/native-image/native-image.properties
diff --git a/src/test/resources/META-INF/native-image/reflect-config.json b/driver/src/test/resources/META-INF/native-image/reflect-config.json
similarity index 100%
rename from src/test/resources/META-INF/native-image/reflect-config.json
rename to driver/src/test/resources/META-INF/native-image/reflect-config.json
diff --git a/src/test/resources/META-INF/native-image/resource-config.json b/driver/src/test/resources/META-INF/native-image/resource-config.json
similarity index 100%
rename from src/test/resources/META-INF/native-image/resource-config.json
rename to driver/src/test/resources/META-INF/native-image/resource-config.json
diff --git a/src/test/resources/META-INF/native-image/serialization-config.json b/driver/src/test/resources/META-INF/native-image/serialization-config.json
similarity index 100%
rename from src/test/resources/META-INF/native-image/serialization-config.json
rename to driver/src/test/resources/META-INF/native-image/serialization-config.json
diff --git a/src/test/resources/arangodb-bad.properties b/driver/src/test/resources/arangodb-bad.properties
similarity index 100%
rename from src/test/resources/arangodb-bad.properties
rename to driver/src/test/resources/arangodb-bad.properties
diff --git a/src/test/resources/arangodb.properties b/driver/src/test/resources/arangodb.properties
similarity index 100%
rename from src/test/resources/arangodb.properties
rename to driver/src/test/resources/arangodb.properties
diff --git a/src/test/resources/example.truststore b/driver/src/test/resources/example.truststore
similarity index 100%
rename from src/test/resources/example.truststore
rename to driver/src/test/resources/example.truststore
diff --git a/src/test/resources/logback-test.xml b/driver/src/test/resources/logback-test.xml
similarity index 100%
rename from src/test/resources/logback-test.xml
rename to driver/src/test/resources/logback-test.xml
diff --git a/formatter.xml b/formatter.xml
deleted file mode 100644
index 0485cd4ba..000000000
--- a/formatter.xml
+++ /dev/null
@@ -1,419 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index 3cb091dab..16ae8611b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,14 +4,15 @@
4.0.0com.arangodb
- arangodb-java-driver
+ arangodb-java-driver-parent7.0.0-SNAPSHOT2016
- jar
+
+ driver
+
+ pom
- arangodb-java-driver
- ArangoDB Java Driver
- http://maven.apache.org
+ arangodb-java-driver-parent
@@ -23,10 +24,6 @@
UTF-8
- 2.13.3
- arangodb-1
- https://sonarcloud.io
- false
@@ -41,86 +38,6 @@
-
-
- ossrh
- https://oss.sonatype.org/content/repositories/snapshots
-
-
- ossrh
- https://oss.sonatype.org/service/local/staging/deploy/maven2/
-
-
-
-
-
- doclint-java8-disable
-
- [1.8,)
-
-
- none
-
-
-
- no-graalvm
-
- 1.8
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- com/arangodb/util/UnicodeUtilsTest.java
-
-
-
-
-
-
-
- native
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 3.0.0-M5
-
-
- org.graalvm.buildtools
- native-maven-plugin
- 0.9.16
- true
-
-
- test-native
-
- generateTestResourceConfig
- test
-
- test
-
-
-
- true
- false
-
- --no-fallback
-
-
- ${SslTest}
-
-
-
-
-
-
-
-
@@ -144,297 +61,9 @@
-
- org.sonatype.plugins
- nexus-staging-maven-plugin
- 1.6.13
- true
-
- ossrh
- https://oss.sonatype.org/
- 84aff6e87e214c
- false
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.10.1
-
-
- -Xlint:unchecked
- -Xlint:deprecation
-
- true
- 1.8
- 1.8
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 3.3.0
-
- UTF-8
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 3.2.1
-
-
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 3.4.0
-
-
- attach-javadocs
-
- jar
-
-
- com.arangodb.internal
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 3.0.0-M7
-
-
- **/*Test.java
- **/*Example.java
-
-
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- 3.0.0
-
- 10
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- 3.0.1
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
- org.codehaus.mojo
- flatten-maven-plugin
- 1.2.7
-
- oss
-
-
-
-
- flatten
- process-resources
-
- flatten
-
-
-
-
- flatten.clean
- clean
-
- clean
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
- 0.8.8
-
-
-
- prepare-agent
-
-
-
- report
- prepare-package
-
- report
-
-
-
-
-
- com.github.spotbugs
- spotbugs-maven-plugin
- 4.7.1.1
-
- spotbugs/spotbugs-exclude.xml
-
-
-
- compile
-
- check
-
-
-
-
-
- com.github.spotbugs
- spotbugs
- 4.7.1
-
-
-
-
-
- org.slf4j
- slf4j-api
- 1.7.36
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
- com.fasterxml.jackson.core
- jackson-core
-
-
- com.fasterxml.jackson.core
- jackson-annotations
-
-
- io.vertx
- vertx-web-client
-
-
- com.arangodb
- jackson-dataformat-velocypack
- 3.0.1
- true
-
-
- jakarta.json.bind
- jakarta.json.bind-api
- 2.0.0
-
-
- com.google.code.findbugs
- jsr305
- 3.0.2
- provided
-
-
- ch.qos.logback
- logback-classic
- 1.2.11
- test
-
-
- org.junit.platform
- junit-platform-launcher
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- test
-
-
- org.junit.jupiter
- junit-jupiter-params
- test
-
-
- org.assertj
- assertj-core
- 3.23.1
- test
-
-
- org.reflections
- reflections
- 0.10.2
- test
-
-
- org.graalvm.sdk
- graal-sdk
- 22.2.0
- test
-
-
- org.eclipse
- yasson
- 2.0.4
- test
-
-
-
-
-
-
- com.fasterxml.jackson
- jackson-bom
- ${adb.jackson.version}
- import
- pom
-
-
- io.vertx
- vertx-stack-depchain
- 4.3.4
- pom
- import
-
-
- io.netty
- netty-bom
- 4.1.82.Final
- pom
- import
-
-
- org.junit
- junit-bom
- 5.9.1
- pom
- import
-
-
-
-
-
- https://github.com/arangodb/arangodb-java-driver
- scm:git:git://github.com/arangodb/arangodb-java-driver.git
- scm:git:git://github.com/arangodb/arangodb-java-driver.git
-
-
ArangoDB GmbHhttps://www.arangodb.com