[
https://issues.apache.org/jira/browse/JENA-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16376989#comment-16376989
]
ASF GitHub Bot commented on JENA-1494:
--------------------------------------
Github user rvesse commented on a diff in the pull request:
https://github.com/apache/jena/pull/366#discussion_r170616897
--- Diff:
jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java ---
@@ -116,17 +154,29 @@ public void parse() {
arp.getHandlers().setErrorHandler(rslt) ;
arp.getHandlers().setNamespaceHandler(rslt) ;
+ // ARPOptions.
+ ARPOptions arpOptions = arp.getOptions() ;
if ( RiotUniformCompatibility ) {
- ARPOptions options = arp.getOptions() ;
// Convert some warnings to errors for compatible behaviour
for all parsers.
for ( int code : additionalErrors )
- options.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ;
- arp.setOptionsWith(options) ;
+ arpOptions.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ;
}
if ( JenaRuntime.isRDF11 )
arp.getOptions().setIRIFactory(IRIResolver.iriFactory());
+ if ( context != null ) {
+ try {
+ @SuppressWarnings("unchecked")
+ Map<String, Object> p = (Map<String,
Object>)(context.get(SysRIOT.sysRdfReaderProperties)) ;
+ if ( p != null )
+ p.forEach((k,v) -> oneProperty(arpOptions, k, v)) ;
+ } catch (Throwable ex) {
+ Log.warn(AdapterRDFWriter.class, "Problem setting
properties", ex);
--- End diff --
Should this message more clearly state that some/all properties may have
been ignored?
> Allow setting of RDF/XML Reader properties when using RIOT.
> -----------------------------------------------------------
>
> Key: JENA-1494
> URL: https://issues.apache.org/jira/browse/JENA-1494
> Project: Apache Jena
> Issue Type: Improvement
> Components: RIOT
> Affects Versions: Jena 3.6.0
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Major
> Fix For: Jena 3.7.0
>
>
> RIOT does not currently have a mechanism for setting the ARP (Jena's RDF/XML
> parser) properties. Of all the parsers, only ARP has properties to set. The
> RIOT/ARP bridge , {{ReaderRIOTRDFXML}}, has no mechanism for passing
> property/value settings to ARP.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)