/** * Test the consistency of the bound data. This normally tests * the validity of the bound instance data against the bound * schema data. * @return a ValidityReport structure */ @Override public ValidityReport validate() { checkOpen(); return new StandardValidityReport(); }
/** * Test the consistency of the bound data. This normally tests * the validity of the bound instance data against the bound * schema data. * @return a ValidityReport structure */ @Override public ValidityReport validate() { checkOpen(); return new StandardValidityReport(); }
public ValidityReport validate() { checkOpen(); StandardValidityReport report = new StandardValidityReport();
public ValidityReport validate() { checkOpen(); StandardValidityReport report = new StandardValidityReport();
/** * <p> * Test the consistency of the model. This looks for overall inconsistency, and for any unsatisfiable classes. * </p> * * @return a ValidityReport structure */ @Override public ValidityReport validate() { checkOpen(); prepare(); final StandardValidityReport report = new StandardValidityReport(); _kb.setDoExplanation(true); final boolean consistent = _kb.isConsistent(); _kb.setDoExplanation(false); if (!consistent) report.add(true, "KB is inconsistent!", _kb.getExplanation()); else for (final ATermAppl c : _kb.getUnsatisfiableClasses()) { final String name = JenaUtils.makeGraphNode(c).toString(); report.add(false, "Unsatisfiable class", name); } return report; }
/** * <p> * Test the consistency of the model. This looks for overall inconsistency, and for any unsatisfiable classes. * </p> * * @return a ValidityReport structure */ @Override public ValidityReport validate() { checkOpen(); prepare(); final StandardValidityReport report = new StandardValidityReport(); _kb.setDoExplanation(true); final boolean consistent = _kb.isConsistent(); _kb.setDoExplanation(false); if (!consistent) report.add(true, "KB is inconsistent!", _kb.getExplanation()); else for (final ATermAppl c : _kb.getUnsatisfiableClasses()) { final String name = JenaUtils.makeGraphNode(c).toString(); report.add(false, "Unsatisfiable class", name); } return report; }
/** * <p> * Test the consistency of the model. This looks for overall inconsistency, and for any unsatisfiable classes. * </p> * * @return a ValidityReport structure */ @Override public ValidityReport validate() { checkOpen(); prepare(); final StandardValidityReport report = new StandardValidityReport(); _kb.setDoExplanation(true); final boolean consistent = _kb.isConsistent(); _kb.setDoExplanation(false); if (!consistent) report.add(true, "KB is inconsistent!", _kb.getExplanation()); else for (final ATermAppl c : _kb.getUnsatisfiableClasses()) { final String name = JenaUtils.makeGraphNode(c).toString(); report.add(false, "Unsatisfiable class", name); } return report; }
/** * Check validity report implementation, there had been a stupid bug here. */ public void testValidityReport() { StandardValidityReport report = new StandardValidityReport(); report.add(false, "dummy", "dummy1"); report.add(false, "dummy", "dummy3"); assertTrue(report.isValid()); report.add(true, "dummy", "dummy2"); assertTrue( ! report.isValid()); report = new StandardValidityReport(); report.add(false, "dummy", "dummy1"); report.add(true, "dummy", "dummy2"); report.add(false, "dummy", "dummy3"); assertTrue( ! report.isValid()); report = new StandardValidityReport(); report.add(new ValidityReport.Report(false, "dummy", "dummy1")); report.add(new ValidityReport.Report(true, "dummy", "dummy2")); report.add(new ValidityReport.Report(false, "dummy", "dummy3")); assertTrue( ! report.isValid()); }
/** * Check validity report implementation, there had been a stupid bug here. */ public void testValidityReport() { StandardValidityReport report = new StandardValidityReport(); report.add(false, "dummy", "dummy1"); report.add(false, "dummy", "dummy3"); assertTrue(report.isValid()); report.add(true, "dummy", "dummy2"); assertTrue( ! report.isValid()); report = new StandardValidityReport(); report.add(false, "dummy", "dummy1"); report.add(true, "dummy", "dummy2"); report.add(false, "dummy", "dummy3"); assertTrue( ! report.isValid()); report = new StandardValidityReport(); report.add(new ValidityReport.Report(false, "dummy", "dummy1")); report.add(new ValidityReport.Report(true, "dummy", "dummy2")); report.add(new ValidityReport.Report(false, "dummy", "dummy3")); assertTrue( ! report.isValid()); }