org.eclipse.actf.validation.valdoc.rulebase
Class BaseElement

java.lang.Object
  extended by org.eclipse.actf.validation.valdoc.rulebase.BaseElement
Direct Known Subclasses:
AliasElement, ExecutionPointElement, ScriptElement

public abstract class BaseElement
extends Object

base element class for element within a validation document

Author:
Mike Squillace

Field Summary
protected  String name
           
protected  String text
           
 
Constructor Summary
BaseElement(String name, String text)
          create an element or descriptor for an element in a validation document
 
Method Summary
 String getName()
          returns the name attribute of the element (if present)
 String getText()
          returns the text content of the element (if present)
 String getTextTrim()
          returns the trimmed text content of the element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

text

protected String text
Constructor Detail

BaseElement

public BaseElement(String name,
                   String text)
create an element or descriptor for an element in a validation document

Parameters:
name - name attribute (if present)
text - text content (if any)
Method Detail

getName

public String getName()
returns the name attribute of the element (if present)

Returns:
name attribute

getText

public String getText()
returns the text content of the element (if present)

Returns:
text content or empty string if no content is present

getTextTrim

public String getTextTrim()
returns the trimmed text content of the element

Returns:
trimmed textual content of element