Package de.bcxp.challenge
Class App
java.lang.Object
de.bcxp.challenge.App
The entry class for your solution. This class is only aimed as starting point and not intended as baseline for your
software design. Read: create your own classes and packages as appropriate.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
getBestMatchFromDocument
(String path, IDocumentParser parser, IDocumentAnalyser analyser) Loads a document from the given file path using the provided parser, analyzes its entries to find the best match using the provided analyser, and returns the result.static void
This is the main entry method of your program.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
WEATHER_CSV_PATH
- See Also:
-
COUNTRIES_CSV_PATH
- See Also:
-
-
Constructor Details
-
App
public App()
-
-
Method Details
-
main
This is the main entry method of your program.- Parameters:
args
- The CLI arguments passed
-
getBestMatchFromDocument
private static String getBestMatchFromDocument(String path, IDocumentParser parser, IDocumentAnalyser analyser) Loads a document from the given file path using the provided parser, analyzes its entries to find the best match using the provided analyser, and returns the result.Since the provided main()-Method in App.java calls for only one value, an arbitrary value is pulled from the set of results. For example, if there are multiple days with equal temperature spreads, one arbitrary from this set of days is returned.
- Parameters:
path
- the file path to the documentparser
- theIDocumentParser
that reads and parses the document into entriesanalyser
- theIDocumentAnalyser
that finds the best match from the parsed entries- Returns:
- The ID of an arbitrary result from the result Set
-