info.bliki.htmlcleaner
Class HtmlTagProvider

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by info.bliki.htmlcleaner.HtmlTagProvider
All Implemented Interfaces:
ITagInfoProvider, java.io.Serializable, java.lang.Cloneable, java.util.Map

public class HtmlTagProvider
extends java.util.HashMap
implements ITagInfoProvider

Default HTML tag info provider. Here the basic set of HTML tags is defined, including depricated tags and some Microsoft specific tags. Rules for tag balancing are similar to that used in most web-browsers.

Created by: Vladimir Nikic
Date: November, 2006.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
HtmlTagProvider()
          Default constructor - creates tags and rules for balancing.
 
Method Summary
protected  void addDependancy(java.lang.String tagName, java.lang.String tagList)
           
protected  void addTag(java.lang.String name, java.lang.String contentType, int belongsTo, java.lang.String dependancies)
          Shortcut to creating TagInfo instance and storing it to the map.
protected  void defineTags()
          Definition of all HTML tags together with rules for tag balancing.
static HtmlTagProvider getInstance()
          Returns singleton instance of this class.
 TagInfo getTagInfo(java.lang.String tagName)
          Implementation of the interface method.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

HtmlTagProvider

public HtmlTagProvider()
Default constructor - creates tags and rules for balancing.

Method Detail

getInstance

public static HtmlTagProvider getInstance()
Returns singleton instance of this class.


addTag

protected void addTag(java.lang.String name,
                      java.lang.String contentType,
                      int belongsTo,
                      java.lang.String dependancies)
Shortcut to creating TagInfo instance and storing it to the map.

Parameters:
name -
contentType -
belongsTo -
dependancies -

defineTags

protected void defineTags()
Definition of all HTML tags together with rules for tag balancing.


addDependancy

protected void addDependancy(java.lang.String tagName,
                             java.lang.String tagList)

getTagInfo

public TagInfo getTagInfo(java.lang.String tagName)
Implementation of the interface method.

Specified by:
getTagInfo in interface ITagInfoProvider
Parameters:
tagName -
Returns:
TagInfo instance from the map, for the specified tag name.


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.