From c94163c14d0952b25abe79363ffc98f44be045a3 Mon Sep 17 00:00:00 2001 From: Darius Wattimena Date: Tue, 13 Jun 2023 17:50:00 +0200 Subject: [PATCH 1/9] Removed unneeded debug logging of the comment block line --- .../src/main/java/dk/dma/ais/sentence/CommentBlockLine.java | 1 - 1 file changed, 1 deletion(-) diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/sentence/CommentBlockLine.java b/ais-lib-messages/src/main/java/dk/dma/ais/sentence/CommentBlockLine.java index d2dce425..c0f95111 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/sentence/CommentBlockLine.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/sentence/CommentBlockLine.java @@ -47,7 +47,6 @@ public void parse(String line) throws CommentBlockException { if (line.startsWith("\\g:")) { parseCommentBlockWithLetterG(line); } else { - System.out.println(line); validateCommentBlock(line, start, end); } } From 00fc3b2de5d9bc0d615e067c0f38c02ebf7a3ddb Mon Sep 17 00:00:00 2001 From: Babis Kaidos Date: Fri, 20 Oct 2023 19:54:35 +0300 Subject: [PATCH 2/9] Change visibility of certain methods to protected Previously, some methods of the AIS reader classes were package-private. By changing their visibility modifier to protected, subclasses in other packages can now override these methods for customization or extend their functionality. This increases the flexibility of the AIS library for diverse scenarios, while keeping encapsulation safe for the remaining codebase. --- .../src/main/java/dk/dma/ais/reader/AisDirectoryReader.java | 2 +- .../src/main/java/dk/dma/ais/reader/AisStreamReader.java | 2 +- .../src/main/java/dk/dma/ais/reader/AisTcpReader.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisDirectoryReader.java b/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisDirectoryReader.java index d0528b1d..b2f7c837 100644 --- a/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisDirectoryReader.java +++ b/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisDirectoryReader.java @@ -80,7 +80,7 @@ public class AisDirectoryReader extends AisReader { * @param comparator the comparator * @throws IOException the io exception */ - AisDirectoryReader(String dir, String pattern, boolean recursive, Comparator comparator) throws IOException { + protected AisDirectoryReader(String dir, String pattern, boolean recursive, Comparator comparator) throws IOException { requireNonNull(dir); requireNonNull(pattern); this.pattern = pattern; diff --git a/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisStreamReader.java b/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisStreamReader.java index b89625a3..19a43453 100644 --- a/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisStreamReader.java +++ b/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisStreamReader.java @@ -42,7 +42,7 @@ public class AisStreamReader extends AisReader { * * @param stream the stream */ - AisStreamReader(InputStream stream) { + protected AisStreamReader(InputStream stream) { this.stream = requireNonNull(stream); } diff --git a/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisTcpReader.java b/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisTcpReader.java index e56caa0f..e184b4b1 100644 --- a/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisTcpReader.java +++ b/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisTcpReader.java @@ -95,7 +95,7 @@ public class AisTcpReader extends AisReader { * * @param hostAndPort the host and port */ - void addHostPort(HostAndPort hostAndPort) { + protected void addHostPort(HostAndPort hostAndPort) { requireNonNull(hostAndPort); hosts.add(hostAndPort); currentHostIndex++; @@ -256,7 +256,7 @@ public String getHostname() { * * @return the host and port */ - HostAndPort currentHost() { + protected HostAndPort currentHost() { return hosts.get(currentHostIndex); } From 586bb08b06deb0ed4433467aa6513b4d2229a342 Mon Sep 17 00:00:00 2001 From: dimitrispallas <114162301+dimitrispallas@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:25:06 +0200 Subject: [PATCH 3/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aff753d3..a6c17d94 100644 --- a/README.md +++ b/README.md @@ -690,7 +690,7 @@ to send application specific message. See AisReader for different sending option example below all ABM packaging is handled by AisReader. ```java -AisReader aisReader = new AisTcpReader(host, port); +AisReader aisReader = AisReaders.createReader(host, port); aisReader.start(); ... // Make AIS message 12 From 893824e226bcda31dbb5edebfe557b56575a514d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Nov 2023 22:56:37 +0000 Subject: [PATCH 4/9] Bump org.json:json from 20180130 to 20231013 in /ais-lib-json Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20180130 to 20231013. - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- ais-lib-json/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ais-lib-json/pom.xml b/ais-lib-json/pom.xml index 647fa30c..3f401eba 100644 --- a/ais-lib-json/pom.xml +++ b/ais-lib-json/pom.xml @@ -27,7 +27,7 @@ org.json json - 20180130 + 20231013 com.fasterxml.jackson.core From 4e7e01d6ed5e902de3627c0cff3d2d516b3f1220 Mon Sep 17 00:00:00 2001 From: Dimitrios Pallas Date: Wed, 6 Dec 2023 10:19:42 +0200 Subject: [PATCH 5/9] version upgrade in pom.xml files --- ais-lib-cli/pom.xml | 2 +- ais-lib-communication/pom.xml | 2 +- ais-lib-json/pom.xml | 2 +- ais-lib-messages/pom.xml | 2 +- ais-lib-utils/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ais-lib-cli/pom.xml b/ais-lib-cli/pom.xml index 52dc1aee..0d52637c 100644 --- a/ais-lib-cli/pom.xml +++ b/ais-lib-cli/pom.xml @@ -4,7 +4,7 @@ dk.dma.ais.lib ais-parent - 2.8.2 + 2.8.3 diff --git a/ais-lib-communication/pom.xml b/ais-lib-communication/pom.xml index cbeaf5f2..be9a1aca 100755 --- a/ais-lib-communication/pom.xml +++ b/ais-lib-communication/pom.xml @@ -5,7 +5,7 @@ dk.dma.ais.lib ais-parent - 2.8.2 + 2.8.3 ../pom.xml diff --git a/ais-lib-json/pom.xml b/ais-lib-json/pom.xml index 3f401eba..f7bee37a 100644 --- a/ais-lib-json/pom.xml +++ b/ais-lib-json/pom.xml @@ -5,7 +5,7 @@ dk.dma.ais.lib ais-parent - 2.8.2 + 2.8.3 ../pom.xml diff --git a/ais-lib-messages/pom.xml b/ais-lib-messages/pom.xml index ed6f4929..341f9295 100755 --- a/ais-lib-messages/pom.xml +++ b/ais-lib-messages/pom.xml @@ -5,7 +5,7 @@ dk.dma.ais.lib ais-parent - 2.8.2 + 2.8.3 ../pom.xml diff --git a/ais-lib-utils/pom.xml b/ais-lib-utils/pom.xml index 6eb833d8..03516201 100644 --- a/ais-lib-utils/pom.xml +++ b/ais-lib-utils/pom.xml @@ -5,7 +5,7 @@ dk.dma.ais.lib ais-parent - 2.8.2 + 2.8.3 ../pom.xml diff --git a/pom.xml b/pom.xml index d2dab169..ad7c0609 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ dk.dma.ais.lib ais-parent - 2.8.2 + 2.8.3 AIS Parent pom This parent pom for AIS From 78cfb71cf84547163382f57a04a41a20c29b43dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 08:20:20 +0000 Subject: [PATCH 6/9] Bump com.fasterxml.jackson.core:jackson-databind in /ais-lib-json Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.9.10.5 to 2.12.7.1. - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- ais-lib-json/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ais-lib-json/pom.xml b/ais-lib-json/pom.xml index f7bee37a..2a2be627 100644 --- a/ais-lib-json/pom.xml +++ b/ais-lib-json/pom.xml @@ -37,7 +37,7 @@ com.fasterxml.jackson.core jackson-databind - 2.9.10.5 + 2.12.7.1 com.fasterxml.jackson.core From d3d187fead26745824a892678dd68cb7833ba7bc Mon Sep 17 00:00:00 2001 From: Dimitrios Pallas Date: Wed, 6 Dec 2023 11:19:01 +0200 Subject: [PATCH 7/9] com.fasterxml.jackson.core upgrades --- ais-lib-json/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ais-lib-json/pom.xml b/ais-lib-json/pom.xml index 2a2be627..3bde04e4 100644 --- a/ais-lib-json/pom.xml +++ b/ais-lib-json/pom.xml @@ -32,7 +32,7 @@ com.fasterxml.jackson.core jackson-annotations - 2.9.6 + 2.12.7 com.fasterxml.jackson.core @@ -42,7 +42,7 @@ com.fasterxml.jackson.core jackson-core - 2.9.6 + 2.12.7 org.skyscreamer From 6d6616f8c8b5757caed18775f1df688721abfba2 Mon Sep 17 00:00:00 2001 From: Dimitrios Pallas Date: Thu, 4 Jan 2024 12:30:56 +0200 Subject: [PATCH 8/9] log4j and guava updates --- ais-lib-cli/pom.xml | 4 +-- ais-lib-communication/pom.xml | 13 ++++++++- ais-lib-json/pom.xml | 30 +++++++++++++++++++- ais-lib-messages/pom.xml | 13 ++++++++- ais-lib-utils/pom.xml | 23 +++++++++++++--- pom.xml | 52 +++++++++++++++++++++++++++++++---- 6 files changed, 120 insertions(+), 15 deletions(-) diff --git a/ais-lib-cli/pom.xml b/ais-lib-cli/pom.xml index 0d52637c..5c34102a 100644 --- a/ais-lib-cli/pom.xml +++ b/ais-lib-cli/pom.xml @@ -4,7 +4,7 @@ dk.dma.ais.lib ais-parent - 2.8.3 + 2.8.4 @@ -50,7 +50,7 @@ org.slf4j slf4j-log4j12 - ${dependencies.slf4j.version} + 2.0.5 dk.dma.commons diff --git a/ais-lib-communication/pom.xml b/ais-lib-communication/pom.xml index be9a1aca..0a2e2443 100755 --- a/ais-lib-communication/pom.xml +++ b/ais-lib-communication/pom.xml @@ -5,7 +5,7 @@ dk.dma.ais.lib ais-parent - 2.8.3 + 2.8.4 ../pom.xml @@ -67,6 +67,17 @@ dk.dma.commons dma-commons-util ${dependencies.dma.commons.version} + + + com.google.guava + guava + + + + + com.google.guava + guava + 32.0.1-jre dk.dma.enav diff --git a/ais-lib-json/pom.xml b/ais-lib-json/pom.xml index 3bde04e4..0437368f 100644 --- a/ais-lib-json/pom.xml +++ b/ais-lib-json/pom.xml @@ -5,7 +5,7 @@ dk.dma.ais.lib ais-parent - 2.8.3 + 2.8.4 ../pom.xml @@ -14,6 +14,34 @@ AIS JSON Decoders + + org.slf4j + slf4j-api + 1.7.32 + + + + + org.apache.logging.log4j + log4j-api + 2.20.0 + + + + + org.apache.logging.log4j + log4j-core + 2.20.0 + + + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.20.0 + + + ${project.groupId} ais-lib-messages diff --git a/ais-lib-messages/pom.xml b/ais-lib-messages/pom.xml index 341f9295..c7fb5184 100755 --- a/ais-lib-messages/pom.xml +++ b/ais-lib-messages/pom.xml @@ -5,7 +5,7 @@ dk.dma.ais.lib ais-parent - 2.8.3 + 2.8.4 ../pom.xml @@ -23,6 +23,17 @@ dk.dma.commons dma-commons-util ${dependencies.dma.commons.version} + + + com.google.guava + guava + + + + + com.google.guava + guava + 32.0.1-jre diff --git a/ais-lib-utils/pom.xml b/ais-lib-utils/pom.xml index 03516201..d1eefe4d 100644 --- a/ais-lib-utils/pom.xml +++ b/ais-lib-utils/pom.xml @@ -5,7 +5,7 @@ dk.dma.ais.lib ais-parent - 2.8.3 + 2.8.4 ../pom.xml @@ -29,10 +29,25 @@ dma-commons-app ${dependencies.dma.commons.version} + - org.slf4j - slf4j-log4j12 - ${dependencies.slf4j.version} + org.apache.logging.log4j + log4j-api + 2.20.0 + + + + + org.apache.logging.log4j + log4j-core + 2.20.0 + + + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.20.0 diff --git a/pom.xml b/pom.xml index ad7c0609..432c58b1 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ dk.dma.ais.lib ais-parent - 2.8.3 + 2.8.4 AIS Parent pom This parent pom for AIS @@ -80,6 +80,19 @@ maven-gpg-plugin 3.1.0 + + + + + + + + + + + + + @@ -89,14 +102,30 @@ org.slf4j slf4j-api - ${dependencies.slf4j.version} + 1.7.32 + + - org.slf4j - slf4j-log4j12 - ${dependencies.slf4j.version} - test + org.apache.logging.log4j + log4j-api + 2.20.0 + + + + + org.apache.logging.log4j + log4j-core + 2.20.0 + + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.20.0 + + net.jcip jcip-annotations @@ -111,6 +140,17 @@ dk.dma.commons dma-commons-util ${dependencies.dma.commons.version} + + + com.google.guava + guava + + + + + com.google.guava + guava + 32.0.1-jre From c933c802464ce6f250eab75bac31df64ab7a39ab Mon Sep 17 00:00:00 2001 From: Konstantinos Karakostas <16063233+Noire001@users.noreply.github.com> Date: Fri, 31 May 2024 13:07:58 +0300 Subject: [PATCH 9/9] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6c17d94..b2f60319 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,10 @@ You're encouraged to contribute to AisLib. Fork the code from This library is licensed under the Apache License, Version 2.0. +## Usage ## + +AisLib is available on [Maven Repository](https://mvnrepository.com/artifact/dk.dma.ais.lib) + ## Examples ## ### Simple read and message handling ### @@ -548,7 +552,7 @@ The following fields can be used in filter expressions sources | s.id | Source id | | s.bs | Source base station | | s.country | Source country | DNK - | s.type | Source type | LIVE, SAT  + | s.type | Source type | LIVE, SAT | s.region | Source region | 0
|
|
|
messages | m.id | Message type | 1, 2, 3, 5 @@ -559,7 +563,7 @@ The following fields can be used in filter expressions | m.dow | Msg recv'd on day-of-week | mon, monday, 1 | m.hour | Msg recv'd on hour | 14 | m.minute | Msg recv'd on minute | 34 -
|

 |
+
|
|
|
| m.imo | IMO number | 6159463 | m.type | Ship type | tanker, 32 | m.navstat | Navigational status | AT_ANCHOR, 1