From da4d518b62e8901ebc57655ea2643554607de5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20K=C5=99emen?= Date: Thu, 2 Mar 2023 00:11:34 +0100 Subject: [PATCH] [#5] Refactoring --- src/main/java/cz/sio2/obo/VersionFetcher.java | 4 ++++ .../sio2/obo/{ => versionextractor}/FSVersionExtractor.java | 2 +- .../obo/{ => versionextractor}/RDFXMLVersionExtractor.java | 2 +- .../cz/sio2/obo/{ => versionextractor}/VersionExtractor.java | 4 +++- .../sio2/obo/{ => versionextractor}/XMLVersionExtractor.java | 2 +- .../obo/{ => versionextractor}/TestOWLVersionExtractor.java | 4 +++- .../{ => versionextractor}/TestRDFXMLVersionExtractor.java | 4 +++- .../obo/{ => versionextractor}/TestXMLVersionExtractor.java | 5 +++-- 8 files changed, 19 insertions(+), 8 deletions(-) rename src/main/java/cz/sio2/obo/{ => versionextractor}/FSVersionExtractor.java (93%) rename src/main/java/cz/sio2/obo/{ => versionextractor}/RDFXMLVersionExtractor.java (94%) rename src/main/java/cz/sio2/obo/{ => versionextractor}/VersionExtractor.java (95%) rename src/main/java/cz/sio2/obo/{ => versionextractor}/XMLVersionExtractor.java (94%) rename src/test/java/cz/sio2/obo/{ => versionextractor}/TestOWLVersionExtractor.java (90%) rename src/test/java/cz/sio2/obo/{ => versionextractor}/TestRDFXMLVersionExtractor.java (91%) rename src/test/java/cz/sio2/obo/{ => versionextractor}/TestXMLVersionExtractor.java (90%) diff --git a/src/main/java/cz/sio2/obo/VersionFetcher.java b/src/main/java/cz/sio2/obo/VersionFetcher.java index dfed5eb..53ecb41 100644 --- a/src/main/java/cz/sio2/obo/VersionFetcher.java +++ b/src/main/java/cz/sio2/obo/VersionFetcher.java @@ -1,5 +1,9 @@ package cz.sio2.obo; +import cz.sio2.obo.versionextractor.FSVersionExtractor; +import cz.sio2.obo.versionextractor.RDFXMLVersionExtractor; +import cz.sio2.obo.versionextractor.VersionExtractor; +import cz.sio2.obo.versionextractor.XMLVersionExtractor; import lombok.extern.slf4j.Slf4j; import org.apache.hc.client5.http.classic.HttpClient; import org.apache.hc.client5.http.classic.methods.HttpGet; diff --git a/src/main/java/cz/sio2/obo/FSVersionExtractor.java b/src/main/java/cz/sio2/obo/versionextractor/FSVersionExtractor.java similarity index 93% rename from src/main/java/cz/sio2/obo/FSVersionExtractor.java rename to src/main/java/cz/sio2/obo/versionextractor/FSVersionExtractor.java index a254575..410d513 100644 --- a/src/main/java/cz/sio2/obo/FSVersionExtractor.java +++ b/src/main/java/cz/sio2/obo/versionextractor/FSVersionExtractor.java @@ -1,4 +1,4 @@ -package cz.sio2.obo; +package cz.sio2.obo.versionextractor; import java.util.regex.Pattern; diff --git a/src/main/java/cz/sio2/obo/RDFXMLVersionExtractor.java b/src/main/java/cz/sio2/obo/versionextractor/RDFXMLVersionExtractor.java similarity index 94% rename from src/main/java/cz/sio2/obo/RDFXMLVersionExtractor.java rename to src/main/java/cz/sio2/obo/versionextractor/RDFXMLVersionExtractor.java index 482a4d3..295a9b6 100644 --- a/src/main/java/cz/sio2/obo/RDFXMLVersionExtractor.java +++ b/src/main/java/cz/sio2/obo/versionextractor/RDFXMLVersionExtractor.java @@ -1,4 +1,4 @@ -package cz.sio2.obo; +package cz.sio2.obo.versionextractor; import java.util.regex.Pattern; diff --git a/src/main/java/cz/sio2/obo/VersionExtractor.java b/src/main/java/cz/sio2/obo/versionextractor/VersionExtractor.java similarity index 95% rename from src/main/java/cz/sio2/obo/VersionExtractor.java rename to src/main/java/cz/sio2/obo/versionextractor/VersionExtractor.java index ae1a941..308ccf9 100644 --- a/src/main/java/cz/sio2/obo/VersionExtractor.java +++ b/src/main/java/cz/sio2/obo/versionextractor/VersionExtractor.java @@ -1,4 +1,6 @@ -package cz.sio2.obo; +package cz.sio2.obo.versionextractor; + +import cz.sio2.obo.Version; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/src/main/java/cz/sio2/obo/XMLVersionExtractor.java b/src/main/java/cz/sio2/obo/versionextractor/XMLVersionExtractor.java similarity index 94% rename from src/main/java/cz/sio2/obo/XMLVersionExtractor.java rename to src/main/java/cz/sio2/obo/versionextractor/XMLVersionExtractor.java index 1c24028..716109f 100644 --- a/src/main/java/cz/sio2/obo/XMLVersionExtractor.java +++ b/src/main/java/cz/sio2/obo/versionextractor/XMLVersionExtractor.java @@ -1,4 +1,4 @@ -package cz.sio2.obo; +package cz.sio2.obo.versionextractor; import java.util.regex.Pattern; diff --git a/src/test/java/cz/sio2/obo/TestOWLVersionExtractor.java b/src/test/java/cz/sio2/obo/versionextractor/TestOWLVersionExtractor.java similarity index 90% rename from src/test/java/cz/sio2/obo/TestOWLVersionExtractor.java rename to src/test/java/cz/sio2/obo/versionextractor/TestOWLVersionExtractor.java index 7141a45..9840503 100644 --- a/src/test/java/cz/sio2/obo/TestOWLVersionExtractor.java +++ b/src/test/java/cz/sio2/obo/versionextractor/TestOWLVersionExtractor.java @@ -1,5 +1,7 @@ -package cz.sio2.obo; +package cz.sio2.obo.versionextractor; +import cz.sio2.obo.Version; +import cz.sio2.obo.versionextractor.FSVersionExtractor; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvFileSource; diff --git a/src/test/java/cz/sio2/obo/TestRDFXMLVersionExtractor.java b/src/test/java/cz/sio2/obo/versionextractor/TestRDFXMLVersionExtractor.java similarity index 91% rename from src/test/java/cz/sio2/obo/TestRDFXMLVersionExtractor.java rename to src/test/java/cz/sio2/obo/versionextractor/TestRDFXMLVersionExtractor.java index dad9c1e..ee498dd 100644 --- a/src/test/java/cz/sio2/obo/TestRDFXMLVersionExtractor.java +++ b/src/test/java/cz/sio2/obo/versionextractor/TestRDFXMLVersionExtractor.java @@ -1,5 +1,7 @@ -package cz.sio2.obo; +package cz.sio2.obo.versionextractor; +import cz.sio2.obo.Version; +import cz.sio2.obo.versionextractor.RDFXMLVersionExtractor; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvFileSource; diff --git a/src/test/java/cz/sio2/obo/TestXMLVersionExtractor.java b/src/test/java/cz/sio2/obo/versionextractor/TestXMLVersionExtractor.java similarity index 90% rename from src/test/java/cz/sio2/obo/TestXMLVersionExtractor.java rename to src/test/java/cz/sio2/obo/versionextractor/TestXMLVersionExtractor.java index 7c988f9..0b74468 100644 --- a/src/test/java/cz/sio2/obo/TestXMLVersionExtractor.java +++ b/src/test/java/cz/sio2/obo/versionextractor/TestXMLVersionExtractor.java @@ -1,7 +1,8 @@ -package cz.sio2.obo; +package cz.sio2.obo.versionextractor; +import cz.sio2.obo.Version; +import cz.sio2.obo.versionextractor.XMLVersionExtractor; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvFileSource;