org.apache.ecs
Class StringElement

java.lang.Object
  |
  +--org.apache.ecs.Element
        |
        +--org.apache.ecs.ElementAttributes
              |
              +--org.apache.ecs.ConcreteElement
                    |
                    +--org.apache.ecs.StringElement

public class StringElement
extends ConcreteElement

This class is used to create a String element in ECS. A StringElement has no tags wrapped around it, it is an Element without tags.

Version:
$Id: StringElement.java,v 1.2 1999/05/14 23:40:38 jonbolt Exp $
Author:
Stephan Nagy, Jon S. Stevens

Field Summary
private  java.lang.StringBuffer sb
          internal use only
 
Fields inherited from class org.apache.ecs.ConcreteElement
h_element, v_element
 
Fields inherited from class org.apache.ecs.ElementAttributes
attribute_filter, end_modifier, end_modifier_defined, filter_attribute_state, NO_ATTRIBUTE_VALUE, start_modifier, start_modifier_defined, TAG, TEXT
 
Fields inherited from class org.apache.ecs.Element
case_type, codeset, element, end_element, filter, filter_state, position, VERSION
 
Constructor Summary
StringElement()
          Basic constructor
StringElement(Element string)
          Basic constructor
StringElement(java.lang.String string)
          Basic constructor
 
Method Summary
(package private)  void ()
           
 StringElement addElement(Element element)
          Adds an Element to the element.
 StringElement addElement(java.lang.String element)
          Adds an Element to the element.
private  StringElement append(java.lang.String string)
          Appends to the internal StringBuffer
 void output(java.io.OutputStream out)
          Implements the output method in Element
 void output(java.io.PrintWriter out)
          Implements the output method in Element
 StringElement removeElement(java.lang.String hashcode)
          Removes an Element from the element.
 StringElement reset()
          Resets the interal string to be empty.
 
Methods inherited from class org.apache.ecs.ConcreteElement
addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, registryHasElement, registryHasElement, removeElementFromRegistry, removeElementFromRegistry
 
Methods inherited from class org.apache.ecs.ElementAttributes
addAttribute, clone, getAttributeFilter, getAttributeFilterState, getEndModifier, getEndModifierDefined, getStartModifier, getStartModifierDefined, hasAttribute, removeAttribute, removeEndModifier, removeStartModifier, setAttributeFilter, setAttributeFilterState, setClass, setDir, setEndModifier, setEndModifierDefined, setID, setLang, setModifier, setModifier, setStartModifier, setStartModifierDefined, setStyle, setTitle
 
Methods inherited from class org.apache.ecs.Element
alterCase, getCase, getCodeSet, getElementHashEntry, getElementType, getFilter, getFilterState, getNeedClosingTag, getTagPosition, getVersion, setCase, setCodeSet, setElementType, setFilter, setFilterState, setNeedClosingTag, setTagPosition, toString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

sb

private java.lang.StringBuffer sb
internal use only
Constructor Detail

StringElement

public StringElement()
Basic constructor

StringElement

public StringElement(java.lang.String string)
Basic constructor

StringElement

public StringElement(Element string)
Basic constructor
Method Detail

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

append

private StringElement append(java.lang.String string)
Appends to the internal StringBuffer

reset

public StringElement reset()
Resets the interal string to be empty.

addElement

public StringElement addElement(java.lang.String element)
Adds an Element to the element.
Parameters:
element - Adds an Element to the element.

addElement

public StringElement addElement(Element element)
Adds an Element to the element.
Parameters:
element - Adds an Element to the element.

removeElement

public StringElement removeElement(java.lang.String hashcode)
Removes an Element from the element.
Parameters:
hashcode - the name of the element to be removed.

output

public void output(java.io.OutputStream out)
Implements the output method in Element
Overrides:
output in class ConcreteElement

output

public void output(java.io.PrintWriter out)
Implements the output method in Element
Overrides:
output in class ConcreteElement