Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-31 Thread Martynas Jusevičius
Doesn't RIOT and IRI code both share a common core component, to which both BadURIException and IRIException could be pushed and then unified? And why couldn't ErrorHandler methods take Exceptions? Given that those Exception subclasses carry all the necessary error information, the handler code

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-31 Thread Andy Seaborne
On 30/07/16 15:43, Martynas Jusevičius wrote: Andy, why does ErrorHandlerStd throw RiotException? https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/riot/system/ErrorHandlerFactory.java#L128 It fails to pass on URI violations that way, because RiotException is

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-25 Thread Martynas Jusevičius
OK nevermind, that was a bad idea. Throwing an exception (after the parse errors are collected) solves this. On Mon, Jul 25, 2016 at 7:43 PM, Martynas Jusevičius wrote: > Isn't there a way to do this uniformly, for any Reader? That would be > much preferred. > > I think I

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-25 Thread Martynas Jusevičius
Isn't there a way to do this uniformly, for any Reader? That would be much preferred. I think I might be able to do what I need with a custom ErrorHandler. The downside is that it exposes only error message, and not the raw URI value. Couldn't the violations be passed to Model and then exposed

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-24 Thread Martynas Jusevičius
Let me put it that way: can I successfully parse a Model with invalid URI values and also get a report saying which values were invalid and why? So that it could be presented to the user as error messages. On Sat, 23 Jul 2016 at 01:37, Martynas Jusevičius wrote: > Is it

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-22 Thread Martynas Jusevičius
Is it possible to let the Model parse silently and afterwards somehow retrieve org.apache.jena.iri.Violation instances from the ErrorHandler? Currently I'm implementing a custom ErrorHandler that would collect violations instead of logging them. But ErrorHandler only provides String message, long

Re: Setting (strict) error handler before before reading Model (Jena 2.11.0)

2016-07-08 Thread A. Soroka
This may or may not be close to what you are looking for, but you might try something like oaj.riot.RDFDataMgr::parse with a wrapper around oaj.riot.system.StreamRDFLib::graph. You can subclass oaj.riot.system.StreamRDFWrapper for that. Then you have tuple-level control over the process and