DLESE Tools
v1.2

org.dlese.dpc.xml.maps
Class ReviewStatusXMLReader

java.lang.Object
  extended byorg.dlese.dpc.xml.maps.ReviewStatusXMLReader
All Implemented Interfaces:
XMLMap

public class ReviewStatusXMLReader
extends Object
implements XMLMap

This class provides mapping between Review Status metadata values and the corresponding XML metadata record.

The accessor methods act as an interface with the XMLNode and XMLRecord classes. The XML processing details are handled by those classes, but the one requirement of this class is to have knowledge of the paths structure. Paths are used as keys into the XMLRecord map.

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

Field Summary
protected  boolean isValid
          boolean value indicates success of initialization
protected  HashMap map
          mapping of user-defined names to metadata values
protected  File xmlFile
          source XML file
protected  XMLRecord xmlRecord
          convenience abstraction of the XML DOM
 
Constructor Summary
protected ReviewStatusXMLReader()
          Default constructor is restricted to assure that a file directory is provided on object creation.
  ReviewStatusXMLReader(File xmlfile)
           
  ReviewStatusXMLReader(String filepath)
           
 
Method Summary
 void destroy()
          Releases all resources and calls finalize method.
 List getKeys()
          Retrieves a list the keys contained in the map.
protected  String getRecordID()
           
protected  String getReviewID()
           
protected  String getReviewPathway()
           
protected  String getReviewStatus()
           
protected  String getReviewStatusDate()
           
protected  String getReviewURL()
           
 Object getValue(String name)
          Getter method to retrieve a specific metadata value.
 List getValues()
          Retrieves the list of metadata values held in the map.
 boolean init()
          Creates XMLRecord and intializes local map
 void setMap()
          After successful initialization, this method creates the map of actual name:value pairs defined within this specific XMLMap instance.
 void setValue(String name, Object xmlObject)
          Setter method for setting a specific metadata value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isValid

protected boolean isValid
boolean value indicates success of initialization


xmlFile

protected File xmlFile
source XML file


xmlRecord

protected XMLRecord xmlRecord
convenience abstraction of the XML DOM


map

protected HashMap map
mapping of user-defined names to metadata values

Constructor Detail

ReviewStatusXMLReader

protected ReviewStatusXMLReader()
Default constructor is restricted to assure that a file directory is provided on object creation.


ReviewStatusXMLReader

public ReviewStatusXMLReader(File xmlfile)

ReviewStatusXMLReader

public ReviewStatusXMLReader(String filepath)
Parameters:
filepath - A qualified filepath to a well-formed XML file.
Method Detail

init

public boolean init()
Creates XMLRecord and intializes local map

Specified by:
init in interface XMLMap
Returns:
true if successful, false otherwise.

destroy

public void destroy()
Releases all resources and calls finalize method.

Specified by:
destroy in interface XMLMap

getValue

public Object getValue(String name)
Getter method to retrieve a specific metadata value.

Specified by:
getValue in interface XMLMap
Parameters:
name - the user-defined name identifying the specific value to retrieve.
Returns:
the requested value if it exists, null otherwise.

setValue

public void setValue(String name,
                     Object xmlObject)
Setter method for setting a specific metadata value.

Specified by:
setValue in interface XMLMap
Parameters:
name - the user-defined name identifying the specific value to update.
xmlObject - the value to assoicate with the specified name.

setMap

public void setMap()
After successful initialization, this method creates the map of actual name:value pairs defined within this specific XMLMap instance.

Specified by:
setMap in interface XMLMap

getKeys

public List getKeys()
Retrieves a list the keys contained in the map.

Specified by:
getKeys in interface XMLMap
Returns:
the list of keys used to hash the metadata values.

getValues

public List getValues()
Retrieves the list of metadata values held in the map.

Specified by:
getValues in interface XMLMap
Returns:
the list of values held in the map.

getRecordID

protected String getRecordID()

getReviewID

protected String getReviewID()

getReviewURL

protected String getReviewURL()

getReviewStatus

protected String getReviewStatus()

getReviewStatusDate

protected String getReviewStatusDate()

getReviewPathway

protected String getReviewPathway()

DLESE Tools
v1.2