gov.nist.antd.merlin.util
Class ConfigFileLoader

java.lang.Object
  |
  +--gov.nist.antd.merlin.util.ConfigFileLoader

public class ConfigFileLoader
extends java.lang.Object

This panel contains the Algorithm Panel that displays/edit the list of algorithms.

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
borchert
, rouil

Constructor Summary
private ConfigFileLoader()
          Private constructor to avoid instantiation
 
Method Summary
static java.lang.String configToString(com.renesys.raceway.DML.dmlConfig cfg)
          Return the String for of the configuration
private static java.lang.String configToString(com.renesys.raceway.DML.dmlConfig cfg, int tab)
          recursive function to get the configuration as a String
static com.renesys.raceway.DML.dmlConfig loadDmlFile()
          Generate a file loader and return the configuration
static void main(java.lang.String[] argv)
          Test method
static void removeEntry(java.lang.String name, com.renesys.raceway.DML.dmlConfig inCfg)
          Remove all entries with the specific name
static void saveDmlFile(com.renesys.raceway.DML.dmlConfig cfg)
          Used to save a configuration
static void saveDmlFile(java.lang.String cfg)
          Used to save a configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigFileLoader

private ConfigFileLoader()
Private constructor to avoid instantiation

Method Detail

loadDmlFile

public static com.renesys.raceway.DML.dmlConfig loadDmlFile()
Generate a file loader and return the configuration

Returns:
The configuration object

saveDmlFile

public static void saveDmlFile(com.renesys.raceway.DML.dmlConfig cfg)
Used to save a configuration

Parameters:
cfg - The configuration to save

saveDmlFile

public static void saveDmlFile(java.lang.String cfg)
Used to save a configuration

Parameters:
cfg - The configuration as a String

configToString

public static java.lang.String configToString(com.renesys.raceway.DML.dmlConfig cfg)
Return the String for of the configuration

Parameters:
cfg - The dml configuration to print
Returns:
The configuration as a String

configToString

private static java.lang.String configToString(com.renesys.raceway.DML.dmlConfig cfg,
                                               int tab)
recursive function to get the configuration as a String

Parameters:
cfg - The dml configuration to print
tab - The indentation to add
Returns:
The configuration as a String

removeEntry

public static void removeEntry(java.lang.String name,
                               com.renesys.raceway.DML.dmlConfig inCfg)
                        throws com.renesys.raceway.DML.dmlException
Remove all entries with the specific name

Parameters:
name - The name of the entry
inCfg - The dml configuration object
Throws:
com.renesys.raceway.DML.dmlException - if the entry does not exist

main

public static void main(java.lang.String[] argv)
Test method

Parameters:
argv - arguments