Changeset 2623
- Timestamp:
- 02/25/13 20:04:38 (11 years ago)
- Location:
- SRUServer/trunk/src/main/java/eu/clarin/sru/server
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUAbstractResult.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 39 39 /** 40 40 * Add a non surrogate diagnostic to the response. 41 * 41 * 42 42 * @param code 43 43 * numerical diagnostic code … … 56 56 /** 57 57 * Add a non surrogate diagnostic to the response. 58 * 58 * 59 59 * @param code 60 60 * numerical diagnostic code … … 70 70 /** 71 71 * Add a non surrogate diagnostic to the response. 72 * 72 * 73 73 * @param code 74 74 * numerical diagnostic code … … 83 83 * Default implementation is provided for convince and always returns 84 84 * <code>false</code>. 85 * 85 * 86 86 * @return <code>true</code> if extra response data should be serialized. 87 87 * @see #writeExtraResponseData(XMLStreamWriter) … … 94 94 /** 95 95 * Serialize extra response data for this request. 96 * 96 * 97 97 * @param writer 98 98 * the {@link XMLStreamException} instance to be used -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUConfigException.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 25 25 /** 26 26 * Constructor. 27 * 27 * 28 28 * @param msg 29 29 * a message … … 36 36 /** 37 37 * Constructor. 38 * 38 * 39 39 * @param msg 40 40 * a message -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUConstants.java
r1990 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUDiagnostic.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 19 19 /** 20 20 * Class to hold a SRU diagnostic. 21 * 21 * 22 22 * @see SRUConstants 23 23 * @see SRUDiagnosticList … … 35 35 /** 36 36 * Constructor. 37 * 37 * 38 38 * @param code 39 39 * numerical diagnostic code … … 54 54 /** 55 55 * Constructor. 56 * 56 * 57 57 * @param code 58 58 * numerical diagnostic code … … 68 68 /** 69 69 * Constructor. 70 * 70 * 71 71 * @param code 72 72 * numerical diagnostic code … … 79 79 /** 80 80 * Get code for this diagnostic. 81 * 81 * 82 82 * @return diagnostic code 83 83 * @see SRUConstants … … 91 91 * Get supplementary information for this diagnostic. The format for this 92 92 * value is often specified by the diagnostic code. 93 * 93 * 94 94 * @return supplementary information 95 95 */ … … 101 101 /** 102 102 * Get human readable message. 103 * 103 * 104 104 * @return human readable message 105 105 */ -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUDiagnosticList.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 20 20 * Container for non surrogate diagnostics for the request. The will be put in 21 21 * the <em>diagnostics</em> part of the response. 22 * 22 * 23 23 * @see SRUConstants 24 24 * @see SRUDiagnostic … … 32 32 /** 33 33 * Add a non surrogate diagnostic to the response. 34 * 34 * 35 35 * @param code 36 36 * numerical diagnostic code -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUException.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 20 20 * An exception raised if something went wrong processing the request. For 21 21 * diagnostic codes, see constants in {@link SRUConstants}. 22 * 22 * 23 23 * @see SRUConstants 24 24 */ … … 31 31 /** 32 32 * Constructor. 33 * 33 * 34 34 * @param code 35 35 * the diagnostic code … … 51 51 /** 52 52 * Constructor. 53 * 53 * 54 54 * @param code 55 55 * the diagnostic code … … 66 66 /** 67 67 * Constructor. 68 * 68 * 69 69 * @param code 70 70 * the diagnostic code … … 81 81 /** 82 82 * Constructor. 83 * 83 * 84 84 * @param code 85 85 * the diagnostic code … … 94 94 /** 95 95 * Constructor. 96 * 96 * 97 97 * @param code 98 98 * the diagnostic code … … 107 107 /** 108 108 * Constructor. 109 * 109 * 110 110 * @param code 111 111 * the diagnostic code … … 118 118 /** 119 119 * Create a SRU diagnostic from this exception. 120 * 120 * 121 121 * @return a {@link SRUDiagnostic} instance 122 122 */ -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUExplainResult.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 21 21 * use it implement extensions to the SRU protocol, i.e. providing 22 22 * extraResponseData. 23 * 23 * 24 24 * <p> 25 25 * This class needs to be implemented for the target data source. 26 26 * </p> 27 * 27 * 28 28 * @see <a href="http://www.loc.gov/standards/sru/specs/explain.html">SRU 29 29 * Explain Operation </a> … … 33 33 /** 34 34 * Constructor. 35 * 35 * 36 36 * @param diagnostics 37 37 * an instance of a SRUDiagnosticList -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUOperation.java
r2103 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURecordPacking.java
r2103 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURequest.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 32 32 * Get the <em>operation</em> parameter of this request. Available for 33 33 * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests. 34 * 34 * 35 35 * @return the operation 36 36 * @see SRUOperation … … 42 42 * Get the <em>version</em> parameter of this request. Available for 43 43 * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests. 44 * 44 * 45 45 * @return the version 46 46 * @see SRUVersion … … 51 51 /** 52 52 * Check if this request is of a specific version. 53 * 53 * 54 54 * @param version 55 55 * the version to check … … 65 65 * Check if version of this request is at least <em>min</em> and at most 66 66 * <em>max</em>. 67 * 67 * 68 68 * @param min 69 69 * the minimum version … … 83 83 * Get the <em>recordPacking</em> parameter of this request. Only available 84 84 * for <em>explain</em> and <em>searchRetrieve</em> requests. 85 * 85 * 86 86 * @return the record packing method 87 87 * @see SRURecordPacking … … 93 93 * Get the <em>query</em> parameter of this request. Only available for 94 94 * <em>searchRetrieve</em> requests. 95 * 95 * 96 96 * @return the parsed query or <code>null</code> if not a 97 97 * <em>searchRetrieve</em> request … … 103 103 * Get the <em>startRecord</em> parameter of this request. Only available 104 104 * for <em>searchRetrieve</em> requests. 105 * 105 * 106 106 * @return the number of the start record or <code>-1</code> if no value was 107 107 * supplied for this request … … 114 114 * for <em>searchRetrieve</em> requests. If no value was supplied with the 115 115 * request, the server will automatically set a default value. 116 * 116 * 117 117 * @return the maximum number of records 118 118 */ … … 123 123 * Get the <em>recordSchema</em> parameter of this request. Only available 124 124 * for <em>searchRetrieve</em> requests. 125 * 125 * 126 126 * @return the record schema name or <code>null</code> if no value was 127 127 * supplied for this request … … 135 135 * parameter of this request. Only available for <em>searchRetrieve</em> 136 136 * requests. 137 * 137 * 138 138 * @return the record schema identifier or <code>null</code> if no 139 139 * <em>recordSchema</em> parameter was supplied for this request … … 146 146 * Get the <em>recordXPath</em> parameter of this request. Only available 147 147 * for <em>searchRetrieve</em> requests and version 1.1 requests. 148 * 148 * 149 149 * @return the record XPath or <code>null</code> of no value was supplied 150 150 * for this request … … 156 156 * Get the <em>resultSetTTL</em> parameter of this request. Only available 157 157 * for <em>searchRetrieve</em> requests. 158 * 158 * 159 159 * @return the result set TTL or <code>-1</code> if no value was supplied 160 160 * for this request … … 166 166 * Get the <em>sortKeys</em> parameter of this request. Only available for 167 167 * <em>searchRetrieve</em> requests and version 1.1 requests. 168 * 168 * 169 169 * @return the record XPath or <code>null</code> of no value was supplied 170 170 * for this request … … 176 176 * Get the <em>scanClause</em> parameter of this request. Only available for 177 177 * <em>scan</em> requests. 178 * 178 * 179 179 * @return the parsed scan clause or <code>null</code> if not a 180 180 * <em>scan</em> request … … 186 186 * Get the <em>responsePosition</em> parameter of this request. Only 187 187 * available for <em>scan</em> requests. 188 * 188 * 189 189 * @return the response position or <code>-1</code> if no value was supplied 190 190 * for this request … … 196 196 * Get the <em>maximumTerms</em> parameter of this request. Available for 197 197 * any type of request. 198 * 198 * 199 199 * @return the maximum number of terms or <code>-1</code> if no value was 200 200 * supplied for this request … … 206 206 * Get the <em>stylesheet</em> parameter of this request. Available for 207 207 * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests. 208 * 208 * 209 209 * @return the stylesheet or <code>null</code> if no value was supplied for 210 210 * this request … … 216 216 * Get the protocol schema which was used of this request. Available for 217 217 * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests. 218 * 218 * 219 219 * @return the protocol scheme 220 220 */ … … 225 225 * Get the names of extra parameters of this request. Available for 226 226 * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests. 227 * 227 * 228 228 * @return a possibly empty list of parameter names 229 229 */ … … 234 234 * Get the value of an extra parameter of this request. Available for 235 235 * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests. 236 * 236 * 237 237 * @param name 238 238 * name of the extra parameter. Must be prefixed with … … 250 250 /** 251 251 * Get the raw client request information from the servlet container. 252 * 252 * 253 253 * @return the servlet request 254 254 */ -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURequestImpl.java
r2103 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 383 383 } 384 384 385 // diagnostics != null -> consider as sucesss 385 // diagnostics != null -> consider as sucesss 386 386 return (diagnostics == null); 387 387 } … … 672 672 PARAM_VERSION + "\" was not supplied."); 673 673 } 674 674 675 675 /* 676 676 * this is an explain operation, assume default version -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUScanResultSet.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 26 26 * A result set of a <em>scan</em> operation. It is used to iterate over the 27 27 * term set and provides a method to serialize the terms. 28 * 28 * 29 29 * <p> 30 30 * A <code>SRUScanResultSet</code> object maintains a cursor pointing to its … … 38 38 * This class needs to be implemented for the target search engine. 39 39 * </p> 40 * 40 * 41 41 * @see <a href="http://www.loc.gov/standards/sru/specs/scan.html"> SRU Scan 42 42 * Operation</a> … … 72 72 /** 73 73 * Constructor. 74 * 74 * 75 75 * @param diagnostics 76 76 * an instance of a SRUDiagnosticList. … … 91 91 * the cursor is positioned after the last term. 92 92 * </p> 93 * 93 * 94 94 * @return <code>true</code> if the new current term is valid; 95 95 * <code>false</code> if there are no more terms … … 100 100 /** 101 101 * Get the current term exactly as it appears in the index. 102 * 102 * 103 103 * @return current term 104 104 */ … … 110 110 * the index in the request's <em>scanClause</em> was searched with the term 111 111 * in the <em>value</em> field. 112 * 112 * 113 113 * @return a non-negative number of records 114 114 */ … … 119 119 * Get the string for the current term to display to the end user in place 120 120 * of the term itself. 121 * 121 * 122 122 * @return display string or <code>null</code> 123 123 */ … … 128 128 * Get the flag to indicate the position of the term within the complete 129 129 * term list. 130 * 130 * 131 131 * @return position within term list or <code>null</code> 132 132 */ … … 138 138 * default implementation is provided for convince and always returns 139 139 * <code>false</code>. 140 * 140 * 141 141 * @return <code>true</code> if the term has extra term data 142 142 * @throws NoSuchElementException … … 152 152 * Serialize extra term data for the current term. A no-op default 153 153 * implementation is provided for convince. 154 * 154 * 155 155 * @param writer 156 156 * the {@link XMLStreamException} instance to be used -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUSearchEngine.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 41 41 * The implementation of this method <em>must</em> be thread-safe. 42 42 * </p> 43 * 43 * 44 44 * @param config 45 45 * the <code>SRUEndpointConfig</code> object that contains the … … 69 69 * The implementation of this method <em>must</em> be thread-safe. 70 70 * </p> 71 * 71 * 72 72 * @param config 73 73 * the <code>SRUEndpointConfig</code> object that contains the … … 99 99 * The implementation of this method <em>must</em> be thread-safe. 100 100 * </p> 101 * 101 * 102 102 * @param config 103 103 * the <code>SRUEndpointConfig</code> object that contains the -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUSearchResultSet.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 38 38 * This class needs to be implemented for the target search engine. 39 39 * </p> 40 * 40 * 41 41 * @see <a href="http://www.loc.gov/standards/sru/specs/search-retrieve.html"> 42 42 * SRU Search Retrieve Operation</a> … … 46 46 /** 47 47 * Constructor. 48 * 48 * 49 49 * @param diagnostics 50 50 * an instance of a SRUDiagnosticList … … 59 59 * The number of records matched by the query. If the query fails this must 60 60 * be 0. 61 * 61 * 62 62 * @return the total number of results or 0 if the query failed 63 63 */ … … 69 69 * records requested to be returned (maximumRecords parameter). If the query 70 70 * fails this must be 0. 71 * 71 * 72 72 * @return the number of results or 0 if the query failed 73 73 */ … … 78 78 * The result set id of this result. the default implementation returns 79 79 * <code>null</code>. 80 * 80 * 81 81 * @return the result set id or <code>null</code> if not applicable for this 82 82 * result … … 90 90 * The idle time for this result. The default implementation returns 91 91 * <code>-1</code>. 92 * 92 * 93 93 * @return the result set idle time or <code>-1</code> if not applicable for 94 94 * this result … … 102 102 * The record schema identifier in which the records are returned 103 103 * (recordSchema parameter). 104 * 104 * 105 105 * @return the record schema identifier 106 106 */ … … 118 118 * the cursor is positioned after the last record. 119 119 * </p> 120 * 120 * 121 121 * @return <code>true</code> if the new current record is valid; 122 122 * <code>false</code> if there are no more records … … 128 128 * An identifier for the current record by which it can unambiguously be 129 129 * retrieved in a subsequent operation. 130 * 130 * 131 131 * @return identifier for the record or <code>null</code> of none is 132 132 * available … … 141 141 * diagnostic, the writeRecord method will not be called. The default 142 142 * implementation returns <code>null</code>. 143 * 143 * 144 144 * @return a surrogate diagnostic or <code>null</code> 145 145 */ … … 151 151 /** 152 152 * Serialize the current record in the requested format. 153 * 153 * 154 154 * @param writer 155 155 * the {@link XMLStreamException} instance to be used … … 167 167 * Check, if extra record data should be serialized for the current record. 168 168 * The default implementation returns <code>false</code>. 169 * 169 * 170 170 * @return <code>true</code> if the record has extra record data 171 171 * @throws NoSuchElementException … … 181 181 * Serialize extra record data for the current record. A no-op default 182 182 * implementation is provided for convince. 183 * 183 * 184 184 * @param writer 185 185 * the {@link XMLStreamException} instance to be used -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUServer.java
r2553 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 43 43 * SRU/CQL protocol implementation for the server-side (SRU/S). This class 44 44 * implements SRU/CQL version 1.1 and and 1.2. 45 * 45 * 46 46 * @see SRUServerConfig 47 47 * @see SRUSearchEngine … … 75 75 /** 76 76 * Constructor. 77 * 77 * 78 78 * @param config 79 79 * a SRUEndpointConfig object … … 101 101 /** 102 102 * Handle a SRU request. 103 * 103 * 104 104 * @param request 105 105 * a HttpServletRequest request -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUServerConfig.java
r2622 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUVersion.java
r2246 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUXMLStreamWriter.java
r2201 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/utils/SRUSearchEngineBase.java
r2302 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it … … 45 45 * Handle a <em>scan</em> operation. The default implementation is a no-op. 46 46 * Override this method, if you want to provide a custom behavior. 47 * 47 * 48 48 * @see SRUSearchEngine#explain(SRUServerConfig, SRURequest, 49 49 * SRUDiagnosticList) … … 59 59 * Handle a <em>scan</em> operation. The default implementation is a no-op. 60 60 * Override this method, if you want to provide a custom behavior. 61 * 61 * 62 62 * @see SRUSearchEngine#scan(SRUServerConfig, SRURequest, SRUDiagnosticList) 63 63 */ … … 71 71 /** 72 72 * Handle a <em>searchRetrieve</em> operation. 73 * 73 * 74 74 * @see SRUSearchEngine#search(SRUServerConfig, SRURequest, 75 75 * SRUDiagnosticList) … … 83 83 /** 84 84 * Initialize the search engine. 85 * 85 * 86 86 * @param context 87 87 * the {@link ServletContext} for the Servlet … … 102 102 /** 103 103 * Initialize the search engine. 104 * 104 * 105 105 * @param config 106 106 * the {@link SRUServerConfig} object for this search engine -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/utils/SRUServerServlet.java
r2622 r2623 1 1 /** 2 * This software is copyright (c) 2011 by2 * This software is copyright (c) 2011-2013 by 3 3 * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) 4 4 * This is free software. You can redistribute it
Note: See TracChangeset
for help on using the changeset viewer.