zorba::URLResolver

#include <zorba/uri_resolvers.h>

Interface for URL resolving. Subclass this to provide a URL resolver to the method StaticContext::addURLResolver().

Public Functions

Resource *

resolveURL(const zorba::String &aUrl, EntityData const *aEntityData)=0

Transforms an input URL into a Resource.

URLResolver()

~URLResolver()

Public Functions

resolveURL

Resource * resolveURL(const zorba::String &aUrl, EntityData const *aEntityData)=0

Transforms an input URL into a Resource.

The "aEntityData" parameter informs the URLResolver what kind of entity is being referenced by the URL. URLResolvers may choose to make use of this information to alter their behaviour. URLResolvers must ensure that they return a concrete subclass of Resource which is compatible with the entity kind being resolved.Implementers of this method should do nothing if they do not know how to resolve the URL. They should create and return a Resource if they were successfully able to resolve the URL.Implementers may throw any exception if they believe that they are canonical for the URL and yet had some error arise attempting to resolve it. Note that because there may be several possible URLs attempted, Zorba will catch any exceptions thrown and continue until all all URLs have failed. Zorba will not re-throw any of these exceptions directly. However, if the exception thrown extends std::exception, Zorba will make efforts to ensure that its error message is included in the exception which is ultimately thrown. For any other thrown objects, only the fact that an exception occurred will be remembered; the exception object itself will be discarded.In any case, if they create a Resource, Zorba will take memory ownership of the Resource and delete it (by calling destroy() on it) when it is no longer needed.

URLResolver

 URLResolver()

~URLResolver

 ~URLResolver()