org.thymeleaf.templateparser.html
Class AbstractHtmlTemplateParser

Object
  extended by org.thymeleaf.templateparser.html.AbstractHtmlTemplateParser
All Implemented Interfaces:
ITemplateParser
Direct Known Subclasses:
LegacyHtml5TemplateParser

public abstract class AbstractHtmlTemplateParser
extends Object
implements ITemplateParser

Document parser implementation for non-XML HTML documents.

Since:
2.0.0
Author:
Daniel Fernández

Constructor Summary
AbstractHtmlTemplateParser(String templateModeName, int poolSize)
           
 
Method Summary
 java.util.List<Node> parseFragment(Configuration configuration, String fragment)
           Parses the document fragment contained in the given String object.
 Document parseTemplate(Configuration configuration, String documentName, java.io.Reader reader)
           Parses the document contained in the given Reader object.
protected abstract  java.util.List<Node> unwrapFragment(Document document)
           
protected abstract  String wrapFragment(String fragment)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHtmlTemplateParser

public AbstractHtmlTemplateParser(String templateModeName,
                                  int poolSize)
Method Detail

parseTemplate

public final Document parseTemplate(Configuration configuration,
                                    String documentName,
                                    java.io.Reader reader)
Description copied from interface: ITemplateParser

Parses the document contained in the given Reader object.

Specified by:
parseTemplate in interface ITemplateParser
Parameters:
configuration - the Configuration object
documentName - the document name (optional).
reader - the Reader on the document to be parsed (required).
Returns:
the parsed Document.

parseFragment

public final java.util.List<Node> parseFragment(Configuration configuration,
                                                String fragment)
Description copied from interface: ITemplateParser

Parses the document fragment contained in the given String object.

Specified by:
parseFragment in interface ITemplateParser
Parameters:
configuration - the Configuration object
fragment - the String containing the fragment
Returns:
the resulting list of nodes.

wrapFragment

protected abstract String wrapFragment(String fragment)

unwrapFragment

protected abstract java.util.List<Node> unwrapFragment(Document document)


Copyright © 2012 The THYMELEAF team. All Rights Reserved.