- Timestamp:
- 03/13/13 10:55:16 (11 years ago)
- 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/SRURequestImpl.java
r2681 r2688 66 66 private CQLNode query; 67 67 private String rawQuery; 68 private int startRecord = DEFAULT_START_RECORD;68 private int startRecord = -1; 69 69 private int maximumRecords = -1; 70 70 private String recordSchemaName; … … 76 76 private CQLNode scanClause; 77 77 private String rawScanClause; 78 private int responsePosition = DEFAULT_RESPONSE_POSITION;78 private int responsePosition = -1; 79 79 private int maximumTerms = -1; 80 80 … … 411 411 412 412 413 int getRawStartRecord() { 414 return startRecord; 415 } 416 417 413 418 int getRawMaximumRecords() { 414 419 return maximumRecords; … … 418 423 String getRawScanClause() { 419 424 return rawScanClause; 425 } 426 427 428 int getRawResponsePosition() { 429 return responsePosition; 420 430 } 421 431 … … 493 503 @Override 494 504 public int getStartRecord() { 495 return startRecord;505 return (startRecord > 0) ? startRecord : DEFAULT_START_RECORD; 496 506 } 497 507 … … 553 563 @Override 554 564 public int getResponsePosition() { 555 return responsePosition; 565 return (responsePosition >= 0) 566 ? responsePosition : DEFAULT_RESPONSE_POSITION; 556 567 } 557 568 -
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUServer.java
r2644 r2688 353 353 // check, of startRecord position is greater than total record set 354 354 if ((result.getTotalRecordCount() >= 0) && 355 (request.getStartRecord() > 0) && 356 (request.getStartRecord() > result.getTotalRecordCount())) { 357 throw new SRUException(SRUConstants.SRU_FIRST_RECORD_POSITION_OUT_OF_RANGE); 355 (request.getRawStartRecord() > 0) && 356 (request.getRawStartRecord() > result.getTotalRecordCount())) { 357 throw new SRUException( 358 SRUConstants.SRU_FIRST_RECORD_POSITION_OUT_OF_RANGE); 358 359 } 359 360
Note: See TracChangeset
for help on using the changeset viewer.