Package edu.odu.cs.cowem.documents.urls
Class URLRewriting
- java.lang.Object
-
- edu.odu.cs.cowem.documents.urls.URLRewriting
-
public class URLRewriting extends java.lang.ObjectImplements URL rewriting in course documents. URL rewriting is used to provide stable shorthands for various URLS that will resolve properly even if document sets are moved, and to provide special rewriting of fields such as dates that may need to be flagged for special processing.
-
-
Constructor Summary
Constructors Constructor Description URLRewriting(java.io.File sourceDirectory, WebsiteProject project, java.lang.String bbURL)Create a URL rewriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrewrite(org.w3c.dom.Document htmlDoc)Rewrite href attributes of "a" elements and src attributes of "img" and script elements that match the patterns listed above.
-
-
-
Constructor Detail
-
URLRewriting
public URLRewriting(java.io.File sourceDirectory, WebsiteProject project, java.lang.String bbURL)Create a URL rewriter.- Parameters:
sourceDirectory- directory containing document sourceproject- project context, used to determine relative URLsbbURL- URL of a Blackboard course
-
-
Method Detail
-
rewrite
public final void rewrite(org.w3c.dom.Document htmlDoc)
Rewrite href attributes of "a" elements and src attributes of "img" and script elements that match the patterns listed above. Attributes not matching any such pattern are left unchanged.- Parameters:
htmlDoc- the DOM of an HTML document.
-
-