-
Notifications
You must be signed in to change notification settings - Fork 14
Description
The Resolver interface has just the one method:
String resolve(String first, String second);
Where the second string is a URI/IRI to be resolved relative to a URI/IRI in the first string.
This method is only ever called from URIExtractor10, URIExtractor11 with the first parameter set to context.getBase(). This value is always the same, but because it is parameterized, a URI or IRI must be created around it every time.
It may be useful to keep the dual parameter method available, but I'd also like to suggest introducing the following two methods:
void setBase(String first);
String resolve(String second);
In this way the IRI (or URI) need only be generated once, and all other URIs/IRIs would be resolved relative to it. Also, if this setBase() method were called before the Parser's sink, then the StatementSink would be able to use this mechanism to easily override a null base (see issue #28)