Ignore:
Timestamp:
2011-12-13T10:01:05+13:00 (12 years ago)
Author:
sjm84
Message:

Adjusted how metadata names (to return) are aquired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r24813 r24889  
    186186        boolean get_structure = false;
    187187        boolean get_structure_info = false;
    188         if (document_type.equals("paged"))
     188        if (document_type.equals(GSXML.DOC_TYPE_PAGED))
    189189        {
    190190            get_structure_info = true;
     191
     192            if (expand_contents)
     193            {
     194                ds_param = this.doc.createElement(GSXML.PARAM_ELEM);
     195                ds_param_list.appendChild(ds_param);
     196                ds_param.setAttribute(GSXML.NAME_ATT, "structure");
     197                ds_param.setAttribute(GSXML.VALUE_ATT, "entire");
     198            }
     199
    191200            // get teh info needed for paged naviagtion
    192201            ds_param = this.doc.createElement(GSXML.PARAM_ELEM);
     
    203212            ds_param.setAttribute(GSXML.VALUE_ATT, "siblingPosition");
    204213
    205         }
    206         else if (document_type.equals("hierarchy"))
     214            if (get_siblings)
     215            {
     216                ds_param = this.doc.createElement(GSXML.PARAM_ELEM);
     217                ds_param_list.appendChild(ds_param);
     218                ds_param.setAttribute(GSXML.NAME_ATT, "structure");
     219                ds_param.setAttribute(GSXML.VALUE_ATT, "siblings");
     220            }
     221
     222        }
     223        else if (document_type.equals(GSXML.DOC_TYPE_HIERARCHY))
    207224        {
    208225            get_structure = true;
     
    330347        if (format_elem != null)
    331348        {
    332             extractMetadataNames(format_elem, meta_names);
     349            getRequiredMetadataNames(format_elem, meta_names);
    333350        }
    334351
     
    391408        }
    392409        doc_list.appendChild(doc_node);
     410
    393411        Element dm_response_message = (Element) this.mr.process(dm_message);
    394412        if (processErrorElements(dm_response_message, page_response))
     
    671689     * ends in query). should this action do the query or should it send a
    672690     * message to the query action? but that will involve lots of extra stuff.
    673      * also doesn't handle phrases properly - just highlights all the terms found
    674      * in the text.
     691     * also doesn't handle phrases properly - just highlights all the terms
     692     * found in the text.
    675693     */
    676694    protected Element highlightQueryTerms(Element request, Element dc_response_doc_content)
     
    860878        }
    861879
    862         System.err.println(query_term_variants + " *** " + phrase_query_term_variants_hierarchy);
    863880        return highlightQueryTermsInternal(content, query_term_variants, phrase_query_term_variants_hierarchy);
    864881    }
     
    897914           
    898915            boolean is_character_letter_or_digit = Character.isLetterOrDigit(content_characters[i]);
    899 
     916           
    900917            // Has a word just started?
    901918            if (in_word == false && is_character_letter_or_digit == true)
Note: See TracChangeset for help on using the changeset viewer.