Changeset 34215

Show
Ignore:
Timestamp:
21.06.2020 10:01:55 (3 weeks ago)
Author:
kjdon
Message:

removed hard coded lang=en, and now pass in lang to getMetadataList, so that macro resolving can work properly for classigier nodes. eg used in DateList? _textmonth01_

Location:
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java

    r31867 r34215  
    660660            } 
    661661 
    662             Element metadata_list = getMetadataList(result_doc, node_id, all_metadata, metadata_names_list); 
     662            Element metadata_list = getMetadataList(result_doc, node_id, all_metadata, metadata_names_list, lang); 
    663663            new_node.appendChild(metadata_list); 
    664664        } 
     
    827827     * get the metadata for the classifier node node_id returns a metadataList 
    828828     * element: <metadataList><metadata 
    829      * name="xxx">value</metadata></metadataList> if all_metadata is true, 
    830      * returns all available metadata, otherwise just returns requested metadata 
    831      */ 
    832   abstract protected Element getMetadataList(Document doc, String node_id, boolean all_metadata, ArrayList<String> metadata_names); 
     829     * name="xxx">value</metadata></metadataList> 
     830     * if all_metadata is true, returns all available metadata, otherwise just returns requested metadata 
     831     */ 
     832    abstract protected Element getMetadataList(Document doc, String node_id, boolean all_metadata, ArrayList<String> metadata_names, String lang); 
    833833 
    834834    /** 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Browse.java

    r31867 r34215  
    191191     */ 
    192192    // assumes only one value per metadata 
    193   // does no macro resolving. assumes classifier metadata will not have macros. 
    194   protected Element getMetadataList(Document doc, String node_id, boolean all_metadata, ArrayList<String> metadata_names) 
    195     { 
    196         String lang = "en"; 
     193    protected Element getMetadataList(Document doc, String node_id, boolean all_metadata, ArrayList<String> metadata_names, String lang) 
     194    { 
     195        //String lang = "en"; 
    197196        Element metadata_list = doc.createElement(GSXML.METADATA_ELEM + GSXML.LIST_MODIFIER); 
    198197        DBInfo info = this.coll_db.getInfo(node_id);