Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Creating Neo4j Graphs in java

 
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.
 
Rancher
Posts: 43011
76
  • 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?
 
grapes are vegan food pellets. Eat this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!