DLESE Tools
v1.6.0

org.dlese.dpc.xml
Interface XMLMap

All Known Implementing Classes:
DleseXMLReader

public interface XMLMap

Provides a hashmap-like interface into an XML-based metadata file, hashed by user-defined named keys. The XMLMap stores objects, often strings, which map to a user-defined label. The current version requires that the mapping be created using a mapping class that has been defined and made available as part of the org.dlese.dpc.xml.maps package, and instantiable via the XMLMapFactory class in this package. A future release will utilize XML-based configuration files instead.

Although not strictly required, each implementing class should utilize the init method for intialization and subsequently call the destroy method in order to release resources.

Version:
0.9b, 05/20/02
Author:
Dave Deniman

Method Summary
 void destroy()
          Should release resources and call the finalize method.
 List getKeys()
          Method to retrieve the list of names used to identify desired values.
 Object getValue(String name)
          Accessor method for retrieving a specific named value.
 List getValues()
          Method to retrieve the list of values stored in this map.
 boolean init()
          Should initialize members as required.
 void setMap()
          Use this method to populate the XMLMap with the desired named values.
 void setValue(String name, Object xmlObject)
          Setter method for updating a specific named value.
 

Method Detail

init

boolean init()
Should initialize members as required.

Returns:
true if intialization successful, false otherwise

destroy

void destroy()
Should release resources and call the finalize method.


setMap

void setMap()
Use this method to populate the XMLMap with the desired named values.


getKeys

List getKeys()
Method to retrieve the list of names used to identify desired values.


getValues

List getValues()
Method to retrieve the list of values stored in this map.


getValue

Object getValue(String name)
Accessor method for retrieving a specific named value.


setValue

void setValue(String name,
              Object xmlObject)
Setter method for updating a specific named value.


DLESE Tools
v1.6.0