This commit is contained in:
2020-11-27 11:51:34 +01:00
parent 7eb6385cf3
commit 0f14fbb811
13 changed files with 1054 additions and 1 deletions
+96
View File
@@ -0,0 +1,96 @@
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, 0);
} 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();
}
}
}
}