org.sakaiproject.tool.assessment.pdf
Class HTMLWorker

java.lang.Object
  extended by org.sakaiproject.tool.assessment.pdf.itext.HTMLWorker
      extended by org.sakaiproject.tool.assessment.pdf.HTMLWorker
All Implemented Interfaces:
com.lowagie.text.DocListener, com.lowagie.text.ElementListener, com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler, EventListener

public class HTMLWorker
extends HTMLWorker

Author:
Joshua Ryan joshua.ryan@asu.edu Utility classs that extends itext's HTMLWorker to replace all images in Content hosting with references to temp files, as urls through access won't work for items not publicly available when requested from the server to the server

Field Summary
 
Fields inherited from class org.sakaiproject.tool.assessment.pdf.itext.HTMLWorker
document, objectList, tagsSupported, tagsSupportedString
 
Constructor Summary
HTMLWorker(com.lowagie.text.DocListener doc)
          
 
Method Summary
static ArrayList parseToList(Reader reader, com.lowagie.text.html.simpleparser.StyleSheet style, HashMap interfaceProps)
           
 void startElement(String tag, HashMap h)
          Adds Sakai's ConentHostingService awareness to img references This is needed due to Sakai's security model for content with in ContentHostingService, which would not allow requests from the server to the server to get protected images
 
Methods inherited from class org.sakaiproject.tool.assessment.pdf.itext.HTMLWorker
add, clearTextWrap, close, endDocument, endElement, getInterfaceProps, getStyleSheet, newPage, open, parse, parseToList, resetFooter, resetHeader, resetPageCount, setFooter, setHeader, setInterfaceProps, setMarginMirroring, setMargins, setMaxWidth, setPageCount, setPageSize, setStyleSheet, startDocument, text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLWorker

public HTMLWorker(com.lowagie.text.DocListener doc)

Method Detail

parseToList

public static ArrayList parseToList(Reader reader,
                                    com.lowagie.text.html.simpleparser.StyleSheet style,
                                    HashMap interfaceProps)
                             throws IOException
Throws:
IOException

startElement

public void startElement(String tag,
                         HashMap h)
Adds Sakai's ConentHostingService awareness to img references This is needed due to Sakai's security model for content with in ContentHostingService, which would not allow requests from the server to the server to get protected images

Specified by:
startElement in interface com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler
Overrides:
startElement in class HTMLWorker


Copyright © 2005-2012 Sakai Project. All Rights Reserved.