Permalink
Browse files

Cleaned up some Javadoc warnings.

  • Loading branch information...
luccioman committed Jan 9, 2017
1 parent 86dc198 commit 6a4d51d8f9ee1fe4e33b3164d47b751e9fb27d32
Showing with 99 additions and 144 deletions.
  1. +1 −1 source/net/yacy/cora/date/ISO8601Formatter.java
  2. +1 −1 source/net/yacy/cora/protocol/http/HTTPClient.java
  3. +3 −5 source/net/yacy/data/list/ListAccumulator.java
  4. +1 −1 source/net/yacy/data/list/XMLBlacklistImporter.java
  5. +4 −4 source/net/yacy/data/ymark/YMarkUtil.java
  6. +2 −2 source/net/yacy/document/AbstractParser.java
  7. +1 −1 source/net/yacy/document/Document.java
  8. +1 −1 source/net/yacy/document/LargeNumberCache.java
  9. +2 −3 source/net/yacy/document/LibraryProvider.java
  10. +1 −2 source/net/yacy/document/Parser.java
  11. +3 −3 source/net/yacy/document/TextParser.java
  12. +1 −1 source/net/yacy/document/content/DCEntry.java
  13. +3 −6 source/net/yacy/document/importer/Importer.java
  14. +2 −4 source/net/yacy/document/importer/MediawikiImporter.java
  15. +12 −14 source/net/yacy/document/importer/ResumptionToken.java
  16. +6 −7 source/net/yacy/document/parser/apkParser.java
  17. +1 −1 source/net/yacy/document/parser/docParser.java
  18. +3 −2 source/net/yacy/document/parser/html/ContentScraper.java
  19. +7 −7 source/net/yacy/document/parser/html/Evaluation.java
  20. +0 −2 source/net/yacy/document/parser/html/ImageEntry.java
  21. +1 −1 source/net/yacy/document/parser/html/TransformerWriter.java
  22. +1 −1 source/net/yacy/document/parser/htmlParser.java
  23. +3 −3 source/net/yacy/gui/framework/Switchboard.java
  24. +10 −14 source/net/yacy/search/Switchboard.java
  25. +5 −23 source/net/yacy/search/SwitchboardConstants.java
  26. +5 −7 source/net/yacy/search/index/Fulltext.java
  27. +4 −5 source/net/yacy/search/index/Segment.java
  28. +1 −2 source/net/yacy/search/navigator/LanguageNavigator.java
  29. +1 −1 source/net/yacy/search/navigator/Navigator.java
  30. +0 −1 source/net/yacy/search/navigator/RestrictedStringNavigator.java
  31. +2 −2 source/net/yacy/search/navigator/YearNavigator.java
  32. +1 −1 source/net/yacy/search/query/QueryGoal.java
  33. +1 −5 source/net/yacy/search/query/QueryParams.java
  34. +7 −8 source/net/yacy/search/schema/CollectionConfiguration.java
  35. +2 −2 source/net/yacy/search/snippet/TextSnippet.java
@@ -52,7 +52,7 @@ public ISO8601Formatter() {
}
/**
* Parse dates as defined in {@linkplain http://www.w3.org/TR/NOTE-datetime}.
* Parse dates as defined in <a href="http://www.w3.org/TR/NOTE-datetime">http://www.w3.org/TR/NOTE-datetime</a>.
* This format (also specified in ISO8601) allows different "precisions".
* The following lower precision versions for the complete date
* "2007-12-19T10:20:30.567+0300" are allowed:<br>
@@ -100,7 +100,7 @@
/**
* HttpClient implementation which uses HttpComponents Client {@link http://hc.apache.org/}
* HttpClient implementation which uses <a href="http://hc.apache.org/">HttpComponents Client</a>.
*
* @author sixcooler
*
@@ -65,7 +65,7 @@ public boolean addList(final String name) {
/**
* Adds a new entry to a list identified by a given name.
* @param key The name of the list the entry is to be added to.
* @param list The name of the list the entry is to be added to.
* @param entry The new entry.
* @return True if the entry has been added, else false (if list does not exists).
*/
@@ -125,16 +125,14 @@ public boolean addPropertyToCurrent(final String property, final String value) {
}
/**
* Returns a {@link List} which contains all the {@link List Lists} of entries.
* @return list of lists.
* @return a {@link List} which contains all the {@link List Lists} of entries.
*/
public List<List<String>> getEntryLists() {
return entries;
}
/**
* Returns a {@link List} which contains all the {@link Map Maps} of entries.
* @return
* @return a {@link List} which contains all the {@link Map Maps} of entries.
*/
public List<Map<String,String>> getPropertyMaps() {
return properties;
@@ -170,7 +170,7 @@ public void endElement(final String uri, final String localName, final String qN
* Writes characters to a String which might be used by endElement() later.
* @param ch The characters.
* @param start The start position in the character array.
* @param lengthThe number of characters to use from the character array.
* @param length The number of characters to use from the character array.
* @throws org.xml.sax.SAXException
*/
@Override
@@ -45,21 +45,21 @@
public final static Pattern FOLDERS_SEPARATOR_PATTERN = Pattern.compile(FOLDERS_SEPARATOR);
/**
* conveniance function to generate url hashes for YMark bookmarks
* convenience function to generate url hashes for YMark bookmarks
* @param url a string representation of a valid url
* @return a byte[] hash for the input URL string
* @throws MalformedURLException
* @see net.yacy.kelondro.data.meta.DigestURI.DigestURI(String url, byte[] hash).hash()
* @see {@link DigestURL#hash()}
*/
public final static byte[] getBookmarkId(String url) throws MalformedURLException {
return (new DigestURL(url)).hash();
}
/**
* conveniance function to generate word hashes for YMark tags and folders
* convenience function to generate word hashes for YMark tags and folders
* @param key a tag or folder name
* @return a byte[] hash for the input string
* @see net.yacy.kelondro.data.word.Word.word2hash(final String word)
* @see net.yacy.kelondro.data.word.Word#word2hash(String)
*/
public final static byte[] getKeyId(final String key) {
return Word.word2hash(key.toLowerCase());
@@ -76,8 +76,8 @@ public String getName() {
/**
* check equivalence of parsers; this simply tests equality of parser names
* @param o
* @return
* @param o the object to check. Must be a {@link Parser} implementation.
* @return true when this parser is equivalent to o
*/
@Override
public boolean equals(final Object o) {
@@ -765,7 +765,7 @@ else if (o instanceof IconEntry)
* This is similar to mergeDocuments but directly joins internal content variables,
* uses less parsed details and keeps this documents crawl data (like crawldepth, lastmodified)
*
* @see mergeDocuments()
* @see #mergeDocuments(DigestURL, String, Document[])
* @param docs to be included
* @throws IOException
*/
@@ -41,7 +41,7 @@
* Returns a Integer instance representing the specified int value.
* If a new Integer instance is not required, this method
* should generally be used in preference to the constructor
* {@link #Integer(int)}, as this method is likely to yield
* {@link Integer#Integer(int)}, as this method is likely to yield
* significantly better space and time performance by caching
* frequently requested values.
*
@@ -99,12 +99,11 @@ public File fileDisabled() {
}
/**
* initialize the LibraryProvider as static class. This assigns default paths, and initializes the
* Initialize the LibraryProvider as static class. This assigns default paths, and initializes the
* dictionary classes Additionally, if default dictionaries are given in the source path, they are
* translated into the input format inside the DATA/DICTIONARIES directory
*
* @param pathToSource
* @param pathToDICTIONARIES
* @param rootPath parent path of dictionaries
*/
public static void initialize(final File rootPath) {
dictSource = new File(rootPath, path_to_source_dictionaries);
@@ -74,8 +74,7 @@
/**
* check equivalence of parsers; this simply tests equality of parser names
* @param o
* @return
* @return true when this parser is equivalent to o
*/
@Override
public boolean equals(Object o);
@@ -433,7 +433,7 @@ public static String supportsMime(String mimeType) {
/**
* checks if the parser supports the given extension. It is not only checked if the parser can parse such files,
* it is also checked if the extension is not included in the extension-deny list.
* @param extention
* @param ext extension name
* @return an error if the extension is not supported, null otherwise
*/
public static String supportsExtension(final String ext) {
@@ -448,9 +448,9 @@ public static String supportsExtension(final String ext) {
}
/**
* checks if the parser supports the given extension. It is not only checked if the parser can parse such files,
* checks if the parser supports the given extension or the file at the specified url. It is not only checked if the parser can parse such files,
* it is also checked if the extension is not included in the extension-deny list.
* @param extention
* @param url url to check
* @return an error if the extension is not supported, null otherwise
*/
public static String supportsExtension(final MultiProtocolURL url) {
@@ -122,7 +122,7 @@ public Date getDate() {
/**
* get Identifier (url) (so far only used for surrogate processing)
* @param useRelationAsAlternative true = take relation if no identifier resolves to url
* @return
* @return this entry identifier url
*/
public DigestURL getIdentifier(boolean useRelationAsAlternative) {
// identifier may be included multiple times (with all kinds of syntax - example is from on record)
@@ -30,21 +30,18 @@
public int count();
/**
* return the number of articles per second
* @return
* @return the number of articles per second
*/
public int speed();
/**
* return the time this import is already running
* @return
* @return the time this import is already running
*/
public long runningTime();
/**
* return the remaining seconds for the completion of all records in milliseconds
* @return
* @return the remaining seconds for the completion of all records in milliseconds
*/
public long remainingTime();
@@ -123,8 +123,7 @@ public String status() {
}
/**
* return the number of articles per second
* @return
* @return the number of articles per second
*/
@Override
public int speed() {
@@ -133,8 +132,7 @@ public int speed() {
}
/**
* return the remaining seconds for the completion of all records in milliseconds
* @return
* @return the remaining seconds for the completion of all records in milliseconds
*/
@Override
public long remainingTime() {
@@ -88,8 +88,7 @@ public int getRecordCounter() {
/**
* compute a url that can be used to resume the retrieval from the OAI-PMH resource
* @param givenURL
* @return
* @return the computed url
* @throws IOException in case that no follow-up url can be generated; i.e. if the expiration date is exceeded
*/
public DigestURL resumptionURL() throws IOException {
@@ -149,10 +148,10 @@ private StringBuilder escape(final String s) {
}
/**
* an expiration date of a resumption token that addresses how long a cached set will
* stay in the cache of the oai-pmh server. See:
* http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#CachedResultSet
* @return
* See:
* <a href="http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#CachedResultSet">Implementation Guidelines for the Open Archives</a>
* @return an expiration date of a resumption token that addresses how long a cached set will
* stay in the cache of the oai-pmh server
*/
public Date getExpirationDate() {
final String d = get("expirationDate");
@@ -174,8 +173,8 @@ public Date getExpirationDate() {
* In other cases, it is permissible for repositories to revise
* the estimate during a list request sequence.
* An attribute according to
* http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#completeListSize
* @return
* <a href="http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#completeListSize">Implementation Guidelines for the Open Archives</a>
* @return the completeListSize attribute
*/
public int getCompleteListSize() {
final String t = get("completeListSize");
@@ -188,8 +187,8 @@ public int getCompleteListSize() {
* thus it is always "0" in the first incomplete list response.
* It should only be specified if it is consistently used in all responses.
* An attribute according to
* http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#completeListSize
* @return
* <a href="http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#completeListSize">Implementation Guidelines for the Open Archives</a>
* @return the cursor attribute
*/
public int getCursor() {
final String t = get("cursor");
@@ -198,10 +197,9 @@ public int getCursor() {
}
/**
* get a token of the stateless transfer in case that no expiration date is given
* see:
* http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#StateInResumptionToken
* @return
* See:
* <a href="http://www.openarchives.org/OAI/2.0/guidelines-repository.htm#StateInResumptionToken">Implementation Guidelines for the Open Archives</a>
* @return a token of the stateless transfer in case that no expiration date is given
*/
public String getToken() {
return get("token");
@@ -376,9 +376,9 @@ public void evaluateTag(int indent, String tagName, Map<String, String> attribut
* Return the string stored in StringTable format at offset strOff.
* This offset points to the 16 bit string length, which
* is followed by that number of 16 bit (Unicode) chars.
* @param arr
* @param strOff
* @return
* @param arr source byte array
* @param strOff offset position
* @return the computed string
*/
public String compXmlStringAt(byte[] arr, int strOff) {
int strLen = arr[strOff + 1] << 8 & 0xff00 | arr[strOff] & 0xff;
@@ -392,10 +392,9 @@ public String compXmlStringAt(byte[] arr, int strOff) {
}
/**
* Return value of a Little Endian 32 bit word from the byte array at offset off.
* @param arr
* @param off
* @return
* @param arr source byte array
* @param off byte array offset position
* @return value of a Little Endian 32 bit word from the byte array at offset off.
*/
public int LEW(byte[] arr, int off) {
return arr[off + 3] << 24 & 0xff000000 | arr[off + 2] << 16 & 0xff0000 | arr[off + 1] << 8 & 0xff00 | arr[off] & 0xFF;
@@ -141,7 +141,7 @@ public docParser() {
* @param location
* @param mimeType
* @param poifs
* @return
* @return an array containing one Document
* @throws net.yacy.document.Parser.Failure
*/
public Document[] parseOldWordDoc(
@@ -217,8 +217,9 @@ public String toString() {
/**
* scrape a document
* @param root the document root url
* @param maxLinks the maximum number of links to scapre
* @param classDetector a map from class names to vocabulary names to scrape content from the DOM with associated class name
* @param maxLinks the maximum number of links to scrape
* @param vocabularyScraper handles maps from class names to vocabulary names and from documents to a map from vocabularies to terms
* @param timezoneOffset local time zone offset
*/
@SuppressWarnings("unchecked")
public ContentScraper(final DigestURL root, int maxLinks, final VocabularyScraper vocabularyScraper, int timezoneOffset) {
@@ -41,15 +41,15 @@
import net.yacy.kelondro.util.MemoryControl;
/*
/**
* This class provides methods to use a pattern analysis for html files
* The pattern analysis is generic and can be configured using a field-name/pattern property
* configuration file.
* Such a configuration file has names of the structure
* <subject-name>_<document-element>
* &lt;subject-name&gt;_&lt;document-element&gt;
* and values are regular java expressions
* A html file is scanned for pattern matchings within a specific <document-element>
* and if such a matching can be found then the <attribute-name> is collected as
* A html file is scanned for pattern matchings within a specific &lt;document-element&gt;
* and if such a matching can be found then the &lt;attribute-name&gt; is collected as
* subject for the scanned document
* patternProperties files must have special file names where the file name
* starts with the word "parser." and must end with ".properties"
@@ -192,10 +192,10 @@ public String toString() {
}
/**
* calculate the scores for a model
* the scores is a attribute/count map which count how often a specific attribute was found
* Calculate the scores for a model.
* The scores is a attribute/count map which count how often a specific attribute was found
* @param modelName
* @return
* @return the calculated scores
*/
public ClusteredScoreMap<String> getScores(final String modelName) {
return this.modelMap.get(modelName);
@@ -41,8 +41,6 @@
* an ImageEntry represents the appearance of an image in a document. It considers also that an image can be used as an button for a web link
* and stores the web link also.
* @param imageurl the link to the image
* @param linkurl the link which is called when the image is pressed on a web browser. null if the image was not used as link button
* @param anchortext the text inside the anchor body where the image link appears (including the image tag). null if the image was not used as link button
* @param alt the als text in the alt tag
* @param width the width of the image if known, or -1 if unknown
* @param height the height of the image if known, or -1 if unknown
@@ -219,7 +219,7 @@ public TransformerWriter(
/**
*
* @param content
* @return
* @return content or empty array
*/
private char[] filterTag(final char[] content) {
if (this.tagStack.size() == 0) {
@@ -134,7 +134,7 @@ public htmlParser() {
* @param mimeType
* @param charSet
* @param scraper
* @return
* @return a Document instance
*/
private Document transformScraper(final DigestURL location, final String mimeType, final String charSet, final ContentScraper scraper) {
final String[] sections = new String[
@@ -210,9 +210,9 @@ public static int getInt(String key, int dflt) {
/**
* convenience access to boolean values in properties
* @param key
* @param dflt
* @return
* @param key property key
* @param dflt default value
* @return the boolean value from properties or dflt when it is not defined
*/
public static boolean getBool(String key, boolean dflt) {
if (!properties.containsKey(key)) return dflt;
Oops, something went wrong.

0 comments on commit 6a4d51d

Please sign in to comment.