Package org.neo4j.rest.graphdb

Examples of org.neo4j.rest.graphdb.RestAPIImpl


      super(api);
        schemaIndexProvider = new SchemaIndexProvider(this);
    }

    public SpringCypherRestGraphDatabase(String uri) {
        this( new RestAPIImpl( uri ) );
    }
View Full Code Here


    public SpringCypherRestGraphDatabase(String uri) {
        this( new RestAPIImpl( uri ) );
    }

    public SpringCypherRestGraphDatabase(String uri, String user, String password) {
        this(new RestAPIImpl( uri, user, password ));
    }
View Full Code Here

      super(api);
        schemaIndexProvider = new SchemaIndexProvider(this);
    }

    public SpringRestGraphDatabase( String uri ) {
        this( new RestAPIImpl( uri ) );
    }
View Full Code Here

    public SpringRestGraphDatabase( String uri ) {
        this( new RestAPIImpl( uri ) );
    }

    public SpringRestGraphDatabase( String uri, String user, String password ) {
        this(new RestAPIImpl( uri, user, password ));
    }
View Full Code Here

    @Test(expected = NotFoundException.class)
    public void testRollback() throws Exception {
        CypherTransaction transaction = new CypherTransaction(SERVER_ROOT_URI, CypherTransaction.ResultType.row);
        CypherTransaction.Result result = transaction.send("CREATE (n {name:'John'}) RETURN id(n)", null);
        transaction.rollback();
        RestAPIImpl api = new RestAPIImpl(SERVER_ROOT_URI);
        api.getNodeById(((Number) result.getRows().iterator().next().get(0)).longValue(), RestAPIInternal.Load.ForceFromServer);
    }
View Full Code Here

    public static final String URI = "http://localhost:7470";

    @Test
    public void testParseZeroLength() throws Exception {
        String uri = "http://localhost:7470";
        RestAPI restApi = new RestAPIImpl(uri);
        Map<String,Object> node = MapUtil.map("data", Collections.EMPTY_MAP, "self", uri + "/db/data/node/0");
        Map<String, Object> pathData = MapUtil.map("start", node, "nodes",Collections.singletonList(node),"length", 0, "relationships", Collections.EMPTY_LIST, "end", node);
        System.out.println("pathData = " + pathData);
        Path path = RestPathParser.parse(pathData, restApi);
        assertEquals(0,path.length());
View Full Code Here

        assertEquals(0,path.startNode().getId());
        assertEquals(0,path.endNode().getId());
    }
    @Test
    public void testParsePath() throws Exception {
        RestAPI restApi = new RestAPIImpl(URI);
        Map<String,Object> node = node(0);
        Map<String,Object> node2 = node(1);
        Map<String,Object> relationship = relationship(1,0,1);
        Map<String, Object> pathData = MapUtil.map("start", node, "nodes", Arrays.asList(node, node2),"length", 1, "relationships", Collections.singletonList(relationship), "end", node2);
        System.out.println("pathData = " + pathData);
View Full Code Here

TOP

Related Classes of org.neo4j.rest.graphdb.RestAPIImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.