You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/10/25 12:00:29 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14973179#comment-14973179 ] 

ASF subversion and git services commented on JENA-1030:
-------------------------------------------------------

Commit 5edf18dba5091452128cf11cea9975d3e3745c30 in jena's branch refs/heads/master from der
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=5edf18d ]

JENA-1030: wrap <>-quotes around bare URIs when serializing rules


> 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
>            Priority: Minor
>
> 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)