Changeset 2623


Ignore:
Timestamp:
02/25/13 20:04:38 (11 years ago)
Author:
oschonef
Message:
  • update copyright
  • fix some whitespace
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  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    3939    /**
    4040     * Add a non surrogate diagnostic to the response.
    41      * 
     41     *
    4242     * @param code
    4343     *            numerical diagnostic code
     
    5656    /**
    5757     * Add a non surrogate diagnostic to the response.
    58      * 
     58     *
    5959     * @param code
    6060     *            numerical diagnostic code
     
    7070    /**
    7171     * Add a non surrogate diagnostic to the response.
    72      * 
     72     *
    7373     * @param code
    7474     *            numerical diagnostic code
     
    8383     * Default implementation is provided for convince and always returns
    8484     * <code>false</code>.
    85      * 
     85     *
    8686     * @return <code>true</code> if extra response data should be serialized.
    8787     * @see #writeExtraResponseData(XMLStreamWriter)
     
    9494    /**
    9595     * Serialize extra response data for this request.
    96      * 
     96     *
    9797     * @param writer
    9898     *            the {@link XMLStreamException} instance to be used
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUConfigException.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    2525    /**
    2626     * Constructor.
    27      * 
     27     *
    2828     * @param msg
    2929     *            a message
     
    3636    /**
    3737     * Constructor.
    38      * 
     38     *
    3939     * @param msg
    4040     *            a message
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUConstants.java

    r1990 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUDiagnostic.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    1919/**
    2020 * Class to hold a SRU diagnostic.
    21  * 
     21 *
    2222 * @see SRUConstants
    2323 * @see SRUDiagnosticList
     
    3535    /**
    3636     * Constructor.
    37      * 
     37     *
    3838     * @param code
    3939     *            numerical diagnostic code
     
    5454    /**
    5555     * Constructor.
    56      * 
     56     *
    5757     * @param code
    5858     *            numerical diagnostic code
     
    6868    /**
    6969     * Constructor.
    70      * 
     70     *
    7171     * @param code
    7272     *            numerical diagnostic code
     
    7979    /**
    8080     * Get code for this diagnostic.
    81      * 
     81     *
    8282     * @return diagnostic code
    8383     * @see SRUConstants
     
    9191     * Get supplementary information for this diagnostic. The format for this
    9292     * value is often specified by the diagnostic code.
    93      * 
     93     *
    9494     * @return supplementary information
    9595     */
     
    101101    /**
    102102     * Get human readable message.
    103      * 
     103     *
    104104     * @return human readable message
    105105     */
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUDiagnosticList.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    2020 * Container for non surrogate diagnostics for the request. The will be put in
    2121 * the <em>diagnostics</em> part of the response.
    22  * 
     22 *
    2323 * @see SRUConstants
    2424 * @see SRUDiagnostic
     
    3232    /**
    3333     * Add a non surrogate diagnostic to the response.
    34      * 
     34     *
    3535     * @param code
    3636     *            numerical diagnostic code
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUException.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    2020 * An exception raised if something went wrong processing the request. For
    2121 * diagnostic codes, see constants in {@link SRUConstants}.
    22  * 
     22 *
    2323 * @see SRUConstants
    2424 */
     
    3131    /**
    3232     * Constructor.
    33      * 
     33     *
    3434     * @param code
    3535     *            the diagnostic code
     
    5151    /**
    5252     * Constructor.
    53      * 
     53     *
    5454     * @param code
    5555     *            the diagnostic code
     
    6666    /**
    6767     * Constructor.
    68      * 
     68     *
    6969     * @param code
    7070     *            the diagnostic code
     
    8181    /**
    8282     * Constructor.
    83      * 
     83     *
    8484     * @param code
    8585     *            the diagnostic code
     
    9494    /**
    9595     * Constructor.
    96      * 
     96     *
    9797     * @param code
    9898     *            the diagnostic code
     
    107107    /**
    108108     * Constructor.
    109      * 
     109     *
    110110     * @param code
    111111     *            the diagnostic code
     
    118118    /**
    119119     * Create a SRU diagnostic from this exception.
    120      * 
     120     *
    121121     * @return a {@link SRUDiagnostic} instance
    122122     */
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUExplainResult.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    2121 * use it implement extensions to the SRU protocol, i.e. providing
    2222 * extraResponseData.
    23  * 
     23 *
    2424 * <p>
    2525 * This class needs to be implemented for the target data source.
    2626 * </p>
    27  * 
     27 *
    2828 * @see <a href="http://www.loc.gov/standards/sru/specs/explain.html">SRU
    2929 *      Explain Operation </a>
     
    3333    /**
    3434     * Constructor.
    35      * 
     35     *
    3636     * @param diagnostics
    3737     *            an instance of a SRUDiagnosticList
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUOperation.java

    r2103 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURecordPacking.java

    r2103 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURequest.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    3232     * Get the <em>operation</em> parameter of this request. Available for
    3333     * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests.
    34      * 
     34     *
    3535     * @return the operation
    3636     * @see SRUOperation
     
    4242     * Get the <em>version</em> parameter of this request. Available for
    4343     * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests.
    44      * 
     44     *
    4545     * @return the version
    4646     * @see SRUVersion
     
    5151    /**
    5252     * Check if this request is of a specific version.
    53      * 
     53     *
    5454     * @param version
    5555     *            the version to check
     
    6565     * Check if version of this request is at least <em>min</em> and at most
    6666     * <em>max</em>.
    67      * 
     67     *
    6868     * @param min
    6969     *            the minimum version
     
    8383     * Get the <em>recordPacking</em> parameter of this request. Only available
    8484     * for <em>explain</em> and <em>searchRetrieve</em> requests.
    85      * 
     85     *
    8686     * @return the record packing method
    8787     * @see SRURecordPacking
     
    9393     * Get the <em>query</em> parameter of this request. Only available for
    9494     * <em>searchRetrieve</em> requests.
    95      * 
     95     *
    9696     * @return the parsed query or <code>null</code> if not a
    9797     *         <em>searchRetrieve</em> request
     
    103103     * Get the <em>startRecord</em> parameter of this request. Only available
    104104     * for <em>searchRetrieve</em> requests.
    105      * 
     105     *
    106106     * @return the number of the start record or <code>-1</code> if no value was
    107107     *         supplied for this request
     
    114114     * for <em>searchRetrieve</em> requests. If no value was supplied with the
    115115     * request, the server will automatically set a default value.
    116      * 
     116     *
    117117     * @return the maximum number of records
    118118     */
     
    123123     * Get the <em>recordSchema</em> parameter of this request. Only available
    124124     * for <em>searchRetrieve</em> requests.
    125      * 
     125     *
    126126     * @return the record schema name or <code>null</code> if no value was
    127127     *         supplied for this request
     
    135135     * parameter of this request. Only available for <em>searchRetrieve</em>
    136136     * requests.
    137      * 
     137     *
    138138     * @return the record schema identifier or <code>null</code> if no
    139139     *         <em>recordSchema</em> parameter was supplied for this request
     
    146146     * Get the <em>recordXPath</em> parameter of this request. Only available
    147147     * for <em>searchRetrieve</em> requests and version 1.1 requests.
    148      * 
     148     *
    149149     * @return the record XPath or <code>null</code> of no value was supplied
    150150     *         for this request
     
    156156     * Get the <em>resultSetTTL</em> parameter of this request. Only available
    157157     * for <em>searchRetrieve</em> requests.
    158      * 
     158     *
    159159     * @return the result set TTL or <code>-1</code> if no value was supplied
    160160     *         for this request
     
    166166     * Get the <em>sortKeys</em> parameter of this request. Only available for
    167167     * <em>searchRetrieve</em> requests and version 1.1 requests.
    168      * 
     168     *
    169169     * @return the record XPath or <code>null</code> of no value was supplied
    170170     *         for this request
     
    176176     * Get the <em>scanClause</em> parameter of this request. Only available for
    177177     * <em>scan</em> requests.
    178      * 
     178     *
    179179     * @return the parsed scan clause or <code>null</code> if not a
    180180     *         <em>scan</em> request
     
    186186     * Get the <em>responsePosition</em> parameter of this request. Only
    187187     * available for <em>scan</em> requests.
    188      * 
     188     *
    189189     * @return the response position or <code>-1</code> if no value was supplied
    190190     *         for this request
     
    196196     * Get the <em>maximumTerms</em> parameter of this request. Available for
    197197     * any type of request.
    198      * 
     198     *
    199199     * @return the maximum number of terms or <code>-1</code> if no value was
    200200     *         supplied for this request
     
    206206     * Get the <em>stylesheet</em> parameter of this request. Available for
    207207     * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests.
    208      * 
     208     *
    209209     * @return the stylesheet or <code>null</code> if no value was supplied for
    210210     *         this request
     
    216216     * Get the protocol schema which was used of this request. Available for
    217217     * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests.
    218      * 
     218     *
    219219     * @return the protocol scheme
    220220     */
     
    225225     * Get the names of extra parameters of this request. Available for
    226226     * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests.
    227      * 
     227     *
    228228     * @return a possibly empty list of parameter names
    229229     */
     
    234234     * Get the value of an extra parameter of this request. Available for
    235235     * <em>explain</em>, <em>searchRetrieve</em> and <em>scan</em> requests.
    236      * 
     236     *
    237237     * @param name
    238238     *            name of the extra parameter. Must be prefixed with
     
    250250    /**
    251251     * Get the raw client request information from the servlet container.
    252      * 
     252     *
    253253     * @return the servlet request
    254254     */
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRURequestImpl.java

    r2103 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    383383        }
    384384
    385         // diagnostics != null -> consider as sucesss 
     385        // diagnostics != null -> consider as sucesss
    386386        return (diagnostics == null);
    387387    }
     
    672672                                PARAM_VERSION + "\" was not supplied.");
    673673            }
    674            
     674
    675675            /*
    676676             * this is an explain operation, assume default version
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUScanResultSet.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    2626 * A result set of a <em>scan</em> operation. It is used to iterate over the
    2727 * term set and provides a method to serialize the terms.
    28  * 
     28 *
    2929 * <p>
    3030 * A <code>SRUScanResultSet</code> object maintains a cursor pointing to its
     
    3838 * This class needs to be implemented for the target search engine.
    3939 * </p>
    40  * 
     40 *
    4141 * @see <a href="http://www.loc.gov/standards/sru/specs/scan.html"> SRU Scan
    4242 *      Operation</a>
     
    7272    /**
    7373     * Constructor.
    74      * 
     74     *
    7575     * @param diagnostics
    7676     *            an instance of a SRUDiagnosticList.
     
    9191     * the cursor is positioned after the last term.
    9292     * </p>
    93      * 
     93     *
    9494     * @return <code>true</code> if the new current term is valid;
    9595     *         <code>false</code> if there are no more terms
     
    100100    /**
    101101     * Get the current term exactly as it appears in the index.
    102      * 
     102     *
    103103     * @return current term
    104104     */
     
    110110     * the index in the request's <em>scanClause</em> was searched with the term
    111111     * in the <em>value</em> field.
    112      * 
     112     *
    113113     * @return a non-negative number of records
    114114     */
     
    119119     * Get the string for the current term to display to the end user in place
    120120     * of the term itself.
    121      * 
     121     *
    122122     * @return display string or <code>null</code>
    123123     */
     
    128128     * Get the flag to indicate the position of the term within the complete
    129129     * term list.
    130      * 
     130     *
    131131     * @return position within term list or <code>null</code>
    132132     */
     
    138138     * default implementation is provided for convince and always returns
    139139     * <code>false</code>.
    140      * 
     140     *
    141141     * @return <code>true</code> if the term has extra term data
    142142     * @throws NoSuchElementException
     
    152152     * Serialize extra term data for the current term. A no-op default
    153153     * implementation is provided for convince.
    154      * 
     154     *
    155155     * @param writer
    156156     *            the {@link XMLStreamException} instance to be used
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUSearchEngine.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    4141     * The implementation of this method <em>must</em> be thread-safe.
    4242     * </p>
    43      * 
     43     *
    4444     * @param config
    4545     *            the <code>SRUEndpointConfig</code> object that contains the
     
    6969     * The implementation of this method <em>must</em> be thread-safe.
    7070     * </p>
    71      * 
     71     *
    7272     * @param config
    7373     *            the <code>SRUEndpointConfig</code> object that contains the
     
    9999     * The implementation of this method <em>must</em> be thread-safe.
    100100     * </p>
    101      * 
     101     *
    102102     * @param config
    103103     *            the <code>SRUEndpointConfig</code> object that contains the
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUSearchResultSet.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    3838 * This class needs to be implemented for the target search engine.
    3939 * </p>
    40  * 
     40 *
    4141 * @see <a href="http://www.loc.gov/standards/sru/specs/search-retrieve.html">
    4242 *      SRU Search Retrieve Operation</a>
     
    4646    /**
    4747     * Constructor.
    48      * 
     48     *
    4949     * @param diagnostics
    5050     *            an instance of a SRUDiagnosticList
     
    5959     * The number of records matched by the query. If the query fails this must
    6060     * be 0.
    61      * 
     61     *
    6262     * @return the total number of results or 0 if the query failed
    6363     */
     
    6969     * records requested to be returned (maximumRecords parameter). If the query
    7070     * fails this must be 0.
    71      * 
     71     *
    7272     * @return the number of results or 0 if the query failed
    7373     */
     
    7878     * The result set id of this result. the default implementation returns
    7979     * <code>null</code>.
    80      * 
     80     *
    8181     * @return the result set id or <code>null</code> if not applicable for this
    8282     *         result
     
    9090     * The idle time for this result. The default implementation returns
    9191     * <code>-1</code>.
    92      * 
     92     *
    9393     * @return the result set idle time or <code>-1</code> if not applicable for
    9494     *         this result
     
    102102     * The record schema identifier in which the records are returned
    103103     * (recordSchema parameter).
    104      * 
     104     *
    105105     * @return the record schema identifier
    106106     */
     
    118118     * the cursor is positioned after the last record.
    119119     * </p>
    120      * 
     120     *
    121121     * @return <code>true</code> if the new current record is valid;
    122122     *         <code>false</code> if there are no more records
     
    128128     * An identifier for the current record by which it can unambiguously be
    129129     * retrieved in a subsequent operation.
    130      * 
     130     *
    131131     * @return identifier for the record or <code>null</code> of none is
    132132     *         available
     
    141141     * diagnostic, the writeRecord method will not be called. The default
    142142     * implementation returns <code>null</code>.
    143      * 
     143     *
    144144     * @return a surrogate diagnostic or <code>null</code>
    145145     */
     
    151151    /**
    152152     * Serialize the current record in the requested format.
    153      * 
     153     *
    154154     * @param writer
    155155     *            the {@link XMLStreamException} instance to be used
     
    167167     * Check, if extra record data should be serialized for the current record.
    168168     * The default implementation returns <code>false</code>.
    169      * 
     169     *
    170170     * @return <code>true</code> if the record has extra record data
    171171     * @throws NoSuchElementException
     
    181181     * Serialize extra record data for the current record. A no-op default
    182182     * implementation is provided for convince.
    183      * 
     183     *
    184184     * @param writer
    185185     *            the {@link XMLStreamException} instance to be used
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUServer.java

    r2553 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    4343 * SRU/CQL protocol implementation for the server-side (SRU/S). This class
    4444 * implements SRU/CQL version 1.1 and and 1.2.
    45  * 
     45 *
    4646 * @see SRUServerConfig
    4747 * @see SRUSearchEngine
     
    7575    /**
    7676     * Constructor.
    77      * 
     77     *
    7878     * @param config
    7979     *            a SRUEndpointConfig object
     
    101101    /**
    102102     * Handle a SRU request.
    103      * 
     103     *
    104104     * @param request
    105105     *            a HttpServletRequest request
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUServerConfig.java

    r2622 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUVersion.java

    r2246 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUXMLStreamWriter.java

    r2201 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/utils/SRUSearchEngineBase.java

    r2302 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
     
    4545     * Handle a <em>scan</em> operation. The default implementation is a no-op.
    4646     * Override this method, if you want to provide a custom behavior.
    47      * 
     47     *
    4848     * @see SRUSearchEngine#explain(SRUServerConfig, SRURequest,
    4949     *      SRUDiagnosticList)
     
    5959     * Handle a <em>scan</em> operation. The default implementation is a no-op.
    6060     * Override this method, if you want to provide a custom behavior.
    61      * 
     61     *
    6262     * @see SRUSearchEngine#scan(SRUServerConfig, SRURequest, SRUDiagnosticList)
    6363     */
     
    7171    /**
    7272     * Handle a <em>searchRetrieve</em> operation.
    73      * 
     73     *
    7474     * @see SRUSearchEngine#search(SRUServerConfig, SRURequest,
    7575     *      SRUDiagnosticList)
     
    8383    /**
    8484     * Initialize the search engine.
    85      * 
     85     *
    8686     * @param context
    8787     *            the {@link ServletContext} for the Servlet
     
    102102    /**
    103103     * Initialize the search engine.
    104      * 
     104     *
    105105     * @param config
    106106     *            the {@link SRUServerConfig} object for this search engine
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/utils/SRUServerServlet.java

    r2622 r2623  
    11/**
    2  * This software is copyright (c) 2011 by
     2 * This software is copyright (c) 2011-2013 by
    33 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
    44 * This is free software. You can redistribute it
Note: See TracChangeset for help on using the changeset viewer.