You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Martynas Jusevičius (JIRA)" <ji...@apache.org> on 2015/09/18 12:59:04 UTC
[jira] [Created] (JENA-1030) Rule.toString() prevents roundtripping
rules between objects and strings
Martynas Jusevičius created JENA-1030:
-----------------------------------------
Summary: Rule.toString() prevents roundtripping rules between objects and strings
Key: JENA-1030
URL: https://issues.apache.org/jira/browse/JENA-1030
Project: Apache Jena
Issue Type: Bug
Components: Reasoners
Affects Versions: Jena 2.11.0
Reporter: Martynas Jusevičius
Priority: Minor
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 ) ] ] '}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)