public class Main { public static void main(String[] args) { //Crawler startUSPTOCrawler(); startWOSCrawler(); getCPC(); //Importer startUSPTOImport(); startWOSImport(); } private static void getCPC() { if (Settings.GETCPCMAPPING.getContent().equals("YES")) { Thread thread = new Thread(new Runnable() { @Override public void run() { try { new CorporatePatentClassificationCrawler(); } catch (Exception e) { e.printStackTrace(); } } }); thread.start(); try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } } } private static void startUSPTOCrawler() { if (Settings.USPTSTARTDOWNLAOD.getContent().equals("YES")) { Thread thread = new Thread(new Runnable() { @Override public void run() { try { new PatentCrawler(1976, 2000); } catch (Exception e) { e.printStackTrace(); } } }); thread.start(); try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } } } private static void startUSPTOImport() { if (Settings.USPTSTARTIMPORT.getContent().equals("YES")) { new PatentImporter(2019, 2019); } } private static void startWOSCrawler() { if (Settings.WOSSTARTDOWNLOAD.getContent().equals("YES")) { Thread thread = new Thread(new Runnable() { @Override public void run() { try { WoSCrawler crawler = new WoSCrawler("\"" + Settings.WOSCATEGORY.getContent() + "\"", SearchMode.TOPIC, 99000); } catch (Exception e) { e.printStackTrace(); } } }); thread.start(); try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } } } private static void startWOSImport() { if (Settings.WOSSTARTIMPORT.getContent().equals("YES")) { try { WOSImporter importer = new WOSImporter(); importer.doImport(); } catch (Exception e) { e.printStackTrace(); } } } }