|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fesenmeyer.dbnormalizer.core.configuration.ConfigurationWriter
public class ConfigurationWriter
Class which writes a session configuration to a XML file.
ConfigurationReader
,
SessionConfig
Field Summary | |
---|---|
private Document |
doc
The DOM-document used for creating nodes etc. |
private SessionConfig |
sessionConfig
The session configuration to be written to file. |
Constructor Summary | |
---|---|
ConfigurationWriter(SessionConfig sessionConfig)
Class constructor specifying the session configuration to be written. |
Method Summary | |
---|---|
private Element |
getAttributesNode(String nodeName,
Set<String> attributes)
Creates an attributes node, which gets its name from the specified argument nodeName. |
private Node |
getConfigurationNode(SessionConfig sessionConfig)
Creates a configuration node from the session
configuration object. |
private Element |
getDBConfigNode(DBConfig dbConfig)
Creates a dbConfig node. |
private Element |
getFDsNode(Collection<FDConfig> fdConfigs)
Creates a fds node from FDConfig objects. |
private Element |
getTableContainerConfigNode(TableContainerConfig tableContainerConfig)
Creates a node for a TableContainerConfig object. |
private Element |
getTableInfoNode(Collection<TableConfig> tableConfigs)
Creates a tableInfo node from the TableConfig objects
specified by the tableConfigs argument. |
private Element |
getTableNode(TableConfig tableConfig)
Creates a table node from
the TableConfig object specified by argument tableConfig. |
void |
write()
Writes the session configuration to a XML-file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private SessionConfig sessionConfig
private Document doc
Constructor Detail |
---|
public ConfigurationWriter(SessionConfig sessionConfig)
sessionConfig
- the session configuration objectMethod Detail |
---|
public void write() throws ConfigurationException
ConfigurationException
- if an exception occurs, such that
the file can not be successfully written (e.g. an IOException
)private Node getConfigurationNode(SessionConfig sessionConfig)
configuration
node from the session
configuration object.
sessionConfig
- the session configuration object
configuration
nodeprivate Element getDBConfigNode(DBConfig dbConfig)
dbConfig
node.
dbConfig
- the DB-Config object from which the node should be created
dbConfig
nodeprivate Element getTableContainerConfigNode(TableContainerConfig tableContainerConfig)
tableContainerConfig
- the TableContainerConfig object
private Element getTableInfoNode(Collection<TableConfig> tableConfigs)
tableInfo
node from the TableConfig objects
specified by the tableConfigs argument.
tableConfigs
- a collection of TableConfig objects
tableInfo
nodeprivate Element getTableNode(TableConfig tableConfig)
table
node from
the TableConfig object specified by argument tableConfig.
tableConfig
- the tableConfig object
table
nodeprivate Element getAttributesNode(String nodeName, Set<String> attributes)
nodeName
- the node's name to be setattributes
- a set of attribute names
private Element getFDsNode(Collection<FDConfig> fdConfigs)
fds
node from FDConfig objects.
fdConfigs
- a collection of FDConfig objects
fds
node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |