Changeset 21835
- Timestamp:
- 2010-03-26T18:37:14+13:00 (14 years ago)
- Location:
- other-projects/gs3-webservices-java-client/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/GS3JavaClient.java
r15731 r21835 736 736 JEditorPane information = new JEditorPane(); 737 737 information.setEditable(false); 738 738 information.setContentType("text/html"); 739 739 information.setText(collDataEl.info()); 740 740 … … 929 929 * to be retrieved. */ 930 930 public void doBrowse(ClassifierData classifier) { 931 String[] classifierNames = { classifier.name }; 931 932 String response = dlAPIA.retrieveBrowseStructure( 932 this.colName, this.serviceName, classifier .name);933 this.colName, this.serviceName, classifierNames); 933 934 934 935 browseResponseObject.clear(); -
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/DigitalLibraryServicesAPIA.java
r21812 r21835 201 201 * classifierID (including the structures of document descendents of 202 202 * the classifier). 203 * @param classifierID is of the form CL# where the number (#) marks204 * out structured sections like CL1.1.3 or CL2203 * @param classifierIDs - each ID is of the form CL# where the number (#) 204 * marks out structured sections like CL1.1.3 or CL2 205 205 * @param collection is the name of the collection 206 206 * @param service is the name of the browse service (=ClassifierBrowse usually) 207 207 */ 208 208 public String retrieveBrowseStructure( 209 String collection, String service, String classifierID);209 String collection, String service, String[] classifierIDs); 210 210 211 211 /** @return a String representing Greenstone3 -
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/FedoraServicesAPIA.java
r21812 r21835 121 121 } 122 122 123 /** @return a String representing Greenstone3 Document MetadataRetrieve XML123 /** @return a String representing Greenstone3 DocumentStructureRetrieve XML 124 124 * containing the document structure of the documents indicated by docIDs: 125 125 * this means all their descendents … … 131 131 } 132 132 133 /** @return a String representing Greenstone3 Document MetadataRetrieve XML133 /** @return a String representing Greenstone3 DocumentStructureRetrieve XML 134 134 * containing the document structure of the document indicated by docID: 135 135 * this means all its descendents … … 142 142 143 143 // UNUSED by the client, but still a very useful method: 144 /** @return a String representing Greenstone3 Document MetadataRetrieve XML144 /** @return a String representing Greenstone3 DocumentStructureRetrieve XML 145 145 * containing a view of the document structure of the documents denoted by 146 146 * docs where only the requested documents and their direct children are … … 153 153 } 154 154 155 /** @return a String representing Greenstone3 Document MetadataRetrieve XML155 /** @return a String representing Greenstone3 DocumentStructureRetrieve XML 156 156 * containing a view of the document structure of the document denoted by 157 157 * docID where only the document and its direct children are returned. … … 167 167 * classifierID (including the structures of document descendents of 168 168 * the classifier). 169 * @param classifierID is of the form CL# where the number (#) marks170 * out structured sections like CL1.1.3 or CL2169 * @param classifierIDs - each ID is of the form CL# where the number (#) 170 * marks out structured sections like CL1.1.3 or CL2 171 171 * @param collection is the name of the collection 172 172 * @param service is the name of the browse service (=ClassifierBrowse usually) 173 173 */ 174 174 public String retrieveBrowseStructure( 175 String collection, String service, String classifierID)175 String collection, String service, String[] classifierIDs) 176 176 { 177 return this.browse(collection, classifierID );177 return this.browse(collection, classifierIDs); 178 178 } 179 179 … … 194 194 } 195 195 196 /** @return a String representing Greenstone3 XML for a query process197 * response returning the results for the query denoted by parameter198 * nameValParamsMap.199 * @param nameValParamsMap is a Map of name and value pairs for all the200 * query field data values. The names match the field names that201 * describeCollectionService() would have returned for the query service.202 * @param collection is the name of the collection203 * @param service is the name of the query service204 * This method is only ever called when any of the services in the digital205 * library described themselves as type=query. Therefore any digital206 * libraries that have no query services, can just return emtpy message207 * strings (or even "") since this method will never be called on them208 * anyway. */209 public String query(String collection, String service,210 Map nameValParamsMap)211 {212 return super.query(collection, service, nameValParamsMap);213 }214 196 } -
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/GS3ServicesAPIA.java
r15379 r21835 356 356 * classifierID (including the structures of document descendants of 357 357 * the classifier). 358 * @param classifierID is of the form CL# where the number (#) marks359 * out structured sections like CL1.1.3 or CL2358 * @param classifierIDs - each ID is of the form CL# where the number (#) 359 * marks out structured sections like CL1.1.3 or CL2 360 360 * @param collection is the name of the collection 361 361 * @param service is the name of the browse service (=ClassifierBrowse usually) 362 362 */ 363 363 public String retrieveBrowseStructure( 364 String collection, String service, String classifierID)364 String collection, String service, String[] classifierIDs) 365 365 { 366 String[] classifierIDs = { classifierID };367 366 return this.browseDescendants(collection, service, 368 367 language, classifierIDs ); -
other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraConnection.java
r21775 r21835 244 244 // get user input 245 245 setInitialisationProperties(properties); 246 246 properties = null; // finished 247 247 } 248 248 … … 524 524 // fewer files of FedoraClient.jar 525 525 FedoraAPIAServiceLocator serviceLocator 526 527 fedoraServerPassword);526 = new FedoraAPIAServiceLocator(fedoraServerUsername, 527 fedoraServerPassword); 528 528 529 529 APIA = null; -
other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java
r21775 r21835 161 161 * administrative password and username of the fedora server showing 162 162 * the values in the properties file as default. If the necessary 163 * initialisation are not present in the file, the ycorresponding fields163 * initialisation are not present in the file, the corresponding fields 164 164 * in the dialog will be blank. 165 165 * If no password was set on the fedora repository when installing it, … … 1301 1301 * serviceNames: DocumentContent/Metadata/StructureRetrieve, ClassifierBrowse, 1302 1302 * ClassifierBrowseMetadataRetrieve. 1303 * All collections in this Digital Library (Fedora Repository) share 1304 * the same services, so this method returns the same as 1305 * describeService(serviceName). 1303 * All collections in this Digital Library (Fedora Repository) share the 1304 * same services, so this method returns the same services as getServiceList(); 1306 1305 * @param collectionName - the name of the collection whose services are to 1307 1306 * be described. It will be converted to a fedora collection pid, which is of … … 1679 1678 * user to browse the titles of documents in the given collection by letter 1680 1679 * and returning the results. 1681 * @param classifierID is the id of the classifieron which to browse. In1680 * @param classifierIDs are the ids of the classifiers on which to browse. In 1682 1681 * this case, the classifier indicates whether we browse titles by letter, or 1683 1682 * browse (documents) by collection; and it is of the form <CL(letter)>. … … 1687 1686 * the documents that start with the letter indicated by parameter classifier. 1688 1687 */ 1689 public String browse(String collectionName, String classifierID)1688 public String browse(String collectionName, String[] classifierIDs) 1690 1689 { 1691 1690 Document doc = builder.newDocument(); … … 1696 1695 GSXML.CLASS_NODE_ELEM+GSXML.LIST_MODIFIER); 1697 1696 1697 for(int i = 0; i < classifierIDs.length; i++) { 1698 1698 // <classifierNode nodeID="classifierNum"> 1699 1699 Element requestedClassifierNode = doc.createElement( 1700 1700 GSXML.CLASS_NODE_ELEM); 1701 1701 Attr attribute = doc.createAttribute(GSXML.NODE_ID_ATT); 1702 attribute.setValue(classifierID );1702 attribute.setValue(classifierIDs[i]); 1703 1703 requestedClassifierNode.setAttributeNode(attribute); 1704 1704 classifierNodeList.appendChild(requestedClassifierNode); … … 1711 1711 Element classifierNode = doc.createElement(GSXML.CLASS_NODE_ELEM); 1712 1712 attribute = doc.createAttribute(GSXML.NODE_ID_ATT); 1713 attribute.setValue(classifierID );1713 attribute.setValue(classifierIDs[i]); 1714 1714 classifierNode.setAttributeNode(attribute); 1715 1715 nodeStructure.appendChild(classifierNode); … … 1719 1719 // classifier CL2 = browse by collection; 1720 1720 //remove the CL prefix and obtain the number from the id: 1721 int classifierNum = Integer.parseInt(classifierID .replace("CL", ""));1721 int classifierNum = Integer.parseInt(classifierIDs[i].replace("CL", "")); 1722 1722 switch(classifierNum) { 1723 1723 case 1: … … 1727 1727 // Retrieve the document structure for each subClassifierID: 1728 1728 // all the documents that begin with its letter. 1729 // remove the starting CL1730 1729 String letter = String.valueOf(ch); 1731 try {1730 try { 1732 1731 String[] docPIDs = this.browseTitlesByLetter( 1733 1732 collectionName, letter); … … 1740 1739 GSXML.CLASS_NODE_ELEM); 1741 1740 attribute = doc.createAttribute(GSXML.NODE_ID_ATT); 1742 attribute.setValue(classifierID +"."+num);1741 attribute.setValue(classifierIDs[i]+"."+num); 1743 1742 subClassifier.setAttributeNode(attribute); 1744 1743 classifierNode.appendChild(subClassifier); … … 1760 1759 GSXML.CLASS_NODE_ELEM); 1761 1760 attribute = doc.createAttribute(GSXML.NODE_ID_ATT); 1762 attribute.setValue(classifierID +"."+0); //1761 attribute.setValue(classifierIDs[i]+"."+0); // 1763 1762 subClassifier.setAttributeNode(attribute); 1764 1763 classifierNode.appendChild(subClassifier); … … 1769 1768 default: 1770 1769 ex = new FedoraGS3RunException( // cause is regular exception 1771 new Exception("Unknown classifier ID: " + classifierID)); 1772 } 1770 new Exception("Unknown classifier ID: " + classifierIDs[i])); 1771 } 1772 } 1773 1773 Element responseMsg = createResponseMessage(doc, classifierNodeList, ex, 1774 1774 GSXML.REQUEST_TYPE_DESCRIBE, collectionName+"/ClassifierBrowse"); … … 2209 2209 System.out.println("\nCLASSIFIER BROWSE"); 2210 2210 System.out.println(con.browse("gs2mgdemo", //"ClassifierBrowse", 2211 "CL1"));2211 new String[]{"CL1"})); 2212 2212 2213 2213 System.out.println("\nCLASSIFIER BROWSE METADATA RETRIEVE"); -
other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraToGS3Interface.java
r15437 r21835 278 278 * user to browse the titles of documents in the given collection by letter 279 279 * and returning the results. 280 * @param classifierID is the id of the classifieron which to browse. In280 * @param classifierIDs are the ids of the classifiers on which to browse. In 281 281 * this case, the classifier indicates whether we browse titles by letter, or 282 282 * browse (documents) by collection; and it is of the form <CL(letter)>. … … 286 286 * the documents that start with the letter indicated by parameter classifier. 287 287 */ 288 public String browse(String collectionName, String classifierID);288 public String browse(String collectionName, String[] classifierIDs); 289 289 290 290 /* @returns the document identifiers returned for a search on the titles of
Note:
See TracChangeset
for help on using the changeset viewer.