|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.bliki.htmlcleaner.TagToken
info.bliki.htmlcleaner.TagNode
public class TagNode
XML node node tag - it is produced during cleaning process when all start and end tokens are removed and replaced by instances of TagNode.
Created by: Vladimir Nikic
Field Summary | |
---|---|
static java.lang.String[] |
ALLOWED_ATTRIBUTES
Allowed attributes Note: the 'style' attribute isn't allowed by default because of XSS risks; if you need this attribute (or other attributes not listed here) you can add it with the static addAllowedAttribute() method. |
protected static java.util.HashSet<java.lang.String> |
ALLOWED_ATTRIBUTES_SET
|
Fields inherited from class info.bliki.htmlcleaner.TagToken |
---|
name, originalSource |
Constructor Summary | |
---|---|
TagNode()
|
|
TagNode(java.lang.String name)
|
Method Summary | |
---|---|
static boolean |
addAllowedAttribute(java.lang.String key)
Add an additional allowed attribute name Note: the 'style' attribute isn't allowed by default because of XSS risks; if you need this attribute (or other attributes not listed here) you can add it with this method. |
boolean |
addAttribute(java.lang.String attName,
java.lang.String attValue,
boolean checkXSS)
Add an attribute to this tag. |
void |
addChild(java.lang.Object child)
|
void |
addChildren(java.util.List<? extends java.lang.Object> children)
|
void |
addItemForMoving(BaseToken item)
|
void |
addObjectAttribute(java.lang.String attName,
java.lang.Object attValue)
Add a special object to this TagNode which contains original information from the parsed wiki object (for example the ImageFormat or original wiki topic string) |
java.lang.Object |
clone()
|
static java.util.Set<java.lang.String> |
getAllowedAttributes()
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
|
java.lang.String |
getBodyString()
Get the pure content text without the tags from this HTMLTag |
void |
getBodyString(java.lang.Appendable buf)
Get the pure content text without the tags from this HTMLTag |
java.util.List<java.lang.Object> |
getChildren()
|
java.util.List<java.lang.Object> |
getItemsToMove()
|
java.util.Map<java.lang.String,java.lang.Object> |
getObjectAttributes()
Get a special object for this TagNode which contains original information from the parsed wiki object (for example the ImageFormat or original wiki topic string). |
TagNode |
getParent()
|
java.lang.String |
getParents()
Get the allowed parent tags for this tag |
boolean |
isAllowedAttribute(java.lang.String attName)
Check, if the attName is allowed. |
boolean |
isFormed()
|
TagNode |
makeCopy()
|
static boolean |
removeAllowedAttribute(java.lang.String key)
|
void |
serialize(XmlSerializer xmlSerializer)
|
void |
setFormed()
|
void |
setItemsToMove(java.util.List<java.lang.Object> itemsToMove)
|
void |
setParent(TagNode parent)
|
Methods inherited from class info.bliki.htmlcleaner.TagToken |
---|
equals, getName, getOriginalSource, hashCode, isReduceTokenStack, setName, setOriginalSource, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] ALLOWED_ATTRIBUTES
static addAllowedAttribute()
method.
protected static final java.util.HashSet<java.lang.String> ALLOWED_ATTRIBUTES_SET
Constructor Detail |
---|
public TagNode()
public TagNode(java.lang.String name)
Method Detail |
---|
public static java.util.Set<java.lang.String> getAllowedAttributes()
public static boolean removeAllowedAttribute(java.lang.String key)
public static boolean addAllowedAttribute(java.lang.String key)
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
public java.util.Map<java.lang.String,java.lang.Object> getObjectAttributes()
attName
- the attribute nameattValue
- the attribute valueaddObjectAttribute(String, Object)
,
ImageFormat
public java.util.List<java.lang.Object> getChildren()
public TagNode getParent()
public void setParent(TagNode parent)
public boolean addAttribute(java.lang.String attName, java.lang.String attValue, boolean checkXSS)
TagToken
addAttribute
in class TagToken
attName
- the attribute nameattValue
- the attribute's value stringcheckXSS
- check the attributes for allowed names to avoid cross side
scripting
public boolean isAllowedAttribute(java.lang.String attName)
TagToken
isAllowedAttribute
in class TagToken
public void addObjectAttribute(java.lang.String attName, java.lang.Object attValue)
attName
- the attribute nameattValue
- the attribute valuegetObjectAttributes()
,
ImageFormat
public void addChild(java.lang.Object child)
public void addChildren(java.util.List<? extends java.lang.Object> children)
public void addItemForMoving(BaseToken item)
public java.util.List<java.lang.Object> getItemsToMove()
public void setItemsToMove(java.util.List<java.lang.Object> itemsToMove)
public boolean isFormed()
public void setFormed()
public void serialize(XmlSerializer xmlSerializer) throws java.io.IOException
java.io.IOException
public TagNode makeCopy()
public java.lang.Object clone()
clone
in class TagToken
public java.lang.String getParents()
TagToken
getParents
in class TagToken
null
if no parent tags are allowedpublic void getBodyString(java.lang.Appendable buf) throws java.io.IOException
java.io.IOException
public java.lang.String getBodyString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |