|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.config.AbstractConfigReader
public class AbstractConfigReader
Abstract class for extracting information from, and writing to, XML config files
Field Summary | |
---|---|
protected static boolean |
debug
Description of the Field |
protected DocumentFactory |
df
|
protected DocMap |
docMap
|
protected String |
nameSpaceInfo
|
protected String |
rootElementName
|
protected File |
source
|
protected static boolean |
writeOnDestroy
Description of the Field |
Constructor Summary | |
---|---|
AbstractConfigReader(File source)
Create a AbstractConfigReader. |
|
AbstractConfigReader(String xmlSource)
|
Method Summary | |
---|---|
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. |
Document |
getDelocalizedDoc()
Gets delocalized Document for this reader. |
DocMap |
getDocMap()
Gets the document attribute of the AbstractConfigReader object |
Document |
getDocument()
Gets the localized Document for this reader. |
Node |
getNode(String xpath)
Gets a single Node satisfying give XPath. |
List |
getNodes(String xpath)
Get all Nodes satisfying the given xpath. |
String |
getNodeText(String xpath)
return the Text of a Node satisfying the given XPath. |
File |
getSource()
Gets the source attribute of the AbstractConfigReader object |
String |
getSourcePath()
Gets the sourcePath attribute of the AbstractConfigReader object |
protected static void |
prtln(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(String xpath,
String value)
Sets the nodeText for specified path, creating new node if necessary. |
protected void |
setSource(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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static boolean debug
protected static boolean writeOnDestroy
protected String rootElementName
protected String nameSpaceInfo
protected DocMap docMap
protected File source
protected DocumentFactory df
Constructor Detail |
---|
public AbstractConfigReader(File source) throws Exception
source
- Description of the Parameter
Exception
public AbstractConfigReader(String xmlSource) throws Exception
Exception
Method Detail |
---|
public String getSourcePath()
public DocMap getDocMap() throws Exception
Exception
- Description of the Exceptionpublic File getSource()
protected void setSource(File file)
file
- The new source valuepublic Document getDocument()
public Document getDelocalizedDoc() throws Exception
Exception
public void flush() throws Exception
Exception
- Description of the Exceptionpublic void refresh()
public List getNodes(String xpath)
xpath
- an XPath
public Node getNode(String xpath)
xpath
- an XPath
public String getNodeText(String xpath)
xpath
- an XPath\
protected void setNodeText(String xpath, String value)
xpath
- The new nodeText valuevalue
- The new nodeText valuepublic void destroy()
protected static void prtln(String s)
s
- The String to print.
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |