Search in sources :

Example 1 with Version

use of org.edamontology.pubfetcher.Version in project edammap by edamontology.

the class Cli method main.

public static void main(String[] argv) throws IOException, ReflectiveOperationException {
    Version version = new Version(Cli.class);
    args = BasicArgs.parseArgs(argv, CliArgs.class, version);
    // logger must be called only after configuration changes have been made in BasicArgs.parseArgs()
    // otherwise invalid.log will be created if arg --log is null
    logger = LogManager.getLogger();
    logger.debug(String.join(" ", argv));
    logger.info("This is {} {}", version.getName(), version.getVersion());
    try {
        run(version);
    } catch (Throwable e) {
        logger.error("Exception!", e);
    }
}
Also used : Version(org.edamontology.pubfetcher.Version)

Example 2 with Version

use of org.edamontology.pubfetcher.Version in project edammap by edamontology.

the class Server method main.

public static void main(String[] argv) throws IOException, ReflectiveOperationException {
    version = new Version(Server.class);
    args = BasicArgs.parseArgs(argv, ServerArgs.class, version);
    // logger must be called only after configuration changes have been made in BasicArgs.parseArgs()
    // otherwise invalid.log will be created if arg --log is null
    logger = LogManager.getLogger();
    logger.debug(String.join(" ", argv));
    logger.info("This is {} {}", version.getName(), version.getVersion());
    try {
        run();
    } catch (Throwable e) {
        logger.error("Exception!", e);
    }
}
Also used : HttpServer(org.glassfish.grizzly.http.server.HttpServer) Version(org.edamontology.pubfetcher.Version)

Example 3 with Version

use of org.edamontology.pubfetcher.Version in project edammap by edamontology.

the class UtilMain method main.

public static void main(String[] argv) throws IOException, ReflectiveOperationException {
    Version version = new Version(UtilMain.class);
    UtilArgs args = BasicArgs.parseArgs(argv, UtilArgs.class, version);
    // logger must be called only after configuration changes have been made in BasicArgs.parseArgs()
    // otherwise invalid.log will be created if arg --log is null
    logger = LogManager.getLogger();
    logger.debug(String.join(" ", argv));
    logger.info("This is {} {}", version.getName(), version.getVersion());
    try {
        run(args, version);
    } catch (Throwable e) {
        logger.error("Exception!", e);
    }
}
Also used : Version(org.edamontology.pubfetcher.Version)

Example 4 with Version

use of org.edamontology.pubfetcher.Version in project edammap by edamontology.

the class PubMedApps method main.

public static void main(String[] argv) throws IOException, ReflectiveOperationException {
    Version version = new Version(PubMedApps.class);
    PubMedAppsArgs args = BasicArgs.parseArgs(argv, PubMedAppsArgs.class, version);
    // logger must be called only after configuration changes have been made in BasicArgs.parseArgs()
    // otherwise invalid.log will be created if arg --log is null
    logger = LogManager.getLogger();
    logger.debug(String.join(" ", argv));
    logger.info("This is {} {}", version.getName(), version.getVersion());
    try {
        run(args);
    } catch (Throwable e) {
        logger.error("Exception!", e);
    }
}
Also used : Version(org.edamontology.pubfetcher.Version)

Aggregations

Version (org.edamontology.pubfetcher.Version)4 HttpServer (org.glassfish.grizzly.http.server.HttpServer)1