Hi Alex, Does your model assert that the classes Topic and Component are disjoint? Because of the open world assumption, it could be that the model simply can't know that your topic is NOT in the Component class.
Best, Han -----Original Message----- From: [email protected] <[email protected]> Sent: vrijdag 23 oktober 2020 15:24 To: [email protected] Subject: Wich reasoner do i have to use to validate the given schema violation? I've created a model with the Jena Lib and i want to validate it against a specific schema.rdf. However when i start the validation, it says everything okay, but i have a significant schema-violation in my Model as you can see below. In my example, the problem is now that i have a Topic with the property "has-component" but "has-component" as a property is in the schema just allowed for "#Component"-class. My Question is now: Wich reasoner can i use to get an error message after validation? PS: I tried nearly all different reasoners from jena with all different parameters, but still doesnt work. My code is : Model schema = RDFDataMgr.loadModel("schema.rdf"); Model data = RDFDataMgr.loadModel("data.rdf"); Resource config = ModelFactory.createDefaultModel() .createResource() .addProperty(ReasonerVocabulary.PROPsetRDFSLevel, "full"); Reasoner reasoner = RDFSRuleReasonerFactory.theInstance().create(config); InfModel infmodel = ModelFactory.createInfModel(reasoner,schema,metadata); ValidityReport validityReport = infmodel.validate(); if (validityReport.isValid()) { System.out.println("OK"); } else { System.out.println("Conflicts"); for (Iterator i = validityReport.getReports(); i.hasNext();) { System.out.println(" - " + i.next()); } } Example from data.rdf: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ixsr="http://ixsr.abokom.de/ixsr#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> [....] <ixsr:Topic rdf:about="http://ixsr.lebfy.de/topics/05d2c8268b68ff6444a49358ca7fe925/1/de-de"> <ixsr:has-component rdf:resource="http://ixsr.lebfy.de/metadata/85e7506eb2e33f90c0a802687f559f0c"/> <ixsr:title xml:lang="de-de">Kontaktdaten</ixsr:title> <ixsr:relates-to-component rdf:resource="http://ixsr.lebfy.de/metadata/85e7506eb2e33f90c0a802687f559f0c"/> <ixsr:relates-to-product-feature rdf:resource="http://ixsr.lebfy.de/metadata/dbbb7334b2e2a9e5c0a8026860d20c17"/> <ixsr:relates-to-product-feature rdf:resource="http://ixsr.lebfy.de/metadata/10b4c299b2ddae19c0a8026824aa7410"/> <ixsr:relates-to-product-feature rdf:resource="http://ixsr.lebfy.de/metadata/b63e4b15b2dc2d83c0a8026877f6aa88"/> <ixsr:dateOfCreation xml:lang="de-de">2020-08-06T12:24:07.285+02:00</ixsr:dateOfCreation> </ixsr:Topic> [....] Example from schema.rdf: <rdf:RDF xmlns:ixsr="http://ixsr.abokom.de/ixsr#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xml:base="http://ixsr.abokom.de/ixsr#" xml:lang="en"> [....] <rdf:Property rdf:about="http://ixsr.abokom.de/ixsr#has-component"> <rdfs:label xml:lang="de">hat Komponente</rdfs:label> <rdfs:label xml:lang="en">has component</rdfs:label> <rdfs:subPropertyOf rdf:resource="http://ixsr.abokom.de/ixsr#ixsrRelationConcept"/> <rdfs:domain rdf:resource="http://ixsr.abokom.de/ixsr#Component"/> <rdfs:range rdf:resource="http://ixsr.abokom.de/ixsr#Component"/> <ixsr:description xml:lang="en"/> <rdfs:comment xml:lang="en">Relates to a component that is part of another component.</rdfs:comment> <rdfs:comment xml:lang="de">Verweist auf eine Kompoente, die Teil einer anderen Komponente ist.</rdfs:comment> <schema:domainIncludes rdf:resource="http://ixsr.abokom.de/ixsr#Component"/> <schema:rangeIncludes rdf:resource="http://ixsr.abokom.de/ixsr#Component"/> <ixsr:description xml:lang="en">Cardinality: http://ixsr.abokom.de/ixsr#Component [0..*]</ixsr:description> </rdf:Property> [....] This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
