org.htmlcleaner
Class TagInfo

java.lang.Object
  extended by org.htmlcleaner.TagInfo

public class TagInfo
extends Object

Class contains information about single HTML tag.
It also contains rules for tag balancing. For each tag, list of dependant tags may be defined. There are several kinds of dependancies used to reorder tags:

Tag TR for instance (table row) may define the following dependancies:

meaning the following:


Field Summary
protected static int BODY
           
protected static int CONTENT_ALL
           
protected static int CONTENT_NONE
           
protected static int CONTENT_TEXT
           
protected static int HEAD
           
protected static int HEAD_AND_BODY
           
 
Constructor Summary
TagInfo(String name, int contentType, int belongsTo, boolean depricated, boolean unique, boolean ignorePermitted)
           
 
Method Summary
 void defineAllowedChildrenTags(String commaSeparatedListOfTags)
           
 void defineCloseBeforeCopyInsideTags(String commaSeparatedListOfTags)
           
 void defineCloseBeforeTags(String commaSeparatedListOfTags)
           
 void defineCloseInsideCopyAfterTags(String commaSeparatedListOfTags)
           
 void defineFatalTags(String commaSeparatedListOfTags)
           
 void defineForbiddenTags(String commaSeparatedListOfTags)
           
 void defineHigherLevelTags(String commaSeparatedListOfTags)
           
 void defineRequiredEnclosingTags(String commaSeparatedListOfTags)
           
 int getBelongsTo()
           
 Set getChildTags()
           
 int getContentType()
           
 Set getContinueAfterTags()
           
 Set getCopyTags()
           
 String getFatalTag()
           
 Set getHigherTags()
           
 Set getMustCloseTags()
           
 String getName()
           
 Set getPermittedTags()
           
 String getRequiredParent()
           
 boolean isDeprecated()
           
 boolean isEmptyTag()
           
 boolean isIgnorePermitted()
           
 boolean isUnique()
           
 void setBelongsTo(int belongsTo)
           
 void setChildTags(Set childTags)
           
 void setContinueAfterTags(Set continueAfterTags)
           
 void setCopyTags(Set copyTags)
           
 void setDeprecated(boolean deprecated)
           
 void setFatalTag(String fatalTag)
           
 void setHigherTags(Set higherTags)
           
 void setIgnorePermitted(boolean ignorePermitted)
           
 void setMustCloseTags(Set mustCloseTags)
           
 void setName(String name)
           
 void setPermittedTags(Set permittedTags)
           
 void setRequiredParent(String requiredParent)
           
 void setUnique(boolean unique)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEAD_AND_BODY

protected static final int HEAD_AND_BODY
See Also:
Constant Field Values

HEAD

protected static final int HEAD
See Also:
Constant Field Values

BODY

protected static final int BODY
See Also:
Constant Field Values

CONTENT_ALL

protected static final int CONTENT_ALL
See Also:
Constant Field Values

CONTENT_NONE

protected static final int CONTENT_NONE
See Also:
Constant Field Values

CONTENT_TEXT

protected static final int CONTENT_TEXT
See Also:
Constant Field Values
Constructor Detail

TagInfo

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

defineFatalTags

public void defineFatalTags(String commaSeparatedListOfTags)

defineRequiredEnclosingTags

public void defineRequiredEnclosingTags(String commaSeparatedListOfTags)

defineForbiddenTags

public void defineForbiddenTags(String commaSeparatedListOfTags)

defineAllowedChildrenTags

public void defineAllowedChildrenTags(String commaSeparatedListOfTags)

defineHigherLevelTags

public void defineHigherLevelTags(String commaSeparatedListOfTags)

defineCloseBeforeCopyInsideTags

public void defineCloseBeforeCopyInsideTags(String commaSeparatedListOfTags)

defineCloseInsideCopyAfterTags

public void defineCloseInsideCopyAfterTags(String commaSeparatedListOfTags)

defineCloseBeforeTags

public void defineCloseBeforeTags(String commaSeparatedListOfTags)

getName

public String getName()

setName

public void setName(String name)

getContentType

public int getContentType()

getMustCloseTags

public Set getMustCloseTags()

setMustCloseTags

public void setMustCloseTags(Set mustCloseTags)

getHigherTags

public Set getHigherTags()

setHigherTags

public void setHigherTags(Set higherTags)

getChildTags

public Set getChildTags()

setChildTags

public void setChildTags(Set childTags)

getPermittedTags

public Set getPermittedTags()

setPermittedTags

public void setPermittedTags(Set permittedTags)

getCopyTags

public Set getCopyTags()

setCopyTags

public void setCopyTags(Set copyTags)

getContinueAfterTags

public Set getContinueAfterTags()

setContinueAfterTags

public void setContinueAfterTags(Set continueAfterTags)

getRequiredParent

public String getRequiredParent()

setRequiredParent

public void setRequiredParent(String requiredParent)

getBelongsTo

public int getBelongsTo()

setBelongsTo

public void setBelongsTo(int belongsTo)

getFatalTag

public String getFatalTag()

setFatalTag

public void setFatalTag(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()

isEmptyTag

public boolean isEmptyTag()

setIgnorePermitted

public void setIgnorePermitted(boolean ignorePermitted)


Copyright © 2006-2011. All Rights Reserved.