• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating Neo4j Graphs in java

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am creating unique neo4j nodes in java class based on column values in database. column value will be assigned to each node. Code is as follow:
public void createNode(String name) {
GraphDatabaseService graphDb = new EmbeddedGraphDatabase("D://NewGraph");
Transaction tx=graphDb.beginTx();
try{
Node nodeName;
nodeName.addLabel(DynamicLabel.label(name));
nodeName = graphDb.createNode();
nodeName.setProperty("name", nodeName);
tx.success();
}


i have already added neo4j.kernel-1.6.M01.jar but still i am getting an error "DynamicLabel cannot be resolved". please guide.
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know nothing about neo4j, but a quick check of the 1.6 javadocs shows that it does not contain such a class - it may have been added later. Why are you using such an old -and even pre-release!- version of neo4j?
 
reply
    Bookmark Topic Watch Topic
  • New Topic