Hi Martynas,
On 17/09/15 23:37, Martynas Jusevičius wrote:
Hit send too soon!
When the list is serialized back to String again, 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 ) ] ] '
Can you confirm this is a bug? I need to roundtrip Rules from Strings
to objects and back.
There's no guarantee that Rule.toString will round trip, it's just there
for debugging, that's why the javadoc says "Printable string describing
the rule".
However, it ought to be easy to put <> round the absolute URIs and if
that's enough to give you round tripping then great.
Can't do this myself at present - I don't have a working built of Jena3,
still on Jena2. Are you on Jena2 or Jena3?
Dave