org.apache.shindig.gadgets.parse.caja
Class CajaHtmlParser

java.lang.Object
  extended by org.apache.shindig.gadgets.parse.GadgetHtmlParser
      extended by org.apache.shindig.gadgets.parse.caja.CajaHtmlParser

public class CajaHtmlParser
extends GadgetHtmlParser


Field Summary
 
Fields inherited from class org.apache.shindig.gadgets.parse.GadgetHtmlParser
documentFactory, PARSED_DOCUMENTS, PARSED_FRAGMENTS
 
Constructor Summary
CajaHtmlParser(DOMImplementation documentFactory)
           
 
Method Summary
protected  com.google.caja.lexer.InputSource getInputSource()
           
protected  com.google.caja.reporting.MessageQueue makeMessageQueue()
           
protected  boolean needsDebugData()
           
protected  Document parseDomImpl(String source)
          TODO: remove the need for parseDomImpl as a parsing method.
protected  DocumentFragment parseFragmentImpl(String source)
           
 
Methods inherited from class org.apache.shindig.gadgets.parse.GadgetHtmlParser
attemptFullDocParseFirst, errorDom, parseDom, parseFragment, prependToNode, setCacheProvider, setSerializerProvider, shouldCache, transferChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CajaHtmlParser

@Inject
public CajaHtmlParser(DOMImplementation documentFactory)
Method Detail

parseDomImpl

protected Document parseDomImpl(String source)
                         throws GadgetException
Description copied from class: GadgetHtmlParser
TODO: remove the need for parseDomImpl as a parsing method. Gadget HTML is tag soup handled in custom fashion, or is a legitimate fragment. In either case, we can simply use the fragment parsing implementation and patch up in higher-level calls.

Specified by:
parseDomImpl in class GadgetHtmlParser
Parameters:
source - a piece of HTML
Returns:
a Document parsed from the HTML
Throws:
GadgetException

parseFragmentImpl

protected DocumentFragment parseFragmentImpl(String source)
                                      throws GadgetException
Specified by:
parseFragmentImpl in class GadgetHtmlParser
Parameters:
source - a snippet of HTML markup
Returns:
a DocumentFragment containing the parsed elements
Throws:
GadgetException

getInputSource

protected com.google.caja.lexer.InputSource getInputSource()

makeMessageQueue

protected com.google.caja.reporting.MessageQueue makeMessageQueue()

needsDebugData

protected boolean needsDebugData()


Copyright © 2007-2012. All Rights Reserved.