In Sesame, how does one derive RDFS/OWL materialization results that have an RDF literal in the subject position? -
i have problem rdfs entailment in sesame 2.8.5. want automatically deduce (3) (1) , (2) (using turtle notation here). defined rule rdfs3 in the rdf 1.1 specification , rule prp-rng in the owl-rl specification.
(1) foaf:givenname rdfs:range xsd:string . (2) ex:wouter foaf:givenname "wouter" . (3) "wouter" xsd:string .
i have implemented in sesame using forwardchainingrdfsinferencer
class follows:
public static void main(string[] args) throws repositoryexception, rdfhandlerexception { repository r = new sailrepository(new forwardchainingrdfsinferencer(new memorystore())); r.initialize(); valuefactory f = r.getvaluefactory(); repositoryconnection c = r.getconnection(); try { c.add(foaf.given_name, rdfs.range, xmlschema.string); c.add(f.createuri("http://example.org/", "wouter"), foaf.given_name, f.createliteral("wouter", xmlschema.string)); repositoryresult<statement> s = c.getstatements(null, null, null, true); rio.write(iterations.addall(s, new linkedhashmodel()), system.out, rdfformat.turtle); } {c.close();} }
the output contains many inferred facts such (4) not include fact (3).
(4) ex:wouter rdfs:resource .
my question is: if fact 3 not derived because literal not allowed appear in subject position of rdf triple, how it possible perform full rdfs and/or owl materialization (in line above mentioned specifications) in sesame?
literals not allowed in subject positions in rdf. therefore, fact 3 not legal rdf triple, , therefore sesame's inferencer not derive it. not mean sesame's inferencer incomplete: derives rdfs-entailed facts can legally derived. or if wish argue constitute incompleteness, means rdf reasoner implementing rdfs entailment by definition incomplete, not able derive such facts within rdf standard.
note rdf semantics spec explicitly refers notion of "generalized rdf" when discussing possibility of having literals in subject positions (and making type of entailments want) - notion hypothetical extension of standard, , not normative.
so, long story short: if want literals in subject positions, not doing rdf, , can't use sesame (or other standards-compliant rdf framework).
Comments
Post a Comment