In the following code, the ValidityReport is always valid; there is no inconsistency detected. I expect that it should give me a warning because I am giving a family name to a FOAF document. Why isn't an inconsistency detected?
Model model = ModelFactory.createDefaultModel();
OntModel m = ModelFactory.createOntologyModel();
m.read(FOAF.NS);
Resource persona = model.createResource("http://www.example.org/rdf#Persona", FOAF.Document);
persona.addProperty(FOAF.family_name, "18", XSDDatatype.XSDint);
InfModel infModel = ModelFactory.createRDFSModel(m, model);
ValidityReport validity = infModel.validate();
if (validity.isValid()) {
System.out.println("Valid!");
} else {
System.out.println("Conflicts");
for (Iterator<Report> in = validity.getReports(); in.hasNext();) {
System.out.println(" - " + in.next());
}
}