edu.stanford.db.xml.util
Class Element

java.lang.Object
  |
  +--edu.stanford.db.xml.util.Element
Direct Known Subclasses:
StrawElement

public class Element
extends java.lang.Object


Field Summary
protected  java.util.Hashtable attrs
           
static int CDATA
           
protected  Element child
          we consider a single child at a time
static int ELEMENTS
           
static int EMPTY
           
static java.util.Enumeration EMPTY_ENUMERATION
           
static java.lang.String EMPTY_STR
           
static int MIXED
           
protected  QName name
           
protected  int numInParent
           
protected  Element parent
           
protected  int type
           
protected  java.lang.String value
          If element is CDATA
 
Constructor Summary
Element()
           
 
Method Summary
 java.lang.String getAttribute(QName name)
           
 java.util.Enumeration getAttributes()
           
 QName getName()
           
 int getNumInParent()
           
 Element getParent()
           
 int getType()
           
 java.lang.String getValue()
           
 void setAttribute(QName name, java.lang.String value)
           
 void setChild(Element child)
           
 void setName(QName name)
           
 void setNumInParent(int n)
           
 void setParent(Element parent)
           
 void setValue(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STR

public static final java.lang.String EMPTY_STR

EMPTY

public static final int EMPTY

CDATA

public static final int CDATA

ELEMENTS

public static final int ELEMENTS

MIXED

public static final int MIXED

EMPTY_ENUMERATION

public static final java.util.Enumeration EMPTY_ENUMERATION

type

protected int type

parent

protected Element parent

child

protected Element child
we consider a single child at a time

name

protected QName name

numInParent

protected int numInParent

value

protected java.lang.String value
If element is CDATA

attrs

protected java.util.Hashtable attrs
Constructor Detail

Element

public Element()
Method Detail

setName

public void setName(QName name)

getName

public QName getName()

setNumInParent

public void setNumInParent(int n)

getNumInParent

public int getNumInParent()

getType

public int getType()

getValue

public java.lang.String getValue()

setValue

public void setValue(java.lang.String value)

getParent

public Element getParent()

setParent

public void setParent(Element parent)

setChild

public void setChild(Element child)

getAttributes

public java.util.Enumeration getAttributes()

setAttribute

public void setAttribute(QName name,
                         java.lang.String value)

getAttribute

public java.lang.String getAttribute(QName name)