@ Override public void processItemDocument ( ItemDocument itemDocument ) { this . countItems ++ ; // Do some printing for demonstration/debugging. // Only print at most 50 items (or it would get too slow). if ( this . countItems < 10 ) { System . out . println ( itemDocument ) ; } else if ( this . countItems == 10 ) { System . out . println ( "*** I won't print any further items.\n" + "*** We will never finish if we print all the items.\n" + "*** Maybe remove this debug output altogether." ) ; } }
Processes one item document . This is often the main workhorse that gathers the data you are interested in . You can modify this code as you wish .