Skip to content

Commit

Permalink
Fixed Javadoc
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Nioche <[email protected]>
  • Loading branch information
jnioche committed Mar 28, 2023
1 parent 1571ced commit 4a4d326
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public interface JSONResource {
/**
* Load the resources from an input stream
*
* @throws Exception
* @throws JsonParseException
* @throws JsonMappingException
* @throws IOException
*/
public void loadJSONResources(InputStream inputStream)
throws JsonParseException, JsonMappingException, IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public void addValues(String key, Collection<String> values) {
}

/**
* @return the previous value(s) associated with <tt>key</tt>
* @return the previous value(s) associated with <code>key</code>
*/
public String[] remove(String key) {
checkLockException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import org.w3c.dom.DocumentFragment;

/**
* Normalises the MimeType value e.g. text/html; charset=UTF-8 => HTML application/pdf => PDF and
* creates a new entry with a key 'format' in the metadata. Requires the JSoupParserBolt to be used
* with the configuration _detect.mimetype_ set to true.
* Normalises the MimeType value e.g. text/html; charset=UTF-8 =&gt; HTML application/pdf =&gt; PDF
* and creates a new entry with a key 'format' in the metadata. Requires the JSoupParserBolt to be
* used with the configuration _detect.mimetype_ set to true.
*/
public class MimeTypeNormalization extends ParseFilter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,14 @@
* `last-modified` is written only by the scheduler, in detail, the property
* `protocol.md.prefix` should not be empty to avoid that `last-modified` is filled with an
* incorrect or ill-formed date from the HTTP header.
* <h2>Configuration</h2>
* <p>The following lines show how to configure the adaptive scheduler in the configuration
* file (crawler-conf.yaml):
* <pre>
* </dl>
*
* <h2>Configuration</h2>
*
* <p>The following lines show how to configure the adaptive scheduler in the configuration file
* (crawler-conf.yaml):
*
* <pre>
* scheduler.class: "com.digitalpebble.stormcrawler.persistence.AdaptiveScheduler"
* # set last-modified time ({@value HttpHeaders#LAST_MODIFIED}) used in HTTP If-Modified-Since request header field
* scheduler.adaptive.setLastModified: true
Expand All @@ -91,9 +95,11 @@
* # Note: "signatureOld" and "signatureChangeDate" are optional, the adaptive
* # scheduler will also work if both are temporarily passed and not persisted.
* </pre>
* <p>To generate the signature and keep a copy of the last signature, the parse filters
* should be configured accordingly:
* <pre>
*
* <p>To generate the signature and keep a copy of the last signature, the parse filters should be
* configured accordingly:
*
* <pre>
* "com.digitalpebble.stormcrawler.parse.ParseFilters": [
* ...,
* {
Expand All @@ -106,7 +112,8 @@
* }
* }
* </pre>
* The order is mandatory: first copy the old signature, than generate the current one.
*
* The order is mandatory: first copy the old signature, than generate the current one.
*/
public class AdaptiveScheduler extends DefaultScheduler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class CookieConverter {
* Get a list of cookies based on the cookies string taken from response header and the target
* url.
*
* @param cookiesString the value of the http header for "Cookie" in the http response.
* @param cookiesStrings the value(s) of the http header for "Cookie" in the http response.
* @param targetURL the url for which we wish to pass the cookies in the request.
* @return List off cookies to add to the request.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ public static String fixHttpHeaders(String headers, int contentLength) {

/**
* Get the actual fetch time from metadata and format it as required by the WARC-Date field. If
* no fetch time is found in metadata (key {@link REQUEST_TIME_KEY}), the current time is taken.
* no fetch time is found in metadata (key {@link
* com.digitalpebble.stormcrawler.protocol.ProtocolResponse#REQUEST_TIME_KEY REQUEST_TIME_KEY}),
* the current time is taken.
*/
protected String getCaptureTime(Metadata metadata) {
String captureTimeMillis = metadata.getFirstValue(REQUEST_TIME_KEY, this.protocolMDprefix);
Expand Down

0 comments on commit 4a4d326

Please sign in to comment.