Commits

Sara Magliacane committed 5dba40f

optimizing the order of operations to remove duplications

  • Participants
  • Parent commits 9f6b3b5

Comments (0)

Files changed (4)

src/nl/vu/recoprov/CompletePipeline.java

 		} else {
 			depGraph = client.getAllRevsOffline(new File(currentDir), depGraph);
 		}
+		System.out.println("Complete initialization of the DependencyGraph");
 
 		return depGraph;
 	}

src/nl/vu/recoprov/TikaReader.java

 		
 		// make content dir - where you store the contents of the files
 		File contentdir = new File(contentdirname);
-		contentdir.delete();
 		contentdir.mkdir();
 	}
 
 
 				parser.parse(tin, textHandler, metadata, context);
 
-				String contentFilename = contentdirname+filename;
-				FileWriter out = new FileWriter(new File(contentFilename));		
+				File contentFile = new File(contentdirname, filename);
+				String contentFilename = contentFile.getAbsolutePath();
+				FileWriter out = new FileWriter(contentFile);		
 				out.write(textHandler.toString());
 				out.close();
 				

src/nl/vu/recoprov/experiments/Experiment3.java

 		jsonfile = json.getAbsolutePath();
 		
 		PROVReader provreader = new PROVReader(dirfile, jsonfile);
-		DependencyGraph depGraph =  provreader.generatePANDepGraph();
-		System.out.println("Done with reference graph");
-
-		// Compare with Transitive Closure
-//		DependencyGraph depGraphT = new TransitiveClosure()
-//				.aggregateSignals(depGraph);
-//		new ProvDMtranslator().translate(depGraphT, "graphCorpus_Trans.gv");
 
 
 		// use only Lucene
 		//depGraph1 = new BackwardTemporalFilter().filterSignals(depGraph1);
 		depGraph1 = new WeightedSumAggregator().aggregateSignals(depGraph1);
 		
+
+		
+		DependencyGraph depGraph =  provreader.generatePANDepGraph();
+		System.out.println("Done with reference graph");
+		// Compare with Transitive Closure
+//		DependencyGraph depGraphT = new TransitiveClosure()
+//				.aggregateSignals(depGraph);
+//		new ProvDMtranslator().translate(depGraphT, "graphCorpus_Trans.gv");
+		
 		File logfile = new File("log" + System.currentTimeMillis() + ".txt");
 		FileWriter writer = new FileWriter(logfile);
 		

src/nl/vu/recoprov/experiments/PROVReader.java

 		depGraph = pipeline.initDependencyGraph();
 
 		// and get the lucene identifiers
-		depGraph = pipeline.loadMetadaAndIndexes(depGraph);
+		depGraph = pipeline.indexFiles(depGraph);
 
 		createEntityFromDepGraph(factory, depGraph);