Changeset 22298 for other-projects/gs3-webservices-java-client/trunk
- Timestamp:
- 2010-06-23T15:44:44+12:00 (14 years ago)
- Location:
- other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/DigitalLibraryServicesAPIA.java
r21835 r22298 106 106 * collection, describing the collection (display items) as well as 107 107 * listing any services supported specifically by the collection. 108 * @param collection is the name of the collection to be described */108 * @param collection is the name of the collection to be described. */ 109 109 public String describeCollection(String collection); 110 110 … … 112 112 * collection's service, describing the service (display items). 113 113 * @param collection is the name of the collection to be described 114 * @param service is the name of the collection's service to be described */114 * @param service is the name of the collection's service to be described. */ 115 115 public String describeCollectionService(String collection, String service); 116 116 … … 125 125 * @param collection is the name of the collection 126 126 * @param docIDs is an array of document identifiers of documents whose 127 * metadata is requested */ 128 public String retrieveDocumentMetadata(String collection, String[] docIDs); 127 * metadata is requested 128 * @param metadata is the list of metadata elements to be retrieved for each doc */ 129 public String retrieveDocumentMetadata(String collection, String[] docIDs, String[] metadata); 129 130 130 131 /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML … … 132 133 * @param collection is the name of the collection 133 134 * @param docID is the document identifier of the document whose metadata is 134 * requested */ 135 public String retrieveDocumentMetadata(String collection, String docID); 135 * requested 136 * @param metadata is the list of metadata elements to be retrieved for each doc */ 137 public String retrieveDocumentMetadata(String collection, String docID, String[] metadata); 136 138 137 139 /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML … … 178 180 * structure is requested */ 179 181 public String retrieveDocumentStructure(String collection, String docID); 182 183 184 /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML 185 * containing the requested portion of the document structure of the documents 186 * indicated by docIDs: 187 * @param collection is the name of the collection 188 * @param docIDs is an array of document identifiers of documents whose 189 * hierarchical structures are requested 190 * @param structure - strings specifying the required structure of each document. 191 * It can be a combination of: ancestors, parent, siblings, children, descendants, entire. 192 * @param info - strings specifying the required structural info of each document. 193 * It can be any combination of: siblingPosition, numSiblings, numChildren. 194 */ 195 public String retrieveDocumentStructure(String collection, String[] docIDs, String[] structure, String[] info); 196 197 198 /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML 199 * containing the requested portion of the document structure of the documents 200 * indicated by docIDs: 201 * @param collection is the name of the collection 202 * @param docID is the document identifier of the document whose hierarchical 203 * structure is requested 204 * @param structure - strings specifying the required structure of the document. 205 * It can be a combination of: ancestors, parent, siblings, children, descendants, entire. 206 * @param info - strings specifying the required structural info of the document. 207 * It can be any combination of: siblingPosition, numSiblings, numChildren. 208 */ 209 public String retrieveDocumentStructure(String collection, String docID, String[] structure, String[] info); 210 180 211 181 212 // UNUSED by the client, but still a very useful method: … … 205 236 * @param collection is the name of the collection 206 237 * @param service is the name of the browse service (=ClassifierBrowse usually) 207 */ 208 public String retrieveBrowseStructure( 209 String collection, String service, String[] classifierIDs); 238 * @param structure - the requested browse substructure. Can be any combination 239 * of ancestors, parent, siblings, children, descendants. 240 * @param info - the requested structural info. Can be numSiblings, siblingPosition, 241 * numChildren 242 */ 243 public String retrieveBrowseStructure(String collection, String service, 244 String[] classifierIDs, String[] structure, String[] info); 210 245 211 246 /** @return a String representing Greenstone3 … … 214 249 * @param nodeIDs is of the form CL#.# where the number (#) marks 215 250 * out structured sections like CL2.1.3. NodeIDs are generally subsections 216 * of top-level classifierNodes (CL#, e.g. CL3). 251 * of top-level classifierNodes (CL#, e.g. CL3). 252 * @param metafields are the classifier metadata fields that are to be returned. 217 253 * @param collection is the name of the collection 218 254 * @param service is the name of the Browse's MetadataRetrieve service 219 255 * (usually the browse service is ClassifierBrowse, in which case it always 220 256 * has a retrieve service called ClassifierBrowseMetadataRetrieve) */ 221 public String retrieveBrowseMetadata( 222 String collection, String service, String[] nodeIDs);257 public String retrieveBrowseMetadata(String collection, String service, 258 String[] nodeIDs, String[] metafields); 223 259 224 260 /** @return a String representing Greenstone3 XML for a query process -
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/FedoraServicesAPIA.java
r21846 r22298 76 76 * @param collection is the name of the collection 77 77 * @param docIDs is an array of document identifiers of documents whose 78 * metadata is requested */ 79 public String retrieveDocumentMetadata(String collection, String[] docIDs) { 80 return this.getDocumentMetadata(docIDs); 78 * metadata is requested 79 * @param metadata is the list of metadata elements requested. If "all" is specified 80 * then all metadata is requested. */ 81 public String retrieveDocumentMetadata(String collection, String[] docIDs, String[] metadata) { 82 return this.getDocumentMetadata(docIDs, metadata); 81 83 } 82 84 … … 85 87 * @param collection is the name of the collection 86 88 * @param docID is the document identifier of the document whose metadata is 87 * requested */ 88 public String retrieveDocumentMetadata(String collection, String docID) { 89 return this.getDocumentMetadata(docID); 89 * requested. 90 * @param metadata is the list of metadata elements requested. If "all" is specified 91 * then all metadata is requested. */ 92 public String retrieveDocumentMetadata(String collection, String docID, String[] metadata) { 93 return this.getDocumentMetadata(docID, metadata); 90 94 } 91 95 … … 96 100 * are requested */ 97 101 public String retrieveTitleMetadata(String collection, String[] docIDs) { 98 return this.getTitleMetadata(docIDs);102 return this.getDocumentMetadata(docIDs, new String[] {"Title"}); 99 103 } 100 104 … … 105 109 * requested */ 106 110 public String retrieveTitleMetadata(String collection, String docID) { 107 return this.getTitleMetadata(docID);111 return this.getDocumentMetadata(docID, new String[] {"Title"}); 108 112 } 109 113 … … 134 138 * hierarchical structures are requested */ 135 139 public String retrieveDocumentStructure(String collection, String[] docIDs) { 136 return this.getDocumentStructure(docIDs);140 return this.getDocumentStructure(docIDs, new String[]{"descendants"}, new String[]{""}); 137 141 } 138 142 … … 144 148 * structure is requested*/ 145 149 public String retrieveDocumentStructure(String collection, String docID) { 146 return this.getDocumentStructure(docID);150 return this.getDocumentStructure(docID, new String[]{"descendants"}, new String[]{""}); 147 151 } 148 152 … … 156 160 * hierarchical structures are requested */ 157 161 public String retrieveDocumentChildren(String collection, String[] docIDs) { 158 return this.getChildren(docIDs);162 return this.getDocumentStructure(docIDs, new String[]{"children"}, new String[]{""}); 159 163 } 160 164 … … 166 170 * structure is requested */ 167 171 public String retrieveDocumentChildren(String collection, String docID) { 168 return this.getChildren(docID); 169 } 170 171 /** @return a String representing Greenstone3 ClassifierBrowse XML 172 return this.getDocumentStructure(docID, new String[]{"children"}, new String[]{""}); 173 } 174 175 /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML 176 * containing the requested portion of the document structure of the documents 177 * indicated by docIDs: 178 * @param collection is the name of the collection. It's already included in the 179 * docID for a Fedora DL. 180 * @param docIDs is an array of document identifiers of documents whose 181 * hierarchical structures are requested 182 * @param structure - strings specifying the required structure of each document. 183 * It can be a combination of: ancestors, parent, siblings, children, descendants, entire. 184 * @param info - strings specifying the required structural info of each document. 185 * It can be any combination of: siblingPosition, numSiblings, numChildren. 186 */ 187 public String retrieveDocumentStructure(String collection, String[] docIDs, String[] structure, String[] info) { 188 return this.getDocumentStructure(docIDs, structure, info); 189 } 190 191 192 /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML 193 * containing the requested portion of the document structure of the documents 194 * indicated by docIDs: 195 * @param collection is the name of the collection. It's already included in the 196 * docID for a Fedora DL. 197 * @param docID is the document identifier of the document whose hierarchical 198 * structure is requested 199 * @param structure - strings specifying the required structure of the document. 200 * It can be a combination of: ancestors, parent, siblings, children, descendants, entire. 201 * @param info - strings specifying the required structural info of the document. 202 * It can be any combination of: siblingPosition, numSiblings, numChildren. 203 */ 204 public String retrieveDocumentStructure(String collection, String docID, String[] structure, String[] info) { 205 return this.getDocumentStructure(docID, structure, info); 206 } 207 208 209 /** @return a String representing Greenstone3 ClassifierBrowse XML 172 210 * giving the entire *structure* of the classification denoted by 173 211 * classifierID (including the structures of document descendents of … … 177 215 * @param collection is the name of the collection 178 216 * @param service is the name of the browse service (=ClassifierBrowse usually) 217 * @param structure - the requested browse substructure. Can be any combination 218 * of ancestors, parent, siblings, children, descendants. 219 * @param info - the requested structural info. Can be numSiblings, siblingPosition, 220 * numChildren 179 221 */ 180 public String retrieveBrowseStructure( 181 String collection, String service, String[] classifierIDs)222 public String retrieveBrowseStructure(String collection, String service, String[] classifierIDs, 223 String[] structure, String[] info) 182 224 { 183 return this.browse(collection, classifierIDs );225 return this.browse(collection, classifierIDs, structure, info); 184 226 } 185 227 … … 190 232 * out structured sections like CL2.1.3. NodeIDs are generally subsections 191 233 * of top-level classifierNodes (CL#, e.g. CL3). 234 * @param metafields are the classifier metadata fields that are to be returned. 192 235 * @param collection is the name of the collection 193 236 * @param service is the name of the Browse's MetadataRetrieve service 194 237 * (usually the browse service is ClassifierBrowse, in which case it always 195 238 * has a retrieve service called ClassifierBrowseMetadataRetrieve) */ 196 public String retrieveBrowseMetadata( 197 String collection, String service, String[] nodeIDs)239 public String retrieveBrowseMetadata(String collection, String service, 240 String[] nodeIDs, String[] metafields) 198 241 { 199 return this.browseMetadataRetrieve(nodeIDs);242 return this.browseMetadataRetrieve(nodeIDs, metafields); 200 243 } 201 244 -
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/GS3ServicesAPIA.java
r21835 r22298 254 254 * @return a String representing Greenstone3 DocumentMetadataRetrieve XML 255 255 * containing all the metadata of all the documents indicated by docIDs 256 */ 257 public String retrieveDocumentMetadata(String collection, String[] docIDs) { 258 return this.retrieveAllDocumentMetadata(collection, language, docIDs); 256 * @param metadata is the list of metadata elements to be retrieved for each doc. 257 */ 258 public String retrieveDocumentMetadata(String collection, String[] docIDs, String[] metafields) { 259 return this.retrieveDocumentMetadata(collection, language, docIDs, metafields); 259 260 } 260 261 … … 266 267 * @return a String representing Greenstone3 DocumentMetadataRetrieve XML 267 268 * containing all the metadata of the document denoted by docID 268 */ 269 public String retrieveDocumentMetadata(String collection, String docID) { 270 return this.retrieveAllDocumentMetadata(collection, language, 271 new String[] { docID }); 269 * @param metadata is the list of metadata elements to be retrieved for each doc. 270 */ 271 public String retrieveDocumentMetadata(String collection, String docID, String[] metafields) { 272 return this.retrieveDocumentMetadata(collection, language, 273 new String[] { docID }, metafields); 272 274 } 273 275 … … 298 300 new String[] { docID }, titleMetaName); 299 301 } 302 303 /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML 304 * containing the requested portion of the document structure of the documents 305 * indicated by docIDs: 306 * @param collection is the name of the collection. 307 * @param docIDs is an array of document identifiers of documents whose 308 * hierarchical structures are requested. 309 * @param structure - strings specifying the required structure of each document. 310 * It can be a combination of: ancestors, parent, siblings, children, descendants, entire. 311 * @param info - strings specifying the required structural info of each document. 312 * It can be any combination of: siblingPosition, numSiblings, numChildren. 313 */ 314 public String retrieveDocumentStructure(String collection, String[] docIDs, String[] structure, String[] info) { 315 return retrieveDocumentStructure(collection, language, docIDs, structure, info); 316 } 317 318 319 /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML 320 * containing the requested portion of the document structure of the documents 321 * indicated by docIDs: 322 * @param collection is the name of the collection. 323 * @param docID is the document identifier of the document whose hierarchical 324 * structure is requested. 325 * @param structure - strings specifying the required structure of the document. 326 * It can be a combination of: ancestors, parent, siblings, children, descendants, entire. 327 * @param info - strings specifying the required structural info of the document. 328 * It can be any combination of: siblingPosition, numSiblings, numChildren. 329 */ 330 public String retrieveDocumentStructure(String collection, String docID, String[] structure, String[] info) { 331 return retrieveDocumentStructure(collection, language, 332 new String[] {docID}, structure, info); 333 } 300 334 301 335 /** Part of the GS3 Java-Client's DigitalLibraryServicesAPIA interface … … 310 344 return this.retrieveEntireDocumentStructure(collection, language, docIDs); 311 345 } 346 312 347 /** Part of the GS3 Java-Client's DigitalLibraryServicesAPIA interface 313 348 * contract. … … 322 357 new String[] { docID }); 323 358 } 359 324 360 325 361 /** Part of the GS3 Java-Client's DigitalLibraryServicesAPIA interface … … 360 396 * @param collection is the name of the collection 361 397 * @param service is the name of the browse service (=ClassifierBrowse usually) 362 */ 363 public String retrieveBrowseStructure( 364 String collection, String service, String[] classifierIDs) 398 * @param structure - the requested browse substructure. Can be any combination 399 * of ancestors, parent, siblings, children, descendants. 400 * @param info - the requested structural info. Can be numSiblings, siblingPosition, 401 * numChildren 402 */ 403 public String retrieveBrowseStructure(String collection, String service, 404 String[] classifierIDs, String[] structure, String[] info) 365 405 { 366 return this.browseDescendants(collection, service, 367 language, classifierIDs ); 406 return this.browse(collection, service, language, classifierIDs, structure, info); 368 407 } 369 408 … … 376 415 * out structured sections like CL2.1.3. NodeIDs are generally subsections 377 416 * of top-level classifierNodes (CL#, e.g. CL3). 417 * @param metafields are the classifier metadata fields that are to be returned. 378 418 * @param collection is the name of the collection 379 419 * @param service is the name of the Browse's MetadataRetrieve service 380 420 * (usually the browse service is ClassifierBrowse, in which case it always 381 421 * has a retrieve service called ClassifierBrowseMetadataRetrieve) */ 382 public String retrieveBrowseMetadata( 383 String collection, String service, String[] nodeIDs)422 public String retrieveBrowseMetadata(String collection, String service, 423 String[] nodeIDs, String[] metafields) 384 424 { 385 return this.retrieveAllBrowseMetadata(collection, service, 386 language, nodeIDs); 425 return this.retrieveBrowseMetadata(collection, service, language, nodeIDs, metafields); 387 426 } 388 427 -
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/GS3WebServicesQBRAPI.java
r16051 r22298 590 590 * @see <a href="http://wiki.greenstone.org/wiki/index.php/Greenstone3">The Greenstone 3 Developer's Manual - pages 48, 49</a> 591 591 * @param collection is the name of the Collection whose 592 * DocumentStructureRetrieve is requested 593 * @param lang is the language of the display content in the response 592 * DocumentStructureRetrieve is requested. 593 * @param lang is the language of the display content in the response. 594 594 * @param docNodeIDs is the list of documentNodeIDs for which the 595 595 * structure ought to be retrieved. 596 596 * @param structure specifies what structure information needs to 597 597 * be retrieved. The values can be one or more of ancestors, parent, 598 * siblings, children, descend ents (NOTE SPELLING), entire.598 * siblings, children, descendants (NOTE SPELLING), entire. 599 599 * @param info - for specifying extra information to be retrieved. 600 600 * Possible values for info parameters are numSiblings, siblingPosition, … … 620 620 * @see <a href="http://wiki.greenstone.org/wiki/index.php/Greenstone3">The Greenstone 3 Developer's Manual - page 47</a> 621 621 * @param collection is the name of the Collection whose 622 * DocumentMetadataRetrieve is requested 623 * @param lang is the language of the display content in the response 622 * DocumentMetadataRetrieve is requested. 623 * @param lang is the language of the display content in the response. 624 624 * @param docNodeIDs is the list of documentNodeIDs for which the 625 625 * structure ought to be retrieved. … … 641 641 * @see <a href="http://wiki.greenstone.org/wiki/index.php/Greenstone3">The Greenstone 3 Developer's Manual - page 47</a> 642 642 * @param collection is the name of the Collection whose 643 * DocumentContentRetrieve is requested 643 * DocumentContentRetrieve is requested. 644 644 * @param lang is the language of the display content in the response 645 645 * @param docNodeIDs is the list of documentNodeIDs for which the … … 753 753 * information is requested. Accepted values are ancestors, parent, siblings, 754 754 * children, descendants. 755 * @param infoParams - the requested structural info. Can be numSiblings, siblingPosition, 756 * numChildren 755 757 */ 756 758 public String browse(String collection, String browseService, String lang, 757 String[] classifierNodeIDs, String[] structureParams)759 String[] classifierNodeIDs, String[] structureParams, String[] infoParams) 758 760 { 759 761 call.setOperationName( "browse" ); … … 764 766 addArrayParam("classifierNodeIDs"); 765 767 addArrayParam("structureParams"); 768 addArrayParam("infoParams"); 766 769 767 770 return invokeWith(new Object[] {collection, browseService, lang, 768 classifierNodeIDs, structureParams});771 classifierNodeIDs, structureParams, infoParams}); 769 772 } 770 773 … … 821 824 System.out.println("browse children of CL1-CL4:\n" + 822 825 ws.browse("gs2mgppdemo", "ClassifierBrowse", "", 823 new String[]{"CL1", "CL2", "CL3", "CL4"}, new String[]{"children"} ));826 new String[]{"CL1", "CL2", "CL3", "CL4"}, new String[]{"children"}, new String[]{"numChildren"})); 824 827 825 828 System.out.println("browse descendants of CL2.3:\n" + … … 861 864 System.out.println("retrieve all browse meta of CL1, CL2, CL2.1, CL3:\n" + 862 865 ws.retrieveAllBrowseMetadata("gs2mgppdemo", "", "", 863 new String[]{"CL1", "CL2", 864 "CL2.1", "CL3"})); 866 new String[]{"CL1", "CL2", "CL2.1", "CL3"})); 865 867 866 868 System.out.println("retrieve Title, hastxt browse meta of CL1, CL2, CL2.1, CL3:\n" +
Note:
See TracChangeset
for help on using the changeset viewer.