Changeset 22224 for main


Ignore:
Timestamp:
2010-06-02T22:03:46+12:00 (14 years ago)
Author:
ak19
Message:

Browse takes structural info params just like DocumentStructureRetrieve. GS3 manual had already been updated a couple of days back'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/resources/java/QBRSOAPServer.java.in

    r16784 r22224  
    137137    protected static final String docStructureOptions =
    138138        "entire ancestors parent siblings children descendants"; // note the spelling
    139     protected static final String docStructureInfo =
     139    protected static final String structureInfoOptions =
    140140        "numSiblings siblingPosition numChildren";
    141141    protected static final String browseStructureOptions =
     
    487487        // Create the <paramlist></paramlist> element of param elements,
    488488        // if any; and only if values are legal (that is, if they occur in 
    489         // static Strings docStructureOptions and docStructureInfo):
     489        // static Strings docStructureOptions and structureInfoOptions):
    490490        // <param name="structure" value = "structure[i]">
    491491        // <param name="info" value = "info[i]">
     
    503503        if(info != null) {
    504504            for(int i = 0; i < info.length; i++) {
    505                 if(docStructureInfo.indexOf(info[i]) != -1) {
     505                if(structureInfoOptions.indexOf(info[i]) != -1) {
    506506                    paramList.appendChild(GSXML.createParameter(
    507507                            this.doc, "info", info[i]));
     
    664664        return browse(collection, browseService, lang,   
    665665                classifierNodeIDs,
    666                 new String[] {"descendants"}); // note the spelling
     666                new String[] {"descendants"}, new String[] {""}); // note the spelling
    667667    }
    668668   
     
    681681     * information is requested. Accepted values are ancestors, parent, siblings,
    682682     * children, descendants.
     683     * @param infoParams - structural info is requested. Can be numSiblings,
     684     * siblingPosition, numChildren
    683685    */
    684686    public String browse(String collection, String browseService, String lang,
    685             String[] classifierNodeIDs, String[] structureParams)
     687            String[] classifierNodeIDs, String[] structureParams, String[] infoParams)
    686688    {
    687689        if(browseService.equals(""))
     
    703705                        this.doc, "structure", structureParams[i]));
    704706            }
     707        }
     708
     709        if(infoParams != null) {
     710            for(int i = 0; i < infoParams.length; i++) {
     711            if(structureInfoOptions.indexOf(infoParams[i]) != -1) {
     712                paramList.appendChild(GSXML.createParameter(
     713                                    this.doc, "info", infoParams[i]));
     714            }
     715            }
    705716        }
    706717       
Note: See TracChangeset for help on using the changeset viewer.