Class FieldInfoMap

java.lang.Object
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 Details

    • map

      protected HashMap map
    • directoryUri

      protected String directoryUri
  • Constructor Details

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

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