info.bliki.htmlcleaner
Class TagInfo

java.lang.Object
  extended by info.bliki.htmlcleaner.TagInfo

public class TagInfo
extends java.lang.Object

Class contains information about single HTML tag.
It also contains rules to for tag balancing. For each tag, list of dependant tags may be defined. In order to more easely describe those rules, several prefixed are introduced.

For each tag, list of dependant tags may be specified using following prefixes:

Tag TR for instance (table row) may define the following dependancies: !table,+tbody,^thead,^tfoot,#td,#th,tr,caption,colgroup meaning the following:

  • TR must be in context of TABLE, otherwise it will be ignored,
  • TR may can be directly inside TBODY, TFOOT and THEAD, otherwise TBODY will be implicitely created in front of it.
  • TR can contain TD and TD, all other tags and content will be pushed out of current limiting context, in the case of html tables, in front of enclosing TABLE tag.
  • if previous open tag is one of TR, CAPTION or COLGROUP, it will be implicitely closed.
  • Created by Vladimir Nikic.
    Date: November, 2006


    Constructor Summary
    TagInfo(java.lang.String name, java.lang.String contentType, int belongsTo, boolean depricated, boolean unique, boolean ignorePermitted, java.lang.String dependancies)
               
     
    Method Summary
     void addDependancy(java.lang.String dependantTagName)
               
     int getBelongsTo()
               
     java.util.Set getChildTags()
               
     java.lang.String getContentType()
               
     java.util.Set getCopyTags()
               
     java.lang.String getFatalTag()
               
     java.util.Set getHigherTags()
               
     java.util.Set getMustCloseTags()
               
     java.lang.String getName()
               
     java.util.Set getPermittedTags()
               
     java.lang.String getRequiredParent()
               
     boolean isDeprecated()
               
     boolean isIgnorePermitted()
               
     boolean isUnique()
               
     void setBelongsTo(int belongsTo)
               
     void setChildTags(java.util.Set childTags)
               
     void setContentType(java.lang.String contentType)
               
     void setCopyTags(java.util.Set copyTags)
               
     void setDeprecated(boolean deprecated)
               
     void setFatalTag(java.lang.String fatalTag)
               
     void setHigherTags(java.util.Set higherTags)
               
     void setIgnorePermitted(boolean ignorePermitted)
               
     void setMustCloseTags(java.util.Set mustCloseTags)
               
     void setName(java.lang.String name)
               
     void setPermittedTags(java.util.Set permittedTags)
               
     void setRequiredParent(java.lang.String requiredParent)
               
     void setUnique(boolean unique)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    TagInfo

    public TagInfo(java.lang.String name,
                   java.lang.String contentType,
                   int belongsTo,
                   boolean depricated,
                   boolean unique,
                   boolean ignorePermitted,
                   java.lang.String dependancies)
    Method Detail

    addDependancy

    public void addDependancy(java.lang.String dependantTagName)

    getName

    public java.lang.String getName()

    setName

    public void setName(java.lang.String name)

    getContentType

    public java.lang.String getContentType()

    setContentType

    public void setContentType(java.lang.String contentType)

    getMustCloseTags

    public java.util.Set getMustCloseTags()

    setMustCloseTags

    public void setMustCloseTags(java.util.Set mustCloseTags)

    getHigherTags

    public java.util.Set getHigherTags()

    setHigherTags

    public void setHigherTags(java.util.Set higherTags)

    getChildTags

    public java.util.Set getChildTags()

    setChildTags

    public void setChildTags(java.util.Set childTags)

    getPermittedTags

    public java.util.Set getPermittedTags()

    setPermittedTags

    public void setPermittedTags(java.util.Set permittedTags)

    getCopyTags

    public java.util.Set getCopyTags()

    setCopyTags

    public void setCopyTags(java.util.Set copyTags)

    getRequiredParent

    public java.lang.String getRequiredParent()

    setRequiredParent

    public void setRequiredParent(java.lang.String requiredParent)

    getBelongsTo

    public int getBelongsTo()

    setBelongsTo

    public void setBelongsTo(int belongsTo)

    getFatalTag

    public java.lang.String getFatalTag()

    setFatalTag

    public void setFatalTag(java.lang.String fatalTag)

    isDeprecated

    public boolean isDeprecated()

    setDeprecated

    public void setDeprecated(boolean deprecated)

    isUnique

    public boolean isUnique()

    setUnique

    public void setUnique(boolean unique)

    isIgnorePermitted

    public boolean isIgnorePermitted()

    setIgnorePermitted

    public void setIgnorePermitted(boolean ignorePermitted)


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