Class DefaultResourceLocator

  • All Implemented Interfaces:
    ResourceLocator

    public class DefaultResourceLocator
    extends Object
    implements ResourceLocator
    Default locator for online resources. Searches by absolute URL, relative path w.r.t. to SLD document or classpath.
    Author:
    Jan De Moerloose
    • Constructor Detail

      • DefaultResourceLocator

        public DefaultResourceLocator()
    • Method Detail

      • setSourceUrl

        public void setSourceUrl​(URL sourceUrl)
      • locateResource

        public URL locateResource​(String uri)
        Description copied from interface: ResourceLocator
        Locate the specified resource.
        Specified by:
        locateResource in interface ResourceLocator
        Parameters:
        uri - uri of the resource
        Returns:
        the fully resolved URL of the resource or null, if the resource cannot be located.
      • validateRelativeURL

        protected URL validateRelativeURL​(URL relativeUrl)
      • makeRelativeURL

        protected URL makeRelativeURL​(String uri,
                                      String query)