DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.vocab
Class FieldInfoMap

java.lang.Object
  extended by org.dlese.dpc.schemedit.vocab.FieldInfoMap
Direct Known Subclasses:
NewFieldInfoMap, OldFieldInfoMap

public abstract class FieldInfoMap
extends Object

Data structure mapping xpaths to FieldInfoReader instances. The FieldInfoMap is instantiated by the FrameworkConfigReader and accessed via the MetaDataFramework.

Author:
ostwald

Field Summary
protected  String directoryUri
           
protected  HashMap map
           
 
Constructor Summary
FieldInfoMap()
          Constructor for the FieldInfoMap object
FieldInfoMap(String uri)
          Constructor for the FieldInfoMap object
 
Method Summary
 List getAllFieldInfo()
          Gets all the FieldInfoReaders as a list.
 FieldInfoReader getFieldInfo(String xpath)
          Gets the fieldInfo for given xpath.
 List getFields()
          Gets all the fields (xpaths) having FieldInfoReaders
 Set getKeySet()
          Gets the keySet attribute of the FieldInfoMap object
 boolean hasFieldInfo(String xpath)
          Returns true if there is a FieldInfoReader present for the specified xpath.
abstract  void init()
          Read a listing of URIs Fields files from directoryUri and then loads each of the listed files as FieldInfoReader objects, which are stored in a map.
protected static void prtln(String s)
          Output a line of text to standard out, with datestamp, if debug is set to true.
 void putFieldInfo(String xpath, FieldInfoReader reader)
          Add a FieldInfoReader to the map.
 void reload()
          Reload all the FieldInfoReaders in the map
 void removeFieldInfo(String xpath)
          Description of the Method
static void setDebug(boolean d)
          Sets the debug attribute of the FieldInfoMap class
 String toString()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

map

protected HashMap map

directoryUri

protected String directoryUri
Constructor Detail

FieldInfoMap

public FieldInfoMap()
Constructor for the FieldInfoMap object


FieldInfoMap

public FieldInfoMap(String uri)
Constructor for the FieldInfoMap object

Parameters:
uri - Description of the Parameter
Method Detail

init

public abstract void init()
                   throws Exception
Read a listing of URIs Fields files from directoryUri and then loads each of the listed files as FieldInfoReader objects, which are stored in a map.

Throws:
Exception - Description of the Exception

setDebug

public static void setDebug(boolean d)
Sets the debug attribute of the FieldInfoMap class

Parameters:
d - The new debug value

putFieldInfo

public void putFieldInfo(String xpath,
                         FieldInfoReader reader)
Add a FieldInfoReader to the map.

Parameters:
xpath - Description of the Parameter
reader - Description of the Parameter

getFieldInfo

public FieldInfoReader getFieldInfo(String xpath)
Gets the fieldInfo for given xpath.

Parameters:
xpath - Description of the Parameter
Returns:
The fieldInfo value or null if not found.

removeFieldInfo

public void removeFieldInfo(String xpath)
Description of the Method

Parameters:
xpath - Description of the Parameter

getKeySet

public Set getKeySet()
Gets the keySet attribute of the FieldInfoMap object

Returns:
The keySet value

reload

public void reload()
            throws Exception
Reload all the FieldInfoReaders in the map

Throws:
Exception - Description of the Exception

getAllFieldInfo

public List getAllFieldInfo()
Gets all the FieldInfoReaders as a list.

Returns:
a List of FieldInfoReaders

getFields

public List getFields()
Gets all the fields (xpaths) having FieldInfoReaders

Returns:
a list of xpaths to Fields

hasFieldInfo

public boolean hasFieldInfo(String xpath)
Returns true if there is a FieldInfoReader present for the specified xpath.

Parameters:
xpath - Description of the Parameter
Returns:
Description of the Return Value

toString

public String toString()
Description of the Method

Overrides:
toString in class Object
Returns:
Description of the Return Value

prtln

protected static void prtln(String s)
Output a line of text to standard out, with datestamp, if debug is set to true.

Parameters:
s - The String that will be output.

DLESE Tools
v1.6.0