("test") {
+ useJUnitPlatform()
+}
+
+tasks.compileJava {
+ options.encoding = "UTF-8"
+}
+
+tasks.javadoc {
+ options.encoding = "UTF-8"
+}
diff --git a/Lab5Core/build/classes/java/main/common/collection/Database$DatabaseLoadFailedException.class b/Lab5Core/build/classes/java/main/common/collection/Database$DatabaseLoadFailedException.class
new file mode 100644
index 0000000..492ba0a
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/collection/Database$DatabaseLoadFailedException.class differ
diff --git a/Lab5Core/build/classes/java/main/common/collection/Database$DatabaseSaveFailedException.class b/Lab5Core/build/classes/java/main/common/collection/Database$DatabaseSaveFailedException.class
new file mode 100644
index 0000000..c8f1fe3
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/collection/Database$DatabaseSaveFailedException.class differ
diff --git a/Lab5Core/build/classes/java/main/common/collection/Database.class b/Lab5Core/build/classes/java/main/common/collection/Database.class
new file mode 100644
index 0000000..8603206
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/collection/Database.class differ
diff --git a/Lab5Core/build/classes/java/main/common/collection/PeopleDatabase.class b/Lab5Core/build/classes/java/main/common/collection/PeopleDatabase.class
new file mode 100644
index 0000000..946242d
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/collection/PeopleDatabase.class differ
diff --git a/Lab5Core/build/classes/java/main/common/commandline/Executable.class b/Lab5Core/build/classes/java/main/common/commandline/Executable.class
new file mode 100644
index 0000000..52dda24
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/commandline/Executable.class differ
diff --git a/Lab5Core/build/classes/java/main/common/commandline/Executables.class b/Lab5Core/build/classes/java/main/common/commandline/Executables.class
new file mode 100644
index 0000000..56c3fca
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/commandline/Executables.class differ
diff --git a/Lab5Core/build/classes/java/main/common/commandline/response/CommandResult.class b/Lab5Core/build/classes/java/main/common/commandline/response/CommandResult.class
new file mode 100644
index 0000000..7d55a03
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/commandline/response/CommandResult.class differ
diff --git a/Lab5Core/build/classes/java/main/common/commandline/response/DefaultResponse.class b/Lab5Core/build/classes/java/main/common/commandline/response/DefaultResponse.class
new file mode 100644
index 0000000..38a0803
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/commandline/response/DefaultResponse.class differ
diff --git a/Lab5Core/build/classes/java/main/common/commandline/response/PeopleDatabaseResponse.class b/Lab5Core/build/classes/java/main/common/commandline/response/PeopleDatabaseResponse.class
new file mode 100644
index 0000000..c956890
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/commandline/response/PeopleDatabaseResponse.class differ
diff --git a/Lab5Core/build/classes/java/main/common/commandline/response/Response.class b/Lab5Core/build/classes/java/main/common/commandline/response/Response.class
new file mode 100644
index 0000000..4f5dd76
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/commandline/response/Response.class differ
diff --git a/Lab5Core/build/classes/java/main/common/data/Color.class b/Lab5Core/build/classes/java/main/common/data/Color.class
new file mode 100644
index 0000000..96a17b5
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/data/Color.class differ
diff --git a/Lab5Core/build/classes/java/main/common/data/Coordinates.class b/Lab5Core/build/classes/java/main/common/data/Coordinates.class
new file mode 100644
index 0000000..95a2996
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/data/Coordinates.class differ
diff --git a/Lab5Core/build/classes/java/main/common/data/Country.class b/Lab5Core/build/classes/java/main/common/data/Country.class
new file mode 100644
index 0000000..6283421
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/data/Country.class differ
diff --git a/Lab5Core/build/classes/java/main/common/data/Location.class b/Lab5Core/build/classes/java/main/common/data/Location.class
new file mode 100644
index 0000000..69aefe6
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/data/Location.class differ
diff --git a/Lab5Core/build/classes/java/main/common/data/Person.class b/Lab5Core/build/classes/java/main/common/data/Person.class
new file mode 100644
index 0000000..39516c3
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/data/Person.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/Adapters$ColorAdapter.class b/Lab5Core/build/classes/java/main/common/parser/Adapters$ColorAdapter.class
new file mode 100644
index 0000000..c627f25
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/Adapters$ColorAdapter.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/Adapters$CoordinateYAdapter.class b/Lab5Core/build/classes/java/main/common/parser/Adapters$CoordinateYAdapter.class
new file mode 100644
index 0000000..5a2dea9
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/Adapters$CoordinateYAdapter.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/Adapters$CountryAdapter.class b/Lab5Core/build/classes/java/main/common/parser/Adapters$CountryAdapter.class
new file mode 100644
index 0000000..a585e91
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/Adapters$CountryAdapter.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/Adapters$HeightAdapter.class b/Lab5Core/build/classes/java/main/common/parser/Adapters$HeightAdapter.class
new file mode 100644
index 0000000..4fec1a6
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/Adapters$HeightAdapter.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/Adapters$LocalDateAdapter.class b/Lab5Core/build/classes/java/main/common/parser/Adapters$LocalDateAdapter.class
new file mode 100644
index 0000000..8d44bb9
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/Adapters$LocalDateAdapter.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/Adapters$NameAdapter.class b/Lab5Core/build/classes/java/main/common/parser/Adapters$NameAdapter.class
new file mode 100644
index 0000000..c39718b
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/Adapters$NameAdapter.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/Adapters$PassportAdapter.class b/Lab5Core/build/classes/java/main/common/parser/Adapters$PassportAdapter.class
new file mode 100644
index 0000000..0e049b7
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/Adapters$PassportAdapter.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/Adapters.class b/Lab5Core/build/classes/java/main/common/parser/Adapters.class
new file mode 100644
index 0000000..9c88fc4
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/Adapters.class differ
diff --git a/Lab5Core/build/classes/java/main/common/parser/ConnectionProperties.class b/Lab5Core/build/classes/java/main/common/parser/ConnectionProperties.class
new file mode 100644
index 0000000..71b4f31
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/parser/ConnectionProperties.class differ
diff --git a/Lab5Core/build/classes/java/main/common/util/UtilFunctions.class b/Lab5Core/build/classes/java/main/common/util/UtilFunctions.class
new file mode 100644
index 0000000..6222623
Binary files /dev/null and b/Lab5Core/build/classes/java/main/common/util/UtilFunctions.class differ
diff --git a/Lab5Core/build/docs/javadoc/allclasses-frame.html b/Lab5Core/build/docs/javadoc/allclasses-frame.html
new file mode 100644
index 0000000..03d1708
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/allclasses-frame.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+All Classes (Lab5Core 2.0 API)
+
+
+
+
+All Classes
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/allclasses-noframe.html b/Lab5Core/build/docs/javadoc/allclasses-noframe.html
new file mode 100644
index 0000000..216ac53
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/allclasses-noframe.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+All Classes (Lab5Core 2.0 API)
+
+
+
+
+All Classes
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/collection/Database.DatabaseLoadFailedException.html b/Lab5Core/build/docs/javadoc/common/collection/Database.DatabaseLoadFailedException.html
new file mode 100644
index 0000000..e962f5b
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/collection/Database.DatabaseLoadFailedException.html
@@ -0,0 +1,319 @@
+
+
+
+
+
+Database.DatabaseLoadFailedException (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+java.lang.Throwable
+
+
+java.lang.Exception
+
+
+common.collection.Database.DatabaseLoadFailedException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+Methods inherited from class java.lang.Throwable
+addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/collection/Database.DatabaseSaveFailedException.html b/Lab5Core/build/docs/javadoc/common/collection/Database.DatabaseSaveFailedException.html
new file mode 100644
index 0000000..f52abaf
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/collection/Database.DatabaseSaveFailedException.html
@@ -0,0 +1,319 @@
+
+
+
+
+
+Database.DatabaseSaveFailedException (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+java.lang.Throwable
+
+
+java.lang.Exception
+
+
+common.collection.Database.DatabaseSaveFailedException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+Methods inherited from class java.lang.Throwable
+addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/collection/Database.html b/Lab5Core/build/docs/javadoc/common/collection/Database.html
new file mode 100644
index 0000000..3fece58
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/collection/Database.html
@@ -0,0 +1,269 @@
+
+
+
+
+
+Database (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nested Class Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/collection/PeopleDatabase.html b/Lab5Core/build/docs/javadoc/common/collection/PeopleDatabase.html
new file mode 100644
index 0000000..8e53de7
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/collection/PeopleDatabase.html
@@ -0,0 +1,363 @@
+
+
+
+
+
+PeopleDatabase (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+common.collection.PeopleDatabase
+
+
+
+
+
+
+
+All Implemented Interfaces:
+Database
+
+
+
+public class PeopleDatabase
+extends java.lang.Object
+implements Database
+Класс базы данных людей, реализующий интерфейс Database
+
+See Also:
+Database
+
+
+
+
+
+
+
+
+
+
+
+
+Nested Class Summary
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+PeopleDatabase (java.util.logging.Logger logger)
+
+
+
+
+
+
+
+
+
+Method Summary
+
+All Methods Instance Methods Concrete Methods
+
+Modifier and Type
+Method and Description
+
+
+java.lang.String
+info ()
+
+
+void
+load ()
+Метод, инициализирующий базу данных из файла, находящемся по пути, указанном в
+ переменной окружения
ENV_VAR
+
+
+
+void
+save ()
+Метод, сохраняющий базу данных в файл, находящемся по пути, указанном в
+ переменной окружения
ENV_VAR
+
+
+
+java.lang.String
+toString ()
+
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/collection/package-frame.html b/Lab5Core/build/docs/javadoc/common/collection/package-frame.html
new file mode 100644
index 0000000..6eb7126
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/collection/package-frame.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+common.collection (Lab5Core 2.0 API)
+
+
+
+
+
+
+
Interfaces
+
+
Classes
+
+
Exceptions
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/collection/package-summary.html b/Lab5Core/build/docs/javadoc/common/collection/package-summary.html
new file mode 100644
index 0000000..b7745b7
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/collection/package-summary.html
@@ -0,0 +1,177 @@
+
+
+
+
+
+common.collection (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+Interface Summary
+
+Interface
+Description
+
+
+
+Database
+
+
+
+
+
+
+
+
+
+Class Summary
+
+Class
+Description
+
+
+
+PeopleDatabase
+
+Класс базы данных людей, реализующий интерфейс Database
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/collection/package-tree.html b/Lab5Core/build/docs/javadoc/common/collection/package-tree.html
new file mode 100644
index 0000000..ec9297d
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/collection/package-tree.html
@@ -0,0 +1,148 @@
+
+
+
+
+
+common.collection Class Hierarchy (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
Class Hierarchy
+
+java.lang.Object
+
+common.collection.PeopleDatabase (implements common.collection.Database )
+java.lang.Throwable (implements java.io.Serializable)
+
+java.lang.Exception
+
+
+
+
+
+
+
+
Interface Hierarchy
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/Executable.html b/Lab5Core/build/docs/javadoc/common/commandline/Executable.html
new file mode 100644
index 0000000..b3474e6
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/Executable.html
@@ -0,0 +1,228 @@
+
+
+
+
+
+Executable (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+Summary:
+Nested |
+Field |
+Constr |
+Method
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Summary:
+Nested |
+Field |
+Constr |
+Method
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/Executables.html b/Lab5Core/build/docs/javadoc/common/commandline/Executables.html
new file mode 100644
index 0000000..d675b32
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/Executables.html
@@ -0,0 +1,471 @@
+
+
+
+
+
+Executables (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+java.lang.Enum<Executables >
+
+
+common.commandline.Executables
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Enum Constant Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Enum
+clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+
+
+
+
+
+Methods inherited from class java.lang.Object
+getClass, notify, notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+valueOf
+public static Executables valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+The string must match exactly an identifier used to declare an
+enum constant in this type. (Extraneous whitespace characters are
+not permitted.)
+
+Parameters:
+name
- the name of the enum constant to be returned.
+Returns:
+the enum constant with the specified name
+Throws:
+java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/package-frame.html b/Lab5Core/build/docs/javadoc/common/commandline/package-frame.html
new file mode 100644
index 0000000..0157f03
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/package-frame.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+common.commandline (Lab5Core 2.0 API)
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/package-summary.html b/Lab5Core/build/docs/javadoc/common/commandline/package-summary.html
new file mode 100644
index 0000000..3641aac
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/package-summary.html
@@ -0,0 +1,154 @@
+
+
+
+
+
+common.commandline (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+Interface Summary
+
+Interface
+Description
+
+
+
+Executable
+
+
+
+
+
+
+
+Enum Summary
+
+Enum
+Description
+
+
+
+Executables
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/package-tree.html b/Lab5Core/build/docs/javadoc/common/commandline/package-tree.html
new file mode 100644
index 0000000..3d0de5f
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/package-tree.html
@@ -0,0 +1,146 @@
+
+
+
+
+
+common.commandline Class Hierarchy (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
Interface Hierarchy
+
+java.io.Serializable
+
+
+
+
Enum Hierarchy
+
+java.lang.Object
+
+java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/response/CommandResult.html b/Lab5Core/build/docs/javadoc/common/commandline/response/CommandResult.html
new file mode 100644
index 0000000..3144195
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/response/CommandResult.html
@@ -0,0 +1,292 @@
+
+
+
+
+
+CommandResult (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+common.commandline.response.CommandResult
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+CommandResult (java.lang.String value,
+ Response response)
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/response/DefaultResponse.html b/Lab5Core/build/docs/javadoc/common/commandline/response/DefaultResponse.html
new file mode 100644
index 0000000..d157cf4
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/response/DefaultResponse.html
@@ -0,0 +1,428 @@
+
+
+
+
+
+DefaultResponse (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+java.lang.Enum<DefaultResponse >
+
+
+common.commandline.response.DefaultResponse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Enum Constant Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Enum
+clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+
+
+
+
+
+Methods inherited from class java.lang.Object
+getClass, notify, notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+valueOf
+public static DefaultResponse valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+The string must match exactly an identifier used to declare an
+enum constant in this type. (Extraneous whitespace characters are
+not permitted.)
+
+Parameters:
+name
- the name of the enum constant to be returned.
+Returns:
+the enum constant with the specified name
+Throws:
+java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/response/PeopleDatabaseResponse.html b/Lab5Core/build/docs/javadoc/common/commandline/response/PeopleDatabaseResponse.html
new file mode 100644
index 0000000..916834c
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/response/PeopleDatabaseResponse.html
@@ -0,0 +1,368 @@
+
+
+
+
+
+PeopleDatabaseResponse (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+Enum Constant Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Enum
+clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+
+
+
+
+
+Methods inherited from class java.lang.Object
+getClass, notify, notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+valueOf
+public static PeopleDatabaseResponse valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+The string must match exactly an identifier used to declare an
+enum constant in this type. (Extraneous whitespace characters are
+not permitted.)
+
+Parameters:
+name
- the name of the enum constant to be returned.
+Returns:
+the enum constant with the specified name
+Throws:
+java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/response/Response.html b/Lab5Core/build/docs/javadoc/common/commandline/response/Response.html
new file mode 100644
index 0000000..43a1ac9
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/response/Response.html
@@ -0,0 +1,227 @@
+
+
+
+
+
+Response (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+Summary:
+Nested |
+Field |
+Constr |
+Method
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Summary:
+Nested |
+Field |
+Constr |
+Method
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/response/package-frame.html b/Lab5Core/build/docs/javadoc/common/commandline/response/package-frame.html
new file mode 100644
index 0000000..92c3609
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/response/package-frame.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+common.commandline.response (Lab5Core 2.0 API)
+
+
+
+
+
+
+
Interfaces
+
+
Classes
+
+
Enums
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/response/package-summary.html b/Lab5Core/build/docs/javadoc/common/commandline/response/package-summary.html
new file mode 100644
index 0000000..fc4f3b2
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/response/package-summary.html
@@ -0,0 +1,173 @@
+
+
+
+
+
+common.commandline.response (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+Interface Summary
+
+Interface
+Description
+
+
+
+Response
+
+
+
+
+
+
+
+Class Summary
+
+Class
+Description
+
+
+
+CommandResult
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/commandline/response/package-tree.html b/Lab5Core/build/docs/javadoc/common/commandline/response/package-tree.html
new file mode 100644
index 0000000..b69fa75
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/commandline/response/package-tree.html
@@ -0,0 +1,155 @@
+
+
+
+
+
+common.commandline.response Class Hierarchy (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
Class Hierarchy
+
+java.lang.Object
+
+common.commandline.response.CommandResult (implements java.io.Serializable)
+
+
+
+
Interface Hierarchy
+
+java.io.Serializable
+
+
+
+
Enum Hierarchy
+
+java.lang.Object
+
+java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/data/Color.html b/Lab5Core/build/docs/javadoc/common/data/Color.html
new file mode 100644
index 0000000..6edb537
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/data/Color.html
@@ -0,0 +1,352 @@
+
+
+
+
+
+Color (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+java.lang.Enum<Color >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Enum Constant Summary
+
+Enum Constants
+
+Enum Constant and Description
+
+
+BLACK
+
+
+BROWN
+
+
+ORANGE
+
+
+
+
+
+
+
+
+
+Method Summary
+
+All Methods Static Methods Concrete Methods
+
+Modifier and Type
+Method and Description
+
+
+static Color
+valueOf (java.lang.String name)
+Returns the enum constant of this type with the specified name.
+
+
+
+static Color []
+values ()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+
+
+
+
+
+
+
+Methods inherited from class java.lang.Enum
+clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+
+
+
+
+
+Methods inherited from class java.lang.Object
+getClass, notify, notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+valueOf
+public static Color valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+The string must match exactly an identifier used to declare an
+enum constant in this type. (Extraneous whitespace characters are
+not permitted.)
+
+Parameters:
+name
- the name of the enum constant to be returned.
+Returns:
+the enum constant with the specified name
+Throws:
+java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/data/Coordinates.html b/Lab5Core/build/docs/javadoc/common/data/Coordinates.html
new file mode 100644
index 0000000..d9bced5
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/data/Coordinates.html
@@ -0,0 +1,312 @@
+
+
+
+
+
+Coordinates (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+common.data.Coordinates
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+Coordinates (float x,
+ float y)
+Конструктор с параметрами
+
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/data/Country.html b/Lab5Core/build/docs/javadoc/common/data/Country.html
new file mode 100644
index 0000000..1b84ff8
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/data/Country.html
@@ -0,0 +1,376 @@
+
+
+
+
+
+Country (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+Enum Constant Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+All Methods Static Methods Concrete Methods
+
+Modifier and Type
+Method and Description
+
+
+static Country
+valueOf (java.lang.String name)
+Returns the enum constant of this type with the specified name.
+
+
+
+static Country []
+values ()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+
+
+
+
+
+
+
+Methods inherited from class java.lang.Enum
+clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+
+
+
+
+
+Methods inherited from class java.lang.Object
+getClass, notify, notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+valueOf
+public static Country valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+The string must match exactly an identifier used to declare an
+enum constant in this type. (Extraneous whitespace characters are
+not permitted.)
+
+Parameters:
+name
- the name of the enum constant to be returned.
+Returns:
+the enum constant with the specified name
+Throws:
+java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/data/Location.html b/Lab5Core/build/docs/javadoc/common/data/Location.html
new file mode 100644
index 0000000..7354ccc
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/data/Location.html
@@ -0,0 +1,330 @@
+
+
+
+
+
+Location (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+
+
+
+
+
+
+All Implemented Interfaces:
+java.io.Serializable, java.lang.Comparable<Location >
+
+
+
+public class Location
+extends java.lang.Object
+implements java.lang.Comparable<Location >, java.io.Serializable
+Класс данных местоположения, реализует сортировку по умолчанию
+ по имени и расстоянию до точки (0; 0; 0)
+
+See Also:
+Serialized Form
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+Location (double x,
+ float y,
+ long z,
+ java.lang.String name)
+Конструктор с параметрами
+
+
+
+
+
+
+
+
+
+
+Method Summary
+
+All Methods Instance Methods Concrete Methods
+
+Modifier and Type
+Method and Description
+
+
+int
+compareTo (Location other)
+Переопределенный метод сравнения двух местоположений,
+ сравнение производится по имени локации и расстоянию до точки (0; 0; 0)
+
+
+
+void
+setName (java.lang.String name)
+Сеттер для поля name
+
+
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+Location
+public Location(double x,
+ float y,
+ long z,
+ java.lang.String name)
+Конструктор с параметрами
+
+Parameters:
+x
- Координата X
+y
- Координата Y
+z
- Координата Z
+name
- Имя локации
+Throws:
+java.lang.NullPointerException
- будет брошено в случае, если Z является null
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+compareTo
+public int compareTo(Location other)
+Переопределенный метод сравнения двух местоположений,
+ сравнение производится по имени локации и расстоянию до точки (0; 0; 0)
+
+Specified by:
+compareTo
in interface java.lang.Comparable<Location >
+Parameters:
+other
- Объект для сравнения
+Returns:
+Целое число - результат сравнения
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/data/Person.html b/Lab5Core/build/docs/javadoc/common/data/Person.html
new file mode 100644
index 0000000..d3e7778
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/data/Person.html
@@ -0,0 +1,420 @@
+
+
+
+
+
+Person (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+
+
+
+
+
+
+All Implemented Interfaces:
+java.io.Serializable, java.lang.Comparable<Person >
+
+
+
+public class Person
+extends java.lang.Object
+implements java.lang.Comparable<Person >, java.io.Serializable
+Класс данных человека, реализует сортировку по умолчанию по имени, номеру паспорта,
+ росту, национальности, местоположению и цвету глаз
+
+See Also:
+Serialized Form
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+Person (@NonNull java.lang.String name,
+ @NonNull Coordinates coordinates,
+ java.lang.Integer height,
+ java.lang.String passportID,
+ @NonNull Color eyeColor,
+ @NonNull Country nationality,
+ Location location)
+Конструктор с параметрами
+
+
+
+
+
+
+
+
+
+
+Method Summary
+
+All Methods Instance Methods Concrete Methods
+
+Modifier and Type
+Method and Description
+
+
+int
+compareTo (Person other)
+Переопределенный метод сравнения двух людей,
+ сравнение производится по имени, номеру паспорта,
+ росту, национальности, местоположению и цвету глаз
+
+
+
+java.lang.String
+formatted ()
+
+
+void
+setHeight (java.lang.Integer height)
+Сеттер для поля height
+
+
+
+void
+setName (java.lang.String name)
+Сеттер для поля name
+
+
+
+void
+setPassportID (java.lang.String passportID)
+Сеттер для поля passportID
+
+
+
+void
+update (Person newPerson)
+Метод, меняющий все значения полей человека (кроме
id
и
creationDate
) в соответствии
+ со значениями полей другого
+
+
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+Person
+public Person(@NonNull
+ @NonNull java.lang.String name,
+ @NonNull
+ @NonNull Coordinates coordinates,
+ java.lang.Integer height,
+ java.lang.String passportID,
+ @NonNull
+ @NonNull Color eyeColor,
+ @NonNull
+ @NonNull Country nationality,
+ Location location)
+Конструктор с параметрами
+
+Parameters:
+name
- Имя человека
+coordinates
- Координаты человека
+height
- Высота человека
+passportID
- Номер паспорта человека
+eyeColor
- Цвет глаз человека
+nationality
- Национальность человека
+location
- Местоположение человека
+Throws:
+java.lang.NullPointerException
- Если name, coordinates, eyeColor или nationality являются null
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+compareTo
+public int compareTo(Person other)
+Переопределенный метод сравнения двух людей,
+ сравнение производится по имени, номеру паспорта,
+ росту, национальности, местоположению и цвету глаз
+
+Specified by:
+compareTo
in interface java.lang.Comparable<Person >
+Parameters:
+other
- Объект для сравнения
+Returns:
+Целое число - результат сравнения
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/data/package-frame.html b/Lab5Core/build/docs/javadoc/common/data/package-frame.html
new file mode 100644
index 0000000..c161a63
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/data/package-frame.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+common.data (Lab5Core 2.0 API)
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/data/package-summary.html b/Lab5Core/build/docs/javadoc/common/data/package-summary.html
new file mode 100644
index 0000000..9209a7b
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/data/package-summary.html
@@ -0,0 +1,178 @@
+
+
+
+
+
+common.data (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+Class Summary
+
+Class
+Description
+
+
+
+Coordinates
+
+Класс данных координат
+
+
+
+Location
+
+Класс данных местоположения, реализует сортировку по умолчанию
+ по имени и расстоянию до точки (0; 0; 0)
+
+
+
+Person
+
+Класс данных человека, реализует сортировку по умолчанию по имени, номеру паспорта,
+ росту, национальности, местоположению и цвету глаз
+
+
+
+
+
+
+
+Enum Summary
+
+Enum
+Description
+
+
+
+Color
+
+Перечисление цветов
+
+
+
+Country
+
+Перечисление стран
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/data/package-tree.html b/Lab5Core/build/docs/javadoc/common/data/package-tree.html
new file mode 100644
index 0000000..af23486
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/data/package-tree.html
@@ -0,0 +1,149 @@
+
+
+
+
+
+common.data Class Hierarchy (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
Class Hierarchy
+
+java.lang.Object
+
+common.data.Coordinates (implements java.lang.Comparable<T>, java.io.Serializable)
+common.data.Location (implements java.lang.Comparable<T>, java.io.Serializable)
+common.data.Person (implements java.lang.Comparable<T>, java.io.Serializable)
+
+
+
+
Enum Hierarchy
+
+java.lang.Object
+
+java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
+
+common.data.Country (implements java.io.Serializable)
+common.data.Color (implements java.io.Serializable)
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/Adapters.ColorAdapter.html b/Lab5Core/build/docs/javadoc/common/parser/Adapters.ColorAdapter.html
new file mode 100644
index 0000000..6c58592
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/Adapters.ColorAdapter.html
@@ -0,0 +1,304 @@
+
+
+
+
+
+Adapters.ColorAdapter (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,Color >
+
+
+common.parser.Adapters.ColorAdapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+ColorAdapter ()
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+ColorAdapter
+public ColorAdapter()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/Adapters.CoordinateYAdapter.html b/Lab5Core/build/docs/javadoc/common/parser/Adapters.CoordinateYAdapter.html
new file mode 100644
index 0000000..d1bee3c
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/Adapters.CoordinateYAdapter.html
@@ -0,0 +1,304 @@
+
+
+
+
+
+Adapters.CoordinateYAdapter (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.lang.Float>
+
+
+common.parser.Adapters.CoordinateYAdapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/Adapters.CountryAdapter.html b/Lab5Core/build/docs/javadoc/common/parser/Adapters.CountryAdapter.html
new file mode 100644
index 0000000..0baaefb
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/Adapters.CountryAdapter.html
@@ -0,0 +1,304 @@
+
+
+
+
+
+Adapters.CountryAdapter (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,Country >
+
+
+common.parser.Adapters.CountryAdapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+CountryAdapter ()
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+CountryAdapter
+public CountryAdapter()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/Adapters.HeightAdapter.html b/Lab5Core/build/docs/javadoc/common/parser/Adapters.HeightAdapter.html
new file mode 100644
index 0000000..94ef19a
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/Adapters.HeightAdapter.html
@@ -0,0 +1,304 @@
+
+
+
+
+
+Adapters.HeightAdapter (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.lang.Integer>
+
+
+common.parser.Adapters.HeightAdapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+HeightAdapter ()
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+HeightAdapter
+public HeightAdapter()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/Adapters.LocalDateAdapter.html b/Lab5Core/build/docs/javadoc/common/parser/Adapters.LocalDateAdapter.html
new file mode 100644
index 0000000..8dbd1d1
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/Adapters.LocalDateAdapter.html
@@ -0,0 +1,304 @@
+
+
+
+
+
+Adapters.LocalDateAdapter (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.time.LocalDate>
+
+
+common.parser.Adapters.LocalDateAdapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/Adapters.NameAdapter.html b/Lab5Core/build/docs/javadoc/common/parser/Adapters.NameAdapter.html
new file mode 100644
index 0000000..fa07140
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/Adapters.NameAdapter.html
@@ -0,0 +1,304 @@
+
+
+
+
+
+Adapters.NameAdapter (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.lang.String>
+
+
+common.parser.Adapters.NameAdapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+NameAdapter ()
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+NameAdapter
+public NameAdapter()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/Adapters.PassportAdapter.html b/Lab5Core/build/docs/javadoc/common/parser/Adapters.PassportAdapter.html
new file mode 100644
index 0000000..359f422
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/Adapters.PassportAdapter.html
@@ -0,0 +1,304 @@
+
+
+
+
+
+Adapters.PassportAdapter (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.lang.String>
+
+
+common.parser.Adapters.PassportAdapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+PassportAdapter
+public PassportAdapter()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/Adapters.html b/Lab5Core/build/docs/javadoc/common/parser/Adapters.html
new file mode 100644
index 0000000..08cff8a
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/Adapters.html
@@ -0,0 +1,433 @@
+
+
+
+
+
+Adapters (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+common.parser.Adapters
+
+
+
+
+
+
+
+
+
+
+
+
+Nested Class Summary
+
+
+
+
+
+
+
+
+Field Summary
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+Adapters ()
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+Adapters
+public Adapters()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/ConnectionProperties.html b/Lab5Core/build/docs/javadoc/common/parser/ConnectionProperties.html
new file mode 100644
index 0000000..d5b9365
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/ConnectionProperties.html
@@ -0,0 +1,281 @@
+
+
+
+
+
+ConnectionProperties (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+common.parser.ConnectionProperties
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/package-frame.html b/Lab5Core/build/docs/javadoc/common/parser/package-frame.html
new file mode 100644
index 0000000..2def28f
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/package-frame.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+common.parser (Lab5Core 2.0 API)
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/package-summary.html b/Lab5Core/build/docs/javadoc/common/parser/package-summary.html
new file mode 100644
index 0000000..7873591
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/package-summary.html
@@ -0,0 +1,171 @@
+
+
+
+
+
+common.parser (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/parser/package-tree.html b/Lab5Core/build/docs/javadoc/common/parser/package-tree.html
new file mode 100644
index 0000000..be4787c
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/parser/package-tree.html
@@ -0,0 +1,146 @@
+
+
+
+
+
+common.parser Class Hierarchy (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/util/UtilFunctions.html b/Lab5Core/build/docs/javadoc/common/util/UtilFunctions.html
new file mode 100644
index 0000000..4201da6
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/util/UtilFunctions.html
@@ -0,0 +1,289 @@
+
+
+
+
+
+UtilFunctions (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+Prev Class
+Next Class
+
+
+
+
+
+
+
+
+Summary:
+Nested |
+Field |
+Constr |
+Method
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+common.util.UtilFunctions
+
+
+
+
+
+
+
+
+
+
+
+
+Method Summary
+
+All Methods Static Methods Concrete Methods
+
+Modifier and Type
+Method and Description
+
+
+static java.lang.Double
+doubleOrNull (java.lang.String number)
+
+
+static <T extends java.lang.Enum<T>> T
+enumOrNull (java.lang.String value,
+ java.lang.Class<T> enumType)
+
+
+static java.lang.Float
+floatOrNull (java.lang.String number)
+
+
+static java.lang.Integer
+intOrNull (java.lang.String number)
+
+
+static java.lang.Long
+longOrNull (java.lang.String number)
+
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+Prev Class
+Next Class
+
+
+
+
+
+
+
+
+Summary:
+Nested |
+Field |
+Constr |
+Method
+
+
+Detail:
+Field |
+Constr |
+Method
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/util/package-frame.html b/Lab5Core/build/docs/javadoc/common/util/package-frame.html
new file mode 100644
index 0000000..fad8071
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/util/package-frame.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+common.util (Lab5Core 2.0 API)
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/util/package-summary.html b/Lab5Core/build/docs/javadoc/common/util/package-summary.html
new file mode 100644
index 0000000..1893357
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/util/package-summary.html
@@ -0,0 +1,141 @@
+
+
+
+
+
+common.util (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+Class Summary
+
+Class
+Description
+
+
+
+UtilFunctions
+
+Класс функций-утилит для избавления от повторяющихся участков кода и выноса их в методы для общего пользования
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/common/util/package-tree.html b/Lab5Core/build/docs/javadoc/common/util/package-tree.html
new file mode 100644
index 0000000..0925422
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/common/util/package-tree.html
@@ -0,0 +1,134 @@
+
+
+
+
+
+common.util Class Hierarchy (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/constant-values.html b/Lab5Core/build/docs/javadoc/constant-values.html
new file mode 100644
index 0000000..346777b
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/constant-values.html
@@ -0,0 +1,171 @@
+
+
+
+
+
+Constant Field Values (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/deprecated-list.html b/Lab5Core/build/docs/javadoc/deprecated-list.html
new file mode 100644
index 0000000..8c3c7cc
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/deprecated-list.html
@@ -0,0 +1,121 @@
+
+
+
+
+
+Deprecated List (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/help-doc.html b/Lab5Core/build/docs/javadoc/help-doc.html
new file mode 100644
index 0000000..ae707d4
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/help-doc.html
@@ -0,0 +1,222 @@
+
+
+
+
+
+API Help (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+Overview
+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+
+
+Package
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+
+Interfaces (italic)
+Classes
+Enums
+Exceptions
+Errors
+Annotation Types
+
+
+
+Class/Interface
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+Class inheritance diagram
+Direct Subclasses
+All Known Subinterfaces
+All Known Implementing Classes
+Class/interface declaration
+Class/interface description
+
+
+Nested Class Summary
+Field Summary
+Constructor Summary
+Method Summary
+
+
+Field Detail
+Constructor Detail
+Method Detail
+
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+Annotation Type
+Each annotation type has its own separate page with the following sections:
+
+Annotation Type declaration
+Annotation Type description
+Required Element Summary
+Optional Element Summary
+Element Detail
+
+
+
+Enum
+Each enum has its own separate page with the following sections:
+
+Enum declaration
+Enum description
+Enum Constant Summary
+Enum Constant Detail
+
+
+
+Tree (Class Hierarchy)
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
+
+When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
+When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+
+
+
+Deprecated API
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+
+
+Index
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+
+
+Prev/Next
+These links take you to the next or previous class, interface, package, or related page.
+
+
+Frames/No Frames
+These links show and hide the HTML frames. All pages are available with or without frames.
+
+
+All Classes
+The All Classes link shows all classes and interfaces except non-static nested types.
+
+
+Serialized Form
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+
+
+Constant Field Values
+The Constant Field Values page lists the static final fields and their values.
+
+
+
This help file applies to API documentation generated using the standard doclet.
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/index-all.html b/Lab5Core/build/docs/javadoc/index-all.html
new file mode 100644
index 0000000..8071929
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/index-all.html
@@ -0,0 +1,531 @@
+
+
+
+
+
+Index (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+A C D E F G H I L M N P R S T U V
+
+
+
A
+
+Adapters - Class in common.parser
+
+Adapters() - Constructor for class common.parser.Adapters
+
+Adapters.ColorAdapter - Class in common.parser
+
+Adapters.CoordinateYAdapter - Class in common.parser
+
+Adapters.CountryAdapter - Class in common.parser
+
+Adapters.HeightAdapter - Class in common.parser
+
+Adapters.LocalDateAdapter - Class in common.parser
+
+Adapters.NameAdapter - Class in common.parser
+
+Adapters.PassportAdapter - Class in common.parser
+
+
+
+
+
+
C
+
+Color - Enum in common.data
+
+Перечисление цветов
+
+ColorAdapter() - Constructor for class common.parser.Adapters.ColorAdapter
+
+CommandResult - Class in common.commandline.response
+
+CommandResult(String, Response) - Constructor for class common.commandline.response.CommandResult
+
+common.collection - package common.collection
+
+common.commandline - package common.commandline
+
+common.commandline.response - package common.commandline.response
+
+common.data - package common.data
+
+common.parser - package common.parser
+
+common.util - package common.util
+
+compareTo(Coordinates) - Method in class common.data.Coordinates
+
+compareTo(Location) - Method in class common.data.Location
+
+Переопределенный метод сравнения двух местоположений,
+ сравнение производится по имени локации и расстоянию до точки (0; 0; 0)
+
+compareTo(Person) - Method in class common.data.Person
+
+Переопределенный метод сравнения двух людей,
+ сравнение производится по имени, номеру паспорта,
+ росту, национальности, местоположению и цвету глаз
+
+ConnectionProperties - Class in common.parser
+
+ConnectionProperties() - Constructor for class common.parser.ConnectionProperties
+
+Coordinates - Class in common.data
+
+Класс данных координат
+
+Coordinates(float, float) - Constructor for class common.data.Coordinates
+
+Конструктор с параметрами
+
+CoordinateYAdapter() - Constructor for class common.parser.Adapters.CoordinateYAdapter
+
+Country - Enum in common.data
+
+Перечисление стран
+
+CountryAdapter() - Constructor for class common.parser.Adapters.CountryAdapter
+
+
+
+
+
+
D
+
+Database - Interface in common.collection
+
+
+
+Database.DatabaseLoadFailedException - Exception in common.collection
+
+Database.DatabaseSaveFailedException - Exception in common.collection
+
+DatabaseLoadFailedException(String) - Constructor for exception common.collection.Database.DatabaseLoadFailedException
+
+DatabaseLoadFailedException(String, String) - Constructor for exception common.collection.Database.DatabaseLoadFailedException
+
+DatabaseLoadFailedException(String, Throwable) - Constructor for exception common.collection.Database.DatabaseLoadFailedException
+
+DatabaseLoadFailedException(String, String, Throwable) - Constructor for exception common.collection.Database.DatabaseLoadFailedException
+
+DatabaseLoadFailedException(Throwable) - Constructor for exception common.collection.Database.DatabaseLoadFailedException
+
+DatabaseSaveFailedException(String) - Constructor for exception common.collection.Database.DatabaseSaveFailedException
+
+DatabaseSaveFailedException(String, String) - Constructor for exception common.collection.Database.DatabaseSaveFailedException
+
+DatabaseSaveFailedException(String, Throwable) - Constructor for exception common.collection.Database.DatabaseSaveFailedException
+
+DatabaseSaveFailedException(String, String, Throwable) - Constructor for exception common.collection.Database.DatabaseSaveFailedException
+
+DatabaseSaveFailedException(Throwable) - Constructor for exception common.collection.Database.DatabaseSaveFailedException
+
+DEFAULT_COLOR - Static variable in class common.parser.Adapters
+
+DEFAULT_COORDINATE - Static variable in class common.parser.Adapters
+
+DEFAULT_COORDINATES - Static variable in class common.parser.Adapters
+
+DEFAULT_COUNTRY - Static variable in class common.parser.Adapters
+
+DEFAULT_DATE - Static variable in class common.parser.Adapters
+
+DEFAULT_HEIGHT - Static variable in class common.parser.Adapters
+
+DEFAULT_LOCATION - Static variable in class common.parser.Adapters
+
+DEFAULT_NAME - Static variable in class common.parser.Adapters
+
+DEFAULT_PASSPORT - Static variable in class common.parser.Adapters
+
+DefaultResponse - Enum in common.commandline.response
+
+doubleOrNull(String) - Static method in class common.util.UtilFunctions
+
+
+
+
+
+
E
+
+enumOrNull(String, Class<T>) - Static method in class common.util.UtilFunctions
+
+Executable - Interface in common.commandline
+
+Executables - Enum in common.commandline
+
+execute(Object[]) - Method in interface common.commandline.Executable
+
+
+
+
+
+
F
+
+floatOrNull(String) - Static method in class common.util.UtilFunctions
+
+formatted() - Method in class common.data.Person
+
+
+
+
+
+
G
+
+getExecutable() - Method in enum common.commandline.Executables
+
+getHostname() - Static method in class common.parser.ConnectionProperties
+
+getMsg() - Method in enum common.commandline.response.DefaultResponse
+
+getMsg() - Method in enum common.commandline.response.PeopleDatabaseResponse
+
+getMsg() - Method in interface common.commandline.response.Response
+
+getPort() - Static method in class common.parser.ConnectionProperties
+
+getResponse() - Method in class common.commandline.response.CommandResult
+
+getValue() - Method in class common.commandline.response.CommandResult
+
+
+
+
+
+
H
+
+HeightAdapter() - Constructor for class common.parser.Adapters.HeightAdapter
+
+
+
+
+
+
I
+
+info() - Method in class common.collection.PeopleDatabase
+
+intOrNull(String) - Static method in class common.util.UtilFunctions
+
+
+
+
+
+
L
+
+load() - Method in interface common.collection.Database
+
+load() - Method in class common.collection.PeopleDatabase
+
+Метод, инициализирующий базу данных из файла, находящемся по пути, указанном в
+ переменной окружения
PeopleDatabase.ENV_VAR
+
+LocalDateAdapter() - Constructor for class common.parser.Adapters.LocalDateAdapter
+
+Location - Class in common.data
+
+Класс данных местоположения, реализует сортировку по умолчанию
+ по имени и расстоянию до точки (0; 0; 0)
+
+Location(double, float, long, String) - Constructor for class common.data.Location
+
+Конструктор с параметрами
+
+longOrNull(String) - Static method in class common.util.UtilFunctions
+
+
+
+
+
+
M
+
+marshal(Color) - Method in class common.parser.Adapters.ColorAdapter
+
+marshal(Float) - Method in class common.parser.Adapters.CoordinateYAdapter
+
+marshal(Country) - Method in class common.parser.Adapters.CountryAdapter
+
+marshal(Integer) - Method in class common.parser.Adapters.HeightAdapter
+
+marshal(LocalDate) - Method in class common.parser.Adapters.LocalDateAdapter
+
+marshal(String) - Method in class common.parser.Adapters.NameAdapter
+
+marshal(String) - Method in class common.parser.Adapters.PassportAdapter
+
+
+
+
+
+
N
+
+NameAdapter() - Constructor for class common.parser.Adapters.NameAdapter
+
+
+
+
+
+
P
+
+PassportAdapter() - Constructor for class common.parser.Adapters.PassportAdapter
+
+PeopleDatabase - Class in common.collection
+
+Класс базы данных людей, реализующий интерфейс Database
+
+PeopleDatabase(Logger) - Constructor for class common.collection.PeopleDatabase
+
+PeopleDatabaseResponse - Enum in common.commandline.response
+
+Person - Class in common.data
+
+Класс данных человека, реализует сортировку по умолчанию по имени, номеру паспорта,
+ росту, национальности, местоположению и цвету глаз
+
+Person(String, Coordinates, Integer, String, Color, Country, Location) - Constructor for class common.data.Person
+
+Конструктор с параметрами
+
+
+
+
+
+
R
+
+Response - Interface in common.commandline.response
+
+
+
+
+
+
S
+
+save() - Method in interface common.collection.Database
+
+save() - Method in class common.collection.PeopleDatabase
+
+Метод, сохраняющий базу данных в файл, находящемся по пути, указанном в
+ переменной окружения
PeopleDatabase.ENV_VAR
+
+setHeight(Integer) - Method in class common.data.Person
+
+Сеттер для поля height
+
+setName(String) - Method in class common.data.Location
+
+Сеттер для поля name
+
+setName(String) - Method in class common.data.Person
+
+Сеттер для поля name
+
+setPassportID(String) - Method in class common.data.Person
+
+Сеттер для поля passportID
+
+setY(float) - Method in class common.data.Coordinates
+
+Сеттер для поля y
+
+
+
+
+
+
T
+
+toString() - Method in class common.collection.PeopleDatabase
+
+
+
+
+
+
U
+
+unmarshal(String) - Method in class common.parser.Adapters.ColorAdapter
+
+unmarshal(String) - Method in class common.parser.Adapters.CoordinateYAdapter
+
+unmarshal(String) - Method in class common.parser.Adapters.CountryAdapter
+
+unmarshal(String) - Method in class common.parser.Adapters.HeightAdapter
+
+unmarshal(String) - Method in class common.parser.Adapters.LocalDateAdapter
+
+unmarshal(String) - Method in class common.parser.Adapters.NameAdapter
+
+unmarshal(String) - Method in class common.parser.Adapters.PassportAdapter
+
+update(Person) - Method in class common.data.Person
+
+
+
+UtilFunctions - Class in common.util
+
+Класс функций-утилит для избавления от повторяющихся участков кода и выноса их в методы для общего пользования
+
+
+
+
+
+
V
+
+valueOf(String) - Static method in enum common.commandline.Executables
+
+Returns the enum constant of this type with the specified name.
+
+valueOf(String) - Static method in enum common.commandline.response.DefaultResponse
+
+Returns the enum constant of this type with the specified name.
+
+valueOf(String) - Static method in enum common.commandline.response.PeopleDatabaseResponse
+
+Returns the enum constant of this type with the specified name.
+
+valueOf(String) - Static method in enum common.data.Color
+
+Returns the enum constant of this type with the specified name.
+
+valueOf(String) - Static method in enum common.data.Country
+
+Returns the enum constant of this type with the specified name.
+
+values() - Static method in enum common.commandline.Executables
+
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+
+values() - Static method in enum common.commandline.response.DefaultResponse
+
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+
+values() - Static method in enum common.commandline.response.PeopleDatabaseResponse
+
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+
+values() - Static method in enum common.data.Color
+
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+
+values() - Static method in enum common.data.Country
+
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+
+
+
A C D E F G H I L M N P R S T U V
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/index.html b/Lab5Core/build/docs/javadoc/index.html
new file mode 100644
index 0000000..8b1a157
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/index.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+Lab5Core 2.0 API
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+Frame Alert
+This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version .
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/overview-frame.html b/Lab5Core/build/docs/javadoc/overview-frame.html
new file mode 100644
index 0000000..456bfdb
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/overview-frame.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+Overview List (Lab5Core 2.0 API)
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/overview-summary.html b/Lab5Core/build/docs/javadoc/overview-summary.html
new file mode 100644
index 0000000..3b52350
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/overview-summary.html
@@ -0,0 +1,155 @@
+
+
+
+
+
+Overview (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/overview-tree.html b/Lab5Core/build/docs/javadoc/overview-tree.html
new file mode 100644
index 0000000..380c7e9
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/overview-tree.html
@@ -0,0 +1,193 @@
+
+
+
+
+
+Class Hierarchy (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
Class Hierarchy
+
+java.lang.Object
+
+common.parser.Adapters
+common.commandline.response.CommandResult (implements java.io.Serializable)
+common.parser.ConnectionProperties
+common.data.Coordinates (implements java.lang.Comparable<T>, java.io.Serializable)
+common.data.Location (implements java.lang.Comparable<T>, java.io.Serializable)
+common.collection.PeopleDatabase (implements common.collection.Database )
+common.data.Person (implements java.lang.Comparable<T>, java.io.Serializable)
+java.lang.Throwable (implements java.io.Serializable)
+
+java.lang.Exception
+
+
+
+
+common.util.UtilFunctions
+javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
+
+
+
+
+
+
Interface Hierarchy
+
+common.collection.Database
+java.io.Serializable
+
+
+
+
Enum Hierarchy
+
+java.lang.Object
+
+java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/package-list b/Lab5Core/build/docs/javadoc/package-list
new file mode 100644
index 0000000..0a83c9b
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/package-list
@@ -0,0 +1,6 @@
+common.collection
+common.commandline
+common.commandline.response
+common.data
+common.parser
+common.util
diff --git a/Lab5Core/build/docs/javadoc/script.js b/Lab5Core/build/docs/javadoc/script.js
new file mode 100644
index 0000000..b346356
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/script.js
@@ -0,0 +1,30 @@
+function show(type)
+{
+ count = 0;
+ for (var key in methods) {
+ var row = document.getElementById(key);
+ if ((methods[key] & type) != 0) {
+ row.style.display = '';
+ row.className = (count++ % 2) ? rowColor : altColor;
+ }
+ else
+ row.style.display = 'none';
+ }
+ updateTabs(type);
+}
+
+function updateTabs(type)
+{
+ for (var value in tabs) {
+ var sNode = document.getElementById(tabs[value][0]);
+ var spanNode = sNode.firstChild;
+ if (value == type) {
+ sNode.className = activeTableTab;
+ spanNode.innerHTML = tabs[value][1];
+ }
+ else {
+ sNode.className = tableTab;
+ spanNode.innerHTML = "" + tabs[value][1] + " ";
+ }
+ }
+}
diff --git a/Lab5Core/build/docs/javadoc/serialized-form.html b/Lab5Core/build/docs/javadoc/serialized-form.html
new file mode 100644
index 0000000..03eb8fb
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/serialized-form.html
@@ -0,0 +1,284 @@
+
+
+
+
+
+Serialized Form (Lab5Core 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Core/build/docs/javadoc/stylesheet.css b/Lab5Core/build/docs/javadoc/stylesheet.css
new file mode 100644
index 0000000..98055b2
--- /dev/null
+++ b/Lab5Core/build/docs/javadoc/stylesheet.css
@@ -0,0 +1,574 @@
+/* Javadoc style sheet */
+/*
+Overall document style
+*/
+
+@import url('resources/fonts/dejavu.css');
+
+body {
+ background-color:#ffffff;
+ color:#353833;
+ font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
+ font-size:14px;
+ margin:0;
+}
+a:link, a:visited {
+ text-decoration:none;
+ color:#4A6782;
+}
+a:hover, a:focus {
+ text-decoration:none;
+ color:#bb7a2a;
+}
+a:active {
+ text-decoration:none;
+ color:#4A6782;
+}
+a[name] {
+ color:#353833;
+}
+a[name]:hover {
+ text-decoration:none;
+ color:#353833;
+}
+pre {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+}
+h1 {
+ font-size:20px;
+}
+h2 {
+ font-size:18px;
+}
+h3 {
+ font-size:16px;
+ font-style:italic;
+}
+h4 {
+ font-size:13px;
+}
+h5 {
+ font-size:12px;
+}
+h6 {
+ font-size:11px;
+}
+ul {
+ list-style-type:disc;
+}
+code, tt {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ padding-top:4px;
+ margin-top:8px;
+ line-height:1.4em;
+}
+dt code {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ padding-top:4px;
+}
+table tr td dt code {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ vertical-align:top;
+ padding-top:4px;
+}
+sup {
+ font-size:8px;
+}
+/*
+Document title and Copyright styles
+*/
+.clear {
+ clear:both;
+ height:0px;
+ overflow:hidden;
+}
+.aboutLanguage {
+ float:right;
+ padding:0px 21px;
+ font-size:11px;
+ z-index:200;
+ margin-top:-9px;
+}
+.legalCopy {
+ margin-left:.5em;
+}
+.bar a, .bar a:link, .bar a:visited, .bar a:active {
+ color:#FFFFFF;
+ text-decoration:none;
+}
+.bar a:hover, .bar a:focus {
+ color:#bb7a2a;
+}
+.tab {
+ background-color:#0066FF;
+ color:#ffffff;
+ padding:8px;
+ width:5em;
+ font-weight:bold;
+}
+/*
+Navigation bar styles
+*/
+.bar {
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ padding:.8em .5em .4em .8em;
+ height:auto;/*height:1.8em;*/
+ font-size:11px;
+ margin:0;
+}
+.topNav {
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ float:left;
+ padding:0;
+ width:100%;
+ clear:right;
+ height:2.8em;
+ padding-top:10px;
+ overflow:hidden;
+ font-size:12px;
+}
+.bottomNav {
+ margin-top:10px;
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ float:left;
+ padding:0;
+ width:100%;
+ clear:right;
+ height:2.8em;
+ padding-top:10px;
+ overflow:hidden;
+ font-size:12px;
+}
+.subNav {
+ background-color:#dee3e9;
+ float:left;
+ width:100%;
+ overflow:hidden;
+ font-size:12px;
+}
+.subNav div {
+ clear:left;
+ float:left;
+ padding:0 0 5px 6px;
+ text-transform:uppercase;
+}
+ul.navList, ul.subNavList {
+ float:left;
+ margin:0 25px 0 0;
+ padding:0;
+}
+ul.navList li{
+ list-style:none;
+ float:left;
+ padding: 5px 6px;
+ text-transform:uppercase;
+}
+ul.subNavList li{
+ list-style:none;
+ float:left;
+}
+.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
+ color:#FFFFFF;
+ text-decoration:none;
+ text-transform:uppercase;
+}
+.topNav a:hover, .bottomNav a:hover {
+ text-decoration:none;
+ color:#bb7a2a;
+ text-transform:uppercase;
+}
+.navBarCell1Rev {
+ background-color:#F8981D;
+ color:#253441;
+ margin: auto 5px;
+}
+.skipNav {
+ position:absolute;
+ top:auto;
+ left:-9999px;
+ overflow:hidden;
+}
+/*
+Page header and footer styles
+*/
+.header, .footer {
+ clear:both;
+ margin:0 20px;
+ padding:5px 0 0 0;
+}
+.indexHeader {
+ margin:10px;
+ position:relative;
+}
+.indexHeader span{
+ margin-right:15px;
+}
+.indexHeader h1 {
+ font-size:13px;
+}
+.title {
+ color:#2c4557;
+ margin:10px 0;
+}
+.subTitle {
+ margin:5px 0 0 0;
+}
+.header ul {
+ margin:0 0 15px 0;
+ padding:0;
+}
+.footer ul {
+ margin:20px 0 5px 0;
+}
+.header ul li, .footer ul li {
+ list-style:none;
+ font-size:13px;
+}
+/*
+Heading styles
+*/
+div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
+ background-color:#dee3e9;
+ border:1px solid #d0d9e0;
+ margin:0 0 6px -8px;
+ padding:7px 5px;
+}
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+ background-color:#dee3e9;
+ border:1px solid #d0d9e0;
+ margin:0 0 6px -8px;
+ padding:7px 5px;
+}
+ul.blockList ul.blockList li.blockList h3 {
+ padding:0;
+ margin:15px 0;
+}
+ul.blockList li.blockList h2 {
+ padding:0px 0 20px 0;
+}
+/*
+Page layout container styles
+*/
+.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
+ clear:both;
+ padding:10px 20px;
+ position:relative;
+}
+.indexContainer {
+ margin:10px;
+ position:relative;
+ font-size:12px;
+}
+.indexContainer h2 {
+ font-size:13px;
+ padding:0 0 3px 0;
+}
+.indexContainer ul {
+ margin:0;
+ padding:0;
+}
+.indexContainer ul li {
+ list-style:none;
+ padding-top:2px;
+}
+.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
+ font-size:12px;
+ font-weight:bold;
+ margin:10px 0 0 0;
+ color:#4E4E4E;
+}
+.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
+ margin:5px 0 10px 0px;
+ font-size:14px;
+ font-family:'DejaVu Sans Mono',monospace;
+}
+.serializedFormContainer dl.nameValue dt {
+ margin-left:1px;
+ font-size:1.1em;
+ display:inline;
+ font-weight:bold;
+}
+.serializedFormContainer dl.nameValue dd {
+ margin:0 0 0 1px;
+ font-size:1.1em;
+ display:inline;
+}
+/*
+List styles
+*/
+ul.horizontal li {
+ display:inline;
+ font-size:0.9em;
+}
+ul.inheritance {
+ margin:0;
+ padding:0;
+}
+ul.inheritance li {
+ display:inline;
+ list-style:none;
+}
+ul.inheritance li ul.inheritance {
+ margin-left:15px;
+ padding-left:15px;
+ padding-top:1px;
+}
+ul.blockList, ul.blockListLast {
+ margin:10px 0 10px 0;
+ padding:0;
+}
+ul.blockList li.blockList, ul.blockListLast li.blockList {
+ list-style:none;
+ margin-bottom:15px;
+ line-height:1.4;
+}
+ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
+ padding:0px 20px 5px 10px;
+ border:1px solid #ededed;
+ background-color:#f8f8f8;
+}
+ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
+ padding:0 0 5px 8px;
+ background-color:#ffffff;
+ border:none;
+}
+ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
+ margin-left:0;
+ padding-left:0;
+ padding-bottom:15px;
+ border:none;
+}
+ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
+ list-style:none;
+ border-bottom:none;
+ padding-bottom:0;
+}
+table tr td dl, table tr td dl dt, table tr td dl dd {
+ margin-top:0;
+ margin-bottom:1px;
+}
+/*
+Table styles
+*/
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
+ width:100%;
+ border-left:1px solid #EEE;
+ border-right:1px solid #EEE;
+ border-bottom:1px solid #EEE;
+}
+.overviewSummary, .memberSummary {
+ padding:0px;
+}
+.overviewSummary caption, .memberSummary caption, .typeSummary caption,
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
+ position:relative;
+ text-align:left;
+ background-repeat:no-repeat;
+ color:#253441;
+ font-weight:bold;
+ clear:none;
+ overflow:hidden;
+ padding:0px;
+ padding-top:10px;
+ padding-left:1px;
+ margin:0px;
+ white-space:pre;
+}
+.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
+.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
+.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
+.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
+.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
+ color:#FFFFFF;
+}
+.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ padding-bottom:7px;
+ display:inline-block;
+ float:left;
+ background-color:#F8981D;
+ border: none;
+ height:16px;
+}
+.memberSummary caption span.activeTableTab span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ margin-right:3px;
+ display:inline-block;
+ float:left;
+ background-color:#F8981D;
+ height:16px;
+}
+.memberSummary caption span.tableTab span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ margin-right:3px;
+ display:inline-block;
+ float:left;
+ background-color:#4D7A97;
+ height:16px;
+}
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
+ padding-top:0px;
+ padding-left:0px;
+ padding-right:0px;
+ background-image:none;
+ float:none;
+ display:inline;
+}
+.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
+ display:none;
+ width:5px;
+ position:relative;
+ float:left;
+ background-color:#F8981D;
+}
+.memberSummary .activeTableTab .tabEnd {
+ display:none;
+ width:5px;
+ margin-right:3px;
+ position:relative;
+ float:left;
+ background-color:#F8981D;
+}
+.memberSummary .tableTab .tabEnd {
+ display:none;
+ width:5px;
+ margin-right:3px;
+ position:relative;
+ background-color:#4D7A97;
+ float:left;
+
+}
+.overviewSummary td, .memberSummary td, .typeSummary td,
+.useSummary td, .constantsSummary td, .deprecatedSummary td {
+ text-align:left;
+ padding:0px 0px 12px 10px;
+}
+th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
+td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
+ vertical-align:top;
+ padding-right:0px;
+ padding-top:8px;
+ padding-bottom:3px;
+}
+th.colFirst, th.colLast, th.colOne, .constantsSummary th {
+ background:#dee3e9;
+ text-align:left;
+ padding:8px 3px 3px 7px;
+}
+td.colFirst, th.colFirst {
+ white-space:nowrap;
+ font-size:13px;
+}
+td.colLast, th.colLast {
+ font-size:13px;
+}
+td.colOne, th.colOne {
+ font-size:13px;
+}
+.overviewSummary td.colFirst, .overviewSummary th.colFirst,
+.useSummary td.colFirst, .useSummary th.colFirst,
+.overviewSummary td.colOne, .overviewSummary th.colOne,
+.memberSummary td.colFirst, .memberSummary th.colFirst,
+.memberSummary td.colOne, .memberSummary th.colOne,
+.typeSummary td.colFirst{
+ width:25%;
+ vertical-align:top;
+}
+td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
+ font-weight:bold;
+}
+.tableSubHeadingColor {
+ background-color:#EEEEFF;
+}
+.altColor {
+ background-color:#FFFFFF;
+}
+.rowColor {
+ background-color:#EEEEEF;
+}
+/*
+Content styles
+*/
+.description pre {
+ margin-top:0;
+}
+.deprecatedContent {
+ margin:0;
+ padding:10px 0;
+}
+.docSummary {
+ padding:0;
+}
+
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+ font-style:normal;
+}
+
+div.block {
+ font-size:14px;
+ font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
+}
+
+td.colLast div {
+ padding-top:0px;
+}
+
+
+td.colLast a {
+ padding-bottom:3px;
+}
+/*
+Formatting effect styles
+*/
+.sourceLineNo {
+ color:green;
+ padding:0 30px 0 0;
+}
+h1.hidden {
+ visibility:hidden;
+ overflow:hidden;
+ font-size:10px;
+}
+.block {
+ display:block;
+ margin:3px 10px 2px 0px;
+ color:#474747;
+}
+.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
+.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
+.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
+ font-weight:bold;
+}
+.deprecationComment, .emphasizedPhrase, .interfaceName {
+ font-style:italic;
+}
+
+div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
+div.block div.block span.interfaceName {
+ font-style:normal;
+}
+
+div.contentContainer ul.blockList li.blockList h2{
+ padding-bottom:0px;
+}
diff --git a/Lab5Core/build/libs/Lab5Core-2.0.jar b/Lab5Core/build/libs/Lab5Core-2.0.jar
new file mode 100644
index 0000000..5437021
Binary files /dev/null and b/Lab5Core/build/libs/Lab5Core-2.0.jar differ
diff --git a/Lab5Core/build/resources/main/connection.properties b/Lab5Core/build/resources/main/connection.properties
new file mode 100644
index 0000000..a1e7224
--- /dev/null
+++ b/Lab5Core/build/resources/main/connection.properties
@@ -0,0 +1,2 @@
+hostname=localhost
+port=1234
diff --git a/Lab5Core/build/tmp/compileJava/previous-compilation-data.bin b/Lab5Core/build/tmp/compileJava/previous-compilation-data.bin
new file mode 100644
index 0000000..af2aa2c
Binary files /dev/null and b/Lab5Core/build/tmp/compileJava/previous-compilation-data.bin differ
diff --git a/Lab5Core/build/tmp/jar/MANIFEST.MF b/Lab5Core/build/tmp/jar/MANIFEST.MF
new file mode 100644
index 0000000..59499bc
--- /dev/null
+++ b/Lab5Core/build/tmp/jar/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/Lab5Core/build/tmp/javadoc/javadoc.options b/Lab5Core/build/tmp/javadoc/javadoc.options
new file mode 100644
index 0000000..387e206
--- /dev/null
+++ b/Lab5Core/build/tmp/javadoc/javadoc.options
@@ -0,0 +1,23 @@
+-classpath 'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\build\\classes\\java\\main;C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\build\\resources\\main;C:\\Users\\egor\\.gradle\\caches\\modules-2\\files-2.1\\org.projectlombok\\lombok\\1.18.22\\9c08ea24c6eb714e2d6170e8122c069a0ba9aacf\\lombok-1.18.22.jar'
+-d 'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\build\\docs\\javadoc'
+-doctitle 'Lab5Core 2.0 API'
+-encoding 'UTF-8'
+-notimestamp
+-quiet
+-windowtitle 'Lab5Core 2.0 API'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\collection\\Database.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\collection\\PeopleDatabase.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\commandline\\Executable.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\commandline\\Executables.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\commandline\\response\\CommandResult.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\commandline\\response\\DefaultResponse.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\commandline\\response\\PeopleDatabaseResponse.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\commandline\\response\\Response.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\data\\Color.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\data\\Coordinates.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\data\\Country.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\data\\Location.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\data\\Person.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\parser\\Adapters.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\parser\\ConnectionProperties.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\src\\main\\java\\common\\util\\UtilFunctions.java'
diff --git a/src/main/java/ru/erius/lab5/collection/Database.java b/Lab5Core/src/main/java/common/collection/Database.java
similarity index 97%
rename from src/main/java/ru/erius/lab5/collection/Database.java
rename to Lab5Core/src/main/java/common/collection/Database.java
index 06bbbe1..f7ab56b 100644
--- a/src/main/java/ru/erius/lab5/collection/Database.java
+++ b/Lab5Core/src/main/java/common/collection/Database.java
@@ -1,4 +1,4 @@
-package ru.erius.lab5.collection;
+package common.collection;
/**
* Интерфейс баз данных с методами {@link #load()} и {@link #save()}
diff --git a/src/main/java/ru/erius/lab5/collection/PeopleDatabase.java b/Lab5Core/src/main/java/common/collection/PeopleDatabase.java
similarity index 76%
rename from src/main/java/ru/erius/lab5/collection/PeopleDatabase.java
rename to Lab5Core/src/main/java/common/collection/PeopleDatabase.java
index b3e1e30..e31df18 100644
--- a/src/main/java/ru/erius/lab5/collection/PeopleDatabase.java
+++ b/Lab5Core/src/main/java/common/collection/PeopleDatabase.java
@@ -1,8 +1,8 @@
-package ru.erius.lab5.collection;
+package common.collection;
import lombok.Getter;
-import ru.erius.lab5.data.Person;
-import ru.erius.lab5.parser.Adapters;
+import common.data.Person;
+import common.parser.Adapters;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
@@ -16,12 +16,13 @@ import java.io.File;
import java.io.IOException;
import java.time.LocalDate;
import java.util.TreeSet;
+import java.util.logging.Logger;
import java.util.stream.Collectors;
/**
* Класс базы данных людей, реализующий интерфейс Database
*
- * @see ru.erius.lab5.collection.Database
+ * @see Database
*/
@XmlRootElement
public class PeopleDatabase implements Database {
@@ -31,6 +32,8 @@ public class PeopleDatabase implements Database {
DEFAULT_FILE_NAME = "lab5.xml",
TYPE = "TreeSet";
+ @XmlTransient
+ private Logger logger = Logger.getLogger("Lab5Client");
@XmlTransient
private JAXBContext context;
@XmlTransient
@@ -51,6 +54,12 @@ public class PeopleDatabase implements Database {
}
}
+ private PeopleDatabase() {}
+
+ public PeopleDatabase(Logger logger) {
+ this.logger = logger;
+ }
+
public String info() {
return String.format("Тип коллекции: %s \n" +
"Дата инициализации: %s \n" +
@@ -67,19 +76,19 @@ public class PeopleDatabase implements Database {
*/
@Override
public void load() throws Database.DatabaseLoadFailedException {
- System.out.println("Инициализация коллекции из файла...");
+ logger.info("Инициализация коллекции из файла...");
String path = System.getenv(ENV_VAR);
boolean envSet = true;
if (path == null) {
- System.out.println("Не найдена переменная окружения LAB5_PATH, создание файла в директории jar файла");
+ logger.warning("Не найдена переменная окружения LAB5_PATH, создание файла в директории jar файла");
path = ".";
envSet = false;
}
File file = new File(path);
if (!file.exists() && envSet) {
- System.out.println("Файл " + file.getAbsolutePath() + " не был найден, создание файла в директории jar файла");
+ logger.warning("Файл " + file.getAbsolutePath() + " не был найден, создание файла в директории jar файла");
file = new File(".");
}
if (file.isDirectory())
@@ -95,9 +104,9 @@ public class PeopleDatabase implements Database {
PeopleDatabase pd = (PeopleDatabase) unmarshaller.unmarshal(file);
this.collection = pd.collection;
this.initDate = pd.initDate;
- System.out.println("Инициализация успешно выполнена");
+ logger.info("Инициализация успешно выполнена");
} catch (JAXBException e) {
- System.out.println("Не удалось загрузить коллекцию из файла " + file.getAbsolutePath() + ", он пуст, либо нарушена структура xml");
+ logger.severe("Не удалось загрузить коллекцию из файла " + file.getAbsolutePath() + ", он пуст, либо нарушена структура xml");
}
}
@@ -112,16 +121,17 @@ public class PeopleDatabase implements Database {
@Override
public void save() throws Database.DatabaseSaveFailedException {
if (!file.exists()) {
- System.out.println("Файла " + file.getAbsolutePath() + " не существует, возможно он был удален, пытаюсь воссоздать файл...");
+ logger.warning("Файла " + file.getAbsolutePath() + " не существует, возможно он был удален, пытаюсь воссоздать файл...");
try {
file.createNewFile();
- System.out.println("Файл был успешно создан");
+ logger.info("Файл был успешно создан");
} catch (IOException e) {
throw new DatabaseSaveFailedException("Не удается создать файл заново, пожалуйста, сделайте это вручную и попробуйте еще раз");
}
}
try {
Marshaller marshaller = context.createMarshaller();
+ marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.marshal(this, file);
} catch (JAXBException e) {
@@ -130,18 +140,18 @@ public class PeopleDatabase implements Database {
}
private File createFile(File file) {
- System.out.println("Директория успешно найдена");
+ logger.info("Директория успешно найдена");
file = new File(file.getAbsolutePath() + "/" + DEFAULT_FILE_NAME);
boolean exists;
try {
exists = file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
- System.err.println("Что-то пошло не так");
+ logger.severe("Что-то пошло не так");
System.exit(-1);
return null;
}
- System.out.println(exists ? "Файл не найден, создание файла " + DEFAULT_FILE_NAME : "Файл успешно найден");
+ logger.info(exists ? "Файл не найден, создание файла " + DEFAULT_FILE_NAME : "Файл успешно найден");
return file;
}
diff --git a/Lab5Core/src/main/java/common/commandline/Executable.java b/Lab5Core/src/main/java/common/commandline/Executable.java
new file mode 100644
index 0000000..bffad8a
--- /dev/null
+++ b/Lab5Core/src/main/java/common/commandline/Executable.java
@@ -0,0 +1,10 @@
+package common.commandline;
+
+import common.commandline.response.CommandResult;
+
+import java.io.Serializable;
+
+@FunctionalInterface
+public interface Executable extends Serializable {
+ CommandResult execute(Object[] args);
+}
diff --git a/Lab5Core/src/main/java/common/commandline/Executables.java b/Lab5Core/src/main/java/common/commandline/Executables.java
new file mode 100644
index 0000000..0d99a53
--- /dev/null
+++ b/Lab5Core/src/main/java/common/commandline/Executables.java
@@ -0,0 +1,117 @@
+package common.commandline;
+
+import common.collection.Database;
+import common.collection.PeopleDatabase;
+import common.commandline.response.CommandResult;
+import common.commandline.response.DefaultResponse;
+import common.commandline.response.PeopleDatabaseResponse;
+import common.data.Person;
+
+import java.util.Collections;
+import java.util.Optional;
+
+public enum Executables {
+ ADD(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ Person person = (Person) args[1];
+ boolean success = peopleDatabase.getCollection().add(person);
+ return new CommandResult(null, success ? DefaultResponse.OK : PeopleDatabaseResponse.FAILED_TO_ADD);
+ }),
+ ADD_IF_MAX(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ Person person = (Person) args[1];
+ Person last = peopleDatabase.getCollection().last();
+ if (person.compareTo(last) > 0) return ADD.executable.execute(args);
+ return new CommandResult(null, PeopleDatabaseResponse.FAILED_TO_ADD);
+ }),
+ ADD_IF_MIN(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ Person person = (Person) args[1];
+ Person first = peopleDatabase.getCollection().first();
+ if (person.compareTo(first) < 0) return ADD.executable.execute(args);
+ return new CommandResult(null, PeopleDatabaseResponse.FAILED_TO_ADD);
+ }),
+ CLEAR(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ peopleDatabase.getCollection().clear();
+ return new CommandResult(null, DefaultResponse.OK);
+ }),
+ FILTER_CONTAINS_NAME(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ String name = (String) args[1];
+ StringBuilder result = new StringBuilder("Список людей, в имени которых содержится " + name + ":\n");
+ peopleDatabase.getCollection()
+ .stream()
+ .filter(p -> p.getName().contains(name))
+ .forEach(p -> result.append(p.formatted()).append("\n"));
+ return new CommandResult(result.toString(), DefaultResponse.OK);
+ }),
+ INFO(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ return new CommandResult(peopleDatabase.info(), DefaultResponse.OK);
+ }),
+ PRINT_FIELD_DESCENDING_LOCATION(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ StringBuilder result = new StringBuilder("Список локаций в порядке убывания:\n");
+ peopleDatabase.getCollection()
+ .stream()
+ .map(Person::getLocation)
+ .sorted(Collections.reverseOrder())
+ .forEach(loc -> result.append(loc).append("\n"));
+ return new CommandResult(result.toString(), DefaultResponse.OK);
+ }),
+ REMOVE_BY_ID(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ long id = (long) args[1];
+ boolean success = peopleDatabase.getCollection().removeIf(p -> p.getId().equals(id));
+ return new CommandResult(null, success ? DefaultResponse.OK : PeopleDatabaseResponse.ELEMENT_NOT_FOUND);
+ }),
+ SAVE(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ try {
+ peopleDatabase.save();
+ return new CommandResult(null, DefaultResponse.OK);
+ } catch (Database.DatabaseSaveFailedException e) {
+ return new CommandResult(e.getMessage(), PeopleDatabaseResponse.SAVE_FAILED);
+ }
+ }),
+ SHOW(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ StringBuilder result = new StringBuilder("Элементы коллекции:\n");
+ peopleDatabase.getCollection().forEach(p -> result.append(p.formatted()));
+ return new CommandResult(result.toString(), DefaultResponse.OK);
+ }),
+ SUM_OF_HEIGHT(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ int sum = peopleDatabase.getCollection()
+ .stream()
+ .mapToInt(p -> p.getHeight() == null ? 0 : p.getHeight())
+ .sum();
+ return new CommandResult("Сумма ростов всех людей в коллекции - " + sum, DefaultResponse.OK);
+ }),
+ UPDATE(args -> {
+ PeopleDatabase peopleDatabase = (PeopleDatabase) args[0];
+ long id = (long) args[1];
+ Person person = (Person) args[2];
+ Optional optionalPerson = peopleDatabase.getCollection()
+ .stream()
+ .filter(p -> p.getId().equals(id))
+ .findFirst();
+ if (!optionalPerson.isPresent()) return new CommandResult(null, PeopleDatabaseResponse.ELEMENT_NOT_FOUND);
+ Person oldPerson = optionalPerson.get();
+ CommandResult result = REMOVE_BY_ID.executable.execute(new Object[]{ peopleDatabase, id });
+ if (result.getResponse() != DefaultResponse.OK) return result;
+ oldPerson.update(person);
+ return ADD.executable.execute(new Object[]{ peopleDatabase, oldPerson });
+ });
+
+ private final Executable executable;
+
+ Executables(Executable executable) {
+ this.executable = executable;
+ }
+
+ public Executable getExecutable() {
+ return executable;
+ }
+}
diff --git a/Lab5Core/src/main/java/common/commandline/response/CommandResult.java b/Lab5Core/src/main/java/common/commandline/response/CommandResult.java
new file mode 100644
index 0000000..361fbce
--- /dev/null
+++ b/Lab5Core/src/main/java/common/commandline/response/CommandResult.java
@@ -0,0 +1,22 @@
+package common.commandline.response;
+
+import java.io.Serializable;
+
+public class CommandResult implements Serializable {
+
+ private final String value;
+ private final Response response;
+
+ public CommandResult(String value, Response response) {
+ this.value = value;
+ this.response = response;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public Response getResponse() {
+ return response;
+ }
+}
diff --git a/Lab5Core/src/main/java/common/commandline/response/DefaultResponse.java b/Lab5Core/src/main/java/common/commandline/response/DefaultResponse.java
new file mode 100644
index 0000000..16cb780
--- /dev/null
+++ b/Lab5Core/src/main/java/common/commandline/response/DefaultResponse.java
@@ -0,0 +1,24 @@
+package common.commandline.response;
+
+public enum DefaultResponse implements Response {
+
+ OK("Команда выполнена успешно"),
+ FILE_NOT_FOUND("Файл не был найден"),
+ CLIENT_ONLY("Команда не предназначена для выполнения на сервере"),
+ SERVER_ERROR("Ошибка при связи по сетевому каналу"),
+ CLASS_NOT_FOUND("Класс не найден"),
+ TYPE_ERROR("Получен ответ не того типа"),
+ HOST_NOT_FOUND("Хоста не существует"),
+ UNKNOWN("Неизвестная ошибка");
+
+ private final String msg;
+
+ DefaultResponse(String msg) {
+ this.msg = msg;
+ }
+
+ @Override
+ public String getMsg() {
+ return msg;
+ }
+}
diff --git a/Lab5Core/src/main/java/common/commandline/response/PeopleDatabaseResponse.java b/Lab5Core/src/main/java/common/commandline/response/PeopleDatabaseResponse.java
new file mode 100644
index 0000000..ff0233f
--- /dev/null
+++ b/Lab5Core/src/main/java/common/commandline/response/PeopleDatabaseResponse.java
@@ -0,0 +1,19 @@
+package common.commandline.response;
+
+public enum PeopleDatabaseResponse implements Response {
+
+ ELEMENT_NOT_FOUND("Элемент не был найден"),
+ SAVE_FAILED("Не удалось сохранить коллекцию"),
+ FAILED_TO_ADD("Не удалось добавить элемент в коллекцию");
+
+ private final String msg;
+
+ PeopleDatabaseResponse(String msg) {
+ this.msg = msg;
+ }
+
+ @Override
+ public String getMsg() {
+ return msg;
+ }
+}
diff --git a/Lab5Core/src/main/java/common/commandline/response/Response.java b/Lab5Core/src/main/java/common/commandline/response/Response.java
new file mode 100644
index 0000000..51c2684
--- /dev/null
+++ b/Lab5Core/src/main/java/common/commandline/response/Response.java
@@ -0,0 +1,7 @@
+package common.commandline.response;
+
+import java.io.Serializable;
+
+public interface Response extends Serializable {
+ String getMsg();
+}
diff --git a/Lab5Core/src/main/java/common/data/Color.java b/Lab5Core/src/main/java/common/data/Color.java
new file mode 100644
index 0000000..7c60a04
--- /dev/null
+++ b/Lab5Core/src/main/java/common/data/Color.java
@@ -0,0 +1,12 @@
+package common.data;
+
+import java.io.Serializable;
+
+/**
+ * Перечисление цветов
+ */
+public enum Color implements Serializable {
+ BLACK,
+ ORANGE,
+ BROWN
+}
diff --git a/src/main/java/ru/erius/lab5/data/Coordinates.java b/Lab5Core/src/main/java/common/data/Coordinates.java
similarity index 90%
rename from src/main/java/ru/erius/lab5/data/Coordinates.java
rename to Lab5Core/src/main/java/common/data/Coordinates.java
index 65cd756..96a7b1e 100644
--- a/src/main/java/ru/erius/lab5/data/Coordinates.java
+++ b/Lab5Core/src/main/java/common/data/Coordinates.java
@@ -1,18 +1,19 @@
-package ru.erius.lab5.data;
+package common.data;
import lombok.*;
-import ru.erius.lab5.parser.Adapters;
+import common.parser.Adapters;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import java.io.Serializable;
/**
* Класс данных координат
*/
@Data @EqualsAndHashCode @ToString
@XmlAccessorType(XmlAccessType.FIELD)
-public class Coordinates implements Comparable {
+public class Coordinates implements Comparable, Serializable {
/**
* Координата X типа float
diff --git a/src/main/java/ru/erius/lab5/data/Country.java b/Lab5Core/src/main/java/common/data/Country.java
similarity index 54%
rename from src/main/java/ru/erius/lab5/data/Country.java
rename to Lab5Core/src/main/java/common/data/Country.java
index ecc3322..d888b3c 100644
--- a/src/main/java/ru/erius/lab5/data/Country.java
+++ b/Lab5Core/src/main/java/common/data/Country.java
@@ -1,9 +1,11 @@
-package ru.erius.lab5.data;
+package common.data;
+
+import java.io.Serializable;
/**
* Перечисление стран
*/
-public enum Country {
+public enum Country implements Serializable {
UNITED_KINGDOM,
GERMANY,
CHINA,
diff --git a/src/main/java/ru/erius/lab5/data/Location.java b/Lab5Core/src/main/java/common/data/Location.java
similarity index 94%
rename from src/main/java/ru/erius/lab5/data/Location.java
rename to Lab5Core/src/main/java/common/data/Location.java
index 20d4b28..8fe4119 100644
--- a/src/main/java/ru/erius/lab5/data/Location.java
+++ b/Lab5Core/src/main/java/common/data/Location.java
@@ -1,11 +1,12 @@
-package ru.erius.lab5.data;
+package common.data;
import lombok.*;
-import ru.erius.lab5.parser.Adapters;
+import common.parser.Adapters;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
+import java.io.Serializable;
import java.util.Comparator;
/**
@@ -14,7 +15,7 @@ import java.util.Comparator;
*/
@Data @EqualsAndHashCode @ToString
@XmlAccessorType(XmlAccessType.FIELD)
-public class Location implements Comparable {
+public class Location implements Comparable, Serializable {
/**
* Координата X типа double
*/
diff --git a/src/main/java/ru/erius/lab5/data/Person.java b/Lab5Core/src/main/java/common/data/Person.java
similarity index 98%
rename from src/main/java/ru/erius/lab5/data/Person.java
rename to Lab5Core/src/main/java/common/data/Person.java
index 998cf69..7055dba 100644
--- a/src/main/java/ru/erius/lab5/data/Person.java
+++ b/Lab5Core/src/main/java/common/data/Person.java
@@ -1,13 +1,14 @@
-package ru.erius.lab5.data;
+package common.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;
-import ru.erius.lab5.parser.*;
+import common.parser.Adapters;
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import java.io.Serializable;
import java.time.LocalDate;
import java.util.*;
@@ -18,7 +19,7 @@ import java.util.*;
@Data @EqualsAndHashCode @ToString
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
-public class Person implements Comparable {
+public class Person implements Comparable, Serializable {
/**
* Количество созданных людей, используется для задания
* уникального id для каждого объекта данного класса
diff --git a/src/main/java/ru/erius/lab5/parser/Adapters.java b/Lab5Core/src/main/java/common/parser/Adapters.java
similarity index 96%
rename from src/main/java/ru/erius/lab5/parser/Adapters.java
rename to Lab5Core/src/main/java/common/parser/Adapters.java
index 3f4e455..4ab80e1 100644
--- a/src/main/java/ru/erius/lab5/parser/Adapters.java
+++ b/Lab5Core/src/main/java/common/parser/Adapters.java
@@ -1,10 +1,10 @@
-package ru.erius.lab5.parser;
+package common.parser;
-import ru.erius.lab5.data.Color;
-import ru.erius.lab5.data.Coordinates;
-import ru.erius.lab5.data.Country;
-import ru.erius.lab5.data.Location;
-import ru.erius.lab5.util.UtilFunctions;
+import common.data.Color;
+import common.data.Coordinates;
+import common.data.Country;
+import common.data.Location;
+import common.util.UtilFunctions;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.time.LocalDate;
diff --git a/Lab5Core/src/main/java/common/parser/ConnectionProperties.java b/Lab5Core/src/main/java/common/parser/ConnectionProperties.java
new file mode 100644
index 0000000..3ecddb5
--- /dev/null
+++ b/Lab5Core/src/main/java/common/parser/ConnectionProperties.java
@@ -0,0 +1,61 @@
+package common.parser;
+
+import common.util.UtilFunctions;
+
+import java.io.*;
+import java.util.Properties;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+
+public final class ConnectionProperties {
+
+ private final static Properties properties = new Properties();
+ private static final Logger logger = Logger.getLogger("Lab5");
+
+ static {
+ File file = new File("connection.properties");
+ try {
+ if (file.exists()) {
+ logger.info("Файл найден, загружаем настройки подключения...");
+ }
+ else {
+ logger.warning("Файл не найден, создание файла " + file.getName());
+ BufferedReader reader = new BufferedReader(new InputStreamReader(ConnectionProperties.class.getClassLoader().getResource("connection.properties").openStream()));
+ String content = reader.lines().collect(Collectors.joining("\n"));
+ file.createNewFile();
+ BufferedWriter writer = new BufferedWriter(new FileWriter(file));
+ writer.write(content);
+ writer.close();
+ reader.close();
+ logger.info("Файл создан, загружаем настройки подключения");
+ }
+ properties.load(new FileInputStream(file));
+ logger.info("Настройки подключения загружены из файла " + file.getName());
+ } catch (IOException e) {
+ e.printStackTrace();
+ System.exit(-1);
+ }
+ }
+
+ public static String getHostname() {
+ String result = properties.getProperty("hostname");
+ if (result == null) {
+ logger.severe("Свойство hostname не было найдено, используем значение по умолчанию localhost");
+ return "localhost";
+ } else return result;
+ }
+
+ public static int getPort() {
+ String resultStr = properties.getProperty("port");
+ if (resultStr == null) {
+ logger.severe("Свойство port не было найден, используем значение по умолчанию 1234");
+ return 1234;
+ }
+ Integer result = UtilFunctions.intOrNull(resultStr);
+ if (result == null) {
+ logger.severe("Порт должен быть целым числом, используем значение по умолчанию 1234");
+ return 1234;
+ }
+ return result;
+ }
+}
diff --git a/src/main/java/ru/erius/lab5/util/UtilFunctions.java b/Lab5Core/src/main/java/common/util/UtilFunctions.java
similarity index 98%
rename from src/main/java/ru/erius/lab5/util/UtilFunctions.java
rename to Lab5Core/src/main/java/common/util/UtilFunctions.java
index 0fd7c47..971b5fe 100644
--- a/src/main/java/ru/erius/lab5/util/UtilFunctions.java
+++ b/Lab5Core/src/main/java/common/util/UtilFunctions.java
@@ -1,4 +1,4 @@
-package ru.erius.lab5.util;
+package common.util;
/**
* Класс функций-утилит для избавления от повторяющихся участков кода и выноса их в методы для общего пользования
diff --git a/Lab5Core/src/main/resources/connection.properties b/Lab5Core/src/main/resources/connection.properties
new file mode 100644
index 0000000..a1e7224
--- /dev/null
+++ b/Lab5Core/src/main/resources/connection.properties
@@ -0,0 +1,2 @@
+hostname=localhost
+port=1234
diff --git a/Lab5Server/build.gradle.kts b/Lab5Server/build.gradle.kts
new file mode 100644
index 0000000..4f26dce
--- /dev/null
+++ b/Lab5Server/build.gradle.kts
@@ -0,0 +1,40 @@
+plugins {
+ java
+ id("com.github.johnrengelman.shadow") version("7.1.2")
+}
+
+group = "ru.erius.lab5"
+version = "2.0"
+val mainClass = "server.Lab5Server"
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
+ testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
+ implementation(project(":Lab5Core"))
+}
+
+tasks.getByName("test") {
+ useJUnitPlatform()
+}
+
+tasks.compileJava {
+ options.encoding = "UTF-8"
+}
+
+tasks.javadoc {
+ options.encoding = "UTF-8"
+}
+
+tasks.shadowJar {
+ archiveClassifier.set("")
+ manifest {
+ attributes(
+ "Manifest-Version" to "1.0",
+ "Main-Class" to mainClass
+ )
+ }
+}
diff --git a/Lab5Server/build/classes/java/main/server/Lab5Server.class b/Lab5Server/build/classes/java/main/server/Lab5Server.class
new file mode 100644
index 0000000..8dbd6ee
Binary files /dev/null and b/Lab5Server/build/classes/java/main/server/Lab5Server.class differ
diff --git a/Lab5Server/build/classes/java/main/server/net/UDPServer.class b/Lab5Server/build/classes/java/main/server/net/UDPServer.class
new file mode 100644
index 0000000..1b41531
Binary files /dev/null and b/Lab5Server/build/classes/java/main/server/net/UDPServer.class differ
diff --git a/Lab5Server/build/docs/javadoc/allclasses-frame.html b/Lab5Server/build/docs/javadoc/allclasses-frame.html
new file mode 100644
index 0000000..e44ed3e
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/allclasses-frame.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+All Classes (Lab5Server 2.0 API)
+
+
+
+
+All Classes
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/allclasses-noframe.html b/Lab5Server/build/docs/javadoc/allclasses-noframe.html
new file mode 100644
index 0000000..6446e9a
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/allclasses-noframe.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+All Classes (Lab5Server 2.0 API)
+
+
+
+
+All Classes
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/constant-values.html b/Lab5Server/build/docs/javadoc/constant-values.html
new file mode 100644
index 0000000..320c4b7
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/constant-values.html
@@ -0,0 +1,121 @@
+
+
+
+
+
+Constant Field Values (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/deprecated-list.html b/Lab5Server/build/docs/javadoc/deprecated-list.html
new file mode 100644
index 0000000..e8f69c9
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/deprecated-list.html
@@ -0,0 +1,121 @@
+
+
+
+
+
+Deprecated List (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/help-doc.html b/Lab5Server/build/docs/javadoc/help-doc.html
new file mode 100644
index 0000000..11f49fd
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/help-doc.html
@@ -0,0 +1,222 @@
+
+
+
+
+
+API Help (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+Overview
+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+
+
+Package
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+
+Interfaces (italic)
+Classes
+Enums
+Exceptions
+Errors
+Annotation Types
+
+
+
+Class/Interface
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+Class inheritance diagram
+Direct Subclasses
+All Known Subinterfaces
+All Known Implementing Classes
+Class/interface declaration
+Class/interface description
+
+
+Nested Class Summary
+Field Summary
+Constructor Summary
+Method Summary
+
+
+Field Detail
+Constructor Detail
+Method Detail
+
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+Annotation Type
+Each annotation type has its own separate page with the following sections:
+
+Annotation Type declaration
+Annotation Type description
+Required Element Summary
+Optional Element Summary
+Element Detail
+
+
+
+Enum
+Each enum has its own separate page with the following sections:
+
+Enum declaration
+Enum description
+Enum Constant Summary
+Enum Constant Detail
+
+
+
+Tree (Class Hierarchy)
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
+
+When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
+When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+
+
+
+Deprecated API
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+
+
+Index
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+
+
+Prev/Next
+These links take you to the next or previous class, interface, package, or related page.
+
+
+Frames/No Frames
+These links show and hide the HTML frames. All pages are available with or without frames.
+
+
+All Classes
+The All Classes link shows all classes and interfaces except non-static nested types.
+
+
+Serialized Form
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+
+
+Constant Field Values
+The Constant Field Values page lists the static final fields and their values.
+
+
+
This help file applies to API documentation generated using the standard doclet.
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/index-all.html b/Lab5Server/build/docs/javadoc/index-all.html
new file mode 100644
index 0000000..e10f561
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/index-all.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+Index (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+C D L M R S U
+
+
+
C
+
+connect() - Method in class server.net.UDPServer
+
+
+
+
+
+
D
+
+disconnect() - Method in class server.net.UDPServer
+
+
+
+
+
+
L
+
+Lab5Server - Class in server
+
+Lab5Server() - Constructor for class server.Lab5Server
+
+logger - Static variable in class server.Lab5Server
+
+
+
+
+
+
M
+
+main(String[]) - Static method in class server.Lab5Server
+
+
+
+
+
+
R
+
+receive(PeopleDatabase) - Method in class server.net.UDPServer
+
+
+
+
+
+
S
+
+send(CommandResult, InetAddress, int) - Method in class server.net.UDPServer
+
+server - package server
+
+server.net - package server.net
+
+
+
+
+
+
U
+
+UDPServer - Class in server.net
+
+UDPServer(int, Logger) - Constructor for class server.net.UDPServer
+
+UDPServer(String, int, Logger) - Constructor for class server.net.UDPServer
+
+
+
C D L M R S U
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/index.html b/Lab5Server/build/docs/javadoc/index.html
new file mode 100644
index 0000000..83c8a99
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/index.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+Lab5Server 2.0 API
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+Frame Alert
+This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version .
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/overview-frame.html b/Lab5Server/build/docs/javadoc/overview-frame.html
new file mode 100644
index 0000000..9b124f9
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/overview-frame.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+Overview List (Lab5Server 2.0 API)
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/overview-summary.html b/Lab5Server/build/docs/javadoc/overview-summary.html
new file mode 100644
index 0000000..a7b567b
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/overview-summary.html
@@ -0,0 +1,139 @@
+
+
+
+
+
+Overview (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/overview-tree.html b/Lab5Server/build/docs/javadoc/overview-tree.html
new file mode 100644
index 0000000..aa3892e
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/overview-tree.html
@@ -0,0 +1,136 @@
+
+
+
+
+
+Class Hierarchy (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/package-list b/Lab5Server/build/docs/javadoc/package-list
new file mode 100644
index 0000000..0941dd7
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/package-list
@@ -0,0 +1,2 @@
+server
+server.net
diff --git a/Lab5Server/build/docs/javadoc/script.js b/Lab5Server/build/docs/javadoc/script.js
new file mode 100644
index 0000000..b346356
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/script.js
@@ -0,0 +1,30 @@
+function show(type)
+{
+ count = 0;
+ for (var key in methods) {
+ var row = document.getElementById(key);
+ if ((methods[key] & type) != 0) {
+ row.style.display = '';
+ row.className = (count++ % 2) ? rowColor : altColor;
+ }
+ else
+ row.style.display = 'none';
+ }
+ updateTabs(type);
+}
+
+function updateTabs(type)
+{
+ for (var value in tabs) {
+ var sNode = document.getElementById(tabs[value][0]);
+ var spanNode = sNode.firstChild;
+ if (value == type) {
+ sNode.className = activeTableTab;
+ spanNode.innerHTML = tabs[value][1];
+ }
+ else {
+ sNode.className = tableTab;
+ spanNode.innerHTML = "" + tabs[value][1] + " ";
+ }
+ }
+}
diff --git a/Lab5Server/build/docs/javadoc/server/Lab5Server.html b/Lab5Server/build/docs/javadoc/server/Lab5Server.html
new file mode 100644
index 0000000..d4c6a52
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/server/Lab5Server.html
@@ -0,0 +1,304 @@
+
+
+
+
+
+Lab5Server (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+Prev Class
+Next Class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+Field Summary
+
+Fields
+
+Modifier and Type
+Field and Description
+
+
+static java.util.logging.Logger
+logger
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+Lab5Server ()
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Field Detail
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+Lab5Server
+public Lab5Server()
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Prev Class
+Next Class
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/server/net/UDPServer.html b/Lab5Server/build/docs/javadoc/server/net/UDPServer.html
new file mode 100644
index 0000000..da32c41
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/server/net/UDPServer.html
@@ -0,0 +1,329 @@
+
+
+
+
+
+UDPServer (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+Prev Class
+Next Class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+java.lang.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+Constructors
+
+Constructor and Description
+
+
+UDPServer (int port,
+ java.util.logging.Logger logger)
+
+
+UDPServer (java.lang.String hostname,
+ int port,
+ java.util.logging.Logger logger)
+
+
+
+
+
+
+
+
+
+Method Summary
+
+All Methods Instance Methods Concrete Methods
+
+Modifier and Type
+Method and Description
+
+
+boolean
+connect ()
+
+
+void
+disconnect ()
+
+
+void
+receive (common.collection.PeopleDatabase peopleDatabase)
+
+
+void
+send (common.commandline.response.CommandResult result,
+ java.net.InetAddress address,
+ int port)
+
+
+
+
+
+
+Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+connect
+public boolean connect()
+
+
+
+
+
+
+
+disconnect
+public void disconnect()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Prev Class
+Next Class
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/server/net/package-frame.html b/Lab5Server/build/docs/javadoc/server/net/package-frame.html
new file mode 100644
index 0000000..80ae5bb
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/server/net/package-frame.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+server.net (Lab5Server 2.0 API)
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/server/net/package-summary.html b/Lab5Server/build/docs/javadoc/server/net/package-summary.html
new file mode 100644
index 0000000..c4433f5
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/server/net/package-summary.html
@@ -0,0 +1,139 @@
+
+
+
+
+
+server.net (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+Class Summary
+
+Class
+Description
+
+
+
+UDPServer
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/server/net/package-tree.html b/Lab5Server/build/docs/javadoc/server/net/package-tree.html
new file mode 100644
index 0000000..ea27878
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/server/net/package-tree.html
@@ -0,0 +1,134 @@
+
+
+
+
+
+server.net Class Hierarchy (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/server/package-frame.html b/Lab5Server/build/docs/javadoc/server/package-frame.html
new file mode 100644
index 0000000..13a4e8c
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/server/package-frame.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+server (Lab5Server 2.0 API)
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/server/package-summary.html b/Lab5Server/build/docs/javadoc/server/package-summary.html
new file mode 100644
index 0000000..65b6641
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/server/package-summary.html
@@ -0,0 +1,139 @@
+
+
+
+
+
+server (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+Class Summary
+
+Class
+Description
+
+
+
+Lab5Server
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/server/package-tree.html b/Lab5Server/build/docs/javadoc/server/package-tree.html
new file mode 100644
index 0000000..644dc45
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/server/package-tree.html
@@ -0,0 +1,134 @@
+
+
+
+
+
+server Class Hierarchy (Lab5Server 2.0 API)
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lab5Server/build/docs/javadoc/stylesheet.css b/Lab5Server/build/docs/javadoc/stylesheet.css
new file mode 100644
index 0000000..98055b2
--- /dev/null
+++ b/Lab5Server/build/docs/javadoc/stylesheet.css
@@ -0,0 +1,574 @@
+/* Javadoc style sheet */
+/*
+Overall document style
+*/
+
+@import url('resources/fonts/dejavu.css');
+
+body {
+ background-color:#ffffff;
+ color:#353833;
+ font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
+ font-size:14px;
+ margin:0;
+}
+a:link, a:visited {
+ text-decoration:none;
+ color:#4A6782;
+}
+a:hover, a:focus {
+ text-decoration:none;
+ color:#bb7a2a;
+}
+a:active {
+ text-decoration:none;
+ color:#4A6782;
+}
+a[name] {
+ color:#353833;
+}
+a[name]:hover {
+ text-decoration:none;
+ color:#353833;
+}
+pre {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+}
+h1 {
+ font-size:20px;
+}
+h2 {
+ font-size:18px;
+}
+h3 {
+ font-size:16px;
+ font-style:italic;
+}
+h4 {
+ font-size:13px;
+}
+h5 {
+ font-size:12px;
+}
+h6 {
+ font-size:11px;
+}
+ul {
+ list-style-type:disc;
+}
+code, tt {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ padding-top:4px;
+ margin-top:8px;
+ line-height:1.4em;
+}
+dt code {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ padding-top:4px;
+}
+table tr td dt code {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ vertical-align:top;
+ padding-top:4px;
+}
+sup {
+ font-size:8px;
+}
+/*
+Document title and Copyright styles
+*/
+.clear {
+ clear:both;
+ height:0px;
+ overflow:hidden;
+}
+.aboutLanguage {
+ float:right;
+ padding:0px 21px;
+ font-size:11px;
+ z-index:200;
+ margin-top:-9px;
+}
+.legalCopy {
+ margin-left:.5em;
+}
+.bar a, .bar a:link, .bar a:visited, .bar a:active {
+ color:#FFFFFF;
+ text-decoration:none;
+}
+.bar a:hover, .bar a:focus {
+ color:#bb7a2a;
+}
+.tab {
+ background-color:#0066FF;
+ color:#ffffff;
+ padding:8px;
+ width:5em;
+ font-weight:bold;
+}
+/*
+Navigation bar styles
+*/
+.bar {
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ padding:.8em .5em .4em .8em;
+ height:auto;/*height:1.8em;*/
+ font-size:11px;
+ margin:0;
+}
+.topNav {
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ float:left;
+ padding:0;
+ width:100%;
+ clear:right;
+ height:2.8em;
+ padding-top:10px;
+ overflow:hidden;
+ font-size:12px;
+}
+.bottomNav {
+ margin-top:10px;
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ float:left;
+ padding:0;
+ width:100%;
+ clear:right;
+ height:2.8em;
+ padding-top:10px;
+ overflow:hidden;
+ font-size:12px;
+}
+.subNav {
+ background-color:#dee3e9;
+ float:left;
+ width:100%;
+ overflow:hidden;
+ font-size:12px;
+}
+.subNav div {
+ clear:left;
+ float:left;
+ padding:0 0 5px 6px;
+ text-transform:uppercase;
+}
+ul.navList, ul.subNavList {
+ float:left;
+ margin:0 25px 0 0;
+ padding:0;
+}
+ul.navList li{
+ list-style:none;
+ float:left;
+ padding: 5px 6px;
+ text-transform:uppercase;
+}
+ul.subNavList li{
+ list-style:none;
+ float:left;
+}
+.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
+ color:#FFFFFF;
+ text-decoration:none;
+ text-transform:uppercase;
+}
+.topNav a:hover, .bottomNav a:hover {
+ text-decoration:none;
+ color:#bb7a2a;
+ text-transform:uppercase;
+}
+.navBarCell1Rev {
+ background-color:#F8981D;
+ color:#253441;
+ margin: auto 5px;
+}
+.skipNav {
+ position:absolute;
+ top:auto;
+ left:-9999px;
+ overflow:hidden;
+}
+/*
+Page header and footer styles
+*/
+.header, .footer {
+ clear:both;
+ margin:0 20px;
+ padding:5px 0 0 0;
+}
+.indexHeader {
+ margin:10px;
+ position:relative;
+}
+.indexHeader span{
+ margin-right:15px;
+}
+.indexHeader h1 {
+ font-size:13px;
+}
+.title {
+ color:#2c4557;
+ margin:10px 0;
+}
+.subTitle {
+ margin:5px 0 0 0;
+}
+.header ul {
+ margin:0 0 15px 0;
+ padding:0;
+}
+.footer ul {
+ margin:20px 0 5px 0;
+}
+.header ul li, .footer ul li {
+ list-style:none;
+ font-size:13px;
+}
+/*
+Heading styles
+*/
+div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
+ background-color:#dee3e9;
+ border:1px solid #d0d9e0;
+ margin:0 0 6px -8px;
+ padding:7px 5px;
+}
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+ background-color:#dee3e9;
+ border:1px solid #d0d9e0;
+ margin:0 0 6px -8px;
+ padding:7px 5px;
+}
+ul.blockList ul.blockList li.blockList h3 {
+ padding:0;
+ margin:15px 0;
+}
+ul.blockList li.blockList h2 {
+ padding:0px 0 20px 0;
+}
+/*
+Page layout container styles
+*/
+.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
+ clear:both;
+ padding:10px 20px;
+ position:relative;
+}
+.indexContainer {
+ margin:10px;
+ position:relative;
+ font-size:12px;
+}
+.indexContainer h2 {
+ font-size:13px;
+ padding:0 0 3px 0;
+}
+.indexContainer ul {
+ margin:0;
+ padding:0;
+}
+.indexContainer ul li {
+ list-style:none;
+ padding-top:2px;
+}
+.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
+ font-size:12px;
+ font-weight:bold;
+ margin:10px 0 0 0;
+ color:#4E4E4E;
+}
+.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
+ margin:5px 0 10px 0px;
+ font-size:14px;
+ font-family:'DejaVu Sans Mono',monospace;
+}
+.serializedFormContainer dl.nameValue dt {
+ margin-left:1px;
+ font-size:1.1em;
+ display:inline;
+ font-weight:bold;
+}
+.serializedFormContainer dl.nameValue dd {
+ margin:0 0 0 1px;
+ font-size:1.1em;
+ display:inline;
+}
+/*
+List styles
+*/
+ul.horizontal li {
+ display:inline;
+ font-size:0.9em;
+}
+ul.inheritance {
+ margin:0;
+ padding:0;
+}
+ul.inheritance li {
+ display:inline;
+ list-style:none;
+}
+ul.inheritance li ul.inheritance {
+ margin-left:15px;
+ padding-left:15px;
+ padding-top:1px;
+}
+ul.blockList, ul.blockListLast {
+ margin:10px 0 10px 0;
+ padding:0;
+}
+ul.blockList li.blockList, ul.blockListLast li.blockList {
+ list-style:none;
+ margin-bottom:15px;
+ line-height:1.4;
+}
+ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
+ padding:0px 20px 5px 10px;
+ border:1px solid #ededed;
+ background-color:#f8f8f8;
+}
+ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
+ padding:0 0 5px 8px;
+ background-color:#ffffff;
+ border:none;
+}
+ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
+ margin-left:0;
+ padding-left:0;
+ padding-bottom:15px;
+ border:none;
+}
+ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
+ list-style:none;
+ border-bottom:none;
+ padding-bottom:0;
+}
+table tr td dl, table tr td dl dt, table tr td dl dd {
+ margin-top:0;
+ margin-bottom:1px;
+}
+/*
+Table styles
+*/
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
+ width:100%;
+ border-left:1px solid #EEE;
+ border-right:1px solid #EEE;
+ border-bottom:1px solid #EEE;
+}
+.overviewSummary, .memberSummary {
+ padding:0px;
+}
+.overviewSummary caption, .memberSummary caption, .typeSummary caption,
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
+ position:relative;
+ text-align:left;
+ background-repeat:no-repeat;
+ color:#253441;
+ font-weight:bold;
+ clear:none;
+ overflow:hidden;
+ padding:0px;
+ padding-top:10px;
+ padding-left:1px;
+ margin:0px;
+ white-space:pre;
+}
+.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
+.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
+.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
+.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
+.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
+ color:#FFFFFF;
+}
+.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ padding-bottom:7px;
+ display:inline-block;
+ float:left;
+ background-color:#F8981D;
+ border: none;
+ height:16px;
+}
+.memberSummary caption span.activeTableTab span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ margin-right:3px;
+ display:inline-block;
+ float:left;
+ background-color:#F8981D;
+ height:16px;
+}
+.memberSummary caption span.tableTab span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ margin-right:3px;
+ display:inline-block;
+ float:left;
+ background-color:#4D7A97;
+ height:16px;
+}
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
+ padding-top:0px;
+ padding-left:0px;
+ padding-right:0px;
+ background-image:none;
+ float:none;
+ display:inline;
+}
+.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
+ display:none;
+ width:5px;
+ position:relative;
+ float:left;
+ background-color:#F8981D;
+}
+.memberSummary .activeTableTab .tabEnd {
+ display:none;
+ width:5px;
+ margin-right:3px;
+ position:relative;
+ float:left;
+ background-color:#F8981D;
+}
+.memberSummary .tableTab .tabEnd {
+ display:none;
+ width:5px;
+ margin-right:3px;
+ position:relative;
+ background-color:#4D7A97;
+ float:left;
+
+}
+.overviewSummary td, .memberSummary td, .typeSummary td,
+.useSummary td, .constantsSummary td, .deprecatedSummary td {
+ text-align:left;
+ padding:0px 0px 12px 10px;
+}
+th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
+td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
+ vertical-align:top;
+ padding-right:0px;
+ padding-top:8px;
+ padding-bottom:3px;
+}
+th.colFirst, th.colLast, th.colOne, .constantsSummary th {
+ background:#dee3e9;
+ text-align:left;
+ padding:8px 3px 3px 7px;
+}
+td.colFirst, th.colFirst {
+ white-space:nowrap;
+ font-size:13px;
+}
+td.colLast, th.colLast {
+ font-size:13px;
+}
+td.colOne, th.colOne {
+ font-size:13px;
+}
+.overviewSummary td.colFirst, .overviewSummary th.colFirst,
+.useSummary td.colFirst, .useSummary th.colFirst,
+.overviewSummary td.colOne, .overviewSummary th.colOne,
+.memberSummary td.colFirst, .memberSummary th.colFirst,
+.memberSummary td.colOne, .memberSummary th.colOne,
+.typeSummary td.colFirst{
+ width:25%;
+ vertical-align:top;
+}
+td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
+ font-weight:bold;
+}
+.tableSubHeadingColor {
+ background-color:#EEEEFF;
+}
+.altColor {
+ background-color:#FFFFFF;
+}
+.rowColor {
+ background-color:#EEEEEF;
+}
+/*
+Content styles
+*/
+.description pre {
+ margin-top:0;
+}
+.deprecatedContent {
+ margin:0;
+ padding:10px 0;
+}
+.docSummary {
+ padding:0;
+}
+
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+ font-style:normal;
+}
+
+div.block {
+ font-size:14px;
+ font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
+}
+
+td.colLast div {
+ padding-top:0px;
+}
+
+
+td.colLast a {
+ padding-bottom:3px;
+}
+/*
+Formatting effect styles
+*/
+.sourceLineNo {
+ color:green;
+ padding:0 30px 0 0;
+}
+h1.hidden {
+ visibility:hidden;
+ overflow:hidden;
+ font-size:10px;
+}
+.block {
+ display:block;
+ margin:3px 10px 2px 0px;
+ color:#474747;
+}
+.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
+.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
+.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
+ font-weight:bold;
+}
+.deprecationComment, .emphasizedPhrase, .interfaceName {
+ font-style:italic;
+}
+
+div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
+div.block div.block span.interfaceName {
+ font-style:normal;
+}
+
+div.contentContainer ul.blockList li.blockList h2{
+ padding-bottom:0px;
+}
diff --git a/Lab5Server/build/libs/Lab5Server-2.0.jar b/Lab5Server/build/libs/Lab5Server-2.0.jar
new file mode 100644
index 0000000..9d96d09
Binary files /dev/null and b/Lab5Server/build/libs/Lab5Server-2.0.jar differ
diff --git a/Lab5Server/build/libs/connection.properties b/Lab5Server/build/libs/connection.properties
new file mode 100644
index 0000000..f5630d4
--- /dev/null
+++ b/Lab5Server/build/libs/connection.properties
@@ -0,0 +1,2 @@
+hostname=localhost
+port=1234
\ No newline at end of file
diff --git a/Lab5Server/build/libs/lab5.xml b/Lab5Server/build/libs/lab5.xml
new file mode 100644
index 0000000..e69de29
diff --git a/Lab5Server/build/tmp/compileJava/previous-compilation-data.bin b/Lab5Server/build/tmp/compileJava/previous-compilation-data.bin
new file mode 100644
index 0000000..fd05344
Binary files /dev/null and b/Lab5Server/build/tmp/compileJava/previous-compilation-data.bin differ
diff --git a/Lab5Server/build/tmp/jar/MANIFEST.MF b/Lab5Server/build/tmp/jar/MANIFEST.MF
new file mode 100644
index 0000000..3c951fd
--- /dev/null
+++ b/Lab5Server/build/tmp/jar/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: client.Lab5Server
+
diff --git a/Lab5Server/build/tmp/javadoc/javadoc.options b/Lab5Server/build/tmp/javadoc/javadoc.options
new file mode 100644
index 0000000..91a1614
--- /dev/null
+++ b/Lab5Server/build/tmp/javadoc/javadoc.options
@@ -0,0 +1,9 @@
+-classpath 'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Server\\build\\classes\\java\\main;C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Server\\build\\resources\\main;C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Core\\build\\libs\\Lab5Core-2.0.jar'
+-d 'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Server\\build\\docs\\javadoc'
+-doctitle 'Lab5Server 2.0 API'
+-encoding 'UTF-8'
+-notimestamp
+-quiet
+-windowtitle 'Lab5Server 2.0 API'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Server\\src\\main\\java\\server\\Lab5Server.java'
+'C:\\Users\\egor\\IdeaProjects\\Lab5\\Lab5Server\\src\\main\\java\\server\\net\\UDPServer.java'
diff --git a/Lab5Server/build/tmp/shadowJar/MANIFEST.MF b/Lab5Server/build/tmp/shadowJar/MANIFEST.MF
new file mode 100644
index 0000000..6f371b5
--- /dev/null
+++ b/Lab5Server/build/tmp/shadowJar/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: server.Lab5Server
+
diff --git a/Lab5Server/src/main/java/server/Lab5Server.java b/Lab5Server/src/main/java/server/Lab5Server.java
new file mode 100644
index 0000000..638e203
--- /dev/null
+++ b/Lab5Server/src/main/java/server/Lab5Server.java
@@ -0,0 +1,27 @@
+package server;
+
+import common.collection.Database;
+import common.collection.PeopleDatabase;
+import common.parser.ConnectionProperties;
+import server.net.UDPServer;
+
+import java.util.logging.Logger;
+
+public class Lab5Server {
+
+ public final static Logger logger = Logger.getLogger("Lab5Server");
+
+ public static void main(String[] args) {
+ PeopleDatabase peopleDatabase = new PeopleDatabase(logger);
+ try {
+ peopleDatabase.load();
+ } catch (Database.DatabaseLoadFailedException e) {
+ System.out.println(e.getMessage());
+ System.exit(-1);
+ }
+ UDPServer udp = new UDPServer(ConnectionProperties.getHostname(), ConnectionProperties.getPort(), logger);
+ if (!udp.connect()) System.exit(-1);
+ while (true)
+ udp.receive(peopleDatabase);
+ }
+}
diff --git a/Lab5Server/src/main/java/server/net/UDPServer.java b/Lab5Server/src/main/java/server/net/UDPServer.java
new file mode 100644
index 0000000..ee09deb
--- /dev/null
+++ b/Lab5Server/src/main/java/server/net/UDPServer.java
@@ -0,0 +1,96 @@
+package server.net;
+
+import common.collection.PeopleDatabase;
+import common.commandline.Executable;
+import common.commandline.response.CommandResult;
+import common.commandline.response.DefaultResponse;
+
+import java.io.*;
+import java.net.*;
+import java.util.logging.Logger;
+
+public class UDPServer {
+
+ private String hostname;
+ private final int port;
+ private DatagramSocket socket;
+ private final Logger logger;
+
+ public UDPServer(int port, Logger logger) {
+ this.port = port;
+ this.logger = logger;
+ }
+
+ public UDPServer(String hostname, int port, Logger logger) {
+ this.hostname = hostname;
+ this.port = port;
+ this.logger = logger;
+ }
+
+ public boolean connect() {
+ logger.info("Подключаемся...");
+ try {
+ InetAddress address = hostname == null ? InetAddress.getLocalHost() : InetAddress.getByName(hostname);
+ socket = new DatagramSocket(port);
+ logger.info("Подключение установлено");
+ return true;
+ } catch (UnknownHostException e) {
+ logger.severe("Хост не найден");
+ return false;
+ } catch (SocketException e) {
+ logger.severe("Не удалось открыть сокет");
+ return false;
+ }
+ }
+
+ public void disconnect() {
+ logger.info("Разрываем соединение...");
+ socket.close();
+ logger.info("Соединение разорвано");
+ }
+
+ public void send(CommandResult result, InetAddress address, int port) {
+ byte[] buffer;
+ try (
+ ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
+ ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteOutputStream)
+ ) {
+ objectOutputStream.writeObject(result);
+ buffer = byteOutputStream.toByteArray();
+ DatagramPacket request = new DatagramPacket(buffer, buffer.length, address, port);
+ socket.send(request);
+ } catch (IOException e) {
+ logger.severe("Не удалось отправить данные клиенту, неполадки в соединении");
+ }
+ logger.info("Результат отправлен клиенту");
+ }
+
+ public void receive(PeopleDatabase peopleDatabase) {
+ logger.info("Ожидаем отправки данных от клиента...");
+ byte[] buffer = new byte[65535];
+ DatagramPacket request = new DatagramPacket(buffer, buffer.length);
+ CommandResult result;
+ try (ByteArrayInputStream byteInputStream = new ByteArrayInputStream(buffer)) {
+ socket.receive(request);
+ logger.info("Данные получены, выполняем команду...");
+ ObjectInputStream objectInputStream = new ObjectInputStream(byteInputStream);
+ Executable command = (Executable) objectInputStream.readObject();
+ Object[] args = (Object[]) objectInputStream.readObject();
+ objectInputStream.close();
+ if (args[0] == null) args[0] = peopleDatabase;
+ result = command.execute(args);
+ } catch (IOException e) {
+ logger.info("Не удалось преобразовать полученные данные, данные были повреждены во время передачи");
+ result = new CommandResult(null, DefaultResponse.SERVER_ERROR);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ logger.info("Не удалось преобразовать полученные данные, классов полученных объектов не существует");
+ result = new CommandResult(null, DefaultResponse.CLASS_NOT_FOUND);
+ } catch (ClassCastException e) {
+ logger.info("Не удалось преобразовать полученные данные, ожидались объекты другого типа");
+ result = new CommandResult(null, DefaultResponse.TYPE_ERROR);
+ }
+ logger.info("Команда выполнена, отправляем результат клиенту...");
+ send(result, request.getAddress(), request.getPort());
+ }
+}
diff --git a/build.gradle.kts b/build.gradle.kts
index 16db861..550180a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -2,9 +2,8 @@ plugins {
java
}
-group = "ru.erius"
-version = "1.2"
-val mainClass = "$group.${name.toLowerCase()}.$name"
+group = "ru.erius.lab5"
+version = "2.0"
repositories {
mavenCentral()
@@ -13,8 +12,6 @@ repositories {
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
- compileOnly("org.projectlombok:lombok:1.18.22")
- annotationProcessor("org.projectlombok:lombok:1.18.22")
}
tasks.getByName("test") {
@@ -22,18 +19,9 @@ tasks.getByName("test") {
}
tasks.compileJava {
- options.encoding = "UTF-8"
+ options.encoding = "windows-1252"
}
tasks.javadoc {
options.encoding = "UTF-8"
}
-
-tasks.jar {
- manifest {
- attributes(
- "Manifest-Version" to "1.0",
- "Main-Class" to mainClass
- )
- }
-}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..005e033
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1 @@
+org.gradle.jvmargs=-Dfile.encoding=UTF-8
diff --git a/lab5.xml b/lab5.xml
new file mode 100644
index 0000000..e69de29
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 83cd3e8..99106f6 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -1,2 +1,2 @@
rootProject.name = "Lab5"
-
+include("Lab5Client", "Lab5Server", "Lab5Core")
diff --git a/src/main/java/ru/erius/lab5/Lab5.java b/src/main/java/ru/erius/lab5/Lab5.java
deleted file mode 100644
index 7de6065..0000000
--- a/src/main/java/ru/erius/lab5/Lab5.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package ru.erius.lab5;
-
-import ru.erius.lab5.collection.Database;
-import ru.erius.lab5.collection.PeopleDatabase;
-import ru.erius.lab5.commandline.CommandLineHandler;
-import ru.erius.lab5.commandline.PeopleDatabaseCommands;
-
-public class Lab5 {
-
- public static void main(String[] args) {
- CommandLineHandler cmd = CommandLineHandler.getInstance();
-
- PeopleDatabaseCommands.registerDatabaseCommands();
- PeopleDatabase peopleDatabase = new PeopleDatabase();
- try {
- peopleDatabase.load();
- } catch (Database.DatabaseLoadFailedException e) {
- System.out.println(e.getMessage());
- System.exit(-1);
- }
- PeopleDatabaseCommands.setPeopleDatabase(peopleDatabase);
-
- cmd.start();
- }
-}
diff --git a/src/main/java/ru/erius/lab5/commandline/Command.java b/src/main/java/ru/erius/lab5/commandline/Command.java
deleted file mode 100644
index 4690e9e..0000000
--- a/src/main/java/ru/erius/lab5/commandline/Command.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package ru.erius.lab5.commandline;
-
-/**
- * Функциональный интерфейс с одним методом {@link #execute(String[])},
- * используется для реализации шаблон проектирования Command
- */
-@FunctionalInterface
-public interface Command {
- void execute(String[] args);
-}
diff --git a/src/main/java/ru/erius/lab5/commandline/DescriptiveCommand.java b/src/main/java/ru/erius/lab5/commandline/DescriptiveCommand.java
deleted file mode 100644
index 39d2fa3..0000000
--- a/src/main/java/ru/erius/lab5/commandline/DescriptiveCommand.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package ru.erius.lab5.commandline;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NonNull;
-
-/**
- * Класс команд с описанием, оболочка для обычных команд, используются для корректной работы команды help
- */
-@Data @AllArgsConstructor
-public class DescriptiveCommand {
- @NonNull
- private final Command command;
- private final String desc;
-}
diff --git a/src/main/java/ru/erius/lab5/commandline/PeopleDatabaseCommands.java b/src/main/java/ru/erius/lab5/commandline/PeopleDatabaseCommands.java
deleted file mode 100644
index 36c1903..0000000
--- a/src/main/java/ru/erius/lab5/commandline/PeopleDatabaseCommands.java
+++ /dev/null
@@ -1,235 +0,0 @@
-package ru.erius.lab5.commandline;
-
-import ru.erius.lab5.collection.Database;
-import ru.erius.lab5.collection.PeopleDatabase;
-import ru.erius.lab5.data.*;
-import ru.erius.lab5.util.UtilFunctions;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Locale;
-import java.util.Optional;
-
-import static ru.erius.lab5.commandline.CommandRegistry.*;
-
-/**
- * Класс объявления всех команд, связанных с манипуляциями над объектом класса PeopleDatabase
- *
- * @see PeopleDatabase
- */
-public final class PeopleDatabaseCommands {
-
- private static PeopleDatabase peopleDatabase;
- private static final String COLORS = Arrays.toString(Color.values()),
- COUNTRIES = Arrays.toString(Country.values());
- private static final CommandLineHandler CMD = CommandLineHandler.getInstance();
-
- private PeopleDatabaseCommands() {}
-
- /**
- * Метод добавления всех команд в регистр команд, обязательно вызывайте его в своей программе,
- * если вам требуются данные команды
- */
- public static void registerDatabaseCommands() {
- registerCommand("info", args -> info(peopleDatabase),
- "info : вывести в стандартный поток вывода информацию о коллекции (тип, дата инициализации, количество элементов и т.д.)");
- registerCommand("show", args -> show(peopleDatabase),
- "show : вывести в стандартный поток вывода все элементы коллекции в строковом представлении");
- registerCommand("add", args -> add(peopleDatabase),
- "add : добавить новый элемент в коллекцию");
- registerCommand("update", args -> update(peopleDatabase, args),
- "update {id} : обновить значение элемента коллекции, {id} которого равен заданному");
- registerCommand("remove_by_id", args -> remove(peopleDatabase, args),
- "remove_by_id {id} : удалить элемент из коллекции по его {id}");
- registerCommand("clear", args -> clear(peopleDatabase),
- "clear : очистить коллекцию");
- registerCommand("save", args -> save(peopleDatabase),
- "save : сохранить коллекцию в файл");
- registerCommand("add_if_max", args -> addIfMax(peopleDatabase),
- "add_if_max : добавить новый элемент в коллекцию, если его значение превышает значение наибольшего элемента этой коллекции");
- registerCommand("add_if_min", args -> addIfMin(peopleDatabase),
- "add_if_min : добавить новый элемент в коллекцию, если его значение меньше, чем у наименьшего элемента этой коллекции");
- registerCommand("sum_of_height", args -> sumOfHeight(peopleDatabase),
- "sum_of_height : вывести сумму значений поля height для всех элементов коллекции");
- registerCommand("filter_contains_name", args -> filterContainsName(peopleDatabase, args),
- "filter_contains_name {name} : вывести элементы, значение поля name которых содержит заданную подстроку");
- registerCommand("print_field_descending_location", args -> printFieldDescendingLocation(peopleDatabase),
- "print_field_descending_location : вывести значения поля location всех элементов в порядке убывания");
- }
-
- public static void setPeopleDatabase(PeopleDatabase peopleDatabase) {
- PeopleDatabaseCommands.peopleDatabase = peopleDatabase;
- }
-
- public static void info(PeopleDatabase peopleDatabase) {
- System.out.println(peopleDatabase.info());
- }
-
- public static void show(PeopleDatabase peopleDatabase) {
- System.out.println("Элементы коллекции:\n");
- peopleDatabase.getCollection().forEach(p -> System.out.println(p.formatted()));
- }
-
- public static void add(PeopleDatabase peopleDatabase) {
- Person person = createPerson();
- boolean success = peopleDatabase.getCollection().add(person);
- System.out.println(success ? "Человек успешно добавлен в коллекцию" : "Не удалось добавить человека в коллекцию");
- }
-
- public static void update(PeopleDatabase peopleDatabase, String[] args) {
- Long id = getIdOrNull(args);
- if (id == null) return;
-
- Optional optionalPerson = peopleDatabase.getCollection()
- .stream()
- .filter(p -> p.getId().equals(id))
- .findFirst();
- if (!optionalPerson.isPresent()) {
- System.out.println("Человек с {id} " + id + " не был найден");
- return;
- }
- Person oldPerson = optionalPerson.get();
- peopleDatabase.getCollection().remove(oldPerson);
-
- Person newPerson = createPerson();
- oldPerson.update(newPerson);
- peopleDatabase.getCollection().add(oldPerson);
- System.out.println("Человек с {id} " + oldPerson.getId() + " был успешно изменен");
- }
-
- public static void remove(PeopleDatabase peopleDatabase, String[] args) {
- Long id = getIdOrNull(args);
- if (id == null) return;
- boolean success = peopleDatabase.getCollection().removeIf(p -> p.getId().equals(id));
- System.out.println("Человек с {id} " + id + " " + (success ? "был успешно удален" : "не был найден"));
- }
-
- public static void clear(PeopleDatabase peopleDatabase) {
- peopleDatabase.getCollection().clear();
- System.out.println("Коллекция была очищена");
- }
-
- public static void save(PeopleDatabase peopleDatabase) {
- try {
- peopleDatabase.save();
- System.out.println("Коллекция была успешно сохранена");
- } catch (Database.DatabaseSaveFailedException e) {
- System.out.println(e.getMessage());
- }
- }
-
- public static void addIfMax(PeopleDatabase peopleDatabase) {
- Person person = createPerson();
- Person last = peopleDatabase.getCollection().last();
- if (person.compareTo(last) > 0) {
- peopleDatabase.getCollection().add(person);
- System.out.println("Человек успешно добавлен в коллекцию");
- return;
- }
- System.out.println("Не удалось добавить человека в коллекцию");
- }
-
- public static void addIfMin(PeopleDatabase peopleDatabase) {
- Person person = createPerson();
- Person first = peopleDatabase.getCollection().first();
- if (person.compareTo(first) < 0) {
- peopleDatabase.getCollection().add(person);
- System.out.println("Человек успешно добавлен в коллекцию");
- return;
- }
- System.out.println("Не удалось добавить человека в коллекцию");
- }
-
- public static void sumOfHeight(PeopleDatabase peopleDatabase) {
- int sum = peopleDatabase.getCollection()
- .stream()
- .mapToInt(p -> p.getHeight() == null ? 0 : p.getHeight())
- .sum();
- System.out.println("Сумма ростов всех людей в коллекции - " + sum);
- }
-
- public static void filterContainsName(PeopleDatabase peopleDatabase, String[] args) {
- if (args.length < 1) {
- System.out.println("Недостаточно данных");
- return;
- }
-
- String name = args[0];
- System.out.println("Список людей, в имени которых содержится " + name + ":");
- peopleDatabase.getCollection()
- .stream()
- .filter(p -> p.getName().contains(name))
- .forEach(System.out::println);
- }
-
- public static void printFieldDescendingLocation(PeopleDatabase peopleDatabase) {
- System.out.println("Список локаций в порядке убывания");
- peopleDatabase.getCollection()
- .stream()
- .map(Person::getLocation)
- .sorted(Collections.reverseOrder())
- .forEach(System.out::println);
- }
-
- private static Long getIdOrNull(String[] args) {
- if (args.length < 1) {
- System.out.println("Недостаточно данных");
- return null;
- }
-
- Long id = UtilFunctions.longOrNull(args[0]);
- if (id == null) {
- System.out.println("{id} должен быть целым числом");
- return null;
- }
-
- return id;
- }
-
- public static Person createPerson() {
- System.out.println("Создание нового объекта класса Person");
- String name = CMD.awaitInput("Введите имя:", "Введите непустую строку",
- input -> !input.isEmpty());
- Integer height = CMD.awaitInput("Введите рост:", "Введите целое число, большее нуля",
- input -> {
- Integer result = UtilFunctions.intOrNull(input);
- return result != null && result > 0 || input.isEmpty();
- }, input -> input.isEmpty() ? null : Integer.parseInt(input));
- String passportID = CMD.awaitInput("Введите номер паспорта:", "Введите минимум 8 символов",
- input -> input.length() >= 8 || input.isEmpty(), input -> input.isEmpty() ? null : input);
- Color eyeColor = CMD.awaitInput("Введите цвет глаз " + COLORS + ":", "Введите один из предложенных цветов",
- input -> UtilFunctions.enumOrNull(input.toUpperCase(Locale.ROOT), Color.class) != null,
- input -> Color.valueOf(input.toUpperCase(Locale.ROOT)));
- Country nationality = CMD.awaitInput("Введите национальность " + COUNTRIES + ":", "Введите одну из предложенных стран",
- input -> UtilFunctions.enumOrNull(input.toUpperCase(Locale.ROOT), Country.class) != null,
- input -> Country.valueOf(input.toUpperCase(Locale.ROOT)));
- Location location = createLocation();
- Coordinates coordinates = createCoordinates();
- return new Person(name, coordinates, height, passportID, eyeColor, nationality, location);
- }
-
- public static Location createLocation() {
- System.out.println("Создание нового объекта класса Location");
- double x = CMD.awaitInput("Введите x:", "Введите дробное число",
- input -> UtilFunctions.doubleOrNull(input) != null, Double::parseDouble);
- float y = CMD.awaitInput("Введите y:", "Введите дробное число",
- input -> UtilFunctions.floatOrNull(input) != null, Float::parseFloat);
- long z = CMD.awaitInput("Введите z:", "Введите целое число",
- input -> UtilFunctions.longOrNull(input) != null, Long::parseLong);
- String name = CMD.awaitInput("Введите название:", "Строка не может быть пустой",
- input -> true, input -> input.isEmpty() ? null : input);
- return new Location(x, y, z, name);
- }
-
- public static Coordinates createCoordinates() {
- System.out.println("Создание нового объекта класса Coordinates");
- float x = CMD.awaitInput("Введите x:", "Введите дробное число",
- input -> UtilFunctions.floatOrNull(input) != null, Float::parseFloat);
- float y = CMD.awaitInput("Введите y:", "Введите дробное число, большее -816",
- input -> {
- Float result = UtilFunctions.floatOrNull(input);
- return result != null && result > -816F;
- }, Float::parseFloat);
- return new Coordinates(x, y);
- }
-}
diff --git a/src/main/java/ru/erius/lab5/data/Color.java b/src/main/java/ru/erius/lab5/data/Color.java
deleted file mode 100644
index 3576102..0000000
--- a/src/main/java/ru/erius/lab5/data/Color.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package ru.erius.lab5.data;
-
-/**
- * Перечисление цветов
- */
-public enum Color {
- BLACK,
- ORANGE,
- BROWN
-}