Class StylesURLs

  • All Implemented Interfaces:
    SpecialURL

    public class StylesURLs
    extends java.lang.Object
    implements SpecialURL
    Implements URL rewriting in course documents. styles:foo, rewritten as baseURL/styles/foo
    • Constructor Summary

      Constructors 
      Constructor Description
      StylesURLs​(java.lang.String baseURL0)
      Create a URL rewriter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean applyTo​(org.w3c.dom.Element link, java.lang.String linkAttr)
      Checks to see if a linking element (a or img) uses a special protocol label and, if so, attempts to rewrite the element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StylesURLs

        public StylesURLs​(java.lang.String baseURL0)
        Create a URL rewriter.
        Parameters:
        baseURL0 - relative URL/directory to base of website.
    • Method Detail

      • applyTo

        public final boolean applyTo​(org.w3c.dom.Element link,
                                     java.lang.String linkAttr)
        Checks to see if a linking element (a or img) uses a special protocol label and, if so, attempts to rewrite the element.
        Specified by:
        applyTo in interface SpecialURL
        Parameters:
        link - an element containing a URL
        linkAttr - name of the attribute containing the URL
        Returns:
        true if the element has been rewritten.