Package org.neo4j.neoclipse.editor

Examples of org.neo4j.neoclipse.editor.NodeWrapper


                        Object obj = null;
                        if ( objectNode instanceof Node )
                        {
                            Node node = (Node) objectNode;
                            NodeWrapper oMap = ApplicationUtil.extractToNodeWrapper( node, true );
                            obj = oMap;
                        }
                        else
                        {
                            obj = objectNode;
View Full Code Here


            {
                final LinkedList<NodeWrapper> list = new LinkedList<NodeWrapper>();
                Iterable<Node> iterable =  graphDb.getAllNodes();
                for ( Node node : iterable )
                {
                    NodeWrapper nodeWrapper = ApplicationUtil.extractToNodeWrapper( node, true );
                    list.add( nodeWrapper );
                }
                return list;
            }
View Full Code Here

    }

    public static NodeWrapper extractToNodeWrapper( Node node, boolean includeRelation )
    {

        NodeWrapper nodeWrapper = new NodeWrapper( node.getId() );
       
        Map<String, Object> oMap = extractToMapFromProperties( node );
        nodeWrapper.setPropertyMap( oMap );
        if ( node.hasRelationship() && includeRelation )
        {
            for ( Relationship relationship : node.getRelationships( Direction.OUTGOING ) )
            {
                RelationshipWrapper rw = new RelationshipWrapper( relationship.getId() );
                relationship.getType().name();
                rw.setEndNodeId( relationship.getEndNode().getId()  );
                rw.setPropertyMap( extractToMapFromProperties( relationship ) );
                rw.setRelationshipType( relationship.getType().name() );
                nodeWrapper.addRelation( rw );
            }
        }
       
        return nodeWrapper;
    }
View Full Code Here

TOP

Related Classes of org.neo4j.neoclipse.editor.NodeWrapper

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.