1 | package org.greenstone.gsdl3.util;
|
---|
2 |
|
---|
3 | /** holds all the site setup variables
|
---|
4 | * includes a method to represent them as an XML node
|
---|
5 | */
|
---|
6 |
|
---|
7 | import org.w3c.dom.Document;
|
---|
8 | import org.w3c.dom.Element;
|
---|
9 |
|
---|
10 | public class ConfigVars {
|
---|
11 |
|
---|
12 | public String library_name_=null;
|
---|
13 | public String sites_home_=null;
|
---|
14 | public String site_name_=null;
|
---|
15 | public String interfaces_home_=null;
|
---|
16 | public String interface_name_=null;
|
---|
17 | public Element config_xml_ = null;
|
---|
18 |
|
---|
19 | public void createXML() {
|
---|
20 |
|
---|
21 | XMLConverter converter = new XMLConverter();
|
---|
22 | Document doc = converter.newDOM();
|
---|
23 |
|
---|
24 | config_xml_ = doc.createElement("config");
|
---|
25 | Element e = GSXML.createTextElement(doc, "library_name", library_name_);
|
---|
26 | config_xml_.appendChild(e);
|
---|
27 | e = GSXML.createTextElement(doc, "sites_home", sites_home_);
|
---|
28 | config_xml_.appendChild(e);
|
---|
29 | e = GSXML.createTextElement(doc, "site_name", site_name_);
|
---|
30 | config_xml_.appendChild(e);
|
---|
31 | e = GSXML.createTextElement(doc, "interfaces_home", interfaces_home_);
|
---|
32 | config_xml_.appendChild(e);
|
---|
33 | e = GSXML.createTextElement(doc, "interface_name", interface_name_);
|
---|
34 | config_xml_.appendChild(e);
|
---|
35 | }
|
---|
36 | }
|
---|
37 |
|
---|