Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Jena 2.11.0
-
None
Description
I have a List<Rule> created using Rule.parseRules from a string:
[inheritance: (?template rdf:type <http://graphity.org/gp#Template>), (?template ?p ?o), (?p rdf:type owl:AnnotationProperty), (?p rdfs:isDefinedBy <http://graphity.org/gp#>), (?subClass rdfs:subClassOf ?template), noValue(?subClass ?p) -> (?subClass ?p ?o) ]
When the list is serialized using toString(), I get
[[ inheritance: (?template rdf:type http://graphity.org/gp#Template) (?template ?p ?o) (?p rdf:type owl:AnnotationProperty) (?p rdfs:isDefinedBy http://graphity.org/gp#) (?subClass rdfs:subClassOf ?template) noValue(?subClass ?p) -> (?subClass ?p ?o) ]]
Notice the missing < > brackets on URIs. Reparsing the string gives an
exception:
com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Malformed rule At 'http://graphity.org/gp# ) ( ?subClass rdfs:subClassOf ?template ) noValue ( ?subClass ?p ) -> ( ?subClass ?p ?o ) ] ] '