GXPARSE hosted by SourceForge.net Logo

ca.gorman.xml.parse.toolkit
Class MutableElement

java.lang.Object
  extended by ca.gorman.xml.parse.toolkit.AbstractElement
      extended by ca.gorman.xml.parse.toolkit.MutableElement
All Implemented Interfaces:
Element

public class MutableElement
extends AbstractElement
implements Element

Constructable and mutable realization of Element. This class makes the contructors and setters of the base class visible to the public.


Constructor Summary
  MutableElement()
           Create an uninitialized MutableElement.
  MutableElement(Element element)
           Create an initialized MutableElement.
  MutableElement(QName qName)
           Create a named MutableElement with empty attribute list.
protected MutableElement(QName qName, Attribute[] attributes)
           Create an initialized MutableElement.
 
Method Summary
 void setAttribute(Attribute attribute)
           Set or replace a single Attribute
 void setAttributes(Attribute[] attribute)
           Set or replace the entire list of attributes.
 void setQName(QName qName)
           Set element name.
 
Methods inherited from class ca.gorman.xml.parse.toolkit.AbstractElement
equals, getAttribute, getAttributes, getChildCount, getParent, getQName, getRepeatCount, getSiblingCount, hasAncestor, hashCode, hasParent, newInstance, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.gorman.xml.parse.Element
equals, getAttribute, getAttributes, getChildCount, getParent, getQName, getRepeatCount, getSiblingCount, hasAncestor, hashCode, hasParent
 

Constructor Detail

MutableElement

protected MutableElement(QName qName,
                         Attribute[] attributes)

Create an initialized MutableElement.


MutableElement

public MutableElement(Element element)

Create an initialized MutableElement.


MutableElement

public MutableElement(QName qName)

Create a named MutableElement with empty attribute list.


MutableElement

public MutableElement()

Create an uninitialized MutableElement.

Method Detail

setQName

public final void setQName(QName qName)
Description copied from class: AbstractElement

Set element name.

Overrides:
setQName in class AbstractElement

setAttributes

public final void setAttributes(Attribute[] attribute)
Description copied from class: AbstractElement

Set or replace the entire list of attributes.

Overrides:
setAttributes in class AbstractElement

setAttribute

public void setAttribute(Attribute attribute)

Set or replace a single Attribute

Overrides:
setAttribute in class AbstractElement
Throws:
NullPointerException - if attribute is null

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License