BatchInserter db = null;
BufferedReader reader = null;
DateFormat df = new SimpleDateFormat("yyyy/MM/dd");
Date today = new Date();
try {
File graphDb = new File("data/graph.db");
if (graphDb.exists()) {
FileUtils.deleteRecursively(graphDb);
}
long nodes = 0;
Map<String, String> config = new HashMap<String, String>();
db = BatchInserters.inserter(dbpath);
reader = new BufferedReader(new FileReader(new File(nodeFile)));
System.out.println("Loading nodes..");
reader.readLine();
String line = null;
while ((line = reader.readLine()) != null) {
String[] lineData = line.split(",");
Map<String, Object> prop = new HashMap<String, Object>(10);
prop.put("Name", lineData[0]);
prop.put("Type", lineData[1]);
prop.put("DateCreated", today.getTime());
createNode(lineData[0], db, prop);
nodes++;
}
System.out.println("Total nodes: "+nodes);
reader.close();
It executes successfully, but when I try to look at the database from the web interface, I don't see anything there. I also tried prepending 'server' to the directory, with no luck.