Examples of RestNode


Examples of org.neo4j.rest.graphdb.entity.RestNode

        final Map<?, ?> endData = (Map<?, ?>) path.get("end");
        final Integer length = (Integer) path.get("length");

        RestRelationship lastRelationship = lastRelationshipData == null ? null : new RestRelationship(lastRelationshipData, restApi);
        return new SimplePath(
                new RestNode(startData,restApi),
                new RestNode(endData,restApi),
                lastRelationship,
                length,
                new IterableWrapper<Node, Map<?,?>>(nodesData) {
                    @Override
                    protected Node underlyingObjectToObject(Map<?, ?> data) {
                        return new RestNode(data,restApi);
                    }
                },
                new IterableWrapper<Relationship, Map<?,?>>(relationshipsData) {
                    @Override
                    protected Relationship underlyingObjectToObject(Map<?, ?> data) {
View Full Code Here

Examples of org.neo4j.rest.graphdb.entity.RestNode

        final String startData = (String) path.get("start");
        final String endData = (String) path.get("end");
        final Integer length = (Integer) path.get("length");
        RestRelationship lastRelationship = lastRelationshipData == null ? null : new RestRelationship(lastRelationshipData, restApi);
        return new SimplePath(
                new RestNode(startData,restApi),
                new RestNode(endData,restApi),
                lastRelationship,
                length,
                new IterableWrapper<Node, String>(nodesData) {
                    @Override
                    protected Node underlyingObjectToObject(String data) {
                        return new RestNode(data,restApi);
                    }
                },
                new IterableWrapper<Relationship, String>(relationshipsData) {
                    @Override
                    protected Relationship underlyingObjectToObject(String data) {
View Full Code Here

Examples of org.neo4j.rest.graphdb.entity.RestNode

    public RestNode getNodeById(long id) {
        RestOperations.RestOperation nodeRequest = restRequest.get("node/" + id);
        RestOperations.RestOperation labelsRequest = restRequest.get("node/" + id+"/labels");
        try {
            Map<Long, Object> results = executeBatchRequest();
            RestNode node = (RestNode) results.get(nodeRequest.getBatchId());
            List<String> labels = (List<String>) results.get(labelsRequest.getBatchId());
            node.setLabels(labels);
            return node;
        } catch(RestResultException rre) {
            if (rre.getMessage().contains("NodeNotFoundException")) throw new NotFoundException("Node not found: "+id);
            else throw rre;
        }
View Full Code Here

Examples of org.springframework.data.neo4j.rest.RestNode

        return Node.class;
    }

    protected Node createEntity( Map<?, ?> item )
    {
        return new RestNode( (Map<?, ?>)item, restGraphDatabase );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.