Re: [Neo4j] API change proposal on Node

2014-03-06 Thread Michael Hunger
You're welcome :) And the docs are really good as well. Feel free to blog about your experiences. Cheers Michael Am 06.03.2014 um 11:47 schrieb AL Wad : > Thank you Michael, > > I shall refrain myself on "instinct programming" and read the docs. > > -- > You received this message because y

Re: [Neo4j] API change proposal on Node

2014-03-06 Thread AL Wad
Thank you Michael, I shall refrain myself on "instinct programming" and read the docs. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.c

Re: [Neo4j] API change proposal on Node

2014-03-05 Thread Michael Hunger
You can also do node.getProperty("name",default) e.g. node.getProperty("name",null) or node.getProperty("name","") to get the default value back instead of an exception. Am 04.03.2014 um 16:39 schrieb AL Wad : > Thank you Chris, > > > So every set should be like > if (node.hasProperty("p

Re: [Neo4j] API change proposal on Node

2014-03-04 Thread AL Wad
> > Thank you Chris, > So every set should be like if (node.hasProperty("propLabel") && node.getProperty("propLabel").equals("propValueToCheck") ) node.setProperty("propLabel", "whatever"); Verbous but no try/catch. I'll take that although checking for null is more java Thank you

Re: [Neo4j] API change proposal on Node

2014-03-04 Thread Chris Vest
You can test for the existence of a property on a Node or Relationship with the hasProperty(key) method. It is defined by the PropertyContainer interface. -- Chris Vest System Engineer, Neo Technology [ skype: mr.chrisvest, twitter: chvest ] On 04 Mar 2014, at 12:50, AL Wad wrote: > Hello, >

[Neo4j] API change proposal on Node

2014-03-04 Thread AL Wad
Hello, I'm new to Neo && presume the post fits better here than on SO && feeling courageous. I wrote an app to update my graph via the REST API (using org.neo4j.rest.graphdb.RestGraphDatabase). My use case is getting nodes I previously created to set a property which is absent (or not). 1/