Made Javadoc review and header review.
This commit is contained in:
parent
f11b3c7ec3
commit
2ab08cca77
46 changed files with 862 additions and 71 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2020-2022 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* This file is part of StatoolInfos, simple service statistics tool.
|
||||
*
|
||||
|
@ -68,6 +68,8 @@ public class CrawlLogs extends ArrayList<CrawlLog>
|
|||
*
|
||||
* @param url
|
||||
* the url
|
||||
* @param parentUrl
|
||||
* the parent url
|
||||
* @param status
|
||||
* the status
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2020-2023 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* This file is part of StatoolInfos, simple service statistics tool.
|
||||
*
|
||||
|
@ -60,6 +60,8 @@ public class IpCounters extends HashMap<String, StringSet>
|
|||
/**
|
||||
* Gets the counters.
|
||||
*
|
||||
* @param prefix
|
||||
* the prefix
|
||||
* @return the counters
|
||||
*/
|
||||
public PathCounters getCounters(final String prefix)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2022-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2022-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -98,10 +98,12 @@ public class HttpAccessLogs implements Iterable<HttpAccessLog>
|
|||
}
|
||||
|
||||
/**
|
||||
* 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<HttpAccessLog>
|
|||
* the source
|
||||
* @param pattern
|
||||
* the pattern
|
||||
* @param datePattern
|
||||
* the date pattern
|
||||
* @param pathFilter
|
||||
* the path filter
|
||||
* @throws IOException
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -254,6 +254,7 @@ public class HttpErrorLogIterator implements Iterator<HttpErrorLog>
|
|||
* 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
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* This file is part of StatoolInfos, simple service statistics tool.
|
||||
*
|
||||
|
@ -127,11 +127,21 @@ public class MonthValues extends HashMap<YearMonth, Double>
|
|||
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<YearMonth, Double>
|
|||
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;
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.statoolinfos.properties;
|
||||
|
||||
|
@ -20,6 +35,12 @@ public class PathPropertyComparator implements Comparator<PathProperty>
|
|||
|
||||
private Sorting sorting;
|
||||
|
||||
/**
|
||||
* Instantiates a new path property comparator.
|
||||
*
|
||||
* @param sorting
|
||||
* the sorting
|
||||
*/
|
||||
public PathPropertyComparator(final Sorting sorting)
|
||||
{
|
||||
//
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.statoolinfos.stats.categories;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.statoolinfos.stats.ip;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.statoolinfos.stats.properties;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.statoolinfos.stats.softwares;
|
||||
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.statoolinfos.stats.useragent;
|
||||
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.statoolinfos.stats.visitor;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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<URL> because URL hashcode method resolves
|
||||
* value, so all URL with same IP have the same hashcode.
|
||||
* WARNING: cannot extends {@code HashSet<URL>} because URL hashcode method
|
||||
* resolves value, so all URL with same IP have the same hashcode.
|
||||
*/
|
||||
public class URLSet implements Iterable<URL>
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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()
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2020-2022 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2020-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* This file is part of StatoolInfos, simple service statistics tool.
|
||||
*
|
||||
|
@ -300,6 +300,11 @@ public class Files extends ArrayList<File>
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort by pathname.
|
||||
*
|
||||
* @return the files
|
||||
*/
|
||||
public Files sortByPathname()
|
||||
{
|
||||
Files result;
|
||||
|
|
|
@ -229,6 +229,9 @@ public class FilesLineIterator implements Iterator<String>
|
|||
this.print = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the print on.
|
||||
*/
|
||||
public void setPrintOn()
|
||||
{
|
||||
this.print = true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2021-2024 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* 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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue