vscript
Class Tag

java.lang.Object
  |
  +--vscript.Tag

public class Tag
extends java.lang.Object

Tag class represents a Tag in VScript and contains tags name,identifer header, subtags and tagdata. The user typically uses only the getAttributeValue(String attr) method in Tag class in order to help configure the component corresponding to the tag based on attributes specified in the tag.


Constructor Summary
Tag(java.lang.String name, java.lang.String identifier, java.lang.StringBuffer header, java.lang.StringBuffer body)
           
 
Method Summary
 java.lang.String getAttributeValue(java.lang.String attr)
          Returns the value of the specified attribute.
 java.lang.String getFullTagName()
          Returns the full name of the tag.
 vscript.interpreter.TagInterpreter getInterpreter()
          Returns the interpreter instance.
 java.util.List getSubTag()
          Return all the subTags, the returned array contains null if a sub tag was deleted.
 java.util.List getSubTag(java.lang.String tagName)
          Return all the subtags with the given tag name.
 java.lang.String getTagData()
          Return the tag data.
 java.lang.String getTagIdentifier()
          Returns the tag identifier.
 java.lang.String getTagName()
          Returns the tag name.
 void parseTagBody(java.util.List list)
          This method is used so that the tag body is only parsed when called for.
 void removeSubTag(java.lang.String tagName)
          Remove all subtags with specified name.
 void setMessageNode(vscript.message.MessageNode node)
          This method is necessary so as to set the messageNode object in order for the Tag to transparently handle getAttributeValue methods taking into account values in the specified attribute holder.
 void setTagData(java.lang.String data)
          Set tag data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tag

public Tag(java.lang.String name,
           java.lang.String identifier,
           java.lang.StringBuffer header,
           java.lang.StringBuffer body)
Method Detail

parseTagBody

public void parseTagBody(java.util.List list)
This method is used so that the tag body is only parsed when called for.


getTagName

public java.lang.String getTagName()
Returns the tag name.


getFullTagName

public java.lang.String getFullTagName()
Returns the full name of the tag.


getTagIdentifier

public java.lang.String getTagIdentifier()
Returns the tag identifier.


getAttributeValue

public java.lang.String getAttributeValue(java.lang.String attr)
Returns the value of the specified attribute. Checks if the attribute is specified inside an attr tag and returns the correct value.

Parameters:
attr - The name of the attribute.

getSubTag

public java.util.List getSubTag()
Return all the subTags, the returned array contains null if a sub tag was deleted. Returns null if there are no subtags.


getSubTag

public java.util.List getSubTag(java.lang.String tagName)
Return all the subtags with the given tag name. If there are no subtags null is returned.


getTagData

public java.lang.String getTagData()
Return the tag data. Tag data is all the data withing the tag body other than sub tags.


setTagData

public void setTagData(java.lang.String data)
Set tag data.


removeSubTag

public void removeSubTag(java.lang.String tagName)
Remove all subtags with specified name.


setMessageNode

public void setMessageNode(vscript.message.MessageNode node)
This method is necessary so as to set the messageNode object in order for the Tag to transparently handle getAttributeValue methods taking into account values in the specified attribute holder.


getInterpreter

public vscript.interpreter.TagInterpreter getInterpreter()
Returns the interpreter instance. If no interpreter is specified for this tag null is returned.