Search in sources :

Example 66 with CmdLineParser

use of org.kohsuke.args4j.CmdLineParser in project ORCID-Source by ORCID.

the class ResaveProfiles method main.

public static void main(String[] args) throws IOException {
    ResaveProfiles resaveProfiles = new ResaveProfiles();
    CmdLineParser parser = new CmdLineParser(resaveProfiles);
    try {
        parser.parseArgument(args);
        resaveProfiles.validateArgs(parser);
        resaveProfiles.init();
        resaveProfiles.execute();
    } catch (CmdLineException e) {
        System.err.println(e.getMessage());
        parser.printUsage(System.err);
        System.exit(1);
    } catch (Throwable t) {
        System.err.println(t);
        System.exit(2);
    }
    System.exit(0);
}
Also used : CmdLineParser(org.kohsuke.args4j.CmdLineParser) CmdLineException(org.kohsuke.args4j.CmdLineException)

Example 67 with CmdLineParser

use of org.kohsuke.args4j.CmdLineParser in project ORCID-Source by ORCID.

the class TransformFundRefDataIntoCSV method main.

/*****************************************************************************
     ************************************* MAIN **********************************
     ***************************************************************************** */
public static void main(String[] args) {
    TransformFundRefDataIntoCSV mergeData = new TransformFundRefDataIntoCSV();
    CmdLineParser parser = new CmdLineParser(mergeData);
    try {
        parser.parseArgument(args);
        mergeData.validateArgs(parser);
        mergeData.process();
    } catch (CmdLineException e) {
        System.err.println(e.getMessage());
        parser.printUsage(System.err);
    }
}
Also used : CmdLineParser(org.kohsuke.args4j.CmdLineParser) CmdLineException(org.kohsuke.args4j.CmdLineException)

Example 68 with CmdLineParser

use of org.kohsuke.args4j.CmdLineParser in project ORCID-Source by ORCID.

the class ProcessDisambiguatedOrgsForIndexing method main.

public static void main(String[] args) {
    ProcessDisambiguatedOrgsForIndexing processDisambiguatedOrgsForIndexing = new ProcessDisambiguatedOrgsForIndexing();
    CmdLineParser parser = new CmdLineParser(processDisambiguatedOrgsForIndexing);
    try {
        parser.parseArgument(args);
        processDisambiguatedOrgsForIndexing.validateArgs(parser);
        processDisambiguatedOrgsForIndexing.init();
        processDisambiguatedOrgsForIndexing.execute();
    } catch (CmdLineException e) {
        System.err.println(e.getMessage());
        parser.printUsage(System.err);
    }
}
Also used : CmdLineParser(org.kohsuke.args4j.CmdLineParser) CmdLineException(org.kohsuke.args4j.CmdLineException)

Example 69 with CmdLineParser

use of org.kohsuke.args4j.CmdLineParser in project ORCID-Source by ORCID.

the class ProcessDisambiguatedOrgsWithIncorrectPopularity method main.

public static void main(String[] args) {
    ProcessDisambiguatedOrgsWithIncorrectPopularity processDisambiguatedOrgsWithIncorrectPopularity = new ProcessDisambiguatedOrgsWithIncorrectPopularity();
    CmdLineParser parser = new CmdLineParser(processDisambiguatedOrgsWithIncorrectPopularity);
    try {
        parser.parseArgument(args);
        processDisambiguatedOrgsWithIncorrectPopularity.validateArgs(parser);
        processDisambiguatedOrgsWithIncorrectPopularity.init();
        processDisambiguatedOrgsWithIncorrectPopularity.execute();
    } catch (CmdLineException e) {
        System.err.println(e.getMessage());
        parser.printUsage(System.err);
    }
}
Also used : CmdLineParser(org.kohsuke.args4j.CmdLineParser) CmdLineException(org.kohsuke.args4j.CmdLineException)

Example 70 with CmdLineParser

use of org.kohsuke.args4j.CmdLineParser in project ORCID-Source by ORCID.

the class RemoveOrphanClients method main.

public static void main(String[] args) throws IOException {
    RemoveOrphanClients resaveProfiles = new RemoveOrphanClients();
    CmdLineParser parser = new CmdLineParser(resaveProfiles);
    try {
        parser.parseArgument(args);
        resaveProfiles.init();
        resaveProfiles.execute();
    } catch (CmdLineException e) {
        System.err.println(e.getMessage());
        parser.printUsage(System.err);
        System.exit(1);
    } catch (Throwable t) {
        System.err.println(t);
        System.exit(2);
    }
    System.exit(0);
}
Also used : CmdLineParser(org.kohsuke.args4j.CmdLineParser) CmdLineException(org.kohsuke.args4j.CmdLineException)

Aggregations

CmdLineParser (org.kohsuke.args4j.CmdLineParser)119 CmdLineException (org.kohsuke.args4j.CmdLineException)80 File (java.io.File)16 Test (org.junit.Test)14 IOException (java.io.IOException)11 HyracksConnection (org.apache.hyracks.api.client.HyracksConnection)10 IHyracksClientConnection (org.apache.hyracks.api.client.IHyracksClientConnection)10 ArrayList (java.util.ArrayList)9 JobId (org.apache.hyracks.api.job.JobId)9 JobSpecification (org.apache.hyracks.api.job.JobSpecification)9 PrintStream (java.io.PrintStream)6 FileOutputStream (java.io.FileOutputStream)4 List (java.util.List)4 FeatureExtractors (io.anserini.ltr.feature.FeatureExtractors)3 Qrels (io.anserini.util.Qrels)3 Directory (org.apache.lucene.store.Directory)3 FSDirectory (org.apache.lucene.store.FSDirectory)3 ConsoleReporter (com.codahale.metrics.ConsoleReporter)2 MetricRegistry (com.codahale.metrics.MetricRegistry)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2