~sword-devel/jsword/trunk

« back to all changes in this revision

Viewing changes to jsword/java/common/org/crosswire/common/config/Config.java

  • Committer: joe
  • Date: 2002-10-08 21:36:18 UTC
  • Revision ID: svn-v4:a88caf3b-7e0a-0410-8d0d-cecb45342206:trunk:80
big config and comment update

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
import java.net.Socket;
12
12
import java.net.URL;
13
13
import java.util.ArrayList;
14
 
import java.util.HashMap;
15
14
import java.util.Iterator;
16
15
import java.util.List;
17
 
import java.util.Map;
18
16
import java.util.Properties;
19
17
 
20
18
import org.apache.log4j.Logger;
21
 
import org.crosswire.common.config.choices.StaticReflectiveChoice;
22
19
import org.crosswire.common.util.EventListenerList;
23
20
import org.crosswire.common.util.PropertiesUtil;
24
21
import org.crosswire.common.util.Reporter;
136
133
        {
137
134
            Element element = (Element) it.next();
138
135
            String key = element.getAttributeValue("key");
139
 
            String type = element.getAttributeValue("type");
140
 
            if (type.equals("static"))
141
 
            {
142
 
                try
143
 
                {
144
 
                    Choice choice = new StaticReflectiveChoice(element);
145
 
                    add(key, choice);
146
 
                }
147
 
                catch (Exception ex)
148
 
                {
149
 
                    log.warn("Error creating config element, key="+key, ex);
150
 
                }
 
136
            try
 
137
            {
 
138
                Choice choice = ChoiceFactory.getChoice(element);
 
139
                add(key, choice);
 
140
            }
 
141
            catch (Exception ex)
 
142
            {
 
143
                log.warn("Error creating config element, key="+key, ex);
151
144
            }
152
145
        }
153
146
    }
285
278
                String key = (String) it.next();
286
279
                Choice model = getChoice(key);
287
280
 
288
 
                if (model.priority() == priority)
 
281
                if (model.getPriority() == priority)
289
282
                {
290
283
                    String old_value = model.getString();
291
284
                    String new_value = local.getProperty(key);
330
323
    }
331
324
 
332
325
    /**
333
 
     * Method getDataMap.
334
 
     */
335
 
    public Map getDataMap()
336
 
    {
337
 
        return datamap;
338
 
    }
339
 
 
340
 
    /**
341
326
     * Take the data stored permanetly and copy it to the local
342
327
     * storage area, using the specified stream
343
328
     */
571
556
 
572
557
    /** The list of listeners */
573
558
    protected EventListenerList listener_list = new EventListenerList();
574
 
    
575
 
    private Map datamap = new HashMap();
576
559
}