Changeset 5964


Ignore:
Timestamp:
2003-11-25T11:46:14+13:00 (20 years ago)
Author:
kjdon
Message:

some modifications, cant remember what for

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/service/XMLRetrieve.java

    r5264 r5964  
    2828    protected String toc_xsl_name = "";
    2929    protected String document_encoding = "";
     30    protected String document_root_tag = "";
     31   
    3032    protected Element collection_doc_list = null;
    31 
     33   
    3234    protected boolean provide_content = true;
    3335    protected boolean provide_structure = true;
     
    3739    public boolean configure(Element info, Element extra_info) {
    3840   
     41    System.out.println("configuring XMLRetrieve...");
    3942    // look for the parameters
    4043    Element param_list = (Element)GSXML.getChildByTagName(info, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
     
    4548        this.toc_xsl_name = (String)params.get("tocXSLT");
    4649        this.document_encoding = (String)params.get("documentEncoding");
     50        this.document_root_tag = (String)params.get("documentRootTag");
    4751        services_to_provide = (String)params.get("provideServices");
    4852    }
     
    9296    collection_doc_list = (Element)GSXML.getChildByTagName(extra_info, GSXML.DOCUMENT_ELEM+GSXML.LIST_MODIFIER);
    9397
     98    this.converter.setEntityResolver(new GSEntityResolver());
    9499    return true;
    95100    }
     
    131136        }
    132137
     138       
    133139        // if we have asked for the whole doc, just append it
    134140        if (doc_name.equals(node_id)) {
     
    363369        String meta_name = (String) meta_name_list.elementAt(i);
    364370        String actual_meta_name = meta_name;
    365         if (meta_name.startsWith("root:")) {
     371        if (meta_name.startsWith("root_")) {
    366372            actual_meta_name = meta_name.substring(5);
    367373        } else {
     
    393399        if (section != null) {
    394400            Element title_meta = extractTitleMeta(section);
    395             metadata_list.appendChild(title_meta);
    396            
     401            if (title_meta != null) {
     402            metadata_list.appendChild(title_meta);
     403            }
    397404        }
    398405        }
     
    426433    // this assumes that the scope refers to a top level node - this may be overwritten if the scope bit in the id is a shorthand of some sort
    427434    protected String translateScope(String scope) {
     435    if (this.document_root_tag != null) {
     436        return GSPath.appendLink(this.document_root_tag, scope);
     437    }
    428438    return scope;
    429439    }
    430440   
    431441}
     442
Note: See TracChangeset for help on using the changeset viewer.