2004.04.29


com.jdc.xml
Class ComplexTag

java.lang.Object
  |
  +--com.jdc.xml.ComplexTag
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ComplexTag

public abstract class ComplexTag
extends Object
implements Serializable

The ComplexTag class represents an XML complex tag object. An XML complex tag has the form: <tag>body</tag>.

Version:
1.0
Author:
Jay Damon
See Also:
Serialized Form

Constructor Summary
ComplexTag()
          Constructs a new XML ComplexTag object.
 
Method Summary
protected  ComplexTag addAttribute(Attribute attribute)
          Adds an XML tag attribute of the form: name="value".
protected  String create()
          Creates and returns an XML tag of the form: <tag>>body</tag> for the current tag identifier, attributes, and body.
protected  String create(String body)
          Creates and returns an XML tag of the form: <tag>>body</tag> for the current tag identifier, attributes, and body.
protected  String endTag()
          Returns the XML end tag.
protected  String getAttributes()
          Returns a String of XML tag attributes.
protected  String getBody()
          Returns the XML tag body.
protected  String getIdentifier()
          Returns the XML tag identifier.
protected  ComplexTag setBody(String body)
          Sets the XML tag body.
protected  ComplexTag setIdentifier(String identifier)
          Sets the XML tag identifier.
protected  String startTag()
          Returns the XML start tag.
 String toString()
          Returns an XML tag of the form: <tag>>body</tag>.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComplexTag

public ComplexTag()
Constructs a new XML ComplexTag object.

Method Detail

addAttribute

protected ComplexTag addAttribute(Attribute attribute)
Adds an XML tag attribute of the form: name="value".

Returns:
This XML tag.

create

protected String create()
Creates and returns an XML tag of the form: <tag>>body</tag> for the current tag identifier, attributes, and body.

Returns:
An XML tag String.

create

protected String create(String body)
Creates and returns an XML tag of the form: <tag>>body</tag> for the current tag identifier, attributes, and body.

Returns:
An XML tag String.

endTag

protected String endTag()
Returns the XML end tag.

Returns:
The XML end tag.

getAttributes

protected String getAttributes()
Returns a String of XML tag attributes.

Returns:
A String of XML tag attributes.

getBody

protected String getBody()
Returns the XML tag body.

Returns:
The XML tag body.

getIdentifier

protected String getIdentifier()
Returns the XML tag identifier.

Returns:
The XML tag identifier.

setBody

protected ComplexTag setBody(String body)
Sets the XML tag body.

Returns:
This XML tag.

setIdentifier

protected ComplexTag setIdentifier(String identifier)
Sets the XML tag identifier.

Returns:
This XML tag.

startTag

protected String startTag()
Returns the XML start tag.

Returns:
The XML start tag.

toString

public String toString()
Returns an XML tag of the form: <tag>>body</tag>.

Overrides:
toString in class Object
Returns:
An XML tag String.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.