Search in sources :

Example 1 with MCRExternalProcess

use of org.mycore.frontend.cli.MCRExternalProcess in project mycore by MyCoRe-Org.

the class MCRBibUtilsTransformer method export.

private MCRContent export(File modsFile) {
    String[] arguments = buildCommandArguments(modsFile);
    MCRExternalProcess ep = null;
    try {
        ep = new MCRExternalProcess(arguments);
        ep.run();
        String errors = ep.getErrors();
        if (!errors.isEmpty())
            LOGGER.warn(errors);
        return ep.getOutput();
    } catch (Exception ex) {
        String msg = "Exception invoking external command " + command;
        throw new MCRException(msg, ex);
    }
}
Also used : MCRException(org.mycore.common.MCRException) IOException(java.io.IOException) MCRException(org.mycore.common.MCRException) MCRExternalProcess(org.mycore.frontend.cli.MCRExternalProcess)

Aggregations

IOException (java.io.IOException)1 MCRException (org.mycore.common.MCRException)1 MCRExternalProcess (org.mycore.frontend.cli.MCRExternalProcess)1