Changeset 4100


Ignore:
Timestamp:
2003-04-07T16:57:06+12:00 (21 years ago)
Author:
kjdon
Message:

createParameter for description has new name: createParameterDescription, and createParameter is now for creating teh actual params (name-value pairs) that are passed in a message. also added some xml names for configure messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r4078 r4100  
    4141    public static final String FORMAT_ELEM = "format"; // config files use format - shoudl we use this instead of stylesheet??
    4242    public static final String TERM_ELEM = "term";
     43    public static final String SYSTEM_ELEM = "system";
    4344
    4445    //config file elems
     
    121122    public static final String REQUEST_TYPE_PROCESS = "process";
    122123    public static final String REQUEST_TYPE_CONFIGURE = "configure";
     124    public static final String REQUEST_TYPE_SYSTEM = "system";
    123125    public static final String REQUEST_TYPE_CGI = "cgi";
    124126    public static final String REQUEST_TYPE_FORMAT = "format";
     
    136138    public static final String SERVICE_TYPE_ENRICH = "enrich";
    137139
    138     // configure types
     140    // configure types - get rid of these first two
    139141    public static final String CONFIG_ACTION_ACTIVATE = "activate";
    140142    public static final String CONFIG_ACTION_DEACTIVATE = "deactivate";
    141    
     143
     144    public static final String SYSTEM_TYPE_CONFIGURE = "configure";
     145    public static final String SYSTEM_TYPE_ACTIVATE = "activate";
     146    public static final String SYSTEM_TYPE_DEACTIVATE = "deactivate";
     147
     148    public static final String SYSTEM_SUBSET_ATT = "subset";
     149    public static final String SYSTEM_MODULE_TYPE_ATT = "moduleType";
     150    public static final String SYSTEM_MODULE_NAME_ATT = "moduleName";
     151   
    142152    // communicator types
    143153    public static final String COMM_TYPE_SOAP_JAVA = "soap";
     
    214224    /** extracts the text out of a node */
    215225    public static String getNodeText(Element param) {
    216     return getNodeTextNode(param).getNodeValue();
     226    Node text_node = getNodeTextNode(param);
     227    if (text_node == null) {
     228        return "";
     229    }
     230    return text_node.getNodeValue();
    217231    }
    218232
     
    387401
    388402
    389     public static Element createParameter(Document owner, String name,
     403    public static Element createParameter(Document owner, String name,
     404                      String value) {
     405    Element param = owner.createElement(PARAM_ELEM);
     406    param.setAttribute(NAME_ATT, name);
     407    param.setAttribute(VALUE_ATT, value);
     408    return param;
     409    }
     410
     411    public static Element createParameterDescription(Document owner, String name,
    390412                      String type, String default_value,
    391413                      String []options) {
Note: See TracChangeset for help on using the changeset viewer.