forked from D-Net/dnet-hadoop
72 lines
2.5 KiB
Java
72 lines
2.5 KiB
Java
/*
|
|
* 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.
|
|
*/
|
|
|
|
package eu.dnetlib.oa.graph.usagestats.export;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
|
|
|
|
/**
|
|
* @author dpie, Spyros Zoupanos
|
|
*/
|
|
public class ExecuteWorkflow {
|
|
|
|
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 {
|
|
|
|
final ArgumentApplicationParser parser = new ArgumentApplicationParser(
|
|
IOUtils
|
|
.toString(
|
|
UsageStatsExporter.class
|
|
.getResourceAsStream(
|
|
"/eu/dnetlib/dhp/oa/graph/usagestats/export/usagestats_parameters.json")));
|
|
parser.parseArgument(args);
|
|
|
|
// Setting up the initial parameters
|
|
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");
|
|
|
|
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();
|
|
}
|
|
}
|