|
16 | 16 |
|
17 | 17 | package com.arangodb.example.graph;
|
18 | 18 |
|
19 |
| -import java.util.HashMap; |
20 | 19 | import java.util.Iterator;
|
21 |
| -import java.util.List; |
22 |
| -import java.util.Map; |
23 | 20 |
|
24 | 21 | import org.junit.After;
|
25 | 22 | import org.junit.Assert;
|
26 | 23 | import org.junit.Before;
|
27 | 24 | import org.junit.Test;
|
28 | 25 |
|
29 | 26 | import com.arangodb.ArangoException;
|
30 |
| -import com.arangodb.CursorResult; |
31 | 27 | import com.arangodb.Direction;
|
32 | 28 | import com.arangodb.EdgeCursor;
|
33 | 29 | import com.arangodb.VertexCursor;
|
@@ -177,40 +173,6 @@ public void graphAqlQuery() throws ArangoException {
|
177 | 173 | // no path found (distance = -1)
|
178 | 174 | Assert.assertEquals(new Long(-1), shortestPath.getDistance());
|
179 | 175 |
|
180 |
| - // |
181 |
| - printHeadline("get all vertex document handles by AQL query"); |
182 |
| - // |
183 |
| - |
184 |
| - String query = "for i in graph_vertices(@graphName , null, null) return i._id"; |
185 |
| - Map<String, Object> bindVars = new HashMap<String, Object>(); |
186 |
| - bindVars.put("graphName", GRAPH_NAME); |
187 |
| - |
188 |
| - final CursorResult<String> cursor = driver.executeAqlQuery(query, bindVars, null, String.class); |
189 |
| - Assert.assertNotNull(cursor); |
190 |
| - final List<String> list = cursor.asList(); |
191 |
| - count = 0; |
192 |
| - for (final String str : list) { |
193 |
| - System.out.printf("%d\t%20s%n", ++count, str); |
194 |
| - } |
195 |
| - Assert.assertEquals(6, list.size()); |
196 |
| - |
197 |
| - // |
198 |
| - printHeadline("get vertex documents by AQL query and filter"); |
199 |
| - // |
200 |
| - |
201 |
| - query = "for i in graph_vertices(@graphName , null, null) filter i.name != @name return i"; |
202 |
| - bindVars = new HashMap<String, Object>(); |
203 |
| - bindVars.put("graphName", GRAPH_NAME); |
204 |
| - bindVars.put("name", "Boris"); |
205 |
| - |
206 |
| - final CursorResult<Person> cursor2 = driver.executeAqlQuery(query, bindVars, null, Person.class); |
207 |
| - Assert.assertNotNull(cursor2); |
208 |
| - final List<Person> list2 = cursor2.asList(); |
209 |
| - count = 0; |
210 |
| - for (final Person person : list2) { |
211 |
| - System.out.printf("%d\t%20s\t%s%n", ++count, person.getDocumentHandle(), person.getName()); |
212 |
| - } |
213 |
| - Assert.assertEquals(5, list2.size()); |
214 | 176 | }
|
215 | 177 |
|
216 | 178 | private void printShortestPath(final ShortestPathEntity<Person, Knows> shortestPath) {
|
|
0 commit comments