|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlocal.tomas.common.dom.DomConfiguration
public class DomConfiguration
Configuration data stored in a DOM structure.
| Field Summary | |
|---|---|
protected Node |
root
The root node. |
| Constructor Summary | |
|---|---|
DomConfiguration(File file)
Construct configuration loaded from file. |
|
DomConfiguration(InputSource in)
Construct configuration loaded from input source. |
|
DomConfiguration(InputStream in)
Construct configuration loaded from input stream. |
|
DomConfiguration(Node root)
Construct configuration with specified root node. |
|
DomConfiguration(URL url)
Construct configuration loaded from URL. |
|
| Method Summary | |
|---|---|
Attr |
createAttribute(String name,
String value)
Create attribute of configuration node. |
Element |
createElement(String tagName)
Create new configuration element. |
void |
dump(PrintStream out)
Write configuration to print stream. |
static Node |
getNode(Node node,
String path)
Get descendant node. |
Node |
getNode(String path)
Get DOM node. |
static Node[] |
getNodeArray(Node node,
String path)
Get array of nodes. |
Node[] |
getNodeArray(String path)
Get array of nodes. |
static Properties |
getProperties(Node node,
String path)
Load properties from configuration. |
Properties |
getProperties(String path)
Get properties. |
static DomConfiguration |
getSubConfiguration(Node node,
String path)
Get subconfiguration. |
DomConfiguration |
getSubConfiguration(String path)
Get subconfiguration of this configuration. |
static String |
getValue(Node node,
String path)
Get value. |
String |
getValue(String path)
Get value. |
static String[] |
getValueArray(Node node,
String path)
Get array of values. |
String[] |
getValueArray(String path)
Get array of values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Node root
| Constructor Detail |
|---|
public DomConfiguration(Node root)
root - the root node
public DomConfiguration(URL url)
throws IOException,
SAXException
url - URL to load from
IOException
SAXException
public DomConfiguration(File file)
throws IOException,
SAXException
file - file to load from
IOException
SAXException
public DomConfiguration(InputStream in)
throws SAXException,
IOException
in - the input stream
SAXException
IOException
public DomConfiguration(InputSource in)
throws SAXException,
IOException
in - the input source
SAXException
IOException| Method Detail |
|---|
public void dump(PrintStream out)
out - the print streampublic Element createElement(String tagName)
tagName - tag name of new element
public Attr createAttribute(String name,
String value)
name - attribute namevalue - attribute value
public Node getNode(String path)
path - xpath to node
public Node[] getNodeArray(String path)
path - xpath to nodes
public static Node[] getNodeArray(Node node,
String path)
node - root nodepath - xpath to nodes
public String getValue(String path)
path - xpath to value
public static String getValue(Node node,
String path)
node - root for pathpath - xpath to value
public String[] getValueArray(String path)
path - xpath to values
public static String[] getValueArray(Node node,
String path)
node - root for pathpath - xpath to values
public static Node getNode(Node node,
String path)
node - root for pathpath - xpath to descendant
public static DomConfiguration getSubConfiguration(Node node,
String path)
node - root for pathpath - xpath to subconfiguration
public DomConfiguration getSubConfiguration(String path)
path - xpath to subconfiguration
public static Properties getProperties(Node node,
String path)
node - root of configurationpath - xpath to properties
public Properties getProperties(String path)
path - path to properties
|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||