Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.DynamicRelationshipType


    @Override
    public RelationshipMetadata createRelationMetadata(PropertyMethod propertyMethod) {
        Relation relation = propertyMethod.getAnnotationOfProperty(Relation.class);
        String name = relation != null ? relation.value() : StringUtils.capitalize(propertyMethod.getName());
        DynamicRelationshipType relationshipType = DynamicRelationshipType.withName(name);
        return new RelationshipMetadata(relationshipType);
    }
View Full Code Here


                        if (targetNode != null)
                        {
                            // Join this node (source node) to target node via
                            // relationship
                            DynamicRelationshipType relType = DynamicRelationshipType.withName(rh.getRelationName());
                            Relationship relationship = node.createRelationshipTo(targetNode, relType);

                            // Populate relationship's own properties into it
                            Object relationshipObj = rh.getRelationVia();
                            if (relationshipObj != null)
View Full Code Here

                                    /**
                                     * Join this node (source node) to target
                                     * node via relationship
                                     */
                                    // Relationship Type
                                    DynamicRelationshipType relType = DynamicRelationshipType.withName(rh
                                            .getRelationName());

                                    // Relationship Properties
                                    Map<String, Object> relationshipProperties = null;
                                    Object relationshipObj = rh.getRelationVia();
View Full Code Here

        readGraphDb.shutdown();
    }
   
    private DbRepresentation createSomeData()
    {
        DynamicRelationshipType type = withName( "KNOWS" );
        GraphDatabaseService db = new EmbeddedGraphDatabase( PATH );
        Transaction tx = db.beginTx();
        Node prevNode = db.getReferenceNode();
        for ( int i = 0; i < 100; i++ )
        {
View Full Code Here

            malena.setProperty( "title", "Malèna" );
            malena.setProperty( "year", 2000 );

            // START SNIPPET: createRelationships
            // we need a relationship type
            DynamicRelationshipType ACTS_IN = DynamicRelationshipType.withName( "ACTS_IN" );
            // create relationships
            Relationship role1 = reeves.createRelationshipTo( theMatrix, ACTS_IN );
            roles.add( role1, "name", "Neo" );
            Relationship role2 = reeves.createRelationshipTo( theMatrixReloaded, ACTS_IN );
            roles.add( role2, "name", "Neo" );
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.DynamicRelationshipType

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.