-
Notifications
You must be signed in to change notification settings - Fork 17
Entry point
Király Péter edited this page Jan 18, 2023
·
4 revisions
The entry points of the application are the classes in the de.gwdg.metadataqa.marc.cli
package (https://github.com/pkiraly/metadata-qa-marc/blob/main/src/main/java/de/gwdg/metadataqa/marc/cli/). Please check other classes in the same package, such as Completeness
how it works. The main idea is that there is a record iterator (RecordIterator
), which iterates all over the files and records, and calls methods of the current class:
-
beforeIteration()
: calls it before the start of the iteration. Good for preparation steps, such as initializing things fileOpened(Path path): a file is opened -
processRecord(Record marc4jRecord, int recordNumber)
: a record is read. Here the record is in a low levele, semanticness-less "Record" class (mart of the external marc4j library), which contains the basic structure. You do not have to add any code here -
processRecord(BibliographicRecord bibliographicRecord, int recordNumber)
: a record is read. Here the record is a BibliographicRecord class, which is our main class. You have to implement this method. -
fileProcessed()
: we get to the end of a file, no more record in the file -
afterIteration(int numberOfprocessedRecords)
: the iteration is finished, no more files to process. You can print out all collected information, close open resources (if any) etc.