org.apache.ecs
Class XhtmlDocument

java.lang.Object
  |
  +--org.apache.ecs.XhtmlDocument
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class XhtmlDocument
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class creates an XhtmlDocument container, for convience.

Version:
$Id: XhtmlDocument.java,v 1.3 2003/04/27 09:42:34 rdonkin Exp $
Author:
Stephan Nagy, Jon S. Stevens, Bojan Smojver
See Also:
Serialized Form

Field Summary
private  body body
           
private  java.lang.String codeset
           
private  Doctype doctype
           
private  head head
           
private  html html
           
private  title title
           
 
Constructor Summary
XhtmlDocument()
          Basic constructor.
XhtmlDocument(java.lang.String codeset)
          Basic constructor.
 
Method Summary
(package private)  void ()
           
 XhtmlDocument appendBody(Element value)
          Append to the body element for this XhtmlDocument container.
 XhtmlDocument appendBody(java.lang.String value)
          Append to the body element for this XhtmlDocument container.
 XhtmlDocument appendHead(Element value)
          Append to the head element for this XhtmlDocument container.
 XhtmlDocument appendHead(java.lang.String value)
          Append to the head element for this XhtmlDocument container.
 XhtmlDocument appendTitle(Element value)
          Append to the title element for this XhtmlDocument container.
 XhtmlDocument appendTitle(java.lang.String value)
          Append to the title element for this XhtmlDocument container.
 java.lang.Object clone()
          Allows the document to be cloned.
 body getBody()
          Get the body element for this XhtmlDocument container.
 java.lang.String getCodeset()
          Gets the codeset for this XhtmlDocument
 Doctype getDoctype()
          Get the doctype element for this XhtmlDocument container.
 head getHead()
          Get the head element for this XhtmlDocument container.
 html getHtml()
          Get the html element for this XhtmlDocument container.
 title getTitle()
          Get the title element for this XhtmlDocument container.
 void output(java.io.OutputStream out)
          Write the container to the OutputStream
 void output(java.io.PrintWriter out)
          Write the container to the PrintWriter
 XhtmlDocument setBody(body set_body)
          Set the body element for this XhtmlDocument container.
 void setCodeset(java.lang.String codeset)
          Sets the codeset for this XhtmlDocument
 XhtmlDocument setDoctype(Doctype set_doctype)
          Set the doctype element for this XhtmlDocument container.
 XhtmlDocument setHead(head set_head)
          Set the head element for this XhtmlDocument container.
 XhtmlDocument setHtml(html set_html)
          Set the html element for this XhtmlDocument container.
 XhtmlDocument setTitle(title set_title)
          Set the title element for this XhtmlDocument container.
 java.lang.String toString()
          Override the toString() method so that it prints something meaningful.
 java.lang.String toString(java.lang.String codeset)
          Override the toString() method so that it prints something meaningful.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

html

private html html

head

private head head

body

private body body

title

private title title

codeset

private java.lang.String codeset

doctype

private Doctype doctype
Constructor Detail

XhtmlDocument

public XhtmlDocument()
Basic constructor.

XhtmlDocument

public XhtmlDocument(java.lang.String codeset)
Basic constructor. Sets the codeset for the page output.
Method Detail

void ()
Overrides:
in class java.lang.Object

getDoctype

public Doctype getDoctype()
Get the doctype element for this XhtmlDocument container.

setDoctype

public XhtmlDocument setDoctype(Doctype set_doctype)
Set the doctype element for this XhtmlDocument container.

getHtml

public html getHtml()
Get the html element for this XhtmlDocument container.

setHtml

public XhtmlDocument setHtml(html set_html)
Set the html element for this XhtmlDocument container.

getHead

public head getHead()
Get the head element for this XhtmlDocument container.

setHead

public XhtmlDocument setHead(head set_head)
Set the head element for this XhtmlDocument container.

appendHead

public XhtmlDocument appendHead(Element value)
Append to the head element for this XhtmlDocument container.
Parameters:
value - adds to the value between the head tags

appendHead

public XhtmlDocument appendHead(java.lang.String value)
Append to the head element for this XhtmlDocument container.
Parameters:
value - adds to the value between the head tags

getBody

public body getBody()
Get the body element for this XhtmlDocument container.

setBody

public XhtmlDocument setBody(body set_body)
Set the body element for this XhtmlDocument container.

appendBody

public XhtmlDocument appendBody(Element value)
Append to the body element for this XhtmlDocument container.
Parameters:
value - adds to the value between the body tags

appendBody

public XhtmlDocument appendBody(java.lang.String value)
Append to the body element for this XhtmlDocument container.
Parameters:
value - adds to the value between the body tags

getTitle

public title getTitle()
Get the title element for this XhtmlDocument container.

setTitle

public XhtmlDocument setTitle(title set_title)
Set the title element for this XhtmlDocument container.

appendTitle

public XhtmlDocument appendTitle(Element value)
Append to the title element for this XhtmlDocument container.
Parameters:
value - adds to the value between the title tags

appendTitle

public XhtmlDocument appendTitle(java.lang.String value)
Append to the title element for this XhtmlDocument container.
Parameters:
value - adds to the value between the title tags

setCodeset

public void setCodeset(java.lang.String codeset)
Sets the codeset for this XhtmlDocument

getCodeset

public java.lang.String getCodeset()
Gets the codeset for this XhtmlDocument
Returns:
the codeset

output

public void output(java.io.OutputStream out)
Write the container to the OutputStream

output

public void output(java.io.PrintWriter out)
Write the container to the PrintWriter

toString

public final java.lang.String toString()
Override the toString() method so that it prints something meaningful.
Overrides:
toString in class java.lang.Object

toString

public final java.lang.String toString(java.lang.String codeset)
Override the toString() method so that it prints something meaningful.

clone

public java.lang.Object clone()
Allows the document to be cloned. Doesn't return an instance of document returns instance of html. NOTE: If you have a doctype set, then it will be lost. Feel free to submit a patch to fix this. It isn't trivial.
Overrides:
clone in class java.lang.Object


Copyright © 1999-2003 Apache Software Foundation. All Rights Reserved.