The prior posts dealt with uploading text files – perhaps a csv file or a json file. Sometimes reports are sent as PDF. Today I received a good example of a PDF to show how to upload it.
An example of the file is shown below.
We use the Taxon Name and Rank process as done in this earlier post. The trick is pretty simple: decompose the file using itext7 or earlier versions. And then create an appropriate data table (same format as in the earlier post), and use the same store procedure.
As before, not found bacteria are written to a file for later analysis of exception. In this case there was only two items not found :-).
<XenoGene> <Table> <taxon_rank>species</taxon_rank> <taxon_name>Burkholderia sp. CCGE1002</taxon_name> <BaseOneMillion>100</BaseOneMillion> </Table> <Table> <taxon_rank>species</taxon_rank> <taxon_name>tsetse mealybug Leptospira santarosai</taxon_name> <BaseOneMillion>100</BaseOneMillion> </Table> </XenoGene>
That’s it. Inspect the source to see the details. Note: For different reports, you will need to build custom parsers.