org.apache.ecs
Class Document

java.lang.Object
  |
  +--org.apache.ecs.Document

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

This class creates a Document container, for convience.

Version:
$Id: Document.java,v 1.2 1999/06/22 22:46:20 jonbolt Exp $
Author:
Stephan Nagy, Jon S. Stevens
See Also:
Serialized Form

Field Summary
private  Body body
           
private  java.lang.String codeset
           
private  Head head
           
private  Html html
           
private  Title title
           
 
Constructor Summary
Document()
          Basic constructor.
Document(java.lang.String codeset)
          Basic constructor.
 
Method Summary
(package private)  void ()
           
 Document appendBody(Element value)
          Append to the body element for this document container.
 Document appendBody(java.lang.String value)
          Append to the body element for this document container.
 Document appendHead(Element value)
          Append to the head element for this document container.
 Document appendHead(java.lang.String value)
          Append to the head element for this document container.
 Document appendTitle(Element value)
          Append to the title element for this document container.
 Document appendTitle(java.lang.String value)
          Append to the title element for this document container.
 java.lang.Object clone()
          Allows the document to be cloned.
 Body getBody()
          Get the body element for this document container.
 java.lang.String getCodeset()
          Gets the codeset for this Document
 Head getHead()
          Get the head element for this document container.
 Html getHtml()
          Get the html element for this document container.
 Title getTitle()
          Get the title element for this document container.
 void output(java.io.OutputStream out)
          Write the container to the OutputStream
 void output(java.io.PrintWriter out)
          Write the container to the PrinteWriter
 Document setBody(Body set_body)
          Set the Body element for this document container.
 void setCodeset(java.lang.String codeset)
          Sets the codeset for this Document
 Document setHead(Head set_head)
          Set the head element for this document container.
 Document setHtml(Html set_html)
          Set the html element for this document container.
 Document setTitle(Title set_title)
          Set the Title element for this document 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
Constructor Detail

Document

public Document()
Basic constructor.

Document

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

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

getHtml

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

setHtml

public Document setHtml(Html set_html)
Set the html element for this document container.

getHead

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

setHead

public Document setHead(Head set_head)
Set the head element for this document container.

appendHead

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

appendHead

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

getBody

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

setBody

public Document setBody(Body set_body)
Set the Body element for this document container.

appendBody

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

appendBody

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

getTitle

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

setTitle

public Document setTitle(Title set_title)
Set the Title element for this document container.

appendTitle

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

appendTitle

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

setCodeset

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

getCodeset

public java.lang.String getCodeset()
Gets the codeset for this Document
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 PrinteWriter

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 instanceof document returns instance of Html.
Overrides:
clone in class java.lang.Object