DLESE Tools
v1.2

org.dlese.dpc.xml
Class XMLMapFactory

java.lang.Object
  extended byorg.dlese.dpc.xml.XMLMapFactory

public class XMLMapFactory
extends Object

Provides support for XMLDirectory implementations by using static constants and methods to create individual XMLMap instances. Once a mapping class is created, support for the class should be added here.

This first release supports only reader maps. Writer maps can be added, and eventually only an XML-based metadata-definition configuration file will be required.

NOTE: The caller is respsonsible for requesting the correct reader corresponding to a specific XML file. The only indication that an invalid reader was requested will be the absence of expected values whenever the XMLMap instance is inspected.

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

Field Summary
static int DLESE
          defines instances of DlsesXMLReader
static int REVIEW_STATUS
          defines instances of ReviewStatusXMLReader
 
Method Summary
static XMLMap instanceMap(File file, int mapType)
          Accepts a File argument and creates an XMLMap instance of the requested type.
static XMLMap instanceMap(String filepath, int mapType)
          Accepts a filepath argument and creates an XMLMap instance of the requested type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DLESE

public static final int DLESE
defines instances of DlsesXMLReader

See Also:
Constant Field Values

REVIEW_STATUS

public static final int REVIEW_STATUS
defines instances of ReviewStatusXMLReader

See Also:
Constant Field Values
Method Detail

instanceMap

public static XMLMap instanceMap(String filepath,
                                 int mapType)
Accepts a filepath argument and creates an XMLMap instance of the requested type.

Parameters:
filepath - qualified path to a well-formed XML file.
mapType - integer correspoinding to one of this class's predefined static constants
Returns:
XMLMap of the requested type.

instanceMap

public static XMLMap instanceMap(File file,
                                 int mapType)
Accepts a File argument and creates an XMLMap instance of the requested type.

Parameters:
file - a well-formed XML file corresponding to the requested XML mapType.
mapType - integer correspoinding to one of this class's predefined static constants
Returns:
XMLMap of the requested type.

DLESE Tools
v1.2