de.goerntkai.scot.app.misc
Class HTMLDocument

java.lang.Object
  extended byde.goerntkai.scot.app.misc.HTMLDocument

public class HTMLDocument
extends java.lang.Object

Represents the HTML document.

Author:
Kai Görnt

Constructor Summary
HTMLDocument()
           
 
Method Summary
 void addContent(SCoTBlock[] contentBlocks)
          Adds a new content block to the documents body.
 void addMetaData(ISCoTComponent metaData)
          Adds a new meta tag to the documents head.
 void addMetaData(ISCoTComponent[] metaData)
          Adds an array of new meta tags to the documents head.
 void create(java.lang.String publicID, java.lang.String systemID)
          Creates a new HTML document.
 void createFrameset(FramesetComponent aFrameset, java.lang.String publicID, java.lang.String systemID)
          Creates a new xHTML frameset document.
 boolean isEmpty()
          The given document is checked wether its body or frameset section has child nodes.
 void save(java.lang.String fileName, java.lang.String encoding)
          Stores the HTML document to the given path.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLDocument

public HTMLDocument()
Method Detail

addContent

public void addContent(SCoTBlock[] contentBlocks)
Adds a new content block to the documents body.

Parameters:
contentBlocks - the new block to append

addMetaData

public void addMetaData(ISCoTComponent metaData)

Adds a new meta tag to the documents head.

Parameters:
metaData - the new meta data to append

addMetaData

public void addMetaData(ISCoTComponent[] metaData)

Adds an array of new meta tags to the documents head.

Parameters:
metaData - the new meta data to append

create

public void create(java.lang.String publicID,
                   java.lang.String systemID)

Creates a new HTML document.

TODO test me

Parameters:
publicID -
systemID -

createFrameset

public void createFrameset(FramesetComponent aFrameset,
                           java.lang.String publicID,
                           java.lang.String systemID)

Creates a new xHTML frameset document.

TODO test me

Parameters:
aFrameset -
publicID -
systemID -

isEmpty

public boolean isEmpty()
The given document is checked wether its body or frameset section has child nodes. Returns false if there are child nodes and true if not.

Returns:
wether the body-element of the html-document is empty

save

public void save(java.lang.String fileName,
                 java.lang.String encoding)
          throws java.io.IOException

Stores the HTML document to the given path.

TODO test me

Parameters:
fileName - path where to store the document to
encoding -
Throws:
java.io.IOException


© 2004 by Kai Görnt