|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.markup.MarkupElement
wicket.markup.parser.XmlTag
A subclass of MarkupElement which represents a tag including namespace and its optional attributes. XmlTags are returned by the XML parser.
| Nested Class Summary | |
static class |
XmlTag.Type
Enumerated type for different kinds of component tags. |
| Field Summary | |
static XmlTag.Type |
CLOSE
A close tag, like </TAG>. |
static XmlTag.Type |
OPEN
An open tag, like <TAG componentId = "xyz">. |
static XmlTag.Type |
OPEN_CLOSE
An open/close tag, like <TAG componentId = "xyz"/>. |
| Constructor Summary | |
XmlTag()
Construct. |
|
| Method Summary | |
boolean |
closes(XmlTag open)
Gets whether this tag closes the provided open tag. |
LowerCaseKeyValueMap |
getAttributes()
Gets a hashmap of this tag's attributes. |
int |
getColumnNumber()
Get the column number. |
int |
getLength()
Gets the length of the tag in characters. |
int |
getLineNumber()
Get the line number. |
java.lang.String |
getName()
Gets the name of the tag, for example the tag 's name would be 'b'. |
boolean |
getNameChanged()
Get whether the name of this component tag was changed. |
java.lang.String |
getNamespace()
Namespace of the tag, if available. |
XmlTag |
getOpenTag()
Assuming this is a close tag, return the corresponding open tag |
int |
getPos()
Gets the location of the tag in the input string. |
java.lang.String |
getString(java.lang.String key)
Get a string attribute. |
XmlTag.Type |
getType()
Get the tag type. |
boolean |
isClose()
Gets whether this is a close tag. |
boolean |
isMutable()
|
boolean |
isOpen()
Gets whether this is an open tag. |
boolean |
isOpenClose()
Gets whether this tag is an open/ close tag. |
void |
makeImmutable()
Makes this tag object immutable by making the attribute map unmodifiable. |
XmlTag |
mutable()
Gets this tag if it is already mutable, or a mutable copy of this tag if it is immutable. |
java.lang.Object |
put(java.lang.String key,
boolean value)
Puts a boolean attribute. |
java.lang.Object |
put(java.lang.String key,
int value)
Puts an int attribute. |
java.lang.Object |
put(java.lang.String key,
java.lang.String value)
Puts a string attribute. |
java.lang.Object |
put(java.lang.String key,
StringValue value)
Puts a StringValueattribute. |
void |
putAll(java.util.Map map)
Puts all attributes in map |
void |
remove(java.lang.String key)
Removes an attribute. |
void |
setName(java.lang.String name)
Sets the tag name. |
void |
setOpenTag(XmlTag tag)
Assuming this is a close tag, assign it's corresponding open tag. |
void |
setType(XmlTag.Type type)
Sets type of this tag if it is not immutable. |
java.lang.String |
toDebugString()
Converts this object to a string representation. |
java.lang.String |
toString()
Converts this object to a string representation. |
java.lang.String |
toUserDebugString()
Converts this object to a string representation. |
java.lang.String |
toXmlString(java.lang.String attributeToBeIgnored)
Assuming some attributes have been changed, toXmlString() rebuilds the String on based on the tags informations. |
| Methods inherited from class wicket.markup.MarkupElement |
closes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final XmlTag.Type CLOSE
public static final XmlTag.Type OPEN
public static final XmlTag.Type OPEN_CLOSE
| Constructor Detail |
public XmlTag()
| Method Detail |
public final boolean closes(XmlTag open)
open - The open tag
public LowerCaseKeyValueMap getAttributes()
public int getColumnNumber()
public int getLength()
public int getLineNumber()
public java.lang.String getName()
public boolean getNameChanged()
public java.lang.String getNamespace()
public final XmlTag getOpenTag()
public int getPos()
public java.lang.String getString(java.lang.String key)
key - The key
public XmlTag.Type getType()
public boolean isClose()
public final boolean isMutable()
public boolean isOpen()
public boolean isOpenClose()
public void makeImmutable()
public XmlTag mutable()
public java.lang.Object put(java.lang.String key,
boolean value)
key - The keyvalue - The value
public java.lang.Object put(java.lang.String key,
int value)
key - The keyvalue - The value
public java.lang.Object put(java.lang.String key,
java.lang.String value)
key - The keyvalue - The value
public java.lang.Object put(java.lang.String key,
StringValue value)
StringValueattribute.
key - The keyvalue - The value
public void putAll(java.util.Map map)
map - A key/value mappublic void remove(java.lang.String key)
key - The key to removepublic void setName(java.lang.String name)
name - New tag namepublic void setOpenTag(XmlTag tag)
tag - the open-tag
java.lang.RuntimeException - if 'this' is not a close tagpublic void setType(XmlTag.Type type)
type - The new typepublic java.lang.String toDebugString()
public java.lang.String toString()
public java.lang.String toUserDebugString()
toUserDebugString in class MarkupElementpublic java.lang.String toXmlString(java.lang.String attributeToBeIgnored)
attributeToBeIgnored -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||