Changeset 22279 for other-projects/gs3-webservices-java-client
- Timestamp:
- 2010-06-22T19:33:59+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3services/QBRSOAPServer.java
r16785 r22279 132 132 protected static final String docStructureOptions = 133 133 "entire ancestors parent siblings children descendants"; // note the spelling 134 protected static final String docStructureInfo=134 protected static final String structureInfoOptions = 135 135 "numSiblings siblingPosition numChildren"; 136 136 protected static final String browseStructureOptions = … … 481 481 // Create the <paramlist></paramlist> element of param elements, 482 482 // if any; and only if values are legal (that is, if they occur in 483 // static Strings docStructureOptions and docStructureInfo):483 // static Strings docStructureOptions and structureInfoOptions): 484 484 // <param name="structure" value = "structure[i]"> 485 485 // <param name="info" value = "info[i]"> … … 497 497 if(info != null) { 498 498 for(int i = 0; i < info.length; i++) { 499 if( docStructureInfo.indexOf(info[i]) != -1) {499 if(structureInfoOptions.indexOf(info[i]) != -1) { 500 500 paramList.appendChild(GSXML.createParameter( 501 501 this.doc, "info", info[i])); … … 675 675 * information is requested. Accepted values are ancestors, parent, siblings, 676 676 * children, descendants. 677 * @param infoParams - structural info is requested. Can be numSiblings, 678 * siblingPosition, numChildren 677 679 */ 678 680 public String browse(String collection, String browseService, String lang, 679 String[] classifierNodeIDs, String[] structureParams)681 String[] classifierNodeIDs, String[] structureParams, String[] infoParams) 680 682 { 681 683 if(browseService.equals("")) … … 698 700 } 699 701 } 702 703 if(infoParams != null) { 704 for(int i = 0; i < infoParams.length; i++) { 705 if(structureInfoOptions.indexOf(infoParams[i]) != -1) { 706 paramList.appendChild(GSXML.createParameter( 707 this.doc, "info", info[i])); 708 } 709 } 710 } 700 711 701 712 // <classifierNodeList><classifier nodeID="CLx" /> … … 731 742 // won't be null except when Node returned is not an element 732 743 // otherwise, MR always returns some response 744 745 // Return it as a String formatted for display 746 String responseMsg = this.converter.getPrettyString(response); 747 // this.converter.getString(response); 733 748 734 749 // In order to avoid "Content is not allowed in prolog" exception on the … … 857 872 System.out.println("browse children of CL1-CL4:\n" + 858 873 ws.browse("gs2mgppdemo", "ClassifierBrowse", "", 859 new String[]{"CL1", "CL2", "CL3", "CL4"}, new String[]{"children"}));874 new String[]{"CL1", "CL2", "CL3", "CL4"}, new String[]{"children"}, new String[]{"numChildren"})); 860 875 861 876 System.out.println("browse descendants of CL2.3:\n" + 862 877 ws.browseDescendants("gs2mgppdemo", "ClassifierBrowse", "", 863 new String[]{"CL2.3"}));878 new String[]{"CL2.3"}, new String[]{"siblingPosition"})); 864 879 865 880 // (4) try 2 DocStructure
Note:
See TracChangeset
for help on using the changeset viewer.