[ 
https://issues.apache.org/jira/browse/JENA-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189254#comment-13189254
 ] 

Hudson commented on JENA-198:
-----------------------------

Integrated in Jena_ARQ #418 (See [https://builds.apache.org/job/Jena_ARQ/418/])
    JENA-198 Fixes to TSV input/output which were picking up the default prefix 
map when no prefix map should apply.

andy : 
Files : 
* 
/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInputIterator.java
* 
/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVOutput.java
* 
/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactory.java
* 
/incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/resultset/TestResultSetFormat1.java

                
> TSV Output may be invalid but TSV Input reads it fine
> -----------------------------------------------------
>
>                 Key: JENA-198
>                 URL: https://issues.apache.org/jira/browse/JENA-198
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>         Environment: Any
>            Reporter: Rob Vesse
>            Assignee: Andy Seaborne
>            Priority: Minor
>              Labels: tsv
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVIllegalIOTests.patch, TSVIllegalInput.patch, 
> TSVIllegalOutput.patch
>
>
> I noticed today that TSVOutput may produce output that contains prefixed 
> names which is invalid per my reading of the relevant specification - 
> http://www.w3.org/TR/sparql11-results-csv-tsv/
> This is due to the fact that TSVOutput called FmtUtils.stringForNode() with 
> only a Node resulting in it using the ARQ default prefix mapping for output.
> Attached is a simple patch which fixes the issue, it should also speed up 
> TSVOutput marginally as the existing code requires a SerializationContext to 
> be created for every term serialized and incurs the cost of trying to turn 
> URIs into prefixed names.  Essentially the patch creates a null 
> SerializationContext variable and just passes that to every call to 
> FmtUtils.stringForNode() so that the ARQ default prefix mapping never gets 
> used.
> The second part of the issue is that this malformed TSV input may be accepted 
> because TSVInputIterator uses NodeFactory.parseNode() to parse terms which 
> calls SSE.parseNode() without any prefix mapping and thus internally ends up 
> using the default SSE prefix mapping which means some prefixed names get 
> permitted as valid when they should be rejected.
> The second patch attached fixes this part of the issue by keeping an empty 
> static prefix map and calling SSE.parseNode() directly and passing in this 
> map.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to