public class Document extends java.lang.Object implements ContainerElement
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
base
the base URL for this document
|
protected ListElement |
body
the body of the document
|
protected java.lang.String |
title
this title of the document
|
Constructor and Description |
---|
Document()
Construct a document with no title and an empty body
|
Document(java.lang.String title)
Construct a document with a title but an empty body
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(Element e)
Add another element to the body of the document
|
void |
addElement(java.lang.String s)
Add another string to the body of the document
|
void |
generate(java.io.Writer out)
convert representation to html and write it out
|
void |
generateHeader(java.io.Writer out)
Write the header to the output
|
void |
setBase(java.lang.String base)
Writer for the base url
|
void |
setTitle(java.lang.String title)
Writer for title
|
protected java.lang.String title
protected java.lang.String base
protected ListElement body
public Document()
public Document(java.lang.String title)
title
- the title of the documentpublic void setTitle(java.lang.String title)
title
- the new document titlepublic void setBase(java.lang.String base)
base
- the new base URLpublic void addElement(Element e)
addElement
in interface ContainerElement
e
- the element to addpublic void addElement(java.lang.String s)
addElement
in interface ContainerElement
s
- the string to addpublic void generateHeader(java.io.Writer out) throws java.io.IOException
out
- the Writer to dump output tojava.io.IOException
- an IO error occurred accessing
outCopyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details