/** * Test the consistency of the underlying data. This normally tests * the validity of the bound instance data against the bound * schema data. * @return a ValidityReport structure */ @Override public ValidityReport validate() { return getInfGraph().validate(); }
/** * Test the consistency of the underlying data. This normally tests * the validity of the bound instance data against the bound * schema data. * @return a ValidityReport structure */ @Override public ValidityReport validate() { return getInfGraph().validate(); }
/** * Test the consistency of the underlying data. This normally tests * the validity of the bound instance data against the bound * schema data. * @return a ValidityReport structure */ @Override public ValidityReport validate() { return (getGraph() instanceof InfGraph) ? ((InfGraph) getGraph()).validate() : null; }
/** * Test the consistency of the underlying data. This normally tests * the validity of the bound instance data against the bound * schema data. * @return a ValidityReport structure */ @Override public ValidityReport validate() { return (getGraph() instanceof InfGraph) ? ((InfGraph) getGraph()).validate() : null; }
/** * Helper for dt range testing - loads a file, validates it using RDFS/DT * and returns error status of the result */ private boolean doTestRDFSDTRange(String file, ReasonerFactory rf) throws IOException { String langType = "RDF/XML"; if (file.endsWith(".nt")) { langType = "N-TRIPLE"; } else if (file.endsWith("n3")) { langType = "N3"; } Model m = ModelFactory.createDefaultModel(); Reader reader = new BufferedReader(new FileReader("testing/reasoners/rdfs/"+file)); m.read(reader, WGReasonerTester.BASE_URI + file, langType); InfGraph g = rf.create(null).bind(m.getGraph()); ValidityReport report = g.validate(); if (!report.isValid()) { logger.debug("Validation error report:"); for (Iterator<Report> i = report.getReports(); i.hasNext(); ) { logger.debug(i.next().toString()); } } return report.isValid(); }
/** * Helper for dt range testing - loads a file, validates it using RDFS/DT * and returns error status of the result */ private boolean doTestRDFSDTRange(String file, ReasonerFactory rf) throws IOException { String langType = "RDF/XML"; if (file.endsWith(".nt")) { langType = "N-TRIPLE"; } else if (file.endsWith("n3")) { langType = "N3"; } Model m = ModelFactory.createDefaultModel(); Reader reader = new BufferedReader(new FileReader("testing/reasoners/rdfs/"+file)); m.read(reader, WGReasonerTester.BASE_URI + file, langType); InfGraph g = rf.create(null).bind(m.getGraph()); ValidityReport report = g.validate(); if (!report.isValid()) { logger.debug("Validation error report:"); for (Iterator<Report> i = report.getReports(); i.hasNext(); ) { logger.debug(i.next().toString()); } } return report.isValid(); }
long t1 = System.currentTimeMillis(); InfGraph graph = reasoner.bind(input.getGraph()); boolean correct = ! graph.validate().isValid(); long t2 = System.currentTimeMillis(); lastTestDuration = t2 - t1; long t1 = System.currentTimeMillis(); InfGraph graph = reasoner.bind(input.getGraph()); boolean correct = graph.validate().isValid(); long t2 = System.currentTimeMillis(); lastTestDuration = t2 - t1;
long t1 = System.currentTimeMillis(); InfGraph graph = reasoner.bind(input.getGraph()); boolean correct = ! graph.validate().isValid(); long t2 = System.currentTimeMillis(); lastTestDuration = t2 - t1; long t1 = System.currentTimeMillis(); InfGraph graph = reasoner.bind(input.getGraph()); boolean correct = graph.validate().isValid(); long t2 = System.currentTimeMillis(); lastTestDuration = t2 - t1;
if (conclusions == null) { correct = ! graph.validate().isValid(); if (noisy) { System.out.println("PositiveEntailmentTest of FalseDoc " + test.getURI() + (correct ? " - OK" : " - FAIL")); if (!graph.validate().isValid()) { correct = false; correct = graph.validate().isValid(); if (noisy) { System.out.println("NegativentailmentTest of FalseDoc " + test.getURI() + (correct ? " - OK" : " - FAIL"));
if (conclusions == null) { correct = ! graph.validate().isValid(); if (noisy) { System.out.println("PositiveEntailmentTest of FalseDoc " + test.getURI() + (correct ? " - OK" : " - FAIL")); if (!graph.validate().isValid()) { correct = false; correct = graph.validate().isValid(); if (noisy) { System.out.println("NegativentailmentTest of FalseDoc " + test.getURI() + (correct ? " - OK" : " - FAIL"));