From 2ab08cca77418b4710ccb0e9efd8bf2f7084b0a4 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 14 Aug 2024 23:01:50 +0200 Subject: [PATCH] Made Javadoc review and header review. --- .../devinsy/statoolinfos/core/Category.java | 32 +++++++ src/fr/devinsy/statoolinfos/core/Factory.java | 9 +- .../devinsy/statoolinfos/core/Federation.java | 44 ++++++++- src/fr/devinsy/statoolinfos/core/Metrics.java | 40 +++++++- .../statoolinfos/core/Organization.java | 4 +- .../statoolinfos/crawl/CrawlCache.java | 9 +- .../devinsy/statoolinfos/crawl/CrawlLog.java | 19 +++- .../devinsy/statoolinfos/crawl/CrawlLogs.java | 4 +- .../statoolinfos/crawl/CrawlStatus.java | 10 +- .../devinsy/statoolinfos/crawl/Crawler.java | 5 +- src/fr/devinsy/statoolinfos/io/CSVFile.java | 4 + src/fr/devinsy/statoolinfos/io/JSONFile.java | 2 + src/fr/devinsy/statoolinfos/io/ODSFile.java | 8 +- .../statoolinfos/io/SpreadsheetWriter.java | 22 ++++- .../statoolinfos/metrics/IpCounters.java | 4 +- .../devinsy/statoolinfos/metrics/Metric.java | 64 ++++++++++++- .../metrics/etherpad/EtherpadLog.java | 79 +++++++++++++++- .../statoolinfos/metrics/gitea/GiteaAPI.java | 11 ++- .../metrics/httpaccess/HttpAccessLog.java | 93 +++++++++++++++++++ .../httpaccess/HttpAccessLogParser.java | 6 +- .../metrics/httpaccess/HttpAccessLogs.java | 6 +- .../metrics/httpaccess/HttpStatus.java | 51 ++++++++++ .../httpaccess/HttpStatusCategory.java | 23 +++++ .../metrics/httperrorlog/HttpErrorLog.java | 38 ++++++++ .../httperrorlog/HttpErrorLogIterator.java | 1 + .../httperrorlog/HttpErrorLogParser.java | 6 +- .../metrics/minetest/MinetestLog.java | 51 +++++++++- .../metrics/minetest/MinetestLogAnalyzer.java | 3 +- .../statoolinfos/properties/MonthValues.java | 24 ++++- .../properties/PathPropertyComparator.java | 21 +++++ .../categories/CategoryStatComparator.java | 15 +++ .../devinsy/statoolinfos/stats/ip/IpStat.java | 15 ++- .../stats/ip/IpStatComparator.java | 15 +++ .../statoolinfos/stats/ip/IpStator.java | 10 ++ .../properties/PropertyStatComparator.java | 15 +++ .../stats/services/HostProviderTypeStats.java | 27 +++++- .../stats/services/HostServerTypeStats.java | 32 ++++++- .../softwares/SoftwareStatComparator.java | 15 +++ .../useragent/UserAgentStatComparator.java | 15 +++ .../stats/visitor/VisitorStatComparator.java | 15 +++ .../devinsy/statoolinfos/uptime/URLSet.java | 6 +- .../statoolinfos/uptime/UptimeSet.java | 35 +------ src/fr/devinsy/statoolinfos/util/Chrono.java | 4 +- src/fr/devinsy/statoolinfos/util/Files.java | 7 +- .../statoolinfos/util/FilesLineIterator.java | 3 + .../statoolinfos/util/LineIterator.java | 11 ++- 46 files changed, 862 insertions(+), 71 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/core/Category.java b/src/fr/devinsy/statoolinfos/core/Category.java index 4b44552..e4747ce 100644 --- a/src/fr/devinsy/statoolinfos/core/Category.java +++ b/src/fr/devinsy/statoolinfos/core/Category.java @@ -39,6 +39,11 @@ public class Category /** * Instantiates a new category. + * + * @param name + * the name + * @param description + * the description */ public Category(final String name, final String description) { @@ -64,6 +69,11 @@ public class Category this.logoPath = DEFAULT_LOGO_PATH; } + /** + * Gets the description. + * + * @return the description + */ public String getDescription() { return this.description; @@ -91,11 +101,21 @@ public class Category return result; } + /** + * Gets the name. + * + * @return the name + */ public String getName() { return this.name; } + /** + * Gets the softwares. + * + * @return the softwares + */ public StringList getSoftwares() { return this.softwares; @@ -173,6 +193,12 @@ public class Category return result; } + /** + * Sets the description. + * + * @param description + * the new description + */ public void setDescription(final String description) { this.description = description; @@ -196,6 +222,12 @@ public class Category } } + /** + * Sets the name. + * + * @param name + * the new name + */ public void setName(final String name) { this.name = name; diff --git a/src/fr/devinsy/statoolinfos/core/Factory.java b/src/fr/devinsy/statoolinfos/core/Factory.java index 7d45287..40af3d9 100644 --- a/src/fr/devinsy/statoolinfos/core/Factory.java +++ b/src/fr/devinsy/statoolinfos/core/Factory.java @@ -209,8 +209,6 @@ public class Factory * @return the configuration * @throws StatoolInfosException * the statool infos exception - * @throws IOException - * Signals that an I/O exception has occurred. */ public static Configuration loadConfiguration(final File configurationFile) throws StatoolInfosException { @@ -431,8 +429,15 @@ public class Factory /** * Load service. * + * @param inputURL + * the input URL + * @param cache + * the cache + * @param organization + * the organization * @return the service * @throws IOException + * Signals that an I/O exception has occurred. */ public static Service loadService(final URL inputURL, final CrawlCache cache, final Organization organization) throws IOException { diff --git a/src/fr/devinsy/statoolinfos/core/Federation.java b/src/fr/devinsy/statoolinfos/core/Federation.java index 5c91b4e..60a5d40 100644 --- a/src/fr/devinsy/statoolinfos/core/Federation.java +++ b/src/fr/devinsy/statoolinfos/core/Federation.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -217,6 +217,11 @@ public class Federation extends PathPropertyList return result; } + /** + * Gets the crawl journal. + * + * @return the crawl journal + */ public CrawlJournal getCrawlJournal() { return this.crawlJournal; @@ -252,6 +257,11 @@ public class Federation extends PathPropertyList return result; } + /** + * Gets the input checks. + * + * @return the input checks + */ public PropertyChecks getInputChecks() { return this.inputChecks; @@ -279,11 +289,21 @@ public class Federation extends PathPropertyList return result; } + /** + * Gets the input file. + * + * @return the input file + */ public File getInputFile() { return this.inputFile; } + /** + * Gets the input URL. + * + * @return the input URL + */ public URL getInputURL() { return this.inputURL; @@ -336,6 +356,11 @@ public class Federation extends PathPropertyList return result; } + /** + * Gets the logo file name. + * + * @return the logo file name + */ public String getLogoFileName() { return this.logoFileName; @@ -499,6 +524,11 @@ public class Federation extends PathPropertyList return result; } + /** + * Gets the organizations. + * + * @return the organizations + */ public Organizations getOrganizations() { return this.organizations; @@ -819,11 +849,23 @@ public class Federation extends PathPropertyList this.inputFile = inputFile; } + /** + * Sets the input URL. + * + * @param inputURL + * the new input URL + */ public void setInputURL(final URL inputURL) { this.inputURL = inputURL; } + /** + * Sets the logo file name. + * + * @param logoFileName + * the new logo file name + */ public void setLogoFileName(final String logoFileName) { this.logoFileName = logoFileName; diff --git a/src/fr/devinsy/statoolinfos/core/Metrics.java b/src/fr/devinsy/statoolinfos/core/Metrics.java index cb31b7e..b6f044a 100644 --- a/src/fr/devinsy/statoolinfos/core/Metrics.java +++ b/src/fr/devinsy/statoolinfos/core/Metrics.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -99,16 +99,31 @@ public class Metrics extends PathPropertyList return result; } + /** + * Gets the input checks. + * + * @return the input checks + */ public PropertyChecks getInputChecks() { return this.inputChecks; } + /** + * Gets the input file. + * + * @return the input file + */ public File getInputFile() { return this.inputFile; } + /** + * Gets the input URL. + * + * @return the input URL + */ public URL getInputURL() { return this.inputURL; @@ -144,6 +159,11 @@ public class Metrics extends PathPropertyList return result; } + /** + * Gets the local file name prefix. + * + * @return the local file name prefix + */ public String getLocalFileNamePrefix() { return this.localFileNamePrefix; @@ -165,16 +185,34 @@ public class Metrics extends PathPropertyList return result; } + /** + * Sets the input file. + * + * @param inputFile + * the new input file + */ public void setInputFile(final File inputFile) { this.inputFile = inputFile; } + /** + * Sets the input URL. + * + * @param inputURL + * the new input URL + */ public void setInputURL(final URL inputURL) { this.inputURL = inputURL; } + /** + * Sets the local file name prefix. + * + * @param localFileNamePrefix + * the new local file name prefix + */ public void setLocalFileNamePrefix(final String localFileNamePrefix) { this.localFileNamePrefix = localFileNamePrefix; diff --git a/src/fr/devinsy/statoolinfos/core/Organization.java b/src/fr/devinsy/statoolinfos/core/Organization.java index 30dd8bb..e21eb87 100644 --- a/src/fr/devinsy/statoolinfos/core/Organization.java +++ b/src/fr/devinsy/statoolinfos/core/Organization.java @@ -42,6 +42,8 @@ import fr.devinsy.statoolinfos.util.URLUtils; */ public class Organization extends PathPropertyList { + private static final long serialVersionUID = -2709210934548224213L; + public enum Status { ACTIVE, @@ -60,8 +62,6 @@ public class Organization extends PathPropertyList OTHER } - private static final long serialVersionUID = -2709210934548224213L; - private Federation federation; private Services services; private File inputFile; diff --git a/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java b/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java index 441b0cc..ac1441e 100644 --- a/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java +++ b/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java @@ -46,14 +46,14 @@ import fr.devinsy.statoolinfos.util.URLUtils; */ public class CrawlCache { + private static Logger logger = LoggerFactory.getLogger(CrawlCache.class); + public static enum DefaultLogoGenerator { CAT, BIRD } - private static Logger logger = LoggerFactory.getLogger(CrawlCache.class); - private File directory; /** @@ -116,6 +116,11 @@ public class CrawlCache } } + /** + * Gets the directory. + * + * @return the directory + */ public File getDirectory() { return this.directory; diff --git a/src/fr/devinsy/statoolinfos/crawl/CrawlLog.java b/src/fr/devinsy/statoolinfos/crawl/CrawlLog.java index 9395a21..f3ede22 100644 --- a/src/fr/devinsy/statoolinfos/crawl/CrawlLog.java +++ b/src/fr/devinsy/statoolinfos/crawl/CrawlLog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -34,6 +34,8 @@ public class CrawlLog * * @param url * the url + * @param parentUrl + * the parent url * @param status * the status */ @@ -44,6 +46,11 @@ public class CrawlLog this.status = status; } + /** + * Gets the parent url. + * + * @return the parent url + */ public URL getParentUrl() { return this.parentUrl; @@ -71,11 +78,21 @@ public class CrawlLog return result; } + /** + * Gets the status. + * + * @return the status + */ public CrawlStatus getStatus() { return this.status; } + /** + * Gets the url. + * + * @return the url + */ public URL getUrl() { return this.url; diff --git a/src/fr/devinsy/statoolinfos/crawl/CrawlLogs.java b/src/fr/devinsy/statoolinfos/crawl/CrawlLogs.java index da4c9ac..55950ea 100644 --- a/src/fr/devinsy/statoolinfos/crawl/CrawlLogs.java +++ b/src/fr/devinsy/statoolinfos/crawl/CrawlLogs.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -68,6 +68,8 @@ public class CrawlLogs extends ArrayList * * @param url * the url + * @param parentUrl + * the parent url * @param status * the status */ diff --git a/src/fr/devinsy/statoolinfos/crawl/CrawlStatus.java b/src/fr/devinsy/statoolinfos/crawl/CrawlStatus.java index 893a574..55f11c2 100644 --- a/src/fr/devinsy/statoolinfos/crawl/CrawlStatus.java +++ b/src/fr/devinsy/statoolinfos/crawl/CrawlStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -18,6 +18,9 @@ */ package fr.devinsy.statoolinfos.crawl; +/** + * The Enum CrawlStatus. + */ public enum CrawlStatus { BADCHILDCLASS, @@ -31,6 +34,11 @@ public enum CrawlStatus UPDATED, URLNOTFOUND; + /** + * Checks if is error. + * + * @return true, if is error + */ public boolean isError() { boolean result; diff --git a/src/fr/devinsy/statoolinfos/crawl/Crawler.java b/src/fr/devinsy/statoolinfos/crawl/Crawler.java index 21885ca..6954918 100644 --- a/src/fr/devinsy/statoolinfos/crawl/Crawler.java +++ b/src/fr/devinsy/statoolinfos/crawl/Crawler.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -250,6 +250,8 @@ public class Crawler * * @param url * the url + * @param parentURL + * the parent URL * @return the file */ public File crawlLogo(final URL url, final URL parentURL) @@ -347,6 +349,7 @@ public class Crawler * * @return the crawl journal * @throws IOException + * Signals that an I/O exception has occurred. */ public CrawlJournal restoreJournal() throws IOException { diff --git a/src/fr/devinsy/statoolinfos/io/CSVFile.java b/src/fr/devinsy/statoolinfos/io/CSVFile.java index 87667f6..d291d51 100644 --- a/src/fr/devinsy/statoolinfos/io/CSVFile.java +++ b/src/fr/devinsy/statoolinfos/io/CSVFile.java @@ -76,6 +76,8 @@ public class CSVFile * the file * @param source * the source + * @param categories + * the categories * @throws IOException * Signals that an I/O exception has occurred. */ @@ -151,6 +153,8 @@ public class CSVFile * the out * @param services * the services + * @param categories + * the categories * @throws IOException * Signals that an I/O exception has occurred. */ diff --git a/src/fr/devinsy/statoolinfos/io/JSONFile.java b/src/fr/devinsy/statoolinfos/io/JSONFile.java index 9887d8f..301e538 100644 --- a/src/fr/devinsy/statoolinfos/io/JSONFile.java +++ b/src/fr/devinsy/statoolinfos/io/JSONFile.java @@ -235,6 +235,8 @@ public class JSONFile * * @param service * the service + * @param categories + * the categories * @return the string list */ public static StringList toJSON(final Service service, final Categories categories) diff --git a/src/fr/devinsy/statoolinfos/io/ODSFile.java b/src/fr/devinsy/statoolinfos/io/ODSFile.java index 2d9d374..abf8899 100644 --- a/src/fr/devinsy/statoolinfos/io/ODSFile.java +++ b/src/fr/devinsy/statoolinfos/io/ODSFile.java @@ -35,9 +35,9 @@ public class ODSFile { private static final Logger logger = LoggerFactory.getLogger(ODSFile.class); - public static final int MAX_LINE_SIZE = 1024;; + public static final int MAX_LINE_SIZE = 1024; - protected enum Status + protected enum Status { MANDATORY, OPTIONAL @@ -75,6 +75,10 @@ public class ODSFile * the file * @param source * the source + * @param categories + * the categories + * @throws IOException + * Signals that an I/O exception has occurred. */ public static void save(final File file, final Services source, final Categories categories) throws IOException { diff --git a/src/fr/devinsy/statoolinfos/io/SpreadsheetWriter.java b/src/fr/devinsy/statoolinfos/io/SpreadsheetWriter.java index 6bd6332..58b8193 100644 --- a/src/fr/devinsy/statoolinfos/io/SpreadsheetWriter.java +++ b/src/fr/devinsy/statoolinfos/io/SpreadsheetWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -26,11 +26,31 @@ import java.io.IOException; */ public interface SpreadsheetWriter { + /** + * Close. + * + * @throws FileNotFoundException + * the file not found exception + * @throws IOException + * Signals that an I/O exception has occurred. + */ void close() throws FileNotFoundException, IOException; + /** + * Write cell. + * + * @param content + * the content + */ void writeCell(String content); + /** + * Write endpage. + */ void writeEndpage(); + /** + * Write end row. + */ void writeEndRow(); } diff --git a/src/fr/devinsy/statoolinfos/metrics/IpCounters.java b/src/fr/devinsy/statoolinfos/metrics/IpCounters.java index c1f0fc0..69027a9 100644 --- a/src/fr/devinsy/statoolinfos/metrics/IpCounters.java +++ b/src/fr/devinsy/statoolinfos/metrics/IpCounters.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -60,6 +60,8 @@ public class IpCounters extends HashMap /** * Gets the counters. * + * @param prefix + * the prefix * @return the counters */ public PathCounters getCounters(final String prefix) diff --git a/src/fr/devinsy/statoolinfos/metrics/Metric.java b/src/fr/devinsy/statoolinfos/metrics/Metric.java index 35a32de..d400457 100644 --- a/src/fr/devinsy/statoolinfos/metrics/Metric.java +++ b/src/fr/devinsy/statoolinfos/metrics/Metric.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -51,6 +51,15 @@ public class Metric /** * Instantiates a new metric. + * + * @param path + * the path + * @param name + * the name + * @param description + * the description + * @param startYear + * the start year */ public Metric(final String path, final String name, final String description, final String startYear) { @@ -64,36 +73,71 @@ public class Metric this.dayValues = new StringList(); } + /** + * Gets the day values. + * + * @return the day values + */ public StringList getDayValues() { return this.dayValues; } + /** + * Gets the description. + * + * @return the description + */ public String getDescription() { return this.description; } + /** + * Gets the month values. + * + * @return the month values + */ public StringList getMonthValues() { return this.monthValues; } + /** + * Gets the name. + * + * @return the name + */ public String getName() { return this.name; } + /** + * Gets the start year. + * + * @return the start year + */ public String getStartYear() { return this.startYear; } + /** + * Gets the week values. + * + * @return the week values + */ public StringList getWeekValues() { return this.weekValues; } + /** + * Gets the year values. + * + * @return the year values + */ public StringList getYearValues() { return this.yearValues; @@ -121,16 +165,34 @@ public class Metric return result; } + /** + * Sets the description. + * + * @param description + * the new description + */ public void setDescription(final String description) { this.description = description; } + /** + * Sets the name. + * + * @param name + * the new name + */ public void setName(final String name) { this.name = name; } + /** + * Sets the start year. + * + * @param startYear + * the new start year + */ public void setStartYear(final String startYear) { this.startYear = startYear; diff --git a/src/fr/devinsy/statoolinfos/metrics/etherpad/EtherpadLog.java b/src/fr/devinsy/statoolinfos/metrics/etherpad/EtherpadLog.java index eabd7e6..d8bc714 100644 --- a/src/fr/devinsy/statoolinfos/metrics/etherpad/EtherpadLog.java +++ b/src/fr/devinsy/statoolinfos/metrics/etherpad/EtherpadLog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Christian Pierre MOMON + * Copyright (C) 2022-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -58,6 +58,11 @@ public class EtherpadLog this.author = null; } + /** + * Gets the author. + * + * @return the author + */ public String getAuthor() { return this.author; @@ -78,26 +83,51 @@ public class EtherpadLog return result; } + /** + * Gets the event. + * + * @return the event + */ public String getEvent() { return this.event; } + /** + * Gets the ip. + * + * @return the ip + */ public String getIp() { return this.ip; } + /** + * Gets the level. + * + * @return the level + */ public String getLevel() { return this.level; } + /** + * Gets the padname. + * + * @return the padname + */ public String getPadname() { return this.padname; } + /** + * Gets the time. + * + * @return the time + */ public LocalDateTime getTime() { return this.time; @@ -128,6 +158,11 @@ public class EtherpadLog return result; } + /** + * Gets the type. + * + * @return the type + */ public String getType() { return this.type; @@ -240,36 +275,78 @@ public class EtherpadLog return result; } + /** + * Sets the author. + * + * @param author + * the new author + */ public void setAuthor(final String author) { this.author = author; } + /** + * Sets the event. + * + * @param event + * the new event + */ public void setEvent(final String event) { this.event = event; } + /** + * Sets the ip. + * + * @param ip + * the new ip + */ public void setIp(final String ip) { this.ip = ip; } + /** + * Sets the level. + * + * @param level + * the new level + */ public void setLevel(final String level) { this.level = level; } + /** + * Sets the padname. + * + * @param padname + * the new padname + */ public void setPadname(final String padname) { this.padname = padname; } + /** + * Sets the time. + * + * @param time + * the new time + */ public void setTime(final LocalDateTime time) { this.time = time; } + /** + * Sets the type. + * + * @param type + * the new type + */ public void setType(final String type) { this.type = type; diff --git a/src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java b/src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java index 7a93e82..db8dbb0 100644 --- a/src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java +++ b/src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Christian Pierre MOMON + * Copyright (C) 2022-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -49,6 +49,15 @@ public class GiteaAPI /** * Instantiates a new gitea API. + * + * @param url + * the url + * @param token + * the token + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws ParseException + * the parse exception */ public GiteaAPI(final String url, final String token) throws IOException, ParseException { diff --git a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLog.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLog.java index 8b84263..390ca10 100644 --- a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLog.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLog.java @@ -65,11 +65,21 @@ public class HttpAccessLog this.userAgent = null; } + /** + * Gets the body bytes sent. + * + * @return the body bytes sent + */ public long getBodyBytesSent() { return this.bodyBytesSent; } + /** + * Gets the date. + * + * @return the date + */ public String getDate() { String result; @@ -80,6 +90,11 @@ public class HttpAccessLog return result; } + /** + * Gets the ip. + * + * @return the ip + */ public String getIp() { return this.ip; @@ -115,31 +130,61 @@ public class HttpAccessLog return result; } + /** + * Gets the referer. + * + * @return the referer + */ public String getReferer() { return this.referer; } + /** + * Gets the remote user. + * + * @return the remote user + */ public String getRemoteUser() { return this.remoteUser; } + /** + * Gets the request. + * + * @return the request + */ public String getRequest() { return this.request; } + /** + * Gets the status. + * + * @return the status + */ public HttpStatus getStatus() { return this.status; } + /** + * Gets the time. + * + * @return the time + */ public LocalDateTime getTime() { return this.time.toLocalDateTime(); } + /** + * Gets the user agent. + * + * @return the user agent + */ public UserAgent getUserAgent() { return this.userAgent; @@ -290,31 +335,67 @@ public class HttpAccessLog return result; } + /** + * Sets the body bytes sent. + * + * @param bodyBytesSent + * the new body bytes sent + */ public void setBodyBytesSent(final long bodyBytesSent) { this.bodyBytesSent = bodyBytesSent; } + /** + * Sets the ip. + * + * @param ip + * the new ip + */ public void setIp(final String ip) { this.ip = ip; } + /** + * Sets the referer. + * + * @param referer + * the new referer + */ public void setReferer(final String referer) { this.referer = referer; } + /** + * Sets the remote user. + * + * @param remoteUser + * the new remote user + */ public void setRemoteUser(final String remoteUser) { this.remoteUser = remoteUser; } + /** + * Sets the request. + * + * @param request + * the new request + */ public void setRequest(final String request) { this.request = request; } + /** + * Sets the status. + * + * @param status + * the new status + */ public void setStatus(final HttpStatus status) { this.status = status; @@ -331,11 +412,23 @@ public class HttpAccessLog this.time = ZonedDateTime.of(time, ZoneId.systemDefault()); } + /** + * Sets the time. + * + * @param time + * the new time + */ public void setTime(final ZonedDateTime time) { this.time = time; } + /** + * Sets the user agent. + * + * @param userAgent + * the new user agent + */ public void setUserAgent(final UserAgent userAgent) { this.userAgent = userAgent; diff --git a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParser.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParser.java index 7189f5f..6e73a7a 100644 --- a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParser.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParser.java @@ -106,7 +106,11 @@ public class HttpAccessLogParser * * @param line * the line - * @return the http log + * @param pattern + * the pattern + * @param dateTimeFormatter + * the date time formatter + * @return the http access log */ public static HttpAccessLog parseLog(final String line, final Pattern pattern, final DateTimeFormatter dateTimeFormatter) { diff --git a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogs.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogs.java index fd4f222..a490c0e 100644 --- a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogs.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogs.java @@ -98,10 +98,12 @@ public class HttpAccessLogs implements Iterable } /** - * Instantiates a new http log iterator. + * Instantiates a new http access logs. * * @param source * the source + * @param pattern + * the pattern * @throws IOException * Signals that an I/O exception has occurred. */ @@ -117,6 +119,8 @@ public class HttpAccessLogs implements Iterable * the source * @param pattern * the pattern + * @param datePattern + * the date pattern * @param pathFilter * the path filter * @throws IOException diff --git a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatus.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatus.java index 2a88796..3b7240c 100644 --- a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatus.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatus.java @@ -35,6 +35,13 @@ public class HttpStatus /** * Instantiates a new http status. + * + * @param code + * the code + * @param message + * the message + * @param description + * the description */ public HttpStatus(final int code, final String message, final String description) { @@ -44,41 +51,85 @@ public class HttpStatus this.category = HttpStatusCategory.of(code); } + /** + * Gets the category. + * + * @return the category + */ public HttpStatusCategory getCategory() { return this.category; } + /** + * Gets the code. + * + * @return the code + */ public int getCode() { return this.code; } + /** + * Gets the description. + * + * @return the description + */ public String getDescription() { return this.description; } + /** + * Gets the message. + * + * @return the message + */ public String getMessage() { return this.message; } + /** + * Sets the category. + * + * @param category + * the new category + */ public void setCategory(final HttpStatusCategory category) { this.category = category; } + /** + * Sets the code. + * + * @param code + * the new code + */ public void setCode(final int code) { this.code = code; } + /** + * Sets the description. + * + * @param description + * the new description + */ public void setDescription(final String description) { this.description = description; } + /** + * Sets the message. + * + * @param message + * the new message + */ public void setMessage(final String message) { this.message = message; diff --git a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusCategory.java b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusCategory.java index 119ec66..299bd32 100644 --- a/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusCategory.java +++ b/src/fr/devinsy/statoolinfos/metrics/httpaccess/HttpStatusCategory.java @@ -30,6 +30,13 @@ public enum HttpStatusCategory SERVER_ERROR, INVALID; + /** + * Checks if is client error. + * + * @param httpCode + * the http code + * @return true, if is client error + */ public static boolean isClientError(final int httpCode) { boolean result; @@ -43,6 +50,8 @@ public enum HttpStatusCategory /** * Checks if is informational. * + * @param httpCode + * the http code * @return true, if is informational */ public static boolean isInformational(final int httpCode) @@ -55,6 +64,13 @@ public enum HttpStatusCategory return result; } + /** + * Checks if is redirection. + * + * @param httpCode + * the http code + * @return true, if is redirection + */ public static boolean isRedirection(final int httpCode) { boolean result; @@ -65,6 +81,13 @@ public enum HttpStatusCategory return result; } + /** + * Checks if is server error. + * + * @param httpCode + * the http code + * @return true, if is server error + */ public static boolean isServerError(final int httpCode) { boolean result; diff --git a/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLog.java b/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLog.java index 0876c7c..a1361a5 100644 --- a/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLog.java +++ b/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLog.java @@ -54,6 +54,11 @@ public class HttpErrorLog this.level = null; } + /** + * Gets the date. + * + * @return the date + */ public String getDate() { String result; @@ -64,16 +69,31 @@ public class HttpErrorLog return result; } + /** + * Gets the level. + * + * @return the level + */ public String getLevel() { return this.level; } + /** + * Gets the message. + * + * @return the message + */ public String getMessage() { return this.message; } + /** + * Gets the time. + * + * @return the time + */ public LocalDateTime getTime() { return this.time; @@ -142,16 +162,34 @@ public class HttpErrorLog return result; } + /** + * Sets the level. + * + * @param level + * the new level + */ public void setLevel(final String level) { this.level = level; } + /** + * Sets the message. + * + * @param message + * the new message + */ public void setMessage(final String message) { this.message = message; } + /** + * Sets the time. + * + * @param time + * the new time + */ public void setTime(final LocalDateTime time) { this.time = time; diff --git a/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLogIterator.java b/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLogIterator.java index 409bed7..85c1b1a 100644 --- a/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLogIterator.java +++ b/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLogIterator.java @@ -254,6 +254,7 @@ public class HttpErrorLogIterator implements Iterator * the files * @return true, if is apache http error log files * @throws IOException + * Signals that an I/O exception has occurred. */ public static boolean isApacheHttpErrorLogFiles(final Files files) throws IOException { diff --git a/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLogParser.java b/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLogParser.java index 0f8d9f9..94435b1 100644 --- a/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLogParser.java +++ b/src/fr/devinsy/statoolinfos/metrics/httperrorlog/HttpErrorLogParser.java @@ -79,7 +79,11 @@ public class HttpErrorLogParser * * @param line * the line - * @return the http log + * @param pattern + * the pattern + * @param dateTimeFormatter + * the date time formatter + * @return the http error log */ public static HttpErrorLog parseLog(final String line, final Pattern pattern, final DateTimeFormatter dateTimeFormatter) { diff --git a/src/fr/devinsy/statoolinfos/metrics/minetest/MinetestLog.java b/src/fr/devinsy/statoolinfos/metrics/minetest/MinetestLog.java index fa351fa..577bb0c 100644 --- a/src/fr/devinsy/statoolinfos/metrics/minetest/MinetestLog.java +++ b/src/fr/devinsy/statoolinfos/metrics/minetest/MinetestLog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -59,6 +59,11 @@ public class MinetestLog this.message = null; } + /** + * Gets the date. + * + * @return the date + */ public String getDate() { String result; @@ -92,16 +97,31 @@ public class MinetestLog return result; } + /** + * Gets the level. + * + * @return the level + */ public MinetestLogLevel getLevel() { return this.level; } + /** + * Gets the message. + * + * @return the message + */ public String getMessage() { return this.message; } + /** + * Gets the module. + * + * @return the module + */ public String getModule() { return this.module; @@ -138,6 +158,11 @@ public class MinetestLog return result; } + /** + * Gets the time. + * + * @return the time + */ public LocalDateTime getTime() { return this.time; @@ -206,21 +231,45 @@ public class MinetestLog return result; } + /** + * Sets the level. + * + * @param level + * the new level + */ public void setLevel(final MinetestLogLevel level) { this.level = level; } + /** + * Sets the message. + * + * @param message + * the new message + */ public void setMessage(final String message) { this.message = message; } + /** + * Sets the module. + * + * @param module + * the new module + */ public void setModule(final String module) { this.module = module; } + /** + * Sets the time. + * + * @param time + * the new time + */ public void setTime(final LocalDateTime time) { this.time = time; diff --git a/src/fr/devinsy/statoolinfos/metrics/minetest/MinetestLogAnalyzer.java b/src/fr/devinsy/statoolinfos/metrics/minetest/MinetestLogAnalyzer.java index 29165d2..0497b1b 100644 --- a/src/fr/devinsy/statoolinfos/metrics/minetest/MinetestLogAnalyzer.java +++ b/src/fr/devinsy/statoolinfos/metrics/minetest/MinetestLogAnalyzer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -261,6 +261,7 @@ public class MinetestLogAnalyzer * * @param source * the source + * @return the path counters * @throws IOException * Signals that an I/O exception has occurred. * @throws StatoolInfosException diff --git a/src/fr/devinsy/statoolinfos/properties/MonthValues.java b/src/fr/devinsy/statoolinfos/properties/MonthValues.java index e9d3563..709e849 100644 --- a/src/fr/devinsy/statoolinfos/properties/MonthValues.java +++ b/src/fr/devinsy/statoolinfos/properties/MonthValues.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -127,11 +127,21 @@ public class MonthValues extends HashMap return result; } + /** + * Gets the description. + * + * @return the description + */ public String getDescription() { return this.description; } + /** + * Gets the label. + * + * @return the label + */ public String getLabel() { return this.label; @@ -271,11 +281,23 @@ public class MonthValues extends HashMap return result; } + /** + * Sets the description. + * + * @param description + * the new description + */ public void setDescription(final String description) { this.description = description; } + /** + * Sets the label. + * + * @param label + * the new label + */ public void setLabel(final String label) { this.label = label; diff --git a/src/fr/devinsy/statoolinfos/properties/PathPropertyComparator.java b/src/fr/devinsy/statoolinfos/properties/PathPropertyComparator.java index 60e4dec..a6ce0fe 100644 --- a/src/fr/devinsy/statoolinfos/properties/PathPropertyComparator.java +++ b/src/fr/devinsy/statoolinfos/properties/PathPropertyComparator.java @@ -1,5 +1,20 @@ /* + * Copyright (C) 2021-2024 Christian Pierre MOMON * + * This file is part of StatoolInfos, simple service statistics tool. + * + * StatoolInfos is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * StatoolInfos is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with StatoolInfos. If not, see . */ package fr.devinsy.statoolinfos.properties; @@ -20,6 +35,12 @@ public class PathPropertyComparator implements Comparator private Sorting sorting; + /** + * Instantiates a new path property comparator. + * + * @param sorting + * the sorting + */ public PathPropertyComparator(final Sorting sorting) { // diff --git a/src/fr/devinsy/statoolinfos/stats/categories/CategoryStatComparator.java b/src/fr/devinsy/statoolinfos/stats/categories/CategoryStatComparator.java index bc747b1..8a816ad 100644 --- a/src/fr/devinsy/statoolinfos/stats/categories/CategoryStatComparator.java +++ b/src/fr/devinsy/statoolinfos/stats/categories/CategoryStatComparator.java @@ -1,5 +1,20 @@ /* + * Copyright (C) 2020-2024 Christian Pierre MOMON * + * This file is part of StatoolInfos, simple service statistics tool. + * + * StatoolInfos is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * StatoolInfos is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with StatoolInfos. If not, see . */ package fr.devinsy.statoolinfos.stats.categories; diff --git a/src/fr/devinsy/statoolinfos/stats/ip/IpStat.java b/src/fr/devinsy/statoolinfos/stats/ip/IpStat.java index 49709e7..77e3a93 100644 --- a/src/fr/devinsy/statoolinfos/stats/ip/IpStat.java +++ b/src/fr/devinsy/statoolinfos/stats/ip/IpStat.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -43,16 +43,29 @@ public final class IpStat this.count = 0; } + /** + * Gets the count. + * + * @return the count + */ public long getCount() { return this.count; } + /** + * Gets the value. + * + * @return the value + */ public String getValue() { return this.value; } + /** + * Inc. + */ public void inc() { this.count += 1; diff --git a/src/fr/devinsy/statoolinfos/stats/ip/IpStatComparator.java b/src/fr/devinsy/statoolinfos/stats/ip/IpStatComparator.java index aa1ba92..4419dc4 100644 --- a/src/fr/devinsy/statoolinfos/stats/ip/IpStatComparator.java +++ b/src/fr/devinsy/statoolinfos/stats/ip/IpStatComparator.java @@ -1,5 +1,20 @@ /* + * Copyright (C) 2020-2024 Christian Pierre MOMON * + * This file is part of StatoolInfos, simple service statistics tool. + * + * StatoolInfos is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * StatoolInfos is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with StatoolInfos. If not, see . */ package fr.devinsy.statoolinfos.stats.ip; diff --git a/src/fr/devinsy/statoolinfos/stats/ip/IpStator.java b/src/fr/devinsy/statoolinfos/stats/ip/IpStator.java index 7021a34..32fd276 100644 --- a/src/fr/devinsy/statoolinfos/stats/ip/IpStator.java +++ b/src/fr/devinsy/statoolinfos/stats/ip/IpStator.java @@ -42,6 +42,11 @@ public final class IpStator this.ips = new IpStatSet(); } + /** + * Gets the ips. + * + * @return the ips + */ public IpStats getIps() { IpStats result; @@ -52,6 +57,11 @@ public final class IpStator return result; } + /** + * Gets the log count. + * + * @return the log count + */ public long getLogCount() { return this.logCount; diff --git a/src/fr/devinsy/statoolinfos/stats/properties/PropertyStatComparator.java b/src/fr/devinsy/statoolinfos/stats/properties/PropertyStatComparator.java index 1b2f577..ad30b33 100644 --- a/src/fr/devinsy/statoolinfos/stats/properties/PropertyStatComparator.java +++ b/src/fr/devinsy/statoolinfos/stats/properties/PropertyStatComparator.java @@ -1,5 +1,20 @@ /* + * Copyright (C) 2020-2024 Christian Pierre MOMON * + * This file is part of StatoolInfos, simple service statistics tool. + * + * StatoolInfos is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * StatoolInfos is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with StatoolInfos. If not, see . */ package fr.devinsy.statoolinfos.stats.properties; diff --git a/src/fr/devinsy/statoolinfos/stats/services/HostProviderTypeStats.java b/src/fr/devinsy/statoolinfos/stats/services/HostProviderTypeStats.java index 36734bc..e379c6a 100644 --- a/src/fr/devinsy/statoolinfos/stats/services/HostProviderTypeStats.java +++ b/src/fr/devinsy/statoolinfos/stats/services/HostProviderTypeStats.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -43,26 +43,51 @@ public class HostProviderTypeStats this.unknownCount = 0; } + /** + * Gets the home count. + * + * @return the home count + */ public long getHomeCount() { return this.homeCount; } + /** + * Gets the hosted bay count. + * + * @return the hosted bay count + */ public long getHostedBayCount() { return this.hostedBayCount; } + /** + * Gets the hosted server count. + * + * @return the hosted server count + */ public long getHostedServerCount() { return this.hostedServerCount; } + /** + * Gets the outsourced count. + * + * @return the outsourced count + */ public long getOutsourcedCount() { return this.outsourcedCount; } + /** + * Gets the unknown count. + * + * @return the unknown count + */ public long getUnknownCount() { return this.unknownCount; diff --git a/src/fr/devinsy/statoolinfos/stats/services/HostServerTypeStats.java b/src/fr/devinsy/statoolinfos/stats/services/HostServerTypeStats.java index 546a6b4..8e0c566 100644 --- a/src/fr/devinsy/statoolinfos/stats/services/HostServerTypeStats.java +++ b/src/fr/devinsy/statoolinfos/stats/services/HostServerTypeStats.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -45,31 +45,61 @@ public class HostServerTypeStats this.unknownCount = 0; } + /** + * Gets the cloud count. + * + * @return the cloud count + */ public long getCloudCount() { return this.cloudCount; } + /** + * Gets the nano count. + * + * @return the nano count + */ public long getNanoCount() { return this.nanoCount; } + /** + * Gets the physical count. + * + * @return the physical count + */ public long getPhysicalCount() { return this.physicalCount; } + /** + * Gets the shared count. + * + * @return the shared count + */ public long getSharedCount() { return this.sharedCount; } + /** + * Gets the unknown count. + * + * @return the unknown count + */ public long getUnknownCount() { return this.unknownCount; } + /** + * Gets the virtual count. + * + * @return the virtual count + */ public long getVirtualCount() { return this.virtualCount; diff --git a/src/fr/devinsy/statoolinfos/stats/softwares/SoftwareStatComparator.java b/src/fr/devinsy/statoolinfos/stats/softwares/SoftwareStatComparator.java index de00760..cf08056 100644 --- a/src/fr/devinsy/statoolinfos/stats/softwares/SoftwareStatComparator.java +++ b/src/fr/devinsy/statoolinfos/stats/softwares/SoftwareStatComparator.java @@ -1,5 +1,20 @@ /* + * Copyright (C) 2020-2024 Christian Pierre MOMON * + * This file is part of StatoolInfos, simple service statistics tool. + * + * StatoolInfos is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * StatoolInfos is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with StatoolInfos. If not, see . */ package fr.devinsy.statoolinfos.stats.softwares; diff --git a/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStatComparator.java b/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStatComparator.java index b7ee275..168177b 100644 --- a/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStatComparator.java +++ b/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStatComparator.java @@ -1,5 +1,20 @@ /* + * Copyright (C) 2021-2024 Christian Pierre MOMON * + * This file is part of StatoolInfos, simple service statistics tool. + * + * StatoolInfos is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * StatoolInfos is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with StatoolInfos. If not, see . */ package fr.devinsy.statoolinfos.stats.useragent; diff --git a/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStatComparator.java b/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStatComparator.java index 03fddaa..8052cc2 100644 --- a/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStatComparator.java +++ b/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStatComparator.java @@ -1,5 +1,20 @@ /* + * Copyright (C) 2021-2024 Christian Pierre MOMON * + * This file is part of StatoolInfos, simple service statistics tool. + * + * StatoolInfos is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * StatoolInfos is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with StatoolInfos. If not, see . */ package fr.devinsy.statoolinfos.stats.visitor; diff --git a/src/fr/devinsy/statoolinfos/uptime/URLSet.java b/src/fr/devinsy/statoolinfos/uptime/URLSet.java index f900c0e..f43b13a 100644 --- a/src/fr/devinsy/statoolinfos/uptime/URLSet.java +++ b/src/fr/devinsy/statoolinfos/uptime/URLSet.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -28,8 +28,8 @@ import org.slf4j.LoggerFactory; /** * The Class URLSet. * - * WARNING: cannot extends HashSet because URL hashcode method resolves - * value, so all URL with same IP have the same hashcode. + * WARNING: cannot extends {@code HashSet} because URL hashcode method + * resolves value, so all URL with same IP have the same hashcode. */ public class URLSet implements Iterable { diff --git a/src/fr/devinsy/statoolinfos/uptime/UptimeSet.java b/src/fr/devinsy/statoolinfos/uptime/UptimeSet.java index 7ae59ba..74c2f74 100644 --- a/src/fr/devinsy/statoolinfos/uptime/UptimeSet.java +++ b/src/fr/devinsy/statoolinfos/uptime/UptimeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -18,41 +18,9 @@ */ package fr.devinsy.statoolinfos.uptime; -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import fr.devinsy.statoolinfos.core.Categories; -import fr.devinsy.statoolinfos.core.Category; -import fr.devinsy.statoolinfos.core.Federation; -import fr.devinsy.statoolinfos.core.Metrics; -import fr.devinsy.statoolinfos.core.Organization; -import fr.devinsy.statoolinfos.core.Organizations; -import fr.devinsy.statoolinfos.core.Service; -import fr.devinsy.statoolinfos.core.Service.RegistrationType; -import fr.devinsy.statoolinfos.core.Services; -import fr.devinsy.statoolinfos.core.Software; -import fr.devinsy.statoolinfos.core.Softwares; -import fr.devinsy.statoolinfos.crawl.CrawlCache; -import fr.devinsy.statoolinfos.properties.PathPropertyList; -import fr.devinsy.statoolinfos.stats.categories.CategoryStat; -import fr.devinsy.statoolinfos.stats.categories.CategoryStats; -import fr.devinsy.statoolinfos.stats.country.CountryStats; -import fr.devinsy.statoolinfos.stats.organizations.OrganizationTurnoutStats; -import fr.devinsy.statoolinfos.stats.properties.PropertyStats; -import fr.devinsy.statoolinfos.stats.propertyfiles.PropertiesFileStats; -import fr.devinsy.statoolinfos.stats.services.HostProviderTypeStats; -import fr.devinsy.statoolinfos.stats.services.HostServerTypeStats; -import fr.devinsy.statoolinfos.stats.services.RegistrationStats; -import fr.devinsy.statoolinfos.stats.services.ServiceInstallTypeStats; -import fr.devinsy.statoolinfos.stats.softwares.SoftwareStat; -import fr.devinsy.statoolinfos.stats.softwares.SoftwareStats; -import fr.devinsy.strings.StringSet; - /** * The Class UptimeChecker. */ @@ -75,6 +43,5 @@ public class UptimeSet */ public void purge(final long days) { - } } diff --git a/src/fr/devinsy/statoolinfos/util/Chrono.java b/src/fr/devinsy/statoolinfos/util/Chrono.java index ce0f49d..f02cf74 100644 --- a/src/fr/devinsy/statoolinfos/util/Chrono.java +++ b/src/fr/devinsy/statoolinfos/util/Chrono.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of Logar, simple tool to manage http log files. * @@ -123,6 +123,8 @@ public class Chrono /** * Start. + * + * @return the chrono */ public Chrono start() { diff --git a/src/fr/devinsy/statoolinfos/util/Files.java b/src/fr/devinsy/statoolinfos/util/Files.java index 13b30c1..a979170 100644 --- a/src/fr/devinsy/statoolinfos/util/Files.java +++ b/src/fr/devinsy/statoolinfos/util/Files.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -300,6 +300,11 @@ public class Files extends ArrayList return result; } + /** + * Sort by pathname. + * + * @return the files + */ public Files sortByPathname() { Files result; diff --git a/src/fr/devinsy/statoolinfos/util/FilesLineIterator.java b/src/fr/devinsy/statoolinfos/util/FilesLineIterator.java index a78c529..66e25be 100644 --- a/src/fr/devinsy/statoolinfos/util/FilesLineIterator.java +++ b/src/fr/devinsy/statoolinfos/util/FilesLineIterator.java @@ -229,6 +229,9 @@ public class FilesLineIterator implements Iterator this.print = false; } + /** + * Sets the print on. + */ public void setPrintOn() { this.print = true; diff --git a/src/fr/devinsy/statoolinfos/util/LineIterator.java b/src/fr/devinsy/statoolinfos/util/LineIterator.java index 3cc4496..e78a850 100644 --- a/src/fr/devinsy/statoolinfos/util/LineIterator.java +++ b/src/fr/devinsy/statoolinfos/util/LineIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -90,6 +90,7 @@ public class LineIterator * * @return true, if successful * @throws IOException + * Signals that an I/O exception has occurred. */ public boolean hasNext() throws IOException { @@ -114,8 +115,9 @@ public class LineIterator /** * Next. * - * @return the http log + * @return the string * @throws IOException + * Signals that an I/O exception has occurred. */ public String next() throws IOException { @@ -131,9 +133,10 @@ public class LineIterator } /** - * Read next line. - * + * Sets the ready. + * * @throws IOException + * Signals that an I/O exception has occurred. */ private void setReady() throws IOException {