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
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
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
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
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
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
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