- Timestamp:
- 08/14/12 17:22:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUClient/trunk/src/main/java/eu/clarin/sru/client/SRUSearchRetrieveRequest.java
r2047 r2088 1 /** 2 * This software is copyright (c) 2011 by 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 * This is free software. You can redistribute it 5 * and/or modify it under the terms described in 6 * the GNU General Public License v3 of which you 7 * should have received a copy. Otherwise you can download 8 * it from 9 * 10 * http://www.gnu.org/licenses/gpl-3.0.txt 11 * 12 * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 13 * 14 * @license http://www.gnu.org/licenses/gpl-3.0.txt 15 * GNU General Public License v3 16 */ 1 17 package eu.clarin.sru.client; 2 18 19 /** 20 * An object for performing a <em>explain</em> operation. 21 * <p> 22 * The following argument arguments are mandatory: 23 * </p> 24 * <ul> 25 * <li><em>query</em></li> 26 * </ul> 27 * 28 * @see SRUSearchRetrieveHandler 29 * @see <a href="http://www.loc.gov/standards/sru/specs/search-retrieve.html"> 30 * SRU SearchRetrieve Operation</a> 31 */ 3 32 public final class SRUSearchRetrieveRequest extends SRUAbstractRequest { 4 33 private String query; … … 10 39 11 40 12 protected SRUSearchRetrieveRequest(String baseURI) { 41 /** 42 * Constructor. 43 * 44 * @param baseURI 45 * the baseURI of the endpoint 46 */ 47 public SRUSearchRetrieveRequest(String baseURI) { 13 48 super(baseURI); 14 49 } 15 50 16 51 52 /** 53 * Get the value of the <em>query</em> argument for this request. 54 * 55 * @return the value for the <em>query</em> argument or <code>null</code> of 56 * none was set 57 */ 17 58 public String getQuery() { 18 59 return query; … … 20 61 21 62 63 /** 64 * Set the value of the <em>query</em> argument for this request. 65 * 66 * @param query 67 * the value for the <em>query</em> argument 68 * @throws NullPointerException 69 * if any required argument is <code>null</code> 70 * @throws IllegalArgumentException 71 * if any argument is invalid 72 */ 22 73 public void setQuery(String query) { 23 74 if (query == null) { … … 31 82 32 83 84 /** 85 * Get the value of the <em>startRecord</em> argument for this request. 86 * 87 * @return the value for the <em>startRecord</em> argument or 88 * <code>-1</code> of none was set 89 */ 33 90 public int getStartRecord() { 34 91 return startRecord; … … 36 93 37 94 95 /** 96 * Set the value of the <em>startRecord</em> argument for this request. 97 * 98 * @param startRecord 99 * the value for the <em>startRecord</em> argument 100 * @throws IllegalArgumentException 101 * if any argument is invalid 102 */ 38 103 public void setStartRecord(int startRecord) { 39 104 if (startRecord < 1) { … … 44 109 45 110 111 /** 112 * Get the value of the <em>maximumRecords</em> argument for this request. 113 * 114 * @return the value for the <em>maximumRecords</em> argument or 115 * <code>-1</code> of none was set 116 */ 46 117 public int getMaximumRecords() { 47 118 return maximumRecords; … … 49 120 50 121 122 /** 123 * Set the value of the <em>maximumRecords</em> argument for this request. 124 * 125 * @param maximumRecords 126 * the value for the <em>maximumRecords</em> argument 127 * @throws IllegalArgumentException 128 * if any argument is invalid 129 */ 51 130 public void setMaximumRecords(int maximumRecords) { 52 131 if (maximumRecords < 0) { … … 57 136 58 137 138 /** 139 * Get the value of the <em>recordSchema</em> argument for this request. 140 * 141 * @return the value for the <em>recordSchema</em> argument or 142 * <code>null</code> of none was set 143 */ 59 144 public String getRecordSchema() { 60 145 return recordSchema; … … 62 147 63 148 149 /** 150 * Set the value of the <em>recordSchema</em> argument for this request. 151 * 152 * @param recordSchema 153 * the value for the <em>recordSchema</em> argument 154 * @throws NullPointerException 155 * if any required argument is <code>null</code> 156 * @throws IllegalArgumentException 157 * if any argument is invalid 158 */ 64 159 public void setRecordSchema(String recordSchema) { 65 160 this.recordSchema = recordSchema; … … 67 162 68 163 164 /** 165 * Get the value of the <em>recordSchema</em> argument for this request. 166 * 167 * @return the value for the <em>recordSchema</em> argument or 168 * <code>null</code> of none was set 169 */ 170 public SRURecordPacking getRecordPacking() { 171 return recordPacking; 172 } 173 174 175 /** 176 * Set the value of the <em>recordPacking</em> argument for this request. 177 * 178 * @param recordPacking 179 * the value for the <em>recordPacking</em> argument 180 * @throws NullPointerException 181 * if any required argument is <code>null</code> 182 */ 69 183 public void setRecordPacking(SRURecordPacking recordPacking) { 70 184 if (recordPacking == null) { … … 75 189 76 190 77 public SRURecordPacking getRecordPacking() { 78 return recordPacking; 79 } 80 81 191 /** 192 * Get the value of the <em>resultSetTTL</em> argument for this request. 193 * 194 * @return the value for the <em>resultSetTTL</em> argument or 195 * <code>-1</code> of none was set 196 */ 82 197 public int getResultSetTTL() { 83 198 return resultSetTTL; … … 85 200 86 201 202 /** 203 * Set the value of the <em>resultSetTTL</em> argument for this request. 204 * 205 * @param resultSetTTL 206 * the value for the <em>resultSetTTL</em> argument 207 * @throws IllegalArgumentException 208 * if any argument is invalid 209 */ 87 210 public void setResultSetTTL(int resultSetTTL) { 88 211 this.resultSetTTL = resultSetTTL; … … 91 214 92 215 @Override 93 protectedSRUOperation getOperation() {216 SRUOperation getOperation() { 94 217 return SRUOperation.SEARCH_RETRIEVE; 95 218 } … … 97 220 98 221 @Override 99 protected void addParametersToURI(URIBuilder uriBuilder) 100 throws SRUClientException { 222 void addParametersToURI(URIBuilder uriBuilder) throws SRUClientException { 101 223 // query 102 224 if ((query == null) || query.isEmpty()) {
Note: See TracChangeset
for help on using the changeset viewer.