source: trunk/gsdl3/src/java/org/greenstone/gsdl3/util/ConfigVars.java@ 3466

Last change on this file since 3466 was 3438, checked in by kjdon, 22 years ago

added library name to the config class - dont assume that its always 'library' anymore

  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1package 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
7import org.w3c.dom.Document;
8import org.w3c.dom.Element;
9
10public 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
Note: See TracBrowser for help on using the repository browser.