de.goerntkai.scot.app.document
Class SCoTElement

java.lang.Object
  extended byde.goerntkai.scot.app.document.SCoTElement
All Implemented Interfaces:
ISCoTComponent
Direct Known Subclasses:
AnchorElement, CommentElement, SimpleElement

public abstract class SCoTElement
extends java.lang.Object
implements ISCoTComponent

A SCoTElement is content which HTML representation is a blockbuilding tag. SCoTElement consists usually of one line in the SCoT document. A class which inherits from SCoTElement must implement NewElement(String line) which calls super(line).

Author:
Kai Görnt

Constructor Summary
SCoTElement(java.lang.String line)
          This constructor interpretes and parses the given line.
 
Method Summary
 java.util.ArrayList getParts()
          Returns the parts, this element consists of.
 java.lang.String getTagName()
          Returns the name of the HTML tag, this element gets, if there is any.
abstract  org.w3c.dom.Node toHTML(org.w3c.dom.Document doc)
          Returns the HTML representation of the element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCoTElement

public SCoTElement(java.lang.String line)
            throws SCoTException
This constructor interpretes and parses the given line. The line given must have the format <line> ::= <meaning><content>.

Parameters:
line - the line as found in a SCoT document
Throws:
SCoTException
Method Detail

getParts

public java.util.ArrayList getParts()
Returns the parts, this element consists of.

Returns:
all parts of the element

getTagName

public java.lang.String getTagName()
Returns the name of the HTML tag, this element gets, if there is any. In case that this element is a comment for excample, it returns an empty string.

Returns:
HTML tag name or empty string

toHTML

public abstract org.w3c.dom.Node toHTML(org.w3c.dom.Document doc)
Returns the HTML representation of the element. Uses the parent document for creating the node.

Specified by:
toHTML in interface ISCoTComponent
Parameters:
doc - the parent document
Returns:
the HTML representation


© 2004 by Kai Görnt