You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2015/12/12 19:01:46 UTC
[jira] [Updated] (JENA-1030) Rule.toString() prevents roundtripping
rules between objects and strings
[ https://issues.apache.org/jira/browse/JENA-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne updated JENA-1030:
--------------------------------
Fix Version/s: Jena 3.0.1
> 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: Improvement
> Components: Reasoners
> Affects Versions: Jena 2.11.0
> Reporter: Martynas Jusevičius
> Assignee: Dave Reynolds
> Priority: Minor
> Fix For: Jena 3.0.1
>
>
> I have a {{List<Rule>}} created using {{Rule.parseRules}} from a string:
> {noformat}[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)
> ]{noformat}
> When the list is serialized using {{toString()}}, I get
> {noformat}[[ 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) ]]{noformat}
> Notice the missing {{< >}} brackets on URIs. Reparsing the string gives an
> exception:
> {noformat}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 ) ] ] '{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)