Changeset 25300

Show
Ignore:
Timestamp:
27.03.2012 15:15:07 (7 years ago)
Author:
kjdon
Message:

a little bit of tidying up. adding a few more string constants to GSParams

Location:
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSParams.java

    r25262 r25300  
    2525{ 
    2626 
     27  // cgi parameter names 
    2728    public static final String ACTION = "a"; // the major type of action- eg query or browse or process 
    2829    public static final String SUBACTION = "sa"; // subtype of action if we want different processing than the default 
     
    3031    public static final String RESPONSE_ONLY = "ro"; // if == 1 do the request and pass back the response xml - no page formatting 
    3132    public static final String OUTPUT = "o"; // if processing is to be done, what type of output - html/xml/other?? 
    32     public static final String HTTPHEADERFIELDS = "hhf"; 
    3333    public static final String SERVICE = "s"; // the name of the service 
     34 
    3435    public static final String CLUSTER = "c"; // these two are the same 
    35     public static final String SYSTEM = "s"; 
    36     public static final String CONFIGURE = "c"; 
    3736    public static final String COLLECTION = "c"; 
     37    public static final String COLLECTION_TYPE = "ct"; // collection type - mg, mgpp, lucene etc 
     38 
    3839    public static final String LANGUAGE = "l"; 
    3940    public static final String DOCUMENT = "d"; 
    4041    public static final String DOCUMENT_TYPE = "dt"; 
    41     public static final String RESOURCE = "r"; 
     42  public static final String HREF = "href"; // url. might be an external url, or a relative one that needs translating 
     43  public static final String RELATIVE_LINK = "rl"; // whether the href url is relative to the collection or not. 
     44  public static final String EXTERNAL_LINK_TYPE = "el"; // for an external link, go direct to the page or frame it in the collection 
    4245    public static final String PROCESS_ID = "pid"; // if a request wasn't completed, this identifies the request - used when asking for a status update 
    43     public static final String COLLECTION_TYPE = "ct"; 
    4446 
    45     public static final String SIBLING = "sib"; // this should not be in here 
     47     
     48  public static final String HTTPHEADERFIELDS = "hhf"; 
     49 
    4650    // internal configure args 
    4751    public static final String SYSTEM_SUBSET = "ss"; 
     
    4953    public static final String SYSTEM_MODULE_NAME = "sn"; 
    5054    public static final String SYSTEM_MODULE_TYPE = "st"; 
    51  
    52     public static final String EXPAND_DOCUMENT = "ed"; 
    53     public static final String EXPAND_CONTENTS = "ec"; 
    54     public static final String REALISTIC_BOOK = "book"; 
    5555 
    5656    // used for filtering out a piece of the final page 
     
    6868    public static final String S_OLD_PASSWORD = "s1.oldPassword"; 
    6969 
     70  // some standard arg values 
     71  public static final String SYSTEM_ACTION = "s"; 
     72  
     73  public static final String EXTERNAL_LINK_TYPE_DIRECT = "direct"; 
     74  public static final String EXTERNAL_LINK_TYPE_FRAMED = "frame"; 
     75 
    7076    protected HashMap param_map = null; 
    7177 
     
    7985        addParameter(REQUEST_TYPE, false); 
    8086        addParameter(RESPONSE_ONLY, false); 
    81         addParameter(CLUSTER, false); // we don't want to save collection  
    82         //addParameter(COLLECTION);  
     87        addParameter(CLUSTER, false); // we don't want to save cluster/collection  
    8388        addParameter(LANGUAGE, true); 
    8489        addParameter(DOCUMENT, true); 
    85         addParameter(RESOURCE, true); 
     90        addParameter(DOCUMENT_TYPE, true); 
     91        // should the following two just be in doc action?? 
     92        addParameter(HREF, false); 
     93        addParameter(RELATIVE_LINK, false); 
    8694        addParameter(OUTPUT, false); 
    8795        addParameter(SERVICE, false); 
     
    9199        addParameter(SYSTEM_MODULE_NAME, false); 
    92100        addParameter(SYSTEM_MODULE_TYPE, false); 
    93         addParameter(SIBLING, false); 
    94         addParameter(DOCUMENT_TYPE, true); 
    95         addParameter(EXPAND_DOCUMENT, false); 
    96         addParameter(EXPAND_CONTENTS, false); 
    97         addParameter(REALISTIC_BOOK, false); 
    98101        addParameter(INLINE_TEMPLATE, false); 
    99102        addParameter(DISPLAY_METADATA, false); 
     
    103106        addParameter(S_OLD_PASSWORD, false); 
    104107 
    105         //addParameter(); 
    106         // ugly hack so we don't save the extlink param 
    107         addParameter("s0.ext", false); 
    108         addParameter(COLLECTION_TYPE, true); // collection type - mg or mgpp 
    109  
     108        addParameter(COLLECTION_TYPE, true);  
     109        addParameter(EXTERNAL_LINK_TYPE, false); 
    110110        // filtering args must be specified each time 
    111111        addParameter(EXCERPT_ID, false); 
     
    141141    public boolean shouldSave(String name) 
    142142    { 
     143      // p. is used to store previous settings 
    143144        if (name.startsWith("p.")) 
    144145            return false; 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r25266 r25300  
    4949    static Logger logger = Logger.getLogger(org.greenstone.gsdl3.util.GSXML.class.getName()); 
    5050 
    51     // greenstone xml elements 
     51    // greenstone message xml elements 
    5252    public static final String MESSAGE_ELEM = "message"; 
    5353    public static final String REQUEST_ELEM = "request"; 
     
    9292    public static final String DISPLAY_ELEM = "display"; 
    9393    public static final String LEVEL_ELEM = "level"; 
     94        public static final String REPLACE_ELEM = "replace"; 
    9495 
    9596    public static final String DBINFO_ELEM = "dbInfo"; 
     
    122123    // add on to another elem type to get a list of that type 
    123124    public static final String LIST_MODIFIER = "List"; 
    124  
     125  // used to refer back to another element type 
     126        public static final String REF_MODIFIER = "Ref"; 
    125127    // greenstone xml attributes 
    126128    public static final String COLLECTION_ATT = "collection"; 
     
    156158    public static final String NODE_STRUCTURE_ELEM = "nodeStructure"; 
    157159    public static final String NODE_ID_ATT = "nodeID"; 
     160        public static final String HREF_ID_ATT = "hrefId"; // for ids that need translating 
     161        public static final String ID_MOD_ATT = "idMod"; // might hold .rt etc for hrefIds 
    158162    public static final String NODE_OID = "oid"; 
    159163    public static final String NODE_NAME_ATT = "nodeName"; 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/MacroResolver.java

    r14533 r25300  
    7878     
    7979    public void addMacros(Element replace_list_elem) { 
    80     NodeList replaces = replace_list_elem.getElementsByTagName("replace"); 
     80    NodeList replaces = replace_list_elem.getElementsByTagName(GSXML.REPLACE_ELEM); 
    8181    for (int i=0; i<replaces.getLength(); i++) { 
    8282        Element e = (Element)replaces.item(i);