/** * Consistency check: whether this RDF is consistent or not * * @param data * @return */ @Override public boolean isConsistent(Model data) { log.debug(" isConsistent(Model data)"); return isConsistent(run(data).validate()); }
/** * Consistency check: whether this RDF is consistent or not * * @param data * @return */ @Override public boolean isConsistent(Model data) { log.debug(" isConsistent(Model data)"); return isConsistent(run(data).validate()); }
/** * Consistency check: whether this RDF is consistent or not * * 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 * * @param data * @param rules * @return */ @Override public boolean isConsistent(Model data, List<Rule> rules) { log.debug(" isConsistent(Model data, List<Rule> rules)"); return isConsistent(run(data, rules).validate()); }
/** * Consistency check: whether this RDF is consistent or not * * 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 * * @param data * @param rules * @return */ @Override public boolean isConsistent(Model data, List<Rule> rules) { log.debug(" isConsistent(Model data, List<Rule> rules)"); return isConsistent(run(data, rules).validate()); }
ValidityReport reports = inf.validate(); if (!reports.isValid()) { StringBuilder sb = new StringBuilder();
public void validateModelWithRules(String fName) { System.out.println("Using rule file " + fName); ClassLoader cl = NdlCommons.class.getProtectionDomain().getClassLoader(); URL url = cl.getResource("net/exogeni/orca/ndl/rules/" + fName); List<Rule> rules = Rule.rulesFromURL(url.toString()); GenericRuleReasoner reasoner = new GenericRuleReasoner(rules); reasoner.setOWLTranslation(true); reasoner.setTransitiveClosureCaching(true); InfModel testModel = ModelFactory.createInfModel(reasoner, requestModel); getValidityOutput(testModel.validate()); }
public static void testData(String dataF, String schemaF) { Model schema = FileManager.get().loadModel(schemaF); Reasoner reasoner = ReasonerRegistry.getOWLReasoner(); reasoner.bindSchema(schema); Model data = FileManager.get().loadModel(dataF); InfModel model = ModelFactory.createInfModel(reasoner, data); ValidityReport rep = model.validate(); getValidityOutput(rep); Resource res = model.getResource("http://www.semanticweb.org/ontologies/2013/8/untitled-ontology-45#Image1"); System.out.println("Image types:"); printStatements(model, res, RDF.type, null); }