org.mbari.siam.configt
Class Inittab

java.lang.Object
  extended by org.mbari.siam.configt.ConfigFile
      extended by org.mbari.siam.configt.Inittab

public class Inittab
extends ConfigFile


Field Summary
 
Fields inherited from class org.mbari.siam.configt.ConfigFile
_appendUnwrittenItems, _configItems, _getDisplayValue, _layoutParameters, _log4j, _mapNull, _nullMapString, _parent, _properties, _propertiesPath, _templatePath, _theFile, FIND_REPLACE, SIMPLE, TAG_REPLACE
 
Constructor Summary
Inittab(java.lang.String path, java.lang.String propertiesPath)
           
 
Method Summary
protected  void appendTempFile(java.io.BufferedWriter bw)
          Append additional contents, templates, etc.
static void main(java.lang.String[] args)
           
 java.io.File writeTemp()
          Write the current value of all configuration items to a temporary file.
 
Methods inherited from class org.mbari.siam.configt.ConfigFile
createBackup, getAll, getAttributes, getCols, getItem, getItemValue, getLayoutParameter, getName, getOutputMappings, getPath, getRows, initFile, initFile, initWriteFlags, loadProperties, mapOutputValue, newLine, readAll, replaceFile, setParent, updateConfigItems, validateItem, writeLine, writeTemp, writeTempFindReplace, writeTempSimple, writeTempTagReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inittab

public Inittab(java.lang.String path,
               java.lang.String propertiesPath)
Method Detail

appendTempFile

protected void appendTempFile(java.io.BufferedWriter bw)
                       throws java.io.IOException
Description copied from class: ConfigFile
Append additional contents, templates, etc. before closing the temp config file. Called by several writeTemp() variants. Does nothing by default; subclasses may override.

Overrides:
appendTempFile in class ConfigFile
Throws:
java.io.IOException

writeTemp

public java.io.File writeTemp()
Description copied from class: ConfigFile
Write the current value of all configuration items to a temporary file. This default method is generally overridden by subclasses; the default behaviour is to search each line for the configuration items using the importRegexp. When a match is found, the exportRegexp is used to format the line for writing, inserting the current value of the configuration item. Note that this assumes that only one configuration item appears on each line (as in Java properties files). Configuration files that contain more than one item per line should use a template and/or override this method.

Specified by:
writeTemp in class ConfigFile

main

public static void main(java.lang.String[] args)


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.