Package com.nt.udc.io

Class COSARAttrConverter

java.lang.Object
com.nt.udc.io.COSARAttrConverter

public class COSARAttrConverter extends Object
This class provides the conversion mechanism between string keys and OSAR attributes.
  • Field Details

    • m_debugLevel

      protected static int m_debugLevel
  • Constructor Details

    • COSARAttrConverter

      public COSARAttrConverter() throws Exception
      Throws:
      Exception
    • COSARAttrConverter

      public COSARAttrConverter(ILogger iLogger) throws Exception
      Parameters:
      iLogger - - Object implementing ILogger interface - used for logging errors, warnings, etc.
      Throws:
      Exception
  • Method Details

    • getDebugLevel

      public int getDebugLevel()
    • setDebugLevel

      public void setDebugLevel(int debugLevel)
    • loadFromFile

      public boolean loadFromFile(String filename)
      This function is used for loading the mappings between an OSAR attribute id + type and string keys, stored in a file.
      Parameters:
      filename - - Filename containing the mappings

      Format: '['record:']' { }*

      Returns:
      true if successful, false otherwise
    • loadFromVector

      public boolean loadFromVector(Vector cfgMapping)
      This function is used for loading the mappings between an OSAR attribute id + type and string keys, stored in a Hashtable.
      Parameters:
      cfgMapping - - matrix containing the mappings

      Matrix line format:

      Returns:
      true if successful, false otherwise
    • debug

      public void debug()
      This function prints out a description of the mapping between String keys and OSAR attributes
    • getOSARAttr

      public COSARAttr getOSARAttr(String recordType, String key)
    • error

      protected void error(String fName, String msg)
    • debug

      protected void debug(String fName, String msg)