Ignore:
Timestamp:
08/14/12 17:22:03 (12 years ago)
Author:
oschonef
Message:
  • add JavaDocs? to public API
  • fix wrong constructor visibility with *Request classes
  • do a better job in hiding some non-public API
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 */
    117package eu.clarin.sru.client;
    218
     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 */
    332public final class SRUSearchRetrieveRequest extends SRUAbstractRequest {
    433    private String query;
     
    1039
    1140
    12     protected SRUSearchRetrieveRequest(String baseURI) {
     41    /**
     42     * Constructor.
     43     *
     44     * @param baseURI
     45     *            the baseURI of the endpoint
     46     */
     47    public SRUSearchRetrieveRequest(String baseURI) {
    1348        super(baseURI);
    1449    }
    1550
    1651
     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     */
    1758    public String getQuery() {
    1859        return query;
     
    2061
    2162
     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     */
    2273    public void setQuery(String query) {
    2374        if (query == null) {
     
    3182
    3283
     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     */
    3390    public int getStartRecord() {
    3491        return startRecord;
     
    3693
    3794
     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     */
    38103    public void setStartRecord(int startRecord) {
    39104        if (startRecord < 1) {
     
    44109
    45110
     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     */
    46117    public int getMaximumRecords() {
    47118        return maximumRecords;
     
    49120
    50121
     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     */
    51130    public void setMaximumRecords(int maximumRecords) {
    52131        if (maximumRecords < 0) {
     
    57136
    58137
     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     */
    59144    public String getRecordSchema() {
    60145        return recordSchema;
     
    62147
    63148
     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     */
    64159    public void setRecordSchema(String recordSchema) {
    65160        this.recordSchema = recordSchema;
     
    67162
    68163
     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     */
    69183    public void setRecordPacking(SRURecordPacking recordPacking) {
    70184        if (recordPacking == null) {
     
    75189
    76190
    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     */
    82197    public int getResultSetTTL() {
    83198        return resultSetTTL;
     
    85200
    86201
     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     */
    87210    public void setResultSetTTL(int resultSetTTL) {
    88211        this.resultSetTTL = resultSetTTL;
     
    91214
    92215    @Override
    93     protected SRUOperation getOperation() {
     216    SRUOperation getOperation() {
    94217        return SRUOperation.SEARCH_RETRIEVE;
    95218    }
     
    97220
    98221    @Override
    99     protected void addParametersToURI(URIBuilder uriBuilder)
    100             throws SRUClientException {
     222    void addParametersToURI(URIBuilder uriBuilder) throws SRUClientException {
    101223        // query
    102224        if ((query == null) || query.isEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.