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

    Modifier and Type
    Method
    Description
    void
    Should release resources and call the finalize method.
    Method to retrieve the list of names used to identify desired values.
    Accessor method for retrieving a specific named value.
    Method to retrieve the list of values stored in this map.
    boolean
    Should initialize members as required.
    void
    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 Details

    • 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.