Package org.openbel.framework.common

Examples of org.openbel.framework.common.SimpleOutput.error()


          printUsage();
          // Another SimpleOutput is used here, and it uses stdout because at this
          // point nothing else will need to be output.
          SimpleOutput so = new SimpleOutput();
          so.setErrorStream(System.out);
          so.error("\n");
            so.error("No documents specified.");
            end();
        } else if (extraArgs.size() > 1) {
            fatal("Only a single document can be specified.");
        }
View Full Code Here


          // Another SimpleOutput is used here, and it uses stdout because at this
          // point nothing else will need to be output.
          SimpleOutput so = new SimpleOutput();
          so.setErrorStream(System.out);
          so.error("\n");
            so.error("No documents specified.");
            end();
        } else if (extraArgs.size() > 1) {
            fatal("Only a single document can be specified.");
        }
        final String inputFileName = extraArgs.get(0);
View Full Code Here

        List<String> fileArgs = getExtraneousArguments();
        if (!hasItems(fileArgs)) {
          // print out the usage if no arguments were given
          printUsage();
          reportable.error("\n");
            reportable.error(NO_DOCUMENT_FILES);
            end();
        }
        if (fileArgs.size() > 1) {
            fatal("Only a single document can be specified.");
View Full Code Here

        List<String> fileArgs = getExtraneousArguments();
        if (!hasItems(fileArgs)) {
          // print out the usage if no arguments were given
          printUsage();
          reportable.error("\n");
            reportable.error(NO_DOCUMENT_FILES);
            end();
        }
        if (fileArgs.size() > 1) {
            fatal("Only a single document can be specified.");
        }
View Full Code Here

        String fileArg = fileArgs.get(0);

        if (!isBELDocument(fileArg)) {
            final String error = fileArg + " is not a BEL document.";
            reportable.error(error);
            bail(ExitCode.GENERAL_FAILURE);
            return;
        }

        File file = new File(fileArg);
View Full Code Here

        }

        File file = new File(fileArg);
        if (!readable(file)) {
            final String error = Strings.INPUT_FILE_UNREADABLE + file;
            reportable.error(error);
            bail(ExitCode.GENERAL_FAILURE);
            return;
        }

        try {
View Full Code Here

                        reportable.warning("VALIDATION WARNING: " + e);
                    }
                } else {
                    numErrors++;
                    if (!quiet) {
                        reportable.error("VALIDATION ERROR: " + e);
                    }
                }
            }

            for (String w : vr.getWarnings()) {
View Full Code Here

            for (String w : vr.getWarnings()) {
                if (pedantic) {
                    numErrors++;
                    if (!quiet) {
                        reportable.error("VALIDATION ERROR: " + w);
                    }
                } else {
                    numWarnings++;
                    if (!quiet) {
                        reportable.warning("VALIDATION WARNING: " + w);
View Full Code Here

                bail(ExitCode.SUCCESS);
            } else {
                bail(ExitCode.VALIDATION_FAILURE);
            }
        } catch (Exception e) {
            reportable.error("Failed to import BEL Document.");
            reportable.error("Reason: " + e.getMessage());
            bail(ExitCode.GENERAL_FAILURE);
        }
    }
View Full Code Here

            } else {
                bail(ExitCode.VALIDATION_FAILURE);
            }
        } catch (Exception e) {
            reportable.error("Failed to import BEL Document.");
            reportable.error("Reason: " + e.getMessage());
            bail(ExitCode.GENERAL_FAILURE);
        }
    }

    private void reportValidationError(List<ValidationError> validationErrors) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.