private void writeFinalResults ( ) { // Print a final report: printStatus ( ) ; // Store property counts in files: writePropertyStatisticsToFile ( this . itemStatistics , "item-property-counts.csv" ) ; writePropertyStatisticsToFile ( this . propertyStatistics , "property-property-counts.csv" ) ; // Store site link statistics in file: try ( PrintStream out = new PrintStream ( ExampleHelpers . openExampleFileOuputStream ( "site-link-counts.csv" ) ) ) { out . println ( "Site key,Site links" ) ; for ( Entry < String , Integer > entry : this . siteLinkStatistics . entrySet ( ) ) { out . println ( entry . getKey ( ) + "," + entry . getValue ( ) ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } // Store term statistics in file: writeTermStatisticsToFile ( this . itemStatistics , "item-term-counts.csv" ) ; writeTermStatisticsToFile ( this . propertyStatistics , "property-term-counts.csv" ) ; }
Prints and stores final result of the processing . This should be called after finishing the processing of a dump . It will print the statistics gathered during processing and it will write a CSV file with usage counts for every property .