src/main/java/nl/bioinf/minorapplicationdesign/ontpillen/model/web_scraping/ApotheekWebScraper.java
/**
     * Method that parses the html. It checks if the drug is present on the website using the drugNotOnWebsite list
     * if the drug is not present on the website it sets the information for that drug to the information parsed
     * by FarmacoWebScraper.
     * @throws IOException IOException
     */
Method that parses the html. It checks if the drug is present on the website using the drugNotOnWebsite list
if the drug is not present on the website it sets the information for that drug to the information parsed
by FarmacoWebScraper.
Method that parses the html . It checks if the drug is present on the website using the drugNotOnWebsite list if the drug is not present on the website it sets the information for that drug to the information parsed by FarmacoWebScraper .
@Override
    public void parseHtml() throws IOException {
        LOGGER.info("Parsing html");
        List<DrugSubstance> drugSubstances = drugDao.getDrugSubstances();
        List<String> drugNotOnWebsite = Arrays.asList("thiamine", "coffeïne", "esketamine (nasaal)","esketamine" , "guanfacine");
        for (DrugSubstance drug: drugSubstances) {
            if (drugNotOnWebsite.contains(drug.getName())) {
                addInformationFromFarmaco(drug);
            } else {
                getInformation(drug);
            }
            LOGGER.debug("Drug: " + drug.getName());
            LOGGER.debug("Description in the dao: " + drug.getDescriptionPatient());
            LOGGER.debug("Interactions in the dao: " + drug.getInteractionsPatient());
            LOGGER.debug("SideEffects in the dao: " + drug.getSideEffects().getSideEffectsPatient());
            LOGGER.debug("Stop indication in the dao " + drug.getStopIndications());
        }
    }
@ Override public void parseHtml ( ) throws IOException { LOGGER . info ( "Parsing html" ) ; List < DrugSubstance > drugSubstances = drugDao . getDrugSubstances ( ) ; List < String > drugNotOnWebsite = Arrays . asList ( "thiamine" , "coffeïne", esketamine (nasaal)", " esketamine"  guanfacine") ; for ( DrugSubstance drug : drugSubstances ) { if ( drugNotOnWebsite . contains ( drug . getName ( ) ) ) { addInformationFromFarmaco ( drug ) ; } else { getInformation ( drug ) ; } LOGGER . debug ( "Drug: " + drug . getName ( ) ) ; LOGGER . debug ( "Description in the dao: " + drug . getDescriptionPatient ( ) ) ; LOGGER . debug ( "Interactions in the dao: " + drug . getInteractionsPatient ( ) ) ; LOGGER . debug ( "SideEffects in the dao: " + drug . getSideEffects ( ) . getSideEffectsPatient ( ) ) ; LOGGER . debug ( "Stop indication in the dao " + drug . getStopIndications ( ) ) ; } }
Method that parses the html.
Method that parses the html .
// code to log the description of the Dao