Cocoon API: Class XMLConfigurations
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.apache.cocoon.framework.Configurations
|
+--org.apache.cocoon.framework.XMLConfigurations
This class makes a Configurations object from an XML source.
| Fields inherited from class org.apache.cocoon.framework.Configurations |
baseName, properties, root |
| Constructor Summary | |
XMLConfigurations()
Creates a new empty Configurations |
|
XMLConfigurations(java.lang.String file)
Creates a new Configurations object from the specified file |
|
| Method Summary | |
protected static void |
buildConfigurations(XMLConfigurations confs,
org.w3c.dom.Node source_node)
Builds a new Configurations object from the source node |
protected static void |
buildConfigurations(XMLConfigurations confs,
org.w3c.dom.Node source_node,
java.lang.String prefix)
Builds a new Configurations object from the source node with the given prefix |
java.lang.Object |
get(java.lang.String key)
Returns the value of the key, or null if the key has no value |
java.lang.Object |
get(java.lang.String key,
java.lang.Object def)
Returns the value of the key, or the default if the key has no value |
Configurations |
getConfigurations(java.lang.String key)
Create a Configurations child consisting of all values that begin with the given key |
java.lang.Object |
getNotNull(java.lang.String key)
Returns the value of the key, or tosses a RuntimeException if the key has no value |
java.util.Vector |
getVector(java.lang.String key)
Returns a Vector of values. |
static void |
main(java.lang.String[] argv)
Strictly for testing |
void |
set(java.lang.String key,
java.lang.Object value)
Associates the value with the key |
void |
setBasename(java.lang.String my_prefix)
Sets the prefix |
protected static java.lang.String |
stripBoundingWhitespace(java.lang.String input)
A utility routine that strips the starting and ending whitespace from the given string |
java.lang.String |
toString()
|
| Methods inherited from class org.apache.cocoon.framework.Configurations |
getAnyConfig, getProperties, keys, put |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public XMLConfigurations()
public XMLConfigurations(java.lang.String file)
throws java.io.IOException,
org.xml.sax.SAXException
file - the name of the filejava.io.IOException - if the file does not exist or is unreadableorg.xml.sax.SAXException - if the XML is not well formed| Method Detail |
public static void main(java.lang.String[] argv)
throws java.lang.Exception
protected static void buildConfigurations(XMLConfigurations confs,
org.w3c.dom.Node source_node)
confs - the Configurations object to manipulatesource_node - the node from which to read
protected static void buildConfigurations(XMLConfigurations confs,
org.w3c.dom.Node source_node,
java.lang.String prefix)
confs - the Configurations object to manipulatesource_node - the node from which to readprefix - the prefix to usepublic java.lang.Object get(java.lang.String key)
get in class Configurationskey - the key
public void set(java.lang.String key,
java.lang.Object value)
set in class Configurationskey - the keyvalue - the value
public java.lang.Object get(java.lang.String key,
java.lang.Object def)
get in class Configurationskey - the keydef - the default valuepublic java.lang.Object getNotNull(java.lang.String key)
getNotNull in class Configurationskey - the keyjava.lang.RuntimeException - if the key has no valuepublic java.util.Vector getVector(java.lang.String key)
getVector in class Configurationskey - the keypublic Configurations getConfigurations(java.lang.String key)
getConfigurations in class Configurationskey - the keypublic void setBasename(java.lang.String my_prefix)
setBasename in class Configurationsmy_prefix - the prefixpublic java.lang.String toString()
toString in class java.lang.Objectprotected static java.lang.String stripBoundingWhitespace(java.lang.String input)
input - the input string
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||