Changeset 2680


Ignore:
Timestamp:
03/12/13 17:12:42 (11 years ago)
Author:
oschonef
Message:
  • if client did not provide values for parameters "startRecord" or "maximumTerms" set them to the defaults defined in SRU specification
Location:
SRUServer/trunk/src/main/java/eu/clarin/sru/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURequest.java

    r2623 r2680  
    102102    /**
    103103     * Get the <em>startRecord</em> parameter of this request. Only available
    104      * for <em>searchRetrieve</em> requests.
    105      *
    106      * @return the number of the start record or <code>-1</code> if no value was
    107      *         supplied for this request
     104     * for <em>searchRetrieve</em> requests. If the client did not provide
     105     * a value for the request, it is set to <code>1</code>.
     106     *
     107     * @return the number of the start record
    108108     */
    109109    public int getStartRecord();
     
    185185    /**
    186186     * Get the <em>responsePosition</em> parameter of this request. Only
    187      * available for <em>scan</em> requests.
    188      *
    189      * @return the response position or <code>-1</code> if no value was supplied
    190      *         for this request
     187     * available for <em>scan</em> requests. If the client did not provide
     188     * a value for the request, it is set to <code>1</code>.
     189     *
     190     * @return the response position
    191191     */
    192192    public int getResponsePosition();
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURequestImpl.java

    r2679 r2680  
    5555    private static final String X_UNLIMITED_RESULTSET   = "x-unlimited-resultset";
    5656    private static final String X_INDENT_RESPONSE       = "x-indent-response";
     57    private static final int DEFAULT_START_RECORD       = 1;
     58    private static final int DEFAULT_RESPONSE_POSITION  = 1;
    5759    private final SRUServerConfig config;
    5860    private final HttpServletRequest request;
     
    6365    private CQLNode query;
    6466    private String rawQuery;
    65     private int startRecord    = -1;
     67    private int startRecord = DEFAULT_START_RECORD;
    6668    private int maximumRecords = -1;
    6769    private String recordSchemaName;
     
    6971    private String stylesheet;
    7072    private String recordXPath;
    71     private int resultSetTTL   = -1;
     73    private int resultSetTTL = -1;
    7274    private String sortKeys;
    7375    private CQLNode scanClause;
    7476    private String rawScanClause;
    75     private int responsePosition = -1;
     77    private int responsePosition = DEFAULT_RESPONSE_POSITION;
    7678    private int maximumTerms = -1;
    7779
Note: See TracChangeset for help on using the changeset viewer.