public class AbstractConfigReader
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected static boolean |
debug
Description of the Field
|
protected org.dom4j.DocumentFactory |
df |
protected DocMap |
docMap |
protected java.lang.String |
nameSpaceInfo |
protected java.lang.String |
rootElementName |
protected java.io.File |
source |
protected static boolean |
writeOnDestroy
Description of the Field
|
Constructor and Description |
---|
AbstractConfigReader(java.io.File source)
Create a AbstractConfigReader.
|
AbstractConfigReader(java.lang.String xmlSource) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
This method is called at the conclusion of processing and may be used for
tear-down.
|
void |
flush()
Write config document to disk and then force reread of values.
|
org.dom4j.Document |
getDelocalizedDoc()
Gets delocalized Document for this reader.
|
DocMap |
getDocMap()
Gets the document attribute of the AbstractConfigReader object
|
org.dom4j.Document |
getDocument()
Gets the localized Document for this reader.
|
org.dom4j.Node |
getNode(java.lang.String xpath)
Gets a single Node satisfying give XPath.
|
java.util.List |
getNodes(java.lang.String xpath)
Get all Nodes satisfying the given xpath.
|
java.lang.String |
getNodeText(java.lang.String xpath)
return the Text of a Node satisfying the given XPath.
|
java.io.File |
getSource()
Gets the source attribute of the AbstractConfigReader object
|
java.lang.String |
getSourcePath()
Gets the sourcePath attribute of the AbstractConfigReader object
|
protected static void |
prtln(java.lang.String s)
Print a line to standard out.
|
void |
refresh()
Write Document to disk and then set docMap to null, forcing a re-read upon next access.
|
protected void |
setNodeText(java.lang.String xpath,
java.lang.String value)
Sets the nodeText for specified path, creating new node if necessary.
|
protected void |
setSource(java.io.File file)
set source file, used when creating new CollectionConfig's by first reading a
default config file and then assigning a new source so it will be written
to a new config file
|
protected static boolean debug
protected static boolean writeOnDestroy
protected java.lang.String rootElementName
protected java.lang.String nameSpaceInfo
protected DocMap docMap
protected java.io.File source
protected org.dom4j.DocumentFactory df
public AbstractConfigReader(java.io.File source) throws java.lang.Exception
source
- Description of the Parameterjava.lang.Exception
public AbstractConfigReader(java.lang.String xmlSource) throws java.lang.Exception
java.lang.Exception
public java.lang.String getSourcePath()
public DocMap getDocMap() throws java.lang.Exception
java.lang.Exception
- Description of the Exceptionpublic java.io.File getSource()
protected void setSource(java.io.File file)
file
- The new source valuepublic org.dom4j.Document getDocument()
public org.dom4j.Document getDelocalizedDoc() throws java.lang.Exception
java.lang.Exception
public void flush() throws java.lang.Exception
java.lang.Exception
- Description of the Exceptionpublic void refresh()
public java.util.List getNodes(java.lang.String xpath)
xpath
- an XPathpublic org.dom4j.Node getNode(java.lang.String xpath)
xpath
- an XPathpublic java.lang.String getNodeText(java.lang.String xpath)
xpath
- an XPath\protected void setNodeText(java.lang.String xpath, java.lang.String value)
xpath
- The new nodeText valuevalue
- The new nodeText valuepublic void destroy()
protected static void prtln(java.lang.String s)
s
- The String to print.