Ignore:
Timestamp:
10/28/14 13:42:26 (10 years ago)
Author:
Oliver Schonefeld
Message:
  • update javadoc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • SRUClient/trunk/src/main/java/eu/clarin/sru/client/fcs/DataViewHits.java

    r5743 r5749  
    11package eu.clarin.sru.client.fcs;
    22
     3/**
     4 * A Data View implementation that stores the content of a HITS Data View.
     5 */
    36public class DataViewHits extends DataView {
    47    /**
     
    5558
    5659
     60    /**
     61     * Get the total number of hits in the result.
     62     * @return the number of hits
     63     */
    5764    public int getHitCount() {
    5865        return max_offset;
     
    6067
    6168
     69    /**
     70     * Get the text content of the hit. Usually this is complete sentence.
     71     *
     72     * @return the text content of the hit
     73     */
    6274    public String getText() {
    6375        return text;
     
    6577
    6678
     79    /**
     80     * Get the offsets pointing to range in the text content that yield the hit.
     81     *
     82     * @param idx
     83     *            the hit to retrieve. Must be larger than <code>0</code> and
     84     *            smaller than the result of {@link #getHitCount()}.
     85     * @return An array of two elements. The first array element is the start
     86     *         offset, the second array element is the end offset of the hit
     87     *         range.
     88     * @throws ArrayIndexOutOfBoundsException
     89     *             of the <code>idx</code> argument is out of bounds.
     90     */
    6791    public int[] getHitOffsets(int idx) {
    6892        if (idx < 0) {
    69             throw new IllegalArgumentException("idx < 0");
     93            throw new ArrayIndexOutOfBoundsException("idx < 0");
    7094        }
    7195        if (idx < max_offset) {
Note: See TracChangeset for help on using the changeset viewer.