dnet-hadoop/dhp-workflows/dhp-usage-stats-update/src/main/java/eu/dnetlib/oa/graph/usagestats/export/ExecuteWorkflow.java

72 lines
2.5 KiB
Java
Raw Normal View History

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
2020-05-12 19:38:31 +02:00
package eu.dnetlib.oa.graph.usagestats.export;
2020-10-01 22:24:40 +02:00
import org.apache.commons.io.IOUtils;
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
/**
2020-10-01 22:24:40 +02:00
* @author dpie, Spyros Zoupanos
*/
public class ExecuteWorkflow {
2020-10-01 22:24:40 +02:00
static String matomoAuthToken;
static String matomoBaseURL;
static String repoLogPath;
static String portalLogPath;
static String portalMatomoID;
static String irusUKBaseURL;
static String irusUKReportPath;
static String sarcsReportPathArray;
static String sarcsReportPathNonArray;
static String lareferenciaLogPath;
static String lareferenciaBaseURL;
static String lareferenciaAuthToken;
public static void main(String args[]) throws Exception {
2020-10-01 22:24:40 +02:00
final ArgumentApplicationParser parser = new ArgumentApplicationParser(
IOUtils
.toString(
UsageStatsExporter.class
.getResourceAsStream(
"/eu/dnetlib/dhp/oa/graph/usagestats/export/usagestats_parameters.json")));
parser.parseArgument(args);
2020-10-02 13:45:19 +02:00
// Setting up the initial parameters
2020-10-01 22:24:40 +02:00
matomoAuthToken = parser.get("matomoAuthToken");
matomoBaseURL = parser.get("matomoBaseURL");
repoLogPath = parser.get("repoLogPath");
portalLogPath = parser.get("portalLogPath");
portalMatomoID = parser.get("portalMatomoID");
irusUKBaseURL = parser.get("irusUKBaseURL");
irusUKReportPath = parser.get("irusUKReportPath");
sarcsReportPathArray = parser.get("sarcsReportPathArray");
sarcsReportPathNonArray = parser.get("sarcsReportPathNonArray");
lareferenciaLogPath = parser.get("lareferenciaLogPath");
lareferenciaBaseURL = parser.get("lareferenciaBaseURL");
lareferenciaAuthToken = parser.get("lareferenciaAuthToken");
2020-10-02 13:45:19 +02:00
System.out.println("====> Printing parsed variables");
System.out.println(ExecuteWorkflow.matomoAuthToken);
System.out.println(ExecuteWorkflow.matomoBaseURL);
System.out.println(ExecuteWorkflow.repoLogPath);
System.out.println(ExecuteWorkflow.portalLogPath);
System.out.println(ExecuteWorkflow.irusUKBaseURL);
System.out.println(ExecuteWorkflow.irusUKReportPath);
System.out.println(ExecuteWorkflow.sarcsReportPathArray);
System.out.println(ExecuteWorkflow.sarcsReportPathNonArray);
System.out.println(ExecuteWorkflow.lareferenciaLogPath);
System.out.println(ExecuteWorkflow.lareferenciaBaseURL);
System.out.println(ExecuteWorkflow.lareferenciaAuthToken);
UsageStatsExporter usagestatsExport = new UsageStatsExporter();
usagestatsExport.export();
}
}