com.caucho.util
Class RegistryNode

java.lang.Object
  |
  +--com.caucho.util.RegistryNode

public class RegistryNode
extends java.lang.Object

The Registry is a configuration tree based on a key, value pair structure, essentially like an AList.


Method Summary
 void append(RegistryNode next)
          Appends the children of the next node as children of this node.
 java.lang.Object clone()
           
 boolean getBoolean()
          Returns a boolean value.
 boolean getBoolean(java.lang.String path, boolean deflt)
          Gets a boolean value from a subnode with a default.
 QDate getDate()
           
 QDate getDate(java.lang.String path, QDate deflt)
           
 double getDouble()
           
 double getDouble(java.lang.String path, double deflt)
           
 java.lang.String getErrorMessage(java.lang.String message)
           
 java.lang.String getFilename()
           
 RegistryNode getFirstChild()
           
 int getInt()
           
 int getInt(java.lang.String path, int deflt)
           
 int getLine()
           
 java.lang.String getName()
           
 RegistryNode getParent()
           
 long getPeriod()
          Returns the value as a period.
 long getPeriod(java.lang.String path, long deflt)
           
 RegistryNode getRoot()
          Return the root node
 java.lang.String getString()
           
 java.lang.String getString(java.lang.String path, java.lang.String deflt)
           
 java.lang.String getValue()
           
 boolean isModified()
           
 java.util.Iterator iterator()
           
 RegistryNode lookup(java.lang.String path)
          Returns the node corresponding to the path.
 void print(WriteStream os)
           
 java.util.Iterator select(java.lang.String key)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isModified

public boolean isModified()

getName

public java.lang.String getName()

getValue

public java.lang.String getValue()

getFilename

public java.lang.String getFilename()

getLine

public int getLine()

getErrorMessage

public java.lang.String getErrorMessage(java.lang.String message)

getParent

public RegistryNode getParent()

getFirstChild

public RegistryNode getFirstChild()

getRoot

public RegistryNode getRoot()
Return the root node

append

public void append(RegistryNode next)
Appends the children of the next node as children of this node.
Parameters:
next - parent of the children to be added

getBoolean

public boolean getBoolean()
Returns a boolean value.

getBoolean

public boolean getBoolean(java.lang.String path,
                          boolean deflt)
Gets a boolean value from a subnode with a default.
Parameters:
path - hierarchical path specifying a child node
deflt - default value if no node is found

lookup

public RegistryNode lookup(java.lang.String path)
Returns the node corresponding to the path.
Parameters:
path - slash-separated path selecting a descendent node.

getInt

public int getInt()

getInt

public int getInt(java.lang.String path,
                  int deflt)

getDouble

public double getDouble()

getDouble

public double getDouble(java.lang.String path,
                        double deflt)

getString

public java.lang.String getString()

getString

public java.lang.String getString(java.lang.String path,
                                  java.lang.String deflt)

getDate

public QDate getDate()

getDate

public QDate getDate(java.lang.String path,
                     QDate deflt)

getPeriod

public long getPeriod()
Returns the value as a period.
sseconds
mminutes
hhours
Ddays
Wweeks
Mmonths
Yyears
Returns:
the period in milliseconds, 0 if no period.

getPeriod

public long getPeriod(java.lang.String path,
                      long deflt)

iterator

public java.util.Iterator iterator()

select

public java.util.Iterator select(java.lang.String key)

print

public void print(WriteStream os)
           throws java.io.IOException

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object