Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.Node.removeProperty()


    public void remove() {
        this.graph.tx().readWrite();
        if (this.element instanceof VertexProperty) {
            final Node node = ((Neo4jVertexProperty) this.element).getBaseVertex();
            if (null != node && node.hasProperty(this.key)) {
                node.removeProperty(this.key);
            }
        } else {
            final PropertyContainer propertyContainer = ((Neo4jElement) this.element).getBaseElement();
            if (propertyContainer.hasProperty(this.key)) {
                propertyContainer.removeProperty(this.key);
View Full Code Here


    @Transactional
    @Path(UrlReverseLookerUpper.PATH_NODE_PROPERTY)
    public void deleteNodeProperty(Invocation invocation, Output result)
    {
        Node node = invocation.getDB().getNodeById(getNodeId(invocation));
        node.removeProperty(invocation.getStringParameter(UrlReverseLookerUpper.PROPERTY_KEY_NAME));
        result.ok();
    }

    @DELETE
    @Transactional
View Full Code Here

    @Test
    public void testRemoveProperty() {
        Node node = restGraphDatabase.getReferenceNode();
        node.setProperty( "name", "test" );
        Assert.assertEquals( "test", node.getProperty( "name" ) );
        node.removeProperty( "name" );
        Assert.assertEquals( false, node.hasProperty( "name" ) );
    }


    @Test
View Full Code Here

              }

              if (dbNode.hasProperty(oldKey)) {

                dbNode.setProperty(newKey, dbNode.getProperty(oldKey));
                dbNode.removeProperty(oldKey);

              }

              node.updateInIndex();
View Full Code Here

                throw new IllegalArgumentException("Unknown geometry type: " + geometryType);
            }
           
            layerNode.setProperty(PROP_TYPE, geometryType);
        } else {
            layerNode.removeProperty(PROP_TYPE);
        }
    }
   
    public Integer getGeometryType() {
        Node layerNode = getLayerNode();
View Full Code Here

    @Test
    public void testRemoveProperty() {
        Node node = node();
        node.setProperty( "name", "test" );
        Assert.assertEquals( "test", node.getProperty( "name" ) );
        node.removeProperty( "name" );
        Assert.assertEquals( false, node.hasProperty( "name" ) );
    }


    @Test
View Full Code Here

    @Test
    public void testRemoveProperty() {
        Node node = createNode();
        node.setProperty( "name", "test" );
        assertEquals("test", node.getProperty("name"));
        node.removeProperty( "name" );
        assertEquals(false, node.hasProperty("name"));
    }

    @Test(expected = NotFoundException.class)
    public void testRemoveNode() {
View Full Code Here

    }

    public static Object removeVersionedProperty( Node node, String key )
    {
        Node newNode = copyPropsToNewNode( node );
        Object result = newNode.removeProperty( key );
        rotatePropertiesRelationships( node, newNode );
        return result;
    }

    public static void setVersion( PropertyContainer propertyContainer, Range range )
View Full Code Here

        Node node = getGraphDb().createNode();
        node.setProperty( key, new Integer( 1 ) );
        node.delete();
        try
        {
            node.removeProperty( key );
            Transaction tx = getTransaction();
            tx.success();
            tx.finish();
            fail( "Change property on deleted node should not validate" );
        }
View Full Code Here

        node.removeProperty( "test" );
        node.setProperty( "test", "test3" );
        assertEquals( "test3", node.getProperty( "test" ) );
        newTransaction();
        assertEquals( "test3", node.getProperty( "test" ) );
        node.removeProperty( "test" );
        node.setProperty( "test", "test4" );
        newTransaction();
        assertEquals( "test4", node.getProperty( "test" ) );
    }
   
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.