This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bookstore.scraper.book.booksource.empik; | |
import bookstore.scraper.book.Book; | |
import bookstore.scraper.book.booksource.BookServiceSource; | |
import bookstore.scraper.enums.Bookstore; | |
import bookstore.scraper.enums.CategoryType; | |
import bookstore.scraper.urlproperties.EmpikUrlProperties; | |
import bookstore.scraper.utilities.JSoupConnector; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bookstore.scraper.urlproperties; | |
import lombok.Getter; | |
import lombok.Setter; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.stereotype.Component; | |
@Getter | |
@Setter | |
@Component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bookstore.scraper.test; | |
import bookstore.scraper.book.Book; | |
import bookstore.scraper.enums.Bookstore; | |
import bookstore.scraper.enums.CategoryType; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import java.util.List; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String,String> createCategoryWithCorrespondingURL() | |
{ | |
Map<String, String> categoryToMarlinURL = new HashMap<>(); | |
categoryToMarlinURL.put("horror", merlinUrlProperties.getMerlin().getHorror()); | |
categoryToMarlinURL.put("drama", merlinUrlProperties.getMerlin().getDrama()); | |
... | |
return categoryTomarlinURL; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Map<Bookstore, List<Book>> chooseGetterImplementationByCategory(CategoryType categoryType) { | |
String URL = ""; | |
if (categoryType.equals(CategoryType.CRIME)) | |
URL = | |
if (categoryType.equals(CategoryType.ROMANCES)) | |
URL = | |
if (categoryType.equals(CategoryType.FANTASY)) | |
URL = | |
if (categoryType.equals(CategoryType.GUIDES)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bookstore.scraper.fetcher.empik; | |
import bookstore.scraper.book.Book; | |
import bookstore.scraper.urlproperties.EmpikUrlProperties; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bookstore.scraper.book.scrapingtypeservice; | |
import bookstore.scraper.book.Book; | |
import bookstore.scraper.dataprovider.EmpikBookProvider; | |
import bookstore.scraper.dataprovider.MerlinBookProvider; | |
import bookstore.scraper.enums.Bookstore; | |
import bookstore.scraper.fetcher.empik.EmpikFetchingBookService; | |
import bookstore.scraper.fetcher.merlin.MerlinFetchingBookService; | |
import bookstore.scraper.urlproperties.EmpikUrlProperties; | |
import bookstore.scraper.urlproperties.MerlinUrlProperties; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bookstore.scraper.book.scrapingtypes; | |
import bookstore.scraper.Bookstore; | |
import bookstore.scraper.book.Book; | |
import bookstore.scraper.empik.EmpikFetchingBookService; | |
import bookstore.scraper.merlin.MerlinFetchingBookService; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.stereotype.Service; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.parser.nbp; | |
import pl.parser.nbp.calculations.RateCalculations; | |
import pl.parser.nbp.contentfetcher.XMLDataFetcher; | |
import pl.parser.nbp.model.Rates; | |
import pl.parser.nbp.validation.ConditionChecker; | |
import pl.parser.nbp.historysystem.HistorySystem; | |
import pl.parser.nbp.view.NbpParserView; | |
import java.io.IOException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CarRentalEngine { | |
.... | |
void startCarRental() throws SQLException { | |
... | |
while (isInvalid) { | |
try { | |
option = input.nextInt(); | |
if (option == 1 || option == 2) { | |
isInvalid = false; |
NewerOlder