org.japano.metadata
Class Tag

java.lang.Object
  extended by org.japano.metadata.Tag
All Implemented Interfaces:
XMLNode
Direct Known Subclasses:
ActionTag, PageNodeTag

public class Tag
extends java.lang.Object
implements XMLNode

Base class for japano tags.

Version:
$Id: Tag.java,v 1.8 2005/11/18 19:58:03 fforw Exp $ SourceForge.net Logo
Author:
Sven Helmberger ( sven dot helmberger at gmx dot de )

Field Summary
protected  java.util.List attributes
          Contains a list with all attributes for this tag.
protected  BodyContent bodyContent
          BodyContent
protected  java.lang.String description
          Description of the tag
protected  java.lang.String klass
          Class of the tag
protected  java.lang.String libraryURI
           
protected  java.lang.String name
          name of the tag
static char SUBTAG_DIVIDER
           
 
Constructor Summary
Tag()
          Creates a new tag instance
Tag(java.lang.String name, java.lang.String klass, BodyContent bodyContent, java.lang.String description)
          Creates a new tag instance with the given data
 
Method Summary
 void addAttribute(Attribute attr)
           
 void addAttribute(java.lang.String name, boolean required, boolean rtExprValue, java.lang.String type, java.lang.String description)
          Convenience Method to add a new Attribute constructed from the given parameters.
 void addToTagLibrary(XMLElement tagLibElement)
           
 java.util.List attributes()
           
 java.lang.String getDescription()
           
 java.lang.String getName()
           
static void removeTagLibChild(XMLElement tagLib, java.lang.String elementName, java.lang.String name, boolean removeSubTags)
          Removes a taglib child with the given xml element name and the given content of name sub element.
 void setDescription(java.lang.String description)
           
 void setLibraryURI(java.lang.String libraryURI)
           
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 XMLElement toXML()
          Creates an XMLElement from this XMLNode and its children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUBTAG_DIVIDER

public static final char SUBTAG_DIVIDER
See Also:
Constant Field Values

libraryURI

protected java.lang.String libraryURI

name

protected java.lang.String name
name of the tag


klass

protected java.lang.String klass
Class of the tag


description

protected java.lang.String description
Description of the tag


bodyContent

protected BodyContent bodyContent
BodyContent


attributes

protected java.util.List attributes
Contains a list with all attributes for this tag.

Constructor Detail

Tag

public Tag()
Creates a new tag instance


Tag

public Tag(java.lang.String name,
           java.lang.String klass,
           BodyContent bodyContent,
           java.lang.String description)
Creates a new tag instance with the given data

Parameters:
name - Name of the tag
klass - Class of the tag
bodyContent - BodyContent set for this tag
description - description of this tag
Method Detail

addAttribute

public void addAttribute(Attribute attr)

addAttribute

public void addAttribute(java.lang.String name,
                         boolean required,
                         boolean rtExprValue,
                         java.lang.String type,
                         java.lang.String description)
Convenience Method to add a new Attribute constructed from the given parameters.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addToTagLibrary

public void addToTagLibrary(XMLElement tagLibElement)

removeTagLibChild

public static void removeTagLibChild(XMLElement tagLib,
                                     java.lang.String elementName,
                                     java.lang.String name,
                                     boolean removeSubTags)
Removes a taglib child with the given xml element name and the given content of name sub element.

Parameters:
tagLib - taglib element

toXML

public XMLElement toXML()
Description copied from interface: XMLNode
Creates an XMLElement from this XMLNode and its children.

Specified by:
toXML in interface XMLNode
Returns:
XMLElement

getName

public java.lang.String getName()

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

setName

public void setName(java.lang.String name)

setLibraryURI

public void setLibraryURI(java.lang.String libraryURI)

attributes

public java.util.List attributes()