Release Planner v1.0

rp.util.xml
Interface XMLTags

All Known Implementing Classes:
XMLTagsDefault

public interface XMLTags

Declares a protocol for looking up XML tag id's and names, and for allocating and returning loaders.

Version:
$Revision: 1.1 $, $Date: 2001/06/01 15:23:37 $

Method Summary
 XMLLoader getLoader(int tagId)
          Fetches an instance of a loader class (possibly recycled) for a given tag id.
 int idOf(java.lang.String tagName)
          Returns the integer id of a tag given by its string name.
 java.lang.String nameOf(int tagId)
          Returns the string name of a tag given by its integer id.
 void returnLoader(int tagId, XMLLoader loader)
          Inidicates that the client is done with this loader and it may be recycled.
 

Method Detail

nameOf

public java.lang.String nameOf(int tagId)
Returns the string name of a tag given by its integer id.

Parameters:
tagId - the integer id of the tag we are looking up
Returns:
the unqualified name of the XML tag as it appears in an XML file

idOf

public int idOf(java.lang.String tagName)
         throws XMLTagNotFoundException
Returns the integer id of a tag given by its string name.

Parameters:
tagName - the string name of the tag whose id we are looking up
Returns:
the integer id of the tag
Throws:
XMLTagNotFoundException - when the name corresponds to no tag

getLoader

public XMLLoader getLoader(int tagId)
                    throws XMLTagNoLoaderException
Fetches an instance of a loader class (possibly recycled) for a given tag id.

Parameters:
tagId - the integer id of the tag whose loader we are instantiating
Returns:
a new instance of a loader
Throws:
XMLTagNoLoaderException - when the loader class cannot be instantiated.

returnLoader

public void returnLoader(int tagId,
                         XMLLoader loader)
Inidicates that the client is done with this loader and it may be recycled.

Parameters:
tagId - the id of the tag withi which this loader is associated.
loader - the loader object to be recycled

Release Planner v1.0