I haven’t coded up the test in Java - was using ARQ to validate my SPARQL understanding first. Is it not possible to apply different reasoners through ARQ? If not, I can start coding up these tests in Java.
Thanks, _howard On May 8, 2019 at 11:54:21 PM, Lorenz B. ([email protected]) wrote: well, you said using ARQ, but it's not clear how exactly you compute or show the inferences. Are you using an InfModel? And are you also using the correct reasoner? Here, a sample code when using the RDFS reasoner with the "simple" level: | Model m = ModelFactory.createDefaultModel();|| || m.read("/tmp/data.ttl");|| || Resource config = ModelFactory.createDefaultModel()|| || .createResource()|| || .addProperty(ReasonerVocabulary.PROPsetRDFSLevel, "simple");|| || Reasoner reasoner = RDFSRuleReasonerFactory.theInstance().create(config);|| || || InfModel infM = ModelFactory.createInfModel(reasoner, m);|| || infM.write(System.out, "Turtle");| The output, among others, is |:value a :Property , rdfs:Resource , rdf:Property ;|| || rdfs:comment "The value of the quantitative value or property value node." ;|| || rdfs:domain :MonetaryAmount ;|| || rdfs:label "value" ;|| || rdfs:range xsd:decimal , xsd:string .| > Hi everyone - > > I’ve recently run into a situation where I’m not clear on whether my > problem is a limitation of the tool (or my misuse of it) or one of my > understanding in the modeling. Here’s the gist. > > I want to extend rdf:Property in order to add associations for properties > like data classification (PII, HBI, etc.). Hence, I created the following: > > :Property a rdfs:Class ; > rdfs:label "Property" ; > rdfs:comment "A managed value in the graph." ; > rdfs:subClassOf rdf:Property . > > :classification a rdf:Property ; > rdfs:label "classification" ; > rdfs:comment "Data classification for a property." ; > rdfs:range xsd:string; > rdfs:domain :Property> . > > My thinking is that based on the default reasoners in Jena, the RDF > inferencing rule for rdfs:subClassOf should yield 2 rdf:type triples (one > explicit, one inferred) for the following: > > :value a :Property; > rdfs:label "value"; > rdfs:comment "The value of the quantitative value or property value > node."; > rdfs:range xsd:string, xsd:decimal; > rdfs:domain :MonetaryAmount . > > Again, my expectation is that I should have 2 triples: > > :value rdf:type :Property > :value rdf:type rdf:Property > > However, I never see the inferred triple in arq. > > Am I missing a configuration step for arq, thinking about my model > incorrectly, or something else entirely? > > Thanks, > > _howard > -- Lorenz Bühmann AKSW group, University of Leipzig Group: http://aksw.org - semantic web research center
