Compare commits
No commits in common. "1.17" and "1.0" have entirely different histories.
70 changed files with 241 additions and 331 deletions
31
.classpath
31
.classpath
|
@ -2,26 +2,25 @@
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="src" path="test"/>
|
<classpathentry kind="src" path="test"/>
|
||||||
|
<classpathentry kind="lib" path="lib/commons-lang3-3.1.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/commons-codec-1.8.jar"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||||
<classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar" sourcepath="lib/UnitTesting/hamcrest-core-1.3-sources.jar"/>
|
<classpathentry kind="lib" path="lib/mysql-jdbc-5.0.8.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.12.jar" sourcepath="lib/UnitTesting/junit-4.12-sources.jar"/>
|
<classpathentry kind="lib" path="lib/joda-time-2.3.jar" sourcepath="lib/joda-time-2.3-sources.jar"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
<classpathentry kind="lib" path="lib/commons-io-2.4-sources.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/commons-io-2.4.jar" sourcepath="lib/commons-io-2.4-sources.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/Logs/log4j-1.2.17.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.5.jar" sourcepath="lib/Logs/slf4j-api-1.7.5-sources.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.5.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.11.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/hsqldb-2.3.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/devinsy-strings-0.4.4.jar" sourcepath="lib/devinsy-strings-0.4.4-sources.zip"/>
|
||||||
|
<classpathentry kind="lib" path="lib/devinsy-xml-0.4.2.jar" sourcepath="lib/devinsy-xml-0.4.2-sources.zip"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
|
||||||
<attribute name="owner.project.facets" value="java"/>
|
<attribute name="owner.project.facets" value="java"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="lib/commons-io-2.16.1.jar" sourcepath="lib/commons-io-2.16.1-sources.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/commons-lang3-3.13.0.jar" sourcepath="lib/commons-lang3-3.13.0-sources.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/devinsy-strings-0.17.0.jar" sourcepath="lib/devinsy-strings-0.17.0-sources.zip"/>
|
|
||||||
<classpathentry kind="lib" path="lib/devinsy-xml-0.17.0.jar" sourcepath="lib/devinsy-xml-0.17.0-sources.zip"/>
|
|
||||||
<classpathentry kind="lib" path="lib/commons-codec-1.17.1.jar" sourcepath="lib/commons-codec-1.17.1-sources.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/mariadb-java-client-3.4.1.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/hsqldb-2.7.3.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/Logs/log4j-api-2.23.1.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/Logs/log4j-core-2.23.1.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/Logs/log4j-slf4j2-impl-2.23.1.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/Logs/slf4j-api-2.0.16.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/commons-text-1.12.0.jar" sourcepath="lib/commons-text-1.12.0-sources.jar"/>
|
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
encoding/<project>=UTF-8
|
|
|
@ -1,20 +1,15 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=17
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.source=1.6
|
||||||
org.eclipse.jdt.core.compiler.release=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=17
|
|
||||||
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
|
|
||||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||||
|
@ -22,30 +17,22 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
|
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
|
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
|
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
|
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
|
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
|
||||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||||
|
@ -66,13 +53,11 @@ org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
|
||||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
|
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
|
||||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
|
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
|
||||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
|
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
|
||||||
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
|
|
||||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
|
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
|
||||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
|
org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
|
||||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
|
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
|
||||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||||
org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false
|
|
||||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=false
|
org.eclipse.jdt.core.formatter.comment.format_block_comments=false
|
||||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||||
|
@ -105,7 +90,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
|
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
|
||||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
||||||
|
@ -114,7 +98,6 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||||
|
@ -128,12 +111,11 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||||
|
@ -163,9 +145,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=inser
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||||
|
@ -190,17 +169,13 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
|
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||||
|
@ -247,9 +222,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do n
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||||
|
@ -286,12 +258,9 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
|
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||||
|
@ -312,27 +281,11 @@ org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
|
|
||||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||||
org.eclipse.jdt.core.formatter.tabulation.char=tab
|
org.eclipse.jdt.core.formatter.tabulation.char=tab
|
||||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||||
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
||||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||||
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
|
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||||
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
|
|
||||||
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
|
|
||||||
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
|
|
||||||
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
|
|
||||||
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
|
|
||||||
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
||||||
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
|
|
||||||
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||||
|
|
|
@ -11,12 +11,10 @@ cleanup.always_use_blocks=true
|
||||||
cleanup.always_use_parentheses_in_expressions=false
|
cleanup.always_use_parentheses_in_expressions=false
|
||||||
cleanup.always_use_this_for_non_static_field_access=true
|
cleanup.always_use_this_for_non_static_field_access=true
|
||||||
cleanup.always_use_this_for_non_static_method_access=false
|
cleanup.always_use_this_for_non_static_method_access=false
|
||||||
cleanup.convert_functional_interfaces=false
|
|
||||||
cleanup.convert_to_enhanced_for_loop=false
|
cleanup.convert_to_enhanced_for_loop=false
|
||||||
cleanup.correct_indentation=false
|
cleanup.correct_indentation=false
|
||||||
cleanup.format_source_code=true
|
cleanup.format_source_code=true
|
||||||
cleanup.format_source_code_changes_only=false
|
cleanup.format_source_code_changes_only=false
|
||||||
cleanup.insert_inferred_type_arguments=false
|
|
||||||
cleanup.make_local_variable_final=false
|
cleanup.make_local_variable_final=false
|
||||||
cleanup.make_parameters_final=true
|
cleanup.make_parameters_final=true
|
||||||
cleanup.make_private_fields_final=false
|
cleanup.make_private_fields_final=false
|
||||||
|
@ -31,7 +29,6 @@ cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=fal
|
||||||
cleanup.qualify_static_member_accesses_with_declaring_class=true
|
cleanup.qualify_static_member_accesses_with_declaring_class=true
|
||||||
cleanup.qualify_static_method_accesses_with_declaring_class=false
|
cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||||
cleanup.remove_private_constructors=true
|
cleanup.remove_private_constructors=true
|
||||||
cleanup.remove_redundant_type_arguments=false
|
|
||||||
cleanup.remove_trailing_whitespaces=true
|
cleanup.remove_trailing_whitespaces=true
|
||||||
cleanup.remove_trailing_whitespaces_all=true
|
cleanup.remove_trailing_whitespaces_all=true
|
||||||
cleanup.remove_trailing_whitespaces_ignore_empty=false
|
cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||||
|
@ -45,10 +42,8 @@ cleanup.remove_unused_private_methods=true
|
||||||
cleanup.remove_unused_private_types=true
|
cleanup.remove_unused_private_types=true
|
||||||
cleanup.sort_members=true
|
cleanup.sort_members=true
|
||||||
cleanup.sort_members_all=false
|
cleanup.sort_members_all=false
|
||||||
cleanup.use_anonymous_class_creation=false
|
|
||||||
cleanup.use_blocks=true
|
cleanup.use_blocks=true
|
||||||
cleanup.use_blocks_only_for_return_and_throw=false
|
cleanup.use_blocks_only_for_return_and_throw=false
|
||||||
cleanup.use_lambda=true
|
|
||||||
cleanup.use_parentheses_in_expressions=false
|
cleanup.use_parentheses_in_expressions=false
|
||||||
cleanup.use_this_for_non_static_field_access=true
|
cleanup.use_this_for_non_static_field_access=true
|
||||||
cleanup.use_this_for_non_static_field_access_only_if_necessary=false
|
cleanup.use_this_for_non_static_field_access_only_if_necessary=false
|
||||||
|
@ -59,9 +54,7 @@ cleanup_settings_version=2
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||||
formatter_profile=_SikevaDB
|
formatter_profile=_SikevaDB
|
||||||
formatter_settings_version=13
|
formatter_settings_version=12
|
||||||
jautodoc.cleanup.add_header=false
|
|
||||||
jautodoc.cleanup.replace_header=false
|
|
||||||
sp_cleanup.add_default_serial_version_id=true
|
sp_cleanup.add_default_serial_version_id=true
|
||||||
sp_cleanup.add_generated_serial_version_id=false
|
sp_cleanup.add_generated_serial_version_id=false
|
||||||
sp_cleanup.add_missing_annotations=true
|
sp_cleanup.add_missing_annotations=true
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
<faceted-project>
|
<faceted-project>
|
||||||
<fixed facet="java"/>
|
<fixed facet="java"/>
|
||||||
<fixed facet="jst.utility"/>
|
<fixed facet="jst.utility"/>
|
||||||
|
<installed facet="java" version="1.6"/>
|
||||||
<installed facet="jst.utility" version="1.0"/>
|
<installed facet="jst.utility" version="1.0"/>
|
||||||
<installed facet="java" version="17"/>
|
|
||||||
</faceted-project>
|
</faceted-project>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Fri Aug 23 12:19:51 CEST 2024
|
#Wed Feb 28 19:03:09 CET 2018
|
||||||
build.number=1
|
build.number=2
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
product.name=sikevadb
|
product.name=sikevadb
|
||||||
product.revision.major=1
|
product.revision.major=1
|
||||||
product.revision.minor=17
|
product.revision.minor=0
|
||||||
|
|
BIN
lib/Logs/log4j-1.2.17-source.zip
Normal file
BIN
lib/Logs/log4j-1.2.17-source.zip
Normal file
Binary file not shown.
BIN
lib/Logs/log4j-1.2.17.jar
Normal file
BIN
lib/Logs/log4j-1.2.17.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/Logs/slf4j-api-1.7.5-sources.jar
Normal file
BIN
lib/Logs/slf4j-api-1.7.5-sources.jar
Normal file
Binary file not shown.
BIN
lib/Logs/slf4j-api-1.7.5.jar
Normal file
BIN
lib/Logs/slf4j-api-1.7.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/Logs/slf4j-log4j12-1.7.5-sources.jar
Normal file
BIN
lib/Logs/slf4j-log4j12-1.7.5-sources.jar
Normal file
Binary file not shown.
BIN
lib/Logs/slf4j-log4j12-1.7.5.jar
Normal file
BIN
lib/Logs/slf4j-log4j12-1.7.5.jar
Normal file
Binary file not shown.
|
@ -12,9 +12,4 @@ Description of used libraries:
|
||||||
|
|
||||||
- other:
|
- other:
|
||||||
- commons-codec digest tools
|
- commons-codec digest tools
|
||||||
- commons-io
|
|
||||||
- commons-lang useful tools (StringUtils...)
|
- commons-lang useful tools (StringUtils...)
|
||||||
- devinsy-strings
|
|
||||||
- devinsy-xml
|
|
||||||
- hsqldb
|
|
||||||
- mysql-jdbc
|
|
BIN
lib/UnitTesting/junit-4.11-sources.jar
Normal file
BIN
lib/UnitTesting/junit-4.11-sources.jar
Normal file
Binary file not shown.
BIN
lib/UnitTesting/junit-4.11.jar
Normal file
BIN
lib/UnitTesting/junit-4.11.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/commons-codec-1.8-sources.jar
Normal file
BIN
lib/commons-codec-1.8-sources.jar
Normal file
Binary file not shown.
BIN
lib/commons-codec-1.8.jar
Normal file
BIN
lib/commons-codec-1.8.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/commons-io-2.4-sources.jar
Normal file
BIN
lib/commons-io-2.4-sources.jar
Normal file
Binary file not shown.
BIN
lib/commons-io-2.4.jar
Normal file
BIN
lib/commons-io-2.4.jar
Normal file
Binary file not shown.
BIN
lib/commons-lang3-3.1-sources.jar
Normal file
BIN
lib/commons-lang3-3.1-sources.jar
Normal file
Binary file not shown.
BIN
lib/commons-lang3-3.1.jar
Normal file
BIN
lib/commons-lang3-3.1.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/devinsy-strings-0.4.4-sources.zip
Normal file
BIN
lib/devinsy-strings-0.4.4-sources.zip
Normal file
Binary file not shown.
BIN
lib/devinsy-strings-0.4.4.jar
Normal file
BIN
lib/devinsy-strings-0.4.4.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/devinsy-xml-0.4.2-sources.zip
Normal file
BIN
lib/devinsy-xml-0.4.2-sources.zip
Normal file
Binary file not shown.
BIN
lib/devinsy-xml-0.4.2.jar
Normal file
BIN
lib/devinsy-xml-0.4.2.jar
Normal file
Binary file not shown.
BIN
lib/hsqldb-2.3.0.jar
Normal file
BIN
lib/hsqldb-2.3.0.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
lib/joda-time-2.3-sources.jar
Normal file
BIN
lib/joda-time-2.3-sources.jar
Normal file
Binary file not shown.
BIN
lib/joda-time-2.3.jar
Normal file
BIN
lib/joda-time-2.3.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
lib/mysql-jdbc-5.0.8.jar
Normal file
BIN
lib/mysql-jdbc-5.0.8.jar
Normal file
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -21,8 +21,8 @@ package fr.devinsy.sikevadb;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.logging.log4j.core.config.Configurator;
|
import org.apache.log4j.BasicConfigurator;
|
||||||
import org.apache.logging.log4j.core.config.DefaultConfiguration;
|
import org.apache.log4j.PropertyConfigurator;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -55,13 +55,13 @@ public final class SikevaDBLauncher
|
||||||
File loggerConfig = new File("log4j.properties");
|
File loggerConfig = new File("log4j.properties");
|
||||||
if (loggerConfig.exists())
|
if (loggerConfig.exists())
|
||||||
{
|
{
|
||||||
Configurator.initialize(null, loggerConfig.getAbsolutePath());
|
PropertyConfigurator.configure(loggerConfig.getAbsolutePath());
|
||||||
logger.info("Dedicated log configuration done.");
|
logger.info("Dedicated log configuration done.");
|
||||||
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
|
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Configurator.initialize(new DefaultConfiguration());
|
BasicConfigurator.configure();
|
||||||
logger.info("Basic log configuration done.");
|
logger.info("Basic log configuration done.");
|
||||||
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
|
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -22,14 +22,14 @@ package fr.devinsy.sikevadb.cli;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.logging.log4j.core.config.Configurator;
|
import org.apache.log4j.BasicConfigurator;
|
||||||
import org.apache.logging.log4j.core.config.DefaultConfiguration;
|
import org.apache.log4j.PropertyConfigurator;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import fr.devinsy.sikevadb.core.SikevaDBException;
|
|
||||||
import fr.devinsy.strings.StringList;
|
|
||||||
import utils.BuildInformation;
|
import utils.BuildInformation;
|
||||||
|
import fr.devinsy.sikevadb.core.SikevaDBException;
|
||||||
|
import fr.devinsy.util.strings.StringList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class <code>SikevaDBCLI</code> manages a Command Line Interface for
|
* The Class <code>SikevaDBCLI</code> manages a Command Line Interface for
|
||||||
|
@ -76,13 +76,13 @@ public final class SikevaDBCLI
|
||||||
File loggerConfig = new File("log4j.properties");
|
File loggerConfig = new File("log4j.properties");
|
||||||
if (loggerConfig.exists())
|
if (loggerConfig.exists())
|
||||||
{
|
{
|
||||||
Configurator.initialize(null, loggerConfig.getAbsolutePath());
|
PropertyConfigurator.configure(loggerConfig.getAbsolutePath());
|
||||||
logger.info("Dedicated log configuration done.");
|
logger.info("Dedicated log configuration done.");
|
||||||
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
|
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Configurator.initialize(new DefaultConfiguration());
|
BasicConfigurator.configure();
|
||||||
logger.info("Basic log configuration done.");
|
logger.info("Basic log configuration done.");
|
||||||
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
|
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -20,6 +20,8 @@ package fr.devinsy.sikevadb.core;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Interface Archiver.
|
* The Interface Archiver.
|
||||||
|
*
|
||||||
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public interface Archiver
|
public interface Archiver
|
||||||
{
|
{
|
||||||
|
@ -29,50 +31,17 @@ public interface Archiver
|
||||||
SUSPENDED
|
SUSPENDED
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Activate.
|
|
||||||
*/
|
|
||||||
void activate();
|
void activate();
|
||||||
|
|
||||||
/**
|
|
||||||
* Archive.
|
|
||||||
*
|
|
||||||
* @param element
|
|
||||||
* the element
|
|
||||||
* @throws SikevaDBException
|
|
||||||
* the sikeva DB exception
|
|
||||||
*/
|
|
||||||
void archive(Element element) throws SikevaDBException;
|
void archive(Element element) throws SikevaDBException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear.
|
|
||||||
*
|
|
||||||
* @throws SikevaDBException
|
|
||||||
* the sikeva DB exception
|
|
||||||
*/
|
|
||||||
void clear() throws SikevaDBException;
|
void clear() throws SikevaDBException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Close.
|
|
||||||
*/
|
|
||||||
void close();
|
void close();
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if is activated.
|
|
||||||
*
|
|
||||||
* @return true, if is activated
|
|
||||||
*/
|
|
||||||
boolean isActivated();
|
boolean isActivated();
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if is suspended.
|
|
||||||
*
|
|
||||||
* @return true, if is suspended
|
|
||||||
*/
|
|
||||||
boolean isSuspended();
|
boolean isSuspended();
|
||||||
|
|
||||||
/**
|
|
||||||
* Suspend.
|
|
||||||
*/
|
|
||||||
void suspend();
|
void suspend();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -19,14 +19,15 @@
|
||||||
package fr.devinsy.sikevadb.core;
|
package fr.devinsy.sikevadb.core;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class ClosedDatabaseException.
|
*
|
||||||
|
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
|
||||||
*/
|
*/
|
||||||
public class ClosedDatabaseException extends SikevaDBException
|
public class ClosedDatabaseException extends SikevaDBException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 8364599416669077052L;
|
private static final long serialVersionUID = 8364599416669077052L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new closed database exception.
|
*
|
||||||
*/
|
*/
|
||||||
public ClosedDatabaseException()
|
public ClosedDatabaseException()
|
||||||
{
|
{
|
||||||
|
@ -34,10 +35,8 @@ public class ClosedDatabaseException extends SikevaDBException
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new closed database exception.
|
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* the message
|
|
||||||
*/
|
*/
|
||||||
public ClosedDatabaseException(final String message)
|
public ClosedDatabaseException(final String message)
|
||||||
{
|
{
|
||||||
|
@ -45,12 +44,9 @@ public class ClosedDatabaseException extends SikevaDBException
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new closed database exception.
|
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* the message
|
|
||||||
* @param cause
|
* @param cause
|
||||||
* the cause
|
|
||||||
*/
|
*/
|
||||||
public ClosedDatabaseException(final String message, final Throwable cause)
|
public ClosedDatabaseException(final String message, final Throwable cause)
|
||||||
{
|
{
|
||||||
|
@ -58,10 +54,8 @@ public class ClosedDatabaseException extends SikevaDBException
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new closed database exception.
|
|
||||||
*
|
*
|
||||||
* @param cause
|
* @param cause
|
||||||
* the cause
|
|
||||||
*/
|
*/
|
||||||
public ClosedDatabaseException(final Throwable cause)
|
public ClosedDatabaseException(final Throwable cause)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -18,9 +18,8 @@
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.sikevadb.core;
|
package fr.devinsy.sikevadb.core;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class Element.
|
* The Class Element.
|
||||||
|
@ -32,10 +31,10 @@ public class Element
|
||||||
public static final long NO_ID = -1;
|
public static final long NO_ID = -1;
|
||||||
|
|
||||||
private long id;
|
private long id;
|
||||||
private LocalDateTime creationDate;
|
private DateTime creationDate;
|
||||||
private LocalDateTime editionDate;
|
private DateTime editionDate;
|
||||||
/* archiveDate field is reserved for journalizer. */
|
/* archiveDate field is reserved for journalizer. */
|
||||||
private LocalDateTime archiveDate;
|
private DateTime archiveDate;
|
||||||
private String key;
|
private String key;
|
||||||
private String subkey;
|
private String subkey;
|
||||||
private long size;
|
private long size;
|
||||||
|
@ -73,7 +72,7 @@ public class Element
|
||||||
*/
|
*/
|
||||||
public void archive()
|
public void archive()
|
||||||
{
|
{
|
||||||
this.archiveDate = LocalDateTime.now();
|
this.archiveDate = DateTime.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +80,7 @@ public class Element
|
||||||
*
|
*
|
||||||
* @return the archive date
|
* @return the archive date
|
||||||
*/
|
*/
|
||||||
public LocalDateTime getArchiveDate()
|
public DateTime getArchiveDate()
|
||||||
{
|
{
|
||||||
return this.archiveDate;
|
return this.archiveDate;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +90,7 @@ public class Element
|
||||||
*
|
*
|
||||||
* @return the creation date
|
* @return the creation date
|
||||||
*/
|
*/
|
||||||
public LocalDateTime getCreationDate()
|
public DateTime getCreationDate()
|
||||||
{
|
{
|
||||||
return this.creationDate;
|
return this.creationDate;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +110,7 @@ public class Element
|
||||||
*
|
*
|
||||||
* @return the edition date
|
* @return the edition date
|
||||||
*/
|
*/
|
||||||
public LocalDateTime getEditionDate()
|
public DateTime getEditionDate()
|
||||||
{
|
{
|
||||||
return this.editionDate;
|
return this.editionDate;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +171,7 @@ public class Element
|
||||||
* @param date
|
* @param date
|
||||||
* the new archive date
|
* the new archive date
|
||||||
*/
|
*/
|
||||||
public void setArchiveDate(final LocalDateTime date)
|
public void setArchiveDate(final DateTime date)
|
||||||
{
|
{
|
||||||
this.archiveDate = date;
|
this.archiveDate = date;
|
||||||
}
|
}
|
||||||
|
@ -183,7 +182,7 @@ public class Element
|
||||||
* @param date
|
* @param date
|
||||||
* the new creation date
|
* the new creation date
|
||||||
*/
|
*/
|
||||||
public void setCreationDate(final LocalDateTime date)
|
public void setCreationDate(final DateTime date)
|
||||||
{
|
{
|
||||||
this.creationDate = date;
|
this.creationDate = date;
|
||||||
}
|
}
|
||||||
|
@ -205,7 +204,7 @@ public class Element
|
||||||
* @param date
|
* @param date
|
||||||
* the new edition date
|
* the new edition date
|
||||||
*/
|
*/
|
||||||
public void setEditionDate(final LocalDateTime date)
|
public void setEditionDate(final DateTime date)
|
||||||
{
|
{
|
||||||
this.editionDate = date;
|
this.editionDate = date;
|
||||||
}
|
}
|
||||||
|
@ -277,7 +276,7 @@ public class Element
|
||||||
setValue(value);
|
setValue(value);
|
||||||
|
|
||||||
//
|
//
|
||||||
this.editionDate = LocalDateTime.now();
|
this.editionDate = DateTime.now();
|
||||||
|
|
||||||
//
|
//
|
||||||
if (value == null)
|
if (value == null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -19,14 +19,15 @@
|
||||||
package fr.devinsy.sikevadb.core;
|
package fr.devinsy.sikevadb.core;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class OpenedDatabaseException.
|
*
|
||||||
|
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
|
||||||
*/
|
*/
|
||||||
public class OpenedDatabaseException extends SikevaDBException
|
public class OpenedDatabaseException extends SikevaDBException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 8364599416669077052L;
|
private static final long serialVersionUID = 8364599416669077052L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new opened database exception.
|
*
|
||||||
*/
|
*/
|
||||||
public OpenedDatabaseException()
|
public OpenedDatabaseException()
|
||||||
{
|
{
|
||||||
|
@ -34,10 +35,8 @@ public class OpenedDatabaseException extends SikevaDBException
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new opened database exception.
|
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* the message
|
|
||||||
*/
|
*/
|
||||||
public OpenedDatabaseException(final String message)
|
public OpenedDatabaseException(final String message)
|
||||||
{
|
{
|
||||||
|
@ -45,12 +44,9 @@ public class OpenedDatabaseException extends SikevaDBException
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new opened database exception.
|
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* the message
|
|
||||||
* @param cause
|
* @param cause
|
||||||
* the cause
|
|
||||||
*/
|
*/
|
||||||
public OpenedDatabaseException(final String message, final Throwable cause)
|
public OpenedDatabaseException(final String message, final Throwable cause)
|
||||||
{
|
{
|
||||||
|
@ -58,10 +54,8 @@ public class OpenedDatabaseException extends SikevaDBException
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new opened database exception.
|
|
||||||
*
|
*
|
||||||
* @param cause
|
* @param cause
|
||||||
* the cause
|
|
||||||
*/
|
*/
|
||||||
public OpenedDatabaseException(final Throwable cause)
|
public OpenedDatabaseException(final Throwable cause)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.sikevadb.core;
|
package fr.devinsy.sikevadb.core;
|
||||||
|
|
||||||
import fr.devinsy.strings.StringList;
|
import fr.devinsy.util.strings.StringList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Interface SikevaDB.
|
* The Interface SikevaDB.
|
||||||
|
@ -160,15 +160,6 @@ public interface SikevaDB
|
||||||
*/
|
*/
|
||||||
public void destroy() throws SikevaDBException;
|
public void destroy() throws SikevaDBException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if is created.
|
|
||||||
*
|
|
||||||
* @return true, if is created
|
|
||||||
* @throws SikevaDBException
|
|
||||||
* the SikevaDB exception
|
|
||||||
*/
|
|
||||||
public boolean exists() throws SikevaDBException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an element by key.
|
* Gets an element by key.
|
||||||
*
|
*
|
||||||
|
@ -226,6 +217,15 @@ public interface SikevaDB
|
||||||
*/
|
*/
|
||||||
public Elements getElements(String key) throws SikevaDBException;
|
public Elements getElements(String key) throws SikevaDBException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the top keys.
|
||||||
|
*
|
||||||
|
* @return the keys
|
||||||
|
* @throws SikevaDBException
|
||||||
|
* the SikevaDB exception
|
||||||
|
*/
|
||||||
|
public StringList getTopKeys() throws SikevaDBException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the sub keys of a key.
|
* Gets all the sub keys of a key.
|
||||||
*
|
*
|
||||||
|
@ -237,15 +237,6 @@ public interface SikevaDB
|
||||||
*/
|
*/
|
||||||
public StringList getSubkeys(String key) throws SikevaDBException;
|
public StringList getSubkeys(String key) throws SikevaDBException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets all the top keys.
|
|
||||||
*
|
|
||||||
* @return the keys
|
|
||||||
* @throws SikevaDBException
|
|
||||||
* the SikevaDB exception
|
|
||||||
*/
|
|
||||||
public StringList getTopKeys() throws SikevaDBException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value of a key.
|
* Gets the value of a key.
|
||||||
*
|
*
|
||||||
|
@ -284,28 +275,18 @@ public interface SikevaDB
|
||||||
public String getValue(String key, String subkey) throws SikevaDBException;
|
public String getValue(String key, String subkey) throws SikevaDBException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the values.
|
* Gets the values of a key.
|
||||||
*
|
*
|
||||||
* @param key
|
* @param key
|
||||||
* the key
|
* the key
|
||||||
* @return the values
|
* @return the values
|
||||||
* @throws SikevaDBException
|
* @throws SikevaDBException
|
||||||
* the sikeva DB exception
|
* the SikevaDB exception
|
||||||
*/
|
*/
|
||||||
public StringList getValues(String key) throws SikevaDBException;
|
public StringList getValues(String key) throws SikevaDBException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if is archive activated.
|
|
||||||
*
|
|
||||||
* @return true, if is archive activated
|
|
||||||
*/
|
|
||||||
boolean isArchiveActivated();
|
boolean isArchiveActivated();
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if is archive suspended.
|
|
||||||
*
|
|
||||||
* @return true, if is archive suspended
|
|
||||||
*/
|
|
||||||
boolean isArchiveSuspended();
|
boolean isArchiveSuspended();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -315,6 +296,15 @@ public interface SikevaDB
|
||||||
*/
|
*/
|
||||||
public boolean isClosed();
|
public boolean isClosed();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if is created.
|
||||||
|
*
|
||||||
|
* @return true, if is created
|
||||||
|
* @throws SikevaDBException
|
||||||
|
* the SikevaDB exception
|
||||||
|
*/
|
||||||
|
public boolean exists() throws SikevaDBException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if is opened.
|
* Checks if is opened.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -23,38 +23,39 @@ import java.io.FileNotFoundException;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
|
|
||||||
import javax.xml.stream.XMLStreamException;
|
import javax.xml.stream.XMLStreamException;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
import org.apache.commons.lang3.StringEscapeUtils;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import fr.devinsy.xml.XMLBadFormatException;
|
import fr.devinsy.util.xml.XMLBadFormatException;
|
||||||
import fr.devinsy.xml.XMLReader;
|
import fr.devinsy.util.xml.XMLReader;
|
||||||
import fr.devinsy.xml.XMLTag;
|
import fr.devinsy.util.xml.XMLTag;
|
||||||
import fr.devinsy.xml.XMLTag.TagType;
|
import fr.devinsy.util.xml.XMLTag.TagType;
|
||||||
import fr.devinsy.xml.XMLWriter;
|
import fr.devinsy.util.xml.XMLWriter;
|
||||||
import fr.devinsy.xml.XMLZipWriter;
|
import fr.devinsy.util.xml.XMLZipWriter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class XMLSikevaDB represents a XML persister.
|
* The Class XMLSikevaDB represents a XML persister.
|
||||||
|
*
|
||||||
|
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
|
||||||
*/
|
*/
|
||||||
public class XMLSikevaDB
|
public class XMLSikevaDB
|
||||||
{
|
{
|
||||||
private static final Logger logger = LoggerFactory.getLogger(XMLSikevaDB.class);
|
private static final Logger logger = LoggerFactory.getLogger(XMLSikevaDB.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export.
|
* Export in XML a database in a file.
|
||||||
*
|
*
|
||||||
* @param out
|
* @param out
|
||||||
* the out
|
* the out
|
||||||
* @param source
|
* @param source
|
||||||
* the source
|
* the source
|
||||||
* @throws SikevaDBException
|
* @throws SikevaDBException
|
||||||
* the sikeva DB exception
|
* the SikevaDB exception
|
||||||
* @throws FileNotFoundException
|
* @throws FileNotFoundException
|
||||||
* the file not found exception
|
* the file not found exception
|
||||||
*/
|
*/
|
||||||
|
@ -76,7 +77,7 @@ public class XMLSikevaDB
|
||||||
public static void export(final OutputStream out, final SikevaDB source) throws SikevaDBException
|
public static void export(final OutputStream out, final SikevaDB source) throws SikevaDBException
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
String fileName = "sikevadb-" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd-HH'h'mm'mn'ss's'")) + ".xml.zip";
|
String fileName = "sikevadb-" + DateTime.now().toString("yyyy-MM-dd-HH'h'mm'mn'ss's'") + ".xml.zip";
|
||||||
|
|
||||||
//
|
//
|
||||||
export(out, source, fileName);
|
export(out, source, fileName);
|
||||||
|
@ -150,6 +151,9 @@ public class XMLSikevaDB
|
||||||
* the database
|
* the database
|
||||||
* @param file
|
* @param file
|
||||||
* the file
|
* the file
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
|
* the exception
|
||||||
*/
|
*/
|
||||||
public static void importData(final SikevaDB database, final File file)
|
public static void importData(final SikevaDB database, final File file)
|
||||||
{
|
{
|
||||||
|
@ -173,7 +177,6 @@ public class XMLSikevaDB
|
||||||
* the in
|
* the in
|
||||||
* @return the element
|
* @return the element
|
||||||
* @throws SikevaDBException
|
* @throws SikevaDBException
|
||||||
* the sikeva DB exception
|
|
||||||
*/
|
*/
|
||||||
public static Element readElement(final XMLReader in) throws SikevaDBException
|
public static Element readElement(final XMLReader in) throws SikevaDBException
|
||||||
{
|
{
|
||||||
|
@ -193,10 +196,10 @@ public class XMLSikevaDB
|
||||||
String value = StringEscapeUtils.unescapeXml(in.readContentTag("value").getContent());
|
String value = StringEscapeUtils.unescapeXml(in.readContentTag("value").getContent());
|
||||||
int size = Integer.parseInt(tag.attributes().getByLabel("size").getValue());
|
int size = Integer.parseInt(tag.attributes().getByLabel("size").getValue());
|
||||||
String digest = in.readContentTag("digest").getContent();
|
String digest = in.readContentTag("digest").getContent();
|
||||||
LocalDateTime creationDate = LocalDateTime.parse(in.readContentTag("creation_date").getContent());
|
DateTime creationDate = DateTime.parse(in.readContentTag("creation_date").getContent());
|
||||||
LocalDateTime editionDate = LocalDateTime.parse(in.readContentTag("edition_date").getContent());
|
DateTime editionDate = DateTime.parse(in.readContentTag("edition_date").getContent());
|
||||||
|
|
||||||
LocalDateTime archiveDate;
|
DateTime archiveDate;
|
||||||
String archiveDateValue = in.readNullableContentTag("archive_date").getContent();
|
String archiveDateValue = in.readNullableContentTag("archive_date").getContent();
|
||||||
if (archiveDateValue == null)
|
if (archiveDateValue == null)
|
||||||
{
|
{
|
||||||
|
@ -204,7 +207,7 @@ public class XMLSikevaDB
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
archiveDate = LocalDateTime.parse(archiveDateValue);
|
archiveDate = DateTime.parse(archiveDateValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -244,8 +247,12 @@ public class XMLSikevaDB
|
||||||
* the target
|
* the target
|
||||||
* @param in
|
* @param in
|
||||||
* the in
|
* the in
|
||||||
|
* @throws XMLBadFormatException
|
||||||
|
* @throws XMLStreamException
|
||||||
* @throws SikevaDBException
|
* @throws SikevaDBException
|
||||||
* the sikeva DB exception
|
*
|
||||||
|
* @throws Exception
|
||||||
|
* the exception
|
||||||
*/
|
*/
|
||||||
public static void readElements(final SikevaDB target, final XMLReader in) throws SikevaDBException
|
public static void readElements(final SikevaDB target, final XMLReader in) throws SikevaDBException
|
||||||
{
|
{
|
||||||
|
@ -342,7 +349,9 @@ public class XMLSikevaDB
|
||||||
* @param source
|
* @param source
|
||||||
* the source
|
* the source
|
||||||
* @throws SikevaDBException
|
* @throws SikevaDBException
|
||||||
* the sikeva DB exception
|
*
|
||||||
|
* @throws Exception
|
||||||
|
* the exception
|
||||||
*/
|
*/
|
||||||
public static void write(final XMLWriter out, final SikevaDB source) throws SikevaDBException
|
public static void write(final XMLWriter out, final SikevaDB source) throws SikevaDBException
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -22,16 +22,16 @@ package fr.devinsy.sikevadb.demo;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.logging.log4j.core.config.Configurator;
|
import org.apache.log4j.BasicConfigurator;
|
||||||
import org.apache.logging.log4j.core.config.DefaultConfiguration;
|
import org.apache.log4j.PropertyConfigurator;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import utils.BuildInformation;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDB;
|
import fr.devinsy.sikevadb.core.SikevaDB;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDBException;
|
import fr.devinsy.sikevadb.core.SikevaDBException;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDBFactory;
|
import fr.devinsy.sikevadb.core.SikevaDBFactory;
|
||||||
import fr.devinsy.strings.StringList;
|
import fr.devinsy.util.strings.StringList;
|
||||||
import utils.BuildInformation;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class SikevaDBDemo is a demo for SikevaDB.
|
* The Class SikevaDBDemo is a demo for SikevaDB.
|
||||||
|
@ -171,13 +171,13 @@ public final class SikevaDBDemo
|
||||||
File loggerConfig = new File("log4j.properties");
|
File loggerConfig = new File("log4j.properties");
|
||||||
if (loggerConfig.exists())
|
if (loggerConfig.exists())
|
||||||
{
|
{
|
||||||
Configurator.initialize(null, loggerConfig.getAbsolutePath());
|
PropertyConfigurator.configure(loggerConfig.getAbsolutePath());
|
||||||
logger.info("Dedicated log configuration done.");
|
logger.info("Dedicated log configuration done.");
|
||||||
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
|
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Configurator.initialize(new DefaultConfiguration());
|
BasicConfigurator.configure();
|
||||||
logger.info("Basic log configuration done.");
|
logger.info("Basic log configuration done.");
|
||||||
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
|
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,8 @@ import java.io.IOException;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.SystemUtils;
|
import org.apache.commons.lang3.SystemUtils;
|
||||||
|
import org.joda.time.format.DateTimeFormatter;
|
||||||
|
import org.joda.time.format.ISODateTimeFormat;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -34,8 +36,8 @@ import fr.devinsy.sikevadb.core.Elements;
|
||||||
import fr.devinsy.sikevadb.core.OpenedDatabaseException;
|
import fr.devinsy.sikevadb.core.OpenedDatabaseException;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDB;
|
import fr.devinsy.sikevadb.core.SikevaDB;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDBException;
|
import fr.devinsy.sikevadb.core.SikevaDBException;
|
||||||
import fr.devinsy.strings.StringList;
|
import fr.devinsy.util.strings.StringList;
|
||||||
import fr.devinsy.strings.StringsUtils;
|
import fr.devinsy.util.strings.StringsUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class FileTreeSikevaDB.
|
* The Class FileTreeSikevaDB.
|
||||||
|
@ -56,13 +58,15 @@ import fr.devinsy.strings.StringsUtils;
|
||||||
*/
|
*/
|
||||||
public class FileTreeSikevaDB implements SikevaDB
|
public class FileTreeSikevaDB implements SikevaDB
|
||||||
{
|
{
|
||||||
private static final Logger logger = LoggerFactory.getLogger(FileTreeSikevaDB.class);
|
|
||||||
|
|
||||||
public enum Status
|
public enum Status
|
||||||
{
|
{
|
||||||
OPENED,
|
OPENED,
|
||||||
CLOSED
|
CLOSED
|
||||||
}
|
};
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(FileTreeSikevaDB.class);
|
||||||
|
|
||||||
|
private static final DateTimeFormatter ISOFormatter = ISODateTimeFormat.dateHourMinuteSecondMillis();
|
||||||
|
|
||||||
private Status status;
|
private Status status;
|
||||||
private String login;
|
private String login;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -22,18 +22,18 @@ import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import javax.xml.stream.XMLStreamException;
|
import javax.xml.stream.XMLStreamException;
|
||||||
|
|
||||||
|
import org.joda.time.DateTime;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import fr.devinsy.sikevadb.core.Element;
|
import fr.devinsy.sikevadb.core.Element;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDBException;
|
import fr.devinsy.sikevadb.core.SikevaDBException;
|
||||||
import fr.devinsy.xml.XMLBadFormatException;
|
import fr.devinsy.util.xml.XMLBadFormatException;
|
||||||
import fr.devinsy.xml.XMLReader;
|
import fr.devinsy.util.xml.XMLReader;
|
||||||
import fr.devinsy.xml.XMLWriter;
|
import fr.devinsy.util.xml.XMLWriter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class FileTreeSikevaDBTools.
|
* The Class FileTreeSikevaDBTools.
|
||||||
|
@ -84,11 +84,11 @@ public class FileTreeSikevaDBTools
|
||||||
result.setId(id);
|
result.setId(id);
|
||||||
|
|
||||||
// private DateTime creationDate; IN
|
// private DateTime creationDate; IN
|
||||||
LocalDateTime creationDate = LocalDateTime.parse(in.readContentTag("creation_date").getContent());
|
DateTime creationDate = DateTime.parse(in.readContentTag("creation_date").getContent());
|
||||||
result.setCreationDate(creationDate);
|
result.setCreationDate(creationDate);
|
||||||
|
|
||||||
// private DateTime editionDate; IN
|
// private DateTime editionDate; IN
|
||||||
LocalDateTime editionDate = LocalDateTime.parse(in.readContentTag("edition_date").getContent());
|
DateTime editionDate = DateTime.parse(in.readContentTag("edition_date").getContent());
|
||||||
result.setEditionDate(editionDate);
|
result.setEditionDate(editionDate);
|
||||||
|
|
||||||
// private long size; IN
|
// private long size; IN
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -27,7 +27,10 @@ import fr.devinsy.sikevadb.core.SikevaDBException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class SQLArchiver.
|
* The Class SQLArchiver.
|
||||||
|
*
|
||||||
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SQLArchiver implements Archiver
|
public class SQLArchiver implements Archiver
|
||||||
{
|
{
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SQLArchiver.class);;
|
private static final Logger logger = LoggerFactory.getLogger(SQLArchiver.class);;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,6 @@ package fr.devinsy.sikevadb.sql;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
|
@ -44,7 +43,7 @@ import fr.devinsy.sikevadb.core.Elements;
|
||||||
import fr.devinsy.sikevadb.core.OpenedDatabaseException;
|
import fr.devinsy.sikevadb.core.OpenedDatabaseException;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDB;
|
import fr.devinsy.sikevadb.core.SikevaDB;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDBException;
|
import fr.devinsy.sikevadb.core.SikevaDBException;
|
||||||
import fr.devinsy.strings.StringList;
|
import fr.devinsy.util.strings.StringList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class SQLSikevaDB.
|
* The Class SQLSikevaDB.
|
||||||
|
@ -54,14 +53,14 @@ import fr.devinsy.strings.StringList;
|
||||||
|
|
||||||
public class SQLSikevaDB implements SikevaDB
|
public class SQLSikevaDB implements SikevaDB
|
||||||
{
|
{
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SQLSikevaDB.class);;
|
|
||||||
|
|
||||||
public enum Status
|
public enum Status
|
||||||
{
|
{
|
||||||
OPENED,
|
OPENED,
|
||||||
CLOSED
|
CLOSED
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(SQLSikevaDB.class);;
|
||||||
|
|
||||||
private Status status;
|
private Status status;
|
||||||
private String driverClassname;
|
private String driverClassname;
|
||||||
private String url;
|
private String url;
|
||||||
|
@ -133,7 +132,6 @@ public class SQLSikevaDB implements SikevaDB
|
||||||
* Activate archiver.
|
* Activate archiver.
|
||||||
*
|
*
|
||||||
* @throws ClosedDatabaseException
|
* @throws ClosedDatabaseException
|
||||||
* the closed database exception
|
|
||||||
*/
|
*/
|
||||||
public void activateArchiver() throws ClosedDatabaseException
|
public void activateArchiver() throws ClosedDatabaseException
|
||||||
{
|
{
|
||||||
|
@ -940,8 +938,8 @@ public class SQLSikevaDB implements SikevaDB
|
||||||
//
|
//
|
||||||
connection = getConnection();
|
connection = getConnection();
|
||||||
connection.setAutoCommit(true);
|
connection.setAutoCommit(true);
|
||||||
statement = connection.prepareStatement(
|
statement = connection
|
||||||
"SELECT ID,TOPKEY,SUBKEY,VALUE,SIZE,DIGEST,CREATION_DATE,EDITION_DATE,ARCHIVE_DATE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NULL AND TOPKEY=? AND SUBKEY IS NULL");
|
.prepareStatement("SELECT ID,TOPKEY,SUBKEY,VALUE,SIZE,DIGEST,CREATION_DATE,EDITION_DATE,ARCHIVE_DATE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NULL AND TOPKEY=? AND SUBKEY IS NULL");
|
||||||
statement.setString(1, key);
|
statement.setString(1, key);
|
||||||
resultSet = statement.executeQuery();
|
resultSet = statement.executeQuery();
|
||||||
|
|
||||||
|
@ -1038,8 +1036,8 @@ public class SQLSikevaDB implements SikevaDB
|
||||||
//
|
//
|
||||||
connection = getConnection();
|
connection = getConnection();
|
||||||
connection.setAutoCommit(true);
|
connection.setAutoCommit(true);
|
||||||
statement = connection.prepareStatement(
|
statement = connection
|
||||||
"SELECT ID,TOPKEY,SUBKEY,VALUE,SIZE,DIGEST,CREATION_DATE,EDITION_DATE,ARCHIVE_DATE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NULL AND TOPKEY=? AND SUBKEY=?");
|
.prepareStatement("SELECT ID,TOPKEY,SUBKEY,VALUE,SIZE,DIGEST,CREATION_DATE,EDITION_DATE,ARCHIVE_DATE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NULL AND TOPKEY=? AND SUBKEY=?");
|
||||||
statement.setString(1, key);
|
statement.setString(1, key);
|
||||||
statement.setString(2, subkey);
|
statement.setString(2, subkey);
|
||||||
resultSet = statement.executeQuery();
|
resultSet = statement.executeQuery();
|
||||||
|
@ -1112,8 +1110,8 @@ public class SQLSikevaDB implements SikevaDB
|
||||||
{
|
{
|
||||||
connection = getConnection();
|
connection = getConnection();
|
||||||
connection.setAutoCommit(true);
|
connection.setAutoCommit(true);
|
||||||
statement = connection.prepareStatement(
|
statement = connection
|
||||||
"SELECT ID,TOPKEY,SUBKEY,VALUE,SIZE,DIGEST,CREATION_DATE,EDITION_DATE,ARCHIVE_DATE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NULL ORDER BY TOPKEY,SUBKEY ASC");
|
.prepareStatement("SELECT ID,TOPKEY,SUBKEY,VALUE,SIZE,DIGEST,CREATION_DATE,EDITION_DATE,ARCHIVE_DATE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NULL ORDER BY TOPKEY,SUBKEY ASC");
|
||||||
resultSet = statement.executeQuery();
|
resultSet = statement.executeQuery();
|
||||||
|
|
||||||
while (resultSet.next())
|
while (resultSet.next())
|
||||||
|
@ -1179,8 +1177,8 @@ public class SQLSikevaDB implements SikevaDB
|
||||||
{
|
{
|
||||||
connection = getConnection();
|
connection = getConnection();
|
||||||
connection.setAutoCommit(true);
|
connection.setAutoCommit(true);
|
||||||
statement = connection.prepareStatement(
|
statement = connection
|
||||||
"SELECT ID,TOPKEY,SUBKEY,VALUE,SIZE,DIGEST,CREATION_DATE,EDITION_DATE,ARCHIVE_DATE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NULL AND TOPKEY=? AND SUBKEY IS NULL ORDER BY CREATION_DATE ASC");
|
.prepareStatement("SELECT ID,TOPKEY,SUBKEY,VALUE,SIZE,DIGEST,CREATION_DATE,EDITION_DATE,ARCHIVE_DATE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NULL AND TOPKEY=? AND SUBKEY IS NULL ORDER BY CREATION_DATE ASC");
|
||||||
statement.setString(1, key);
|
statement.setString(1, key);
|
||||||
resultSet = statement.executeQuery();
|
resultSet = statement.executeQuery();
|
||||||
|
|
||||||
|
@ -1810,7 +1808,7 @@ public class SQLSikevaDB implements SikevaDB
|
||||||
//
|
//
|
||||||
if (this.url != null)
|
if (this.url != null)
|
||||||
{
|
{
|
||||||
Class.forName(this.driverClassname).getDeclaredConstructor().newInstance();
|
Class.forName(this.driverClassname).newInstance();
|
||||||
this.singleConnection = DriverManager.getConnection(this.url, this.login, this.password);
|
this.singleConnection = DriverManager.getConnection(this.url, this.login, this.password);
|
||||||
logger.info("Single connection opened with [{}].", this.url);
|
logger.info("Single connection opened with [{}].", this.url);
|
||||||
this.status = Status.OPENED;
|
this.status = Status.OPENED;
|
||||||
|
@ -1830,8 +1828,27 @@ public class SQLSikevaDB implements SikevaDB
|
||||||
throw new IllegalArgumentException("Undefined source.");
|
throw new IllegalArgumentException("Undefined source.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException | NamingException | SQLException | InstantiationException | IllegalAccessException
|
catch (InstantiationException exception)
|
||||||
| ClassNotFoundException exception)
|
{
|
||||||
|
logger.error("Error opening database.", exception);
|
||||||
|
throw new SikevaDBException("Error opening database.");
|
||||||
|
}
|
||||||
|
catch (IllegalAccessException exception)
|
||||||
|
{
|
||||||
|
logger.error("Error opening database.", exception);
|
||||||
|
throw new SikevaDBException("Error opening database.");
|
||||||
|
}
|
||||||
|
catch (ClassNotFoundException exception)
|
||||||
|
{
|
||||||
|
logger.error("Error opening database.", exception);
|
||||||
|
throw new SikevaDBException("Error opening database.");
|
||||||
|
}
|
||||||
|
catch (SQLException exception)
|
||||||
|
{
|
||||||
|
logger.error("Error opening database.", exception);
|
||||||
|
throw new SikevaDBException("Error opening database.");
|
||||||
|
}
|
||||||
|
catch (NamingException exception)
|
||||||
{
|
{
|
||||||
logger.error("Error opening database.", exception);
|
logger.error("Error opening database.", exception);
|
||||||
throw new SikevaDBException("Error opening database.");
|
throw new SikevaDBException("Error opening database.");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -22,17 +22,15 @@ import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneOffset;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import fr.devinsy.strings.StringList;
|
import fr.devinsy.util.strings.StringList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class SQLSikevaDBTools.
|
* The Class SQLSikevaDBTools.
|
||||||
|
@ -56,7 +54,7 @@ public class SQLSikevaDBTools
|
||||||
{
|
{
|
||||||
StringList result;
|
StringList result;
|
||||||
|
|
||||||
String script = IOUtils.toString(source, StandardCharsets.UTF_8);
|
String script = IOUtils.toString(source);
|
||||||
|
|
||||||
result = splitSQLCommands(script);
|
result = splitSQLCommands(script);
|
||||||
|
|
||||||
|
@ -131,9 +129,9 @@ public class SQLSikevaDBTools
|
||||||
* the source
|
* the source
|
||||||
* @return the date time
|
* @return the date time
|
||||||
*/
|
*/
|
||||||
public static LocalDateTime toDateTime(final java.sql.Timestamp source)
|
public static DateTime toDateTime(final java.sql.Timestamp source)
|
||||||
{
|
{
|
||||||
LocalDateTime result;
|
DateTime result;
|
||||||
|
|
||||||
if (source == null)
|
if (source == null)
|
||||||
{
|
{
|
||||||
|
@ -141,9 +139,7 @@ public class SQLSikevaDBTools
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long seconds = source.getTime() / 1000;
|
result = new DateTime(source.getTime());
|
||||||
long nanos = (source.getTime() - seconds * 1000) * 1000000;
|
|
||||||
result = LocalDateTime.ofEpochSecond(seconds, (int) nanos, ZoneOffset.UTC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -167,7 +163,7 @@ public class SQLSikevaDBTools
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = new java.sql.Timestamp(source.getTime() * 1000);
|
result = new java.sql.Timestamp(source.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -181,7 +177,7 @@ public class SQLSikevaDBTools
|
||||||
* the source
|
* the source
|
||||||
* @return the java.sql. timestamp
|
* @return the java.sql. timestamp
|
||||||
*/
|
*/
|
||||||
public static java.sql.Timestamp toTimestamp(final LocalDateTime source)
|
public static java.sql.Timestamp toTimestamp(final DateTime source)
|
||||||
{
|
{
|
||||||
java.sql.Timestamp result;
|
java.sql.Timestamp result;
|
||||||
|
|
||||||
|
@ -191,9 +187,7 @@ public class SQLSikevaDBTools
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long seconds = source.toEpochSecond(ZoneOffset.UTC);
|
result = new java.sql.Timestamp(source.getMillis());
|
||||||
long milliseconds = source.getNano() / 1000000;
|
|
||||||
result = new java.sql.Timestamp(seconds * 1000 + milliseconds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2018 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -19,13 +19,13 @@
|
||||||
package fr.devinsy.sikevadb.filetree;
|
package fr.devinsy.sikevadb.filetree;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.log4j.BasicConfigurator;
|
||||||
import org.apache.logging.log4j.core.config.Configurator;
|
import org.apache.log4j.Level;
|
||||||
import org.apache.logging.log4j.core.config.DefaultConfiguration;
|
import org.apache.log4j.Logger;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
@ -35,7 +35,7 @@ import fr.devinsy.sikevadb.core.Element;
|
||||||
import fr.devinsy.sikevadb.core.Elements;
|
import fr.devinsy.sikevadb.core.Elements;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDBException;
|
import fr.devinsy.sikevadb.core.SikevaDBException;
|
||||||
import fr.devinsy.sikevadb.core.XMLSikevaDB;
|
import fr.devinsy.sikevadb.core.XMLSikevaDB;
|
||||||
import fr.devinsy.strings.StringList;
|
import fr.devinsy.util.strings.StringList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class TreeFileSikevaDBTest.
|
* The Class TreeFileSikevaDBTest.
|
||||||
|
@ -372,9 +372,9 @@ public class TreeFileSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -409,9 +409,9 @@ public class TreeFileSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -446,9 +446,9 @@ public class TreeFileSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -461,9 +461,9 @@ public class TreeFileSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -717,8 +717,8 @@ public class TreeFileSikevaDBTest
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws SikevaDBException
|
public static void beforeClass() throws SikevaDBException
|
||||||
{
|
{
|
||||||
Configurator.initialize(new DefaultConfiguration());
|
BasicConfigurator.configure();
|
||||||
Configurator.setRootLevel(Level.DEBUG);
|
Logger.getRootLogger().setLevel(Level.DEBUG);
|
||||||
|
|
||||||
// Add ?profileSQL=true to generate huge logs.
|
// Add ?profileSQL=true to generate huge logs.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2024 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2018 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -18,13 +18,12 @@
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.sikevadb.sql;
|
package fr.devinsy.sikevadb.sql;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.log4j.BasicConfigurator;
|
||||||
import org.apache.logging.log4j.core.config.Configurator;
|
import org.apache.log4j.Level;
|
||||||
import org.apache.logging.log4j.core.config.DefaultConfiguration;
|
import org.apache.log4j.Logger;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
@ -33,7 +32,7 @@ import org.junit.Test;
|
||||||
import fr.devinsy.sikevadb.core.Element;
|
import fr.devinsy.sikevadb.core.Element;
|
||||||
import fr.devinsy.sikevadb.core.Elements;
|
import fr.devinsy.sikevadb.core.Elements;
|
||||||
import fr.devinsy.sikevadb.core.SikevaDBException;
|
import fr.devinsy.sikevadb.core.SikevaDBException;
|
||||||
import fr.devinsy.strings.StringList;
|
import fr.devinsy.util.strings.StringList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class SQLSikevaDBTest.
|
* The Class SQLSikevaDBTest.
|
||||||
|
@ -62,9 +61,9 @@ public class SQLSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -98,9 +97,9 @@ public class SQLSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now());
|
element.setCreationDate(DateTime.now());
|
||||||
element.setEditionDate(LocalDateTime.now());
|
element.setEditionDate(DateTime.now());
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -380,9 +379,9 @@ public class SQLSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -413,9 +412,9 @@ public class SQLSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -447,9 +446,9 @@ public class SQLSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -462,9 +461,9 @@ public class SQLSikevaDBTest
|
||||||
element.setSubkey(null);
|
element.setSubkey(null);
|
||||||
element.setSize(10);
|
element.setSize(10);
|
||||||
element.setDigest("qsdkfqskjf");
|
element.setDigest("qsdkfqskjf");
|
||||||
element.setCreationDate(LocalDateTime.now().minusDays(11));
|
element.setCreationDate(DateTime.now().minusDays(11));
|
||||||
element.setEditionDate(LocalDateTime.now().minusDays(11));
|
element.setEditionDate(DateTime.now().minusDays(11));
|
||||||
element.setArchiveDate(LocalDateTime.now().minusDays(10));
|
element.setArchiveDate(DateTime.now().minusDays(10));
|
||||||
element.setValue("bonjour");
|
element.setValue("bonjour");
|
||||||
|
|
||||||
database.put(element);
|
database.put(element);
|
||||||
|
@ -692,8 +691,8 @@ public class SQLSikevaDBTest
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws SikevaDBException
|
public static void beforeClass() throws SikevaDBException
|
||||||
{
|
{
|
||||||
Configurator.initialize(new DefaultConfiguration());
|
BasicConfigurator.configure();
|
||||||
Configurator.setRootLevel(Level.DEBUG);
|
Logger.getRootLogger().setLevel(Level.ERROR);
|
||||||
|
|
||||||
// Add ?profileSQL=true to generate huge logs.
|
// Add ?profileSQL=true to generate huge logs.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue