Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Neo4j Graphs in java

 
ashwini hirlekar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic