public static void getValidityOutput(ValidityReport rep) { if (rep.isValid()) { System.out.println("Model is valid"); } if (rep.isClean()) System.out.println("Model is clean"); System.out.println("Report: "); for (Iterator<Report> i = rep.getReports(); i.hasNext();) { System.out.println(" - " + i.next()); } }
/** * This internal method implements the logic of consistency. * * We decide to apply a strict meaning of consistency. The alternative would be to use isValid() method, * which tolerates classes that can't be instantiated. * * Subclasses may want to change this behavior. * * @param report * @return */ protected boolean isConsistent(ValidityReport report) { log.debug(" isConsistent(ValidityReport report)"); if(log.isDebugEnabled()){ Iterator<Report> it = report.getReports(); while (it.hasNext()) { log.debug("Report: {}", it.next()); } } return report.isClean(); }
if (!reports.isValid()) { StringBuilder sb = new StringBuilder(); sb.append("The configuration of the MetadataConverterPlugin is "); sb.append(DMRM.getURI()); sb.append(").\nThe following problems were encountered:\n"); for (Iterator<ValidityReport.Report> iter = reports.getReports(); iter.hasNext(); ) { ValidityReport.Report report = iter.next();
if(!validate().isValid()) { throw new JavaFileGenerationException("The built model is invalid!");
/** * This internal method implements the logic of consistency. * * We decide to apply a strict meaning of consistency. The alternative would be to use isValid() method, * which tolerates classes that can't be instantiated. * * Subclasses may want to change this behavior. * * @param report * @return */ protected boolean isConsistent(ValidityReport report) { log.debug(" isConsistent(ValidityReport report)"); if(log.isDebugEnabled()){ Iterator<Report> it = report.getReports(); while (it.hasNext()) { log.debug("Report: {}", it.next()); } } return report.isClean(); }
public void build() throws RDFSModelBuildingException { if(!model.validate().isValid()) { throw new RDFSModelBuildingException("The model is not valid.");