Json gen for universe

sidewalk-01
Edward M. Kagan 5 years ago
parent 7601152f55
commit 5b9a60b0f1

@ -1,382 +1,420 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="20"> <profiles version="20">
<profile kind="CodeFormatterProfile" name="2pm.tech" version="20"> <profile kind="CodeFormatterProfile" name="2pm.tech" version="20">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="81"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_if_single_item"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_if_single_item"/>
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="83"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_if_single_item"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="3"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="17"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_if_single_item"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/> <setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line_on_wrap"/> <setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line_on_wrap"/> <setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="4"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="true"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="81"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="82"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="1"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="false"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="17"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="82"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line_on_wrap"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="83"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="true"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="82"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="83"/>
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_if_empty"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="34"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="83"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="1"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="0"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="82"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line_on_wrap"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_always"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line_on_wrap"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_if_empty"/> <setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/> <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/> <setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="16"/> <setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/> <setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/> <setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/> <setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="18"/> <setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="34"/> <setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/> <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="false"/> <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/> <setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/> <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="true"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="next_line_on_wrap"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="82"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="82"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="1"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="next_line_on_wrap"/> <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_if_empty"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line_on_wrap"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line_on_wrap"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="false"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="true"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="false"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/> <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_if_single_item"/>
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_if_single_item"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_if_single_item"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_always"/>
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_if_single_item"/>
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="3"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
</profile> </profile>
</profiles> </profiles>

@ -13,7 +13,8 @@
<module>traqtor-generator</module> <module>traqtor-generator</module>
<module>traqtor-schema</module> <module>traqtor-schema</module>
<module>traqtor-schema-ref</module> <module>traqtor-schema-ref</module>
<module>traqtor-api</module> --> <module>traqtor-api</module>
<module>traqtor-json</module> -->
<module>traqtor-aio</module> <module>traqtor-aio</module>
</modules> </modules>

@ -0,0 +1,54 @@
package link.pagan.traqtor;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;
import link.pagan.traqtor.util.FileHandle;
import link.pagan.traqtor.project.Project;
import link.pagan.traqtor.project.universe.UniverseProject;
import link.pagan.traqtor.project.universe.UniverseProjectSerializer;
import link.pagan.traqtor.project.universe.element.Element;
import link.pagan.traqtor.project.universe.element.ElementSerializer;
import link.pagan.traqtor.project.universe.element.Particle;
import link.pagan.traqtor.project.universe.element.PaticleInfoSerializer;
import link.pagan.traqtor.project.universe.link.Link;
import link.pagan.traqtor.project.universe.link.LinkSerializer;
import link.pagan.traqtor.project.universe.schema.Constraint;
import link.pagan.traqtor.project.universe.schema.ConstraintInfoSerializer;
import link.pagan.traqtor.util.Name;
import link.pagan.traqtor.util.NameSerializer;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class Traqtor {
private static final Traqtor PROJECT_IO = new Traqtor();
private final ObjectMapper mapper;
private Traqtor () {
mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
SimpleModule module = new SimpleModule();
module.addSerializer(Name.class, new NameSerializer());
module.addSerializer(UniverseProject.class, new UniverseProjectSerializer());
module.addSerializer(Element.class, new ElementSerializer());
module.addSerializer(Particle.class, new PaticleInfoSerializer());
module.addSerializer(Constraint.class, new ConstraintInfoSerializer());
module.addSerializer(Link.class, new LinkSerializer());
mapper.registerModule(module);
}
public static Traqtor io () {
return PROJECT_IO;
}
public FileHandle toFileHandle (Project project) throws JsonProcessingException {
if (project.getClass().equals(UniverseProject.class)) {
String json = mapper.writeValueAsString((UniverseProject) project);
return new FileHandle(project.name().asDotted(), "uni", json);
}
return null;
}
}

@ -1,7 +1,7 @@
package link.pagan.traqtor; package link.pagan.traqtor;
import link.pagan.traqtor.project.Project; import link.pagan.traqtor.project.Project;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ /** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
class Workspace { class Workspace {

@ -0,0 +1,79 @@
//package link.pagan.traqtor.mapping;
//
//
//
//import java.util.List;
//import link.pagan.traqtor.outdated.schema.basic.data.mapping.MappingSchemaImpl;
//import link.pagan.traqtor.project.universe.schema.DataType;
//import link.pagan.traqtor.util.Name;
//
//
///**
// *
// * @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
// */
//public class DataTypeSchemaReferenceImplementation implements DataTypeSchema {
//
// private static final Name name = Name.of("traqtor", "basic");
//
// // ARRAY(""),
// // LIST(""),
// // SET(""),
//// // MAP(""),
//// public static final DataType BOOLEAN = new DataType("boolean");
//// public static final DataType BYTE = new DataType("byte");
//// public static final DataType SHORT = new DataType("short");
//// public static final DataType INTEGER = new DataType("int");
//// public static final DataType LONG = new DataType("long");
//// public static final DataType FLOAT = new DataType("float");
//// public static final DataType DOUBLE = new DataType("double");
//// public static final DataType STRING = new DataType("string");
//// public static final DataType DATE = new DataType("date");
//// public static final DataType TIME = new DataType("time");
//// public static final DataType TIMESTAMP = new DataType("timestamp");
//// public static final DataType ID = new DataType("id");
//// public static final DataType UUID = new DataType("uuid");
////
//// private static final List<DataType> dataTypes = List.of(BOOLEAN, BYTE, SHORT, INTEGER, LONG, FLOAT, DOUBLE, STRING,
//// DATE, TIME, TIMESTAMP, ID, UUID);
//
//// private static final List<MappingSchema> mappingSchemas = List.of(new MappingSchemaImpl());
//
//// @Override
//// public List<DataType> getDataTypes() {
//// return dataTypes;
//// }
////
//// @Override
//// public Name getName() {
//// return name;
//// }
////
//// @Override
//// public List<MappingSchema> getMappingSchema() {
//// return mappingSchemas;
//// }
//
//// @Override
//// public Map<String, DataType> register() {
//// return new HashMap<String, DataType>(){
//// private static final long serialVersionUID = 1L;
//// {
//// put(BOOLEAN.getName(), BOOLEAN);
//// put(BYTE.getName(), BYTE);
//// put(SHORT.getName(), SHORT);
//// put(INTEGER.getName(), INTEGER);
//// put(LONG.getName(), LONG);
//// put(FLOAT.getName(), FLOAT);
//// put(DOUBLE.getName(), DOUBLE);
//// put(STRING.getName(), STRING);
//// put(BOOLEAN.getName(), BOOLEAN);
//// put(DATE.getName(), DATE);
//// put(TIME.getName(), TIME);
//// put(TIMESTAMP.getName(), TIMESTAMP);
//// put(ID.getName(), ID);
//// put(UUID.getName(), UUID);
//// }};
//// }
//
//}

@ -0,0 +1,21 @@
package link.pagan.traqtor.mapping;
import java.util.HashMap;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public abstract class Mapping {
private final String name;
private final HashMap<MappingEntry, String> mapping;
protected Mapping (String name, HashMap<MappingEntry, String> mapping) {
this.mapping = mapping;
this.name = name;
}
public String getName () { return name; }
public HashMap<MappingEntry, String> getMapping () { return mapping; }
}

@ -0,0 +1,26 @@
package link.pagan.traqtor.mapping;
import link.pagan.traqtor.project.universe.schema.DataType;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class MappingEntry {
private final DataType dataType;
private final boolean nullable;
private final boolean keyable;
public MappingEntry (DataType dataType, boolean nullable, boolean keyable) {
this.dataType = dataType;
this.nullable = nullable;
this.keyable = keyable;
}
public DataType getDataType () { return dataType; }
public boolean isNullable () { return nullable; }
public boolean isKeyable () { return keyable; }
}

@ -0,0 +1,10 @@
package link.pagan.traqtor.mapping;
import java.util.List;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public interface MappingSchema {
public List<MappingEntry> getMappings ();
}

@ -0,0 +1,77 @@
// package link.pagan.traqtor.mapping;
//
//
// import java.util.List;
// import link.pagan.traqtor.util.Name;
//
//
/// **
// *
// * @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
// */
// public class MappingSchemaImpl implements MappingSchema {
//
// private static final Name name = Name.of("traqtor", "basic", "default");
////
//// public static final MappingEntry NULLABLE_BOOLEAN = new MappingEntry(DataTypeSchemaReferenceImplementation.BOOLEAN
// , true , false );
//// public static final MappingEntry BOOLEAN = new MappingEntry(DataTypeSchemaReferenceImplementation.BOOLEAN , false ,
// true );
//// public static final MappingEntry NULLABLE_BYTE = new MappingEntry(DataTypeSchemaReferenceImplementation.BYTE , true
// , false );
//// public static final MappingEntry BYTE = new MappingEntry(DataTypeSchemaReferenceImplementation.BYTE , false , true
// );
//// public static final MappingEntry NULLABLE_SHORT = new MappingEntry(DataTypeSchemaReferenceImplementation.SHORT ,
// true , false );
//// public static final MappingEntry SHORT = new MappingEntry(DataTypeSchemaReferenceImplementation.SHORT , false ,
// true );
//// public static final MappingEntry NULLABLE_INTEGER = new MappingEntry(DataTypeSchemaReferenceImplementation.INTEGER
// , true , false );
//// public static final MappingEntry INTEGER = new MappingEntry(DataTypeSchemaReferenceImplementation.INTEGER , false ,
// true );
//// public static final MappingEntry NULLABLE_LONG = new MappingEntry(DataTypeSchemaReferenceImplementation.LONG , true
// , false );
//// public static final MappingEntry LONG = new MappingEntry(DataTypeSchemaReferenceImplementation.LONG , false , true
// );
//// public static final MappingEntry NULLABLE_FLOAT = new MappingEntry(DataTypeSchemaReferenceImplementation.FLOAT ,
// true , false );
//// public static final MappingEntry FLOAT = new MappingEntry(DataTypeSchemaReferenceImplementation.FLOAT , false ,
// false );
//// public static final MappingEntry NULLABLE_DOUBLE = new MappingEntry(DataTypeSchemaReferenceImplementation.DOUBLE ,
// true , false );
//// public static final MappingEntry DOUBLE = new MappingEntry(DataTypeSchemaReferenceImplementation.DOUBLE , false ,
// false );
//// public static final MappingEntry STRING = new MappingEntry(DataTypeSchemaReferenceImplementation.STRING , true ,
// false );
//// public static final MappingEntry DATE = new MappingEntry(DataTypeSchemaReferenceImplementation.DATE , true , false
// );
//// public static final MappingEntry TIME = new MappingEntry(DataTypeSchemaReferenceImplementation.TIME , true , false
// );
//// public static final MappingEntry TIMESTAMP = new MappingEntry(DataTypeSchemaReferenceImplementation.TIMESTAMP ,
// true , false );
//// public static final MappingEntry ID = new MappingEntry(DataTypeSchemaReferenceImplementation.ID , true , true );
//// public static final MappingEntry UUID = new MappingEntry(DataTypeSchemaReferenceImplementation.UUID , true , true
// );
////
//// private static final List<MappingEntry> mappings = List.of(NULLABLE_BOOLEAN, BOOLEAN,
//// NULLABLE_BYTE, BYTE,
//// NULLABLE_SHORT, SHORT,
//// NULLABLE_INTEGER, INTEGER,
//// NULLABLE_LONG, LONG,
//// NULLABLE_FLOAT, FLOAT,
//// NULLABLE_DOUBLE, DOUBLE,
//// STRING,
//// DATE, TIME, TIMESTAMP,
//// ID, UUID);
////
//// @Override
//// public List<MappingEntry> getMappings() {
//// return mappings;
//// }
////
//// @Override
//// public Name getName() {
//// return name;
//// }
//
// }

@ -0,0 +1,14 @@
package link.pagan.traqtor.mapping.backend;
import java.util.HashMap;
import link.pagan.traqtor.mapping.Mapping;
import link.pagan.traqtor.mapping.MappingEntry;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class BackendMapping extends Mapping {
public BackendMapping (String name, HashMap<MappingEntry, String> mapping) {
super(name, mapping);
}
}

@ -0,0 +1,14 @@
package link.pagan.traqtor.mapping.frontend;
import java.util.HashMap;
import link.pagan.traqtor.mapping.Mapping;
import link.pagan.traqtor.mapping.MappingEntry;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class FrontendMapping extends Mapping {
public FrontendMapping (String name, HashMap<MappingEntry, String> mapping) {
super(name, mapping);
}
}

@ -1,26 +0,0 @@
package link.pagan.traqtor.outdated._api;
// package link.pagan.traqtor._api;
// import link.pagan.traqtor._api.result.CommandExecResult;
// /**
// *
// * @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
// */
// public abstract class BinaryCommand<T extends Commanded, R extends Commanded> extends UnaryCommand<T> {
// protected R arg2;
// public CommandExecResult subexec(BinaryCommand<T, R> subcommand) {
// subcommand.setResultHolder(result);
// subcommand.setArg(arg);
// subcommand.setArg2(arg2);
// return subcommand.exec();
// }
// public void setArg2(R arg2) {
// this.arg2 = arg2;
// }
// }

@ -1,9 +0,0 @@
package link.pagan.traqtor.outdated._api;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public interface Commanded {
}

@ -1,33 +0,0 @@
package link.pagan.traqtor.outdated._api;
//package link.pagan.traqtor._api;
//
//import link.pagan.traqtor._api.result.CommandExecResult;
//import link.pagan.traqtor._api.result.CommandExecResultStatus;
//
///**
// *
// * @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
// */
//public abstract class Executor<T extends Executor<T>> extends Commanded<T> {
//
//
//
// @SuppressWarnings("unchecked")
// public CommandExecResult execute(Command<T> command) {
// CommandExecResult result = new CommandExecResult();
// command.setResultHolder(result);
// command.exec((T) this);
// if (!mute) {
// if (paranoindLoggin) {
// result.print();
// } else {
// if (result.getStatus() != CommandExecResultStatus.DONE) {
// result.print();
// }
// }
// }
// return result;
// }
//
//}

@ -1,77 +0,0 @@
package link.pagan.traqtor.outdated._api;
import link.pagan.traqtor.outdated._api.result.CommandExecResult;
import link.pagan.traqtor.outdated._api.result.message.CommandExecMessage;
import link.pagan.traqtor.outdated._api.result.message.CommandExecMessageStatus;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public abstract class UnaryCommand<T extends Commanded> {
private static boolean paranoindLoggin = false;
private static boolean mute = true;
public static void enableParanoindLoggin() {
enableLog();
paranoindLoggin = true;
}
public static void enableLog() {
mute = false;
}
protected CommandExecResult result;
protected T arg;
public abstract CommandExecResult exec();
public CommandExecResult subexec(UnaryCommand<T> subcommand) {
subcommand.setResultHolder(result);
subcommand.setArg(arg);
return subcommand.exec();
}
protected CommandExecResult fail(String message) {
result.add(new CommandExecMessage(CommandExecMessageStatus.FAIL, message));
return result;
}
protected CommandExecResult info(String message) {
result.add(new CommandExecMessage(CommandExecMessageStatus.INFO, message));
return result;
}
protected CommandExecResult warn(String message) {
result.add(new CommandExecMessage(CommandExecMessageStatus.WARN, message));
return result;
}
protected CommandExecResult done(String message) {
result.add(new CommandExecMessage(CommandExecMessageStatus.DONE, message));
return result;
}
protected CommandExecResult done() {
result.add(new CommandExecMessage(CommandExecMessageStatus.DONE, "OK"));
return result;
}
public void setResultHolder(CommandExecResult result) {
this.result = result;
}
public void setArg(T arg) {
this.arg = arg;
}
public static boolean paranoidLoggingEnabled() {
return paranoindLoggin;
}
public static boolean mute() {
return mute;
}
}

@ -1,42 +0,0 @@
package link.pagan.traqtor.outdated._api.result;
import java.util.ArrayList;
import link.pagan.traqtor.outdated._api.result.message.CommandExecMessage;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class CommandExecResult {
final ArrayList<CommandExecMessage> messages;
public CommandExecResult() {
this.messages = new ArrayList<CommandExecMessage>();
}
public void add(CommandExecMessage message) {
this.messages.add(message);
}
public boolean OK () {
return this.getStatus() != CommandExecResultStatus.FAIL;
}
public CommandExecResultStatus getStatus() {
int status = 100;
for (CommandExecMessage message : messages) {
if (status > message.getStatus().getCode()) {
status = message.getStatus().getCode();
}
}
return CommandExecResultStatus.ofCode(status);
}
public void print() {
for (CommandExecMessage message : messages) {
message.print();
}
}
}

@ -1,27 +0,0 @@
package link.pagan.traqtor.outdated._api.result;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public enum CommandExecResultStatus {
DONE(0),
WARN(-1),
FAIL(-2);
int code;
private CommandExecResultStatus(int code) {
this.code = code;
}
public int getCode() {
return code;
}
public static CommandExecResultStatus ofCode (int code) {
if (code < -1) return FAIL;
if (code == -1) return WARN;
return DONE;
}
}

@ -1,33 +0,0 @@
package link.pagan.traqtor.outdated._api.result.message;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class CommandExecMessage {
final CommandExecMessageStatus status;
final String message;
public CommandExecMessage(CommandExecMessageStatus status, String message) {
this.status = status;
this.message = message;
}
public CommandExecMessageStatus getStatus() {
return status;
}
public String getMessage() {
return message;
}
public void print() {
// if (status.getCode() < 0) {
System.out.println(status.toString() + " : " + message);
// } else {
// System.out.println(status.toString() + " : " + message);
// }
}
}

@ -1,28 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated._api.result.message;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public enum CommandExecMessageStatus {
INFO(1),
DONE(0),
WARN(-1),
FAIL(-2);
int code;
private CommandExecMessageStatus(int code) {
this.code = code;
}
public int getCode() {
return code;
}
}

@ -1,298 +0,0 @@
package link.pagan.traqtor.outdated.api;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import link.pagan.traqtor.outdated._api.UnaryCommand;
import link.pagan.traqtor.outdated._api.result.CommandExecResult;
import link.pagan.traqtor.outdated._api.result.message.CommandExecMessage;
import link.pagan.traqtor.outdated._api.result.message.CommandExecMessageStatus;
import link.pagan.traqtor.outdated.api.project.Project;
import link.pagan.traqtor.outdated.api.project.universe.UniverseProject;
import link.pagan.traqtor.outdated.api.workspace.Workspace;
import link.pagan.traqtor.outdated.schema.data.DataTypeSchema;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class API {
private static boolean workspaceExists (CommandExecResult result, Traqtor traqtor) {
if (traqtor.workspace() == null) {
result.add(new CommandExecMessage(CommandExecMessageStatus.FAIL, "No workspace initialized"));
return false;
}
return true;
}
public static class CreateWorkspace extends UnaryCommand<Traqtor> {
private final Name name;
private final String path;
public CreateWorkspace() {
this(Workspace.DEFAULT_WORKSPACE_NAME);
}
public CreateWorkspace(Name name) {
this(name, null);
}
public CreateWorkspace(Name name, String path) {
this.name = name;
this.path = path;
}
@Override
public CommandExecResult exec() {
if (arg.workspace() != null) {
return fail("There is an open workspace - please close this first, before creating new one");
}
arg.workspace(new Workspace());
arg.workspace().name(name);
subexec(new API.WorkspaceLoadDataTypeSchema(Name.of("traqtor", "basic")));
if (!result.OK()) {
arg.workspace(null);
return result;
}
if (path != null) {
subexec(new SaveAsWorkspace(path));
if (!result.OK()) {
arg.workspace(null);
return result;
}
}
return done();
}
}
public static class SaveAsWorkspace extends UnaryCommand<Traqtor> {
private final String workspacePath;
public SaveAsWorkspace(String workspacePath) {
this.workspacePath = workspacePath;
}
@Override
public CommandExecResult exec() {
File workspaceDir = new File(workspacePath);
if (!workspaceDir.exists()) {
if (!workspaceDir.mkdir()) {
return fail("Failed to create workspace root directory at " + workspacePath);
} else {
info("Workspace root directory created at " + workspacePath);
}
} else {
if (workspaceDir.listFiles().length > 0) {
return fail("Root directory is not empty, failed to assing " + workspacePath + " as root for workspace");
}
}
File workspaceFile = new File(workspacePath, Workspace.JSON_FILENAME + ".json");
if (!workspaceFile.exists()) {
try {
if (!workspaceFile.createNewFile()) {
return fail("Failed to create " + Workspace.JSON_FILENAME + ".json in workspace root directory");
}
} catch (IOException ex) {
return fail("IO erorr while creating " + Workspace.JSON_FILENAME + ".json in workspace root directory");
}
}
String hold = arg.workspace().root();
arg.workspace().root(workspacePath);
subexec(new SaveWorkspace());
if (!result.OK()) {
arg.workspace().root(hold);
return result;
}
return done();
}
}
public static class SaveWorkspace extends UnaryCommand<Traqtor> {
@Override
public CommandExecResult exec() {
String workspacePath = arg.workspace().root();
if (arg.workspace().root() == null) {
return fail("Workspace was not saved before - use \"save as\" command for the first save");
}
File workspaceFile = new File(workspacePath, Workspace.JSON_FILENAME + ".json");
if (!workspaceFile.exists()) {
return fail("Failed to save, " + Workspace.JSON_FILENAME + ".json does not exist, workspace corrupted?");
}
if (!workspaceFile.canWrite()) {
return fail("Can not write " + Workspace.JSON_FILENAME + ".json - permission denied");
}
try {
arg.workspace().mapper().writeValue(workspaceFile, arg.workspace());
} catch (IOException ex) {
System.err.println(ex);
return fail("Failed to write " + Workspace.JSON_FILENAME + ".json");
}
arg.workspace().dirty(false);
return done();
}
}
public static class LoadWorkspace extends UnaryCommand<Traqtor> {
private final String workspacePath;
public LoadWorkspace(String workspacePath) {
this.workspacePath = workspacePath;
}
@Override
public CommandExecResult exec() {
File workspaceFile = new File(workspacePath, Workspace.JSON_FILENAME + ".json");
if (!workspaceFile.exists()) {
return fail("No " + Workspace.JSON_FILENAME + ".json file found in selected directory, missed?");
}
ObjectMapper mapper = new ObjectMapper();
SimpleModule module = new SimpleModule();
module.addDeserializer(Workspace.class, new Workspace.WorkspaceDeserializer());
mapper.registerModule(module);
Workspace workspace = null;
try {
workspace = mapper.readValue(workspaceFile, Workspace.class);
} catch (IOException ex) {
System.err.println(ex);
return fail("Failed to read " + workspaceFile.getAbsolutePath());
}
workspace.root(workspacePath);
HashMap<Name, DataTypeSchema> schemas = workspace.dataTypeSchemas();
for (Name name : schemas.keySet()) {
if (schemas.get(name) == null) {
DataTypeSchema loaded = arg.dataTypeSchemas.get(name);
if (loaded == null) {
warn("Shema with name " + name.asDotted() + " was not found in system. Preload or give up");
} else {
schemas.put(name, loaded);
info("Shema " + name.asDotted() + " was found and loaded into workspace on load");
}
}
}
arg.workspace(workspace);
return done();
}
}
public static class WorkspaceLoadDataTypeSchema extends UnaryCommand<Traqtor> {
private final Name name;
public WorkspaceLoadDataTypeSchema(Name name) {
this.name = name;
}
@Override
public CommandExecResult exec() {
if (!workspaceExists(result, arg)) {
return result;
}
DataTypeSchema schema = arg.dataTypeSchemas.get(this.name);
if (schema == null) {
return fail("Unable to load data type schema by name " + name.asDotted());
}
arg.workspace().dataTypeSchemas().put(schema.getName(), schema);
return done();
}
}
public static class WorkspaceCreateUniverseProject extends UnaryCommand<Traqtor> {
private final Name name;
private final Name schema;
public WorkspaceCreateUniverseProject(Name name, Name schema) {
this.name = name;
this.schema = schema;
}
@Override
public CommandExecResult exec() {
if (!workspaceExists(result, arg)) {
return result;
}
Workspace workspace = arg.workspace();
DataTypeSchema dataTypeSchema = workspace.dataTypeSchemas().get(schema);
if (dataTypeSchema == null) {
return fail("Data type schema with name " + schema.asDotted() + " was not found");
}
if (workspace.projects().containsKey(this.name)) {
return fail("Project with name " + this.name + " already exists");
}
Project project = new UniverseProject(name, dataTypeSchema);
workspace.projects().put(project.name(), project);
workspace.dirty(true);
CommandExecResult saveResult = arg.execute(new API.SaveWorkspace());
if (!saveResult.OK()) {
return fail("Failed to save workspace, after project addition");
}
return done();
}
}
public static class ProjectSave extends UnaryCommand<Traqtor> {
private final Name name;
private final Name schema;
public ProjectSave(Name name, Name schema) {
this.name = name;
this.schema = schema;
}
@Override
public CommandExecResult exec() {
if (!workspaceExists(result, arg)) {
return result;
}
Workspace workspace = arg.workspace();
DataTypeSchema dataTypeSchema = workspace.dataTypeSchemas().get(schema);
if (dataTypeSchema == null) {
return fail("Data type schema with name " + schema.asDotted() + " was not found");
}
if (workspace.projects().containsKey(this.name)) {
return fail("Project with name " + this.name + " already exists");
}
Project project = new UniverseProject(name, dataTypeSchema);
workspace.projects().put(project.name(), project);
workspace.dirty(true);
CommandExecResult saveResult = arg.execute(new API.SaveWorkspace());
if (!saveResult.OK()) {
return fail("Failed to save workspace, after project addition");
}
return done();
}
}
}

@ -1,63 +0,0 @@
package link.pagan.traqtor.outdated.api;
import java.util.HashMap;
import java.util.Map;
import link.pagan.traqtor.outdated._api.UnaryCommand;
import link.pagan.traqtor.outdated._api.Commanded;
import link.pagan.traqtor.outdated._api.result.CommandExecResult;
import link.pagan.traqtor.outdated._api.result.CommandExecResultStatus;
import link.pagan.traqtor.outdated.api.workspace.Workspace;
import link.pagan.traqtor.outdated.schema.basic.data.DataTypeSchemaReferenceImplementation;
import link.pagan.traqtor.outdated.schema.data.DataTypeSchema;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class Traqtor implements Commanded {
private Workspace workspace;
Map<Name, DataTypeSchema> dataTypeSchemas;
public static Traqtor init() {
Traqtor traqtor = new Traqtor();
traqtor.registerDataTypeSchema(new DataTypeSchemaReferenceImplementation());
return traqtor;
}
private void registerDataTypeSchema(DataTypeSchema schema) {
this.dataTypeSchemas.put(schema.getName(), schema);
}
private Traqtor() {
this.dataTypeSchemas = new HashMap<>();
}
public Workspace workspace() {
return workspace;
}
public void workspace(Workspace workspace) {
this.workspace = workspace;
}
public CommandExecResult execute(UnaryCommand<Traqtor> command) {
CommandExecResult result = new CommandExecResult();
command.setResultHolder(result);
command.setArg(this);
command.exec();
if (!UnaryCommand.mute()) {
if (UnaryCommand.paranoidLoggingEnabled()) {
result.print();
} else {
if (result.getStatus() != CommandExecResultStatus.DONE) {
result.print();
}
}
}
return result;
}
}

@ -1,40 +0,0 @@
package link.pagan.traqtor.outdated.api.project;
import link.pagan.traqtor.outdated._api.Commanded;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public abstract class Project implements Commanded {
private final ProjectType type;
private Name name;
private boolean dirty;
public Project(ProjectType type, Name name) {
this.type = type;
this.name = name;
this.dirty = true;
}
public ProjectType type() {
return type;
}
public Name name() {
return name;
}
public boolean dirty() {
return dirty;
}
public void dirty(boolean dirty) {
this.dirty = dirty;
}
}

@ -1,74 +0,0 @@
package link.pagan.traqtor.outdated.api.project;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public enum ProjectType {
UNIVERSE("universe"),
DATABASE("database"),
FRONTEND("frontend"),
BACKEND("backend");
String jsonValue;
private ProjectType(String jsonValue) {
this.jsonValue = jsonValue;
}
public static final class ProjectTypeSerializer extends StdSerializer<ProjectType> {
private static final long serialVersionUID = 1L;
public ProjectTypeSerializer() {
this(null);
}
public ProjectTypeSerializer(Class<ProjectType> t) {
super(t);
}
@Override
public void serialize(ProjectType value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeString(value.jsonValue);
}
}
public static final class ProjectTypeDeserializer extends StdDeserializer<ProjectType> {
private static final long serialVersionUID = 1L;
public ProjectTypeDeserializer() {
this(null);
}
public ProjectTypeDeserializer(Class<ProjectType> t) {
super(t);
}
@Override
public ProjectType deserialize(JsonParser parser, DeserializationContext ctxt) throws IOException, JsonProcessingException {
JsonNode stringType = parser.getCodec().readTree(parser);
String type = stringType.asText();
for (ProjectType pt : values()) {
if (pt.jsonValue.equals(type)) {
return pt;
}
}
return null;
}
}
}

@ -1,22 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.api.project.backend;
import link.pagan.traqtor.outdated.api.project.Project;
import link.pagan.traqtor.outdated.api.project.ProjectType;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class BackendProject extends Project {
public BackendProject(Name name) {
super(ProjectType.BACKEND, name);
}
}

@ -1,22 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.api.project.database;
import link.pagan.traqtor.outdated.api.project.Project;
import link.pagan.traqtor.outdated.api.project.ProjectType;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class DatabaseProject extends Project {
public DatabaseProject(Name name) {
super(ProjectType.DATABASE, name);
}
}

@ -1,22 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.api.project.frontend;
import link.pagan.traqtor.outdated.api.project.Project;
import link.pagan.traqtor.outdated.api.project.ProjectType;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class FrontendProject extends Project {
public FrontendProject(Name name) {
super(ProjectType.FRONTEND, name);
}
}

@ -1,22 +0,0 @@
package link.pagan.traqtor.outdated.api.project.universe;
import link.pagan.traqtor.outdated.api.project.Project;
import link.pagan.traqtor.outdated.api.project.ProjectType;
import link.pagan.traqtor.outdated.schema.data.DataTypeSchema;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class UniverseProject extends Project {
DataTypeSchema dataTypeSchema;
public UniverseProject(Name name, DataTypeSchema dataTypeSchema) {
super(ProjectType.UNIVERSE, name);
this.dataTypeSchema = dataTypeSchema;
}
}

@ -1,188 +0,0 @@
package link.pagan.traqtor.outdated.api.workspace;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import link.pagan.traqtor.outdated._api.Commanded;
import link.pagan.traqtor.outdated.api.project.Project;
import link.pagan.traqtor.outdated.generator.blueprint.universe.AtomBlueprint;
import link.pagan.traqtor.outdated.generator.blueprint.universe.LinkBlueprint;
import link.pagan.traqtor.outdated.generator.blueprint.universe.LinkType;
import link.pagan.traqtor.outdated.generator.blueprint.universe.ParticleBlueprint;
import link.pagan.traqtor.outdated.generator.blueprint.universe.UniverseBlueprint;
import link.pagan.traqtor.outdated.schema.data.DataTypeSchema;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class Workspace implements Commanded {
public static final String JSON_FILENAME = "workspace";
public static final Name DEFAULT_WORKSPACE_NAME = Name.of("workspace");
private final ObjectMapper mapper;
private boolean dirty;
private String root;
private Name name;
private HashMap<Name, DataTypeSchema> schemas;
private HashMap<Name, Project> projects;
public Workspace() {
this.mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
SimpleModule module = new SimpleModule();
module.addSerializer(Workspace.class, new Workspace.WorkspaceSerializer());
module.addSerializer(UniverseBlueprint.class, new UniverseBlueprint.UniverseBlueprintSerializer());
module.addSerializer(Name.class, new Name.NameSerializer());
module.addDeserializer(Name.class, new Name.NameDeserializer());
module.addSerializer(ParticleBlueprint.class, new ParticleBlueprint.ParticleBlueprintSerializer());
module.addSerializer(AtomBlueprint.class, new AtomBlueprint.AtomBlueprintSerializer());
module.addSerializer(LinkBlueprint.class, new LinkBlueprint.LinkBlueprintSerializer());
module.addSerializer(LinkType.class, new LinkType.LinkTypeSerializer());
mapper.registerModule(module);
this.dirty = true;
this.projects = new HashMap<>();
this.schemas = new HashMap<>();
}
public Name name() {
return name;
}
public String root() {
return root;
}
public void root(String root) {
this.root = root;
}
public void name(Name name) {
this.name = name;
}
public ObjectMapper mapper() {
return mapper;
}
public boolean dirty() {
return dirty;
}
public void dirty(boolean dirty) {
this.dirty = dirty;
}
public HashMap<Name, DataTypeSchema> dataTypeSchemas() {
return schemas;
}
public HashMap<Name, Project> projects() {
return projects;
}
public static final class WorkspaceSerializer extends StdSerializer<Workspace> {
private static final long serialVersionUID = 1L;
public WorkspaceSerializer() {
this(null);
}
public WorkspaceSerializer(Class<Workspace> t) {
super(t);
}
@Override
public void serialize(Workspace value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeObjectField("name", value.name);
gen.writeBooleanField("pretty", value.mapper.isEnabled(SerializationFeature.INDENT_OUTPUT));
gen.writeArrayFieldStart("schemas");
ArrayList<Name> schemaNames = new ArrayList<>();
for (Name schemaName : value.schemas.keySet()) {
schemaNames.add(schemaName);
}
schemaNames.sort(Name.COMPARATOR);
for (Name name : schemaNames) {
gen.writeObject(name);
}
gen.writeEndArray();
gen.writeArrayFieldStart("projects");
ArrayList<Name> projectNames = new ArrayList<>();
for (Name projectName : value.projects.keySet()) {
projectNames.add(projectName);
}
projectNames.sort(Name.COMPARATOR);
for (Name name : projectNames) {
gen.writeObject(name);
}
gen.writeEndArray();
gen.writeEndObject();
}
}
public static final class WorkspaceDeserializer extends StdDeserializer<Workspace> {
private static final long serialVersionUID = 1L;
public WorkspaceDeserializer() {
this(null);
}
public WorkspaceDeserializer(Class<Workspace> t) {
super(t);
}
@Override
public Workspace deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException {
Workspace workspace = new Workspace();
JsonNode node = parser.getCodec().readTree(parser);
boolean pretty = node.get("pretty").asBoolean(false);
if (pretty) {
workspace.mapper.enable(SerializationFeature.INDENT_OUTPUT);
} else {
workspace.mapper.disable(SerializationFeature.INDENT_OUTPUT);
}
Name name = workspace.mapper.treeToValue(node.get("name"), Name.class);
workspace.name(name);
for (JsonNode schema : node.get("schemas")) {
Name readValue = workspace.mapper.readValue(schema.toString(), Name.class);
workspace.schemas.put(readValue, null);
}
for (JsonNode project : node.get("projects")) {
workspace.projects.put(workspace.mapper.readValue(project.asText(), Name.class), null);
}
workspace.dirty = false;
return workspace;
}
}
}

@ -1,15 +0,0 @@
package link.pagan.traqtor.outdated.framework.data;
//package link.pagan.traqtor.framework.data;
//
//import org.apache.cayenne.BaseDataObject;
//
///**
// *
// * @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
// */
//public class DatabaseDataObject extends BaseDataObject {
//
// private static final long serialVersionUID = 1448137394405559485L;
//
//}

@ -1,14 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.framework.logic;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class Registry {
}

@ -1,14 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.framework.logic;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class Resource {
}

@ -1,14 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.framework.logic;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class Service {
}

@ -1,30 +0,0 @@
package link.pagan.traqtor.outdated.generator;
import link.pagan.traqtor.outdated.generator.blueprint.database.builder.ColumnBlueprintBuilder;
//import link.pagan.traqtor.outdated.generator.blueprint.database.builder.DatabaseBlueprintBuilder;
import link.pagan.traqtor.outdated.generator.blueprint.database.builder.SchemeBlueprintBuilder;
import link.pagan.traqtor.outdated.generator.blueprint.database.builder.TableBlueprintBuilder;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class R {
// public static DatabaseBlueprintBuilder database() {
// return new DatabaseBlueprintBuilder();
// }
public static SchemeBlueprintBuilder schema() {
return new SchemeBlueprintBuilder();
}
public static TableBlueprintBuilder table() {
return new TableBlueprintBuilder();
}
public static ColumnBlueprintBuilder column() {
return new ColumnBlueprintBuilder();
}
}

@ -1,20 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public abstract class ProjectBlueprint {
// String name;
// Name rootPackage;
// String description;
//
// public void assemble() {
//
// }
//
}

@ -1,14 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.backend;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class BackendBlueprint {
}

@ -1,27 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.database;
import link.pagan.traqtor.outdated.util.Name;
import link.pagan.traqtor.outdated.schema.data.DataType;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class ColumnBlueprint {
Name name;
DataType dataType;
public ColumnBlueprint(Name name) {
this.name = name;
}
}

@ -1,19 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.database;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class DatabaseBlueprint {
String name;
// private List<SchemeBlueprint> schemas;
// private DatabaseAdapter databaseAdapter;
public DatabaseBlueprint(String name) {
this.name = name;
}
}

@ -1,14 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.database;
import java.util.ArrayList;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class SchemeBlueprint {
String name;
ArrayList<TableBlueprint> tables;
}

@ -1,19 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.database;
import java.util.ArrayList;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class TableBlueprint {
String name;
ArrayList<ColumnBlueprint> columns;
}

@ -1,55 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.database.builder;
import link.pagan.traqtor.outdated.generator.blueprint.database.ColumnBlueprint;
import link.pagan.traqtor.outdated.util.Name;
import link.pagan.traqtor.outdated.schema.data.DataType;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class ColumnBlueprintBuilder {
private Name name;
private boolean pk;
private DataType dataType;
public ColumnBlueprintBuilder() {
this.pk = false;
}
public boolean pk() {
return this.pk;
}
public ColumnBlueprintBuilder pk(boolean pk) {
this.pk = pk;
return this;
}
public ColumnBlueprintBuilder name(Name name) {
this.name = name;
return this;
}
public Name name() {
return name;
}
public DataType dataType() {
return dataType;
}
public ColumnBlueprintBuilder dataType(DataType dataType) {
this.dataType = dataType;
return this;
}
public ColumnBlueprint build() {
return new ColumnBlueprint(name);
}
}

@ -1,57 +0,0 @@
//package link.pagan.traqtor.outdated.generator.blueprint.database.builder;
//
//import java.util.ArrayList;
//import java.util.Collections;
//import java.util.List;
//import link.pagan.traqtor.outdated.util.Name;
////import link.pagan.traqtor.project.database.mapping.DatabaseAdapter;
//
///**
// *
// * @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
// */
//public class DatabaseBlueprintBuilder {
//
// private Name name;
// private DatabaseAdapter adapter;
// private final List<SchemeBlueprintBuilder> schemas;
//
// public DatabaseBlueprintBuilder() {
// this.schemas = new ArrayList<SchemeBlueprintBuilder>();
// }
//
// public Name name() {
// return name;
// }
//
// public DatabaseBlueprintBuilder name(Name name) {
// this.name = name;
// return this;
// }
//
// public DatabaseAdapter adapter() {
// return adapter;
// }
//
// public DatabaseBlueprintBuilder adapter(DatabaseAdapter adapter) {
// this.adapter = adapter;
// return this;
// }
//
// public DatabaseBlueprintBuilder schemas(SchemeBlueprintBuilder... schemas) {
// if (schemas != null) {
// Collections.addAll(this.schemas, schemas);
// }
// return this;
// }
//
// public SchemeBlueprintBuilder scheme(Name name) {
// for (SchemeBlueprintBuilder sbb : schemas) {
// if (sbb.name().equals(name)) {
// return sbb;
// }
// }
// return null;
// }
//
//}

@ -1,46 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.database.builder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class SchemeBlueprintBuilder {
private Name name;
private final List<TableBlueprintBuilder> tables;
public SchemeBlueprintBuilder() {
this.tables = new ArrayList<TableBlueprintBuilder>();
}
public Name name() {
return name;
}
public SchemeBlueprintBuilder name(Name name) {
this.name = name;
return this;
}
public SchemeBlueprintBuilder tables(TableBlueprintBuilder... tables) {
if (tables != null) {
Collections.addAll(this.tables, tables);
}
return this;
}
public TableBlueprintBuilder table(Name name) {
for (TableBlueprintBuilder tbb : tables) {
if (tbb.name().equals(name)) {
return tbb;
}
}
return null;
}
}

@ -1,46 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.database.builder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class TableBlueprintBuilder {
private Name name;
private final List<ColumnBlueprintBuilder> columns;
public TableBlueprintBuilder() {
this.columns = new ArrayList<ColumnBlueprintBuilder>();
}
public Name name() {
return name;
}
public TableBlueprintBuilder name(Name name) {
this.name = name;
return this;
}
public TableBlueprintBuilder columns(ColumnBlueprintBuilder... columns) {
if (columns != null) {
Collections.addAll(this.columns, columns);
}
return this;
}
public ColumnBlueprintBuilder column(Name name) {
for (ColumnBlueprintBuilder cbb : columns) {
if (cbb.name().equals(name)) {
return cbb;
}
}
return null;
}
}

@ -1,14 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.frontend;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class FrontendBlueprint {
}

@ -1,20 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.mdl.logic;
import java.util.ArrayList;
import link.pagan.traqtor.outdated.generator.blueprint.mdl.security.permission.PermissionBlueprint;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class EndpointBlueprint {
ArrayList<PermissionBlueprint> permissions;
String name;
}

@ -1,18 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.mdl.logic;
import java.util.ArrayList;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class RegistryBlueprint {
ArrayList<EndpointBlueprint> endpoints;
}

@ -1,19 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.mdl.logic;
import java.util.ArrayList;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class ResourceBlueprint {
String name;
ArrayList<EndpointBlueprint> endpoints;
}

@ -1,14 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.mdl.logic;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class ServiceBlueprint {
}

@ -1,16 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.mdl.security.permission;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class PermissionBlueprint {
String name;
}

@ -1,20 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.mdl.security.permission;
import java.util.ArrayList;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class PermissionDomainBlueprint {
String name;
ArrayList<PermissionBlueprint> permissions;
ArrayList<PermissionDomainBlueprint> subdomains;
}

@ -1,14 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.generator.blueprint.mdl.security.role;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class RoleBlueprint {
}

@ -1,57 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.List;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class AtomBlueprint {
Name name;
String description;
List<ParticleBlueprint> particles;
public AtomBlueprint(Name name, String description, List<ParticleBlueprint> particles) {
this.name = name;
this.description = description;
this.particles = particles;
}
public Name name() {
return name;
}
public static final class AtomBlueprintSerializer extends StdSerializer<AtomBlueprint> {
private static final long serialVersionUID = 1L;
public AtomBlueprintSerializer() {
this(null);
}
public AtomBlueprintSerializer(Class<AtomBlueprint> t) {
super(t);
}
@Override
public void serialize(AtomBlueprint value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeObjectField("name", value.name);
gen.writeStringField("description", value.description);
gen.writeArrayFieldStart("particles");
for (ParticleBlueprint ab : value.particles) {
gen.writeObject(ab);
}
gen.writeEndArray();
gen.writeEndObject();
}
}
}

@ -1,54 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class LinkBlueprint {
AtomBlueprint from;
AtomBlueprint to;
LinkType type;
public LinkBlueprint(AtomBlueprint from, AtomBlueprint to, LinkType type) {
this.from = from;
this.to = to;
this.type = type;
}
public AtomBlueprint from() {
return from;
}
public AtomBlueprint to() {
return to;
}
public static final class LinkBlueprintSerializer extends StdSerializer<LinkBlueprint> {
private static final long serialVersionUID = 1L;
public LinkBlueprintSerializer() {
this(null);
}
public LinkBlueprintSerializer(Class<LinkBlueprint> t) {
super(t);
}
@Override
public void serialize(LinkBlueprint value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeObjectField("name", value.from.name);
gen.writeObjectField("to", value.to.name);
gen.writeObjectField("type", value.type);
gen.writeEndObject();
}
}
}

@ -1,41 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public enum LinkType {
MANY_TO_MANY,
ONE_TO_MANY,
ONE_TO_ONE;
public static final class LinkTypeSerializer extends StdSerializer<LinkType> {
private static final long serialVersionUID = 1L;
public LinkTypeSerializer() {
this(null);
}
public LinkTypeSerializer(Class<LinkType> t) {
super(t);
}
@Override
public void serialize(LinkType value, JsonGenerator gen, SerializerProvider provider) throws IOException {
if (value.equals(MANY_TO_MANY)) {
gen.writeString("MANY_TO_MANY");
} else if (value.equals(ONE_TO_MANY)) {
gen.writeString("ONE_TO_MANY");
} else {
gen.writeString("ONE_TO_ONE");
}
}
}
}

@ -1,53 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import link.pagan.traqtor.outdated.util.Name;
import link.pagan.traqtor.outdated.schema.data.DataType;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class ParticleBlueprint {
Name name;
String description;
DataType type;
public ParticleBlueprint(Name name, String description, DataType type) {
this.name = name;
this.description = description;
this.type = type;
}
public Name name() {
return name;
}
public static final class ParticleBlueprintSerializer extends StdSerializer<ParticleBlueprint> {
private static final long serialVersionUID = 1L;
public ParticleBlueprintSerializer() {
this(null);
}
public ParticleBlueprintSerializer(Class<ParticleBlueprint> t) {
super(t);
}
@Override
public void serialize(ParticleBlueprint value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeObjectField("name", value.name);
gen.writeStringField("description", value.description);
gen.writeStringField("type", value.type.getName());
gen.writeEndObject();
}
}
}

@ -1,57 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.List;
import link.pagan.traqtor.outdated.generator.blueprint.ProjectBlueprint;
import link.pagan.traqtor.outdated.schema.data.DataTypeSchema;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class UniverseBlueprint extends ProjectBlueprint {
List<AtomBlueprint> atoms;
List<LinkBlueprint> links;
DataTypeSchema dataTypeSchema;
public UniverseBlueprint(List<AtomBlueprint> atoms, List<LinkBlueprint> links, DataTypeSchema dataTypeSchema) {
this.atoms = atoms;
this.links = links;
this.dataTypeSchema = dataTypeSchema;
}
public static final class UniverseBlueprintSerializer extends StdSerializer<UniverseBlueprint> {
private static final long serialVersionUID = 1L;
public UniverseBlueprintSerializer() {
this(null);
}
public UniverseBlueprintSerializer(Class<UniverseBlueprint> t) {
super(t);
}
@Override
public void serialize(UniverseBlueprint value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeObjectField("schema", value.dataTypeSchema.getName());
gen.writeArrayFieldStart("atoms");
for (AtomBlueprint ab : value.atoms) {
gen.writeObject(ab);
}
gen.writeEndArray();
gen.writeArrayFieldStart("links");
for (LinkBlueprint lb : value.links) {
gen.writeObject(lb);
}
gen.writeEndArray();
gen.writeEndObject();
}
}
}

@ -1,57 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe.build;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import link.pagan.traqtor.outdated.generator.blueprint.universe.AtomBlueprint;
import link.pagan.traqtor.outdated.generator.blueprint.universe.ParticleBlueprint;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class AtomBlueprintBuilder {
Name name;
String description;
List<ParticleBlueprintBuilder> particleBuilders;
public AtomBlueprintBuilder() {
this.particleBuilders = new ArrayList<>();
}
public AtomBlueprint build(UniverseBlueprintBuilder builder) {
List<ParticleBlueprint> particles = new ArrayList<>();
for (ParticleBlueprintBuilder pb : particleBuilders) {
particles.add(pb.build(builder));
}
particles.sort(new Comparator<ParticleBlueprint>() {
@Override
public int compare(ParticleBlueprint a, ParticleBlueprint b) {
return a.name().asDotted().compareTo(b.name().asDotted());
}
});
return new AtomBlueprint(name, description, particles);
}
public Name name() {
return name;
}
public AtomBlueprintBuilder name(Name name) {
this.name = name;
return this;
}
public AtomBlueprintBuilder description(String description) {
this.description = description;
return this;
}
public AtomBlueprintBuilder addParticle(ParticleBlueprintBuilder particle) {
this.particleBuilders.add(particle);
return this;
}
}

@ -1,55 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe.build;
import java.util.ArrayList;
import link.pagan.traqtor.outdated.generator.blueprint.universe.AtomBlueprint;
import link.pagan.traqtor.outdated.generator.blueprint.universe.LinkBlueprint;
import link.pagan.traqtor.outdated.generator.blueprint.universe.LinkType;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class LinkBlueprintBuilder {
Name from;
Name to;
LinkType type;
public LinkBlueprint build(UniverseBlueprintBuilder builder, ArrayList<AtomBlueprint> atoms) {
AtomBlueprint fromAtom = getAtom(from, atoms);
if (fromAtom == null) {
throw new RuntimeException("Link from atom can not be null");
}
AtomBlueprint toAtom = getAtom(to, atoms);
if (toAtom == null) {
throw new RuntimeException("Link to atom can not be null");
}
return new LinkBlueprint(fromAtom, toAtom, type);
}
public LinkBlueprintBuilder from(Name from) {
this.from = from;
return this;
}
public LinkBlueprintBuilder to(Name to) {
this.to = to;
return this;
}
public LinkBlueprintBuilder type(LinkType type) {
this.type = type;
return this;
}
private static AtomBlueprint getAtom(Name name, ArrayList<AtomBlueprint> atoms) {
for (AtomBlueprint ab : atoms) {
if (ab.name().equals(name)) {
return ab;
}
}
return null;
}
}

@ -1,40 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe.build;
import link.pagan.traqtor.outdated.generator.blueprint.universe.ParticleBlueprint;
import link.pagan.traqtor.outdated.util.Name;
import link.pagan.traqtor.outdated.schema.data.DataType;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class ParticleBlueprintBuilder {
Name name;
String description;
String type;
public ParticleBlueprint build(UniverseBlueprintBuilder builder) {
DataType dataType = builder.getType(type);
if (dataType == null) {
throw new RuntimeException("Particle type was not found on build");
}
return new ParticleBlueprint(name, description, dataType);
}
public ParticleBlueprintBuilder name(Name name) {
this.name = name;
return this;
}
public ParticleBlueprintBuilder description(String description) {
this.description = description;
return this;
}
public ParticleBlueprintBuilder type(String type) {
this.type = type;
return this;
}
}

@ -1,73 +0,0 @@
package link.pagan.traqtor.outdated.generator.blueprint.universe.build;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import link.pagan.traqtor.outdated.generator.blueprint.universe.UniverseBlueprint;
import link.pagan.traqtor.outdated.generator.blueprint.universe.AtomBlueprint;
import link.pagan.traqtor.outdated.generator.blueprint.universe.LinkBlueprint;
import link.pagan.traqtor.outdated.schema.data.DataType;
import link.pagan.traqtor.outdated.schema.data.DataTypeSchema;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class UniverseBlueprintBuilder {
List<AtomBlueprintBuilder> atomBuilders;
List<LinkBlueprintBuilder> linkBuilder;
DataTypeSchema dataTypeSchema;
public UniverseBlueprintBuilder(DataTypeSchema dataTypeSchema) {
this.atomBuilders = new ArrayList<>();
this.linkBuilder = new ArrayList<>();
this.dataTypeSchema = dataTypeSchema;
}
public UniverseBlueprintBuilder addAtom(AtomBlueprintBuilder atom) {
this.atomBuilders.add(atom);
return this;
}
public UniverseBlueprintBuilder addLink(LinkBlueprintBuilder link) {
this.linkBuilder.add(link);
return this;
}
public UniverseBlueprint build() {
ArrayList<AtomBlueprint> atoms = new ArrayList<>();
for (AtomBlueprintBuilder ab : atomBuilders) {
atoms.add(ab.build(this));
}
atoms.sort(new Comparator<AtomBlueprint>() {
@Override
public int compare(AtomBlueprint a, AtomBlueprint b) {
return a.name().asDotted().compareTo(b.name().asDotted());
}
});
ArrayList<LinkBlueprint> links = new ArrayList<>();
for (LinkBlueprintBuilder lb : linkBuilder) {
links.add(lb.build(this, atoms));
}
links.sort(new Comparator<LinkBlueprint>() {
@Override
public int compare(LinkBlueprint a, LinkBlueprint b) {
return (a.from().name().asDotted() + "->" + a.to().name().asDotted()).compareTo(
(b.from().name().asDotted() + "->" + b.to().name().asDotted()));
}
});
return new UniverseBlueprint(atoms, links, dataTypeSchema);
}
DataType getType(String type) {
for (DataType dt : this.dataTypeSchema.getDataTypes()) {
if (dt.getName().equals(type)) {
return dt;
}
}
return null;
}
}

@ -1,25 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.schema.basic;
import java.util.List;
import link.pagan.traqtor.outdated.schema.logic.EndpointSchema;
import link.pagan.traqtor.outdated.schema.logic.EndpointTemplate;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class EndpointSchemaImpl implements EndpointSchema {
@Override
public List<EndpointTemplate> getPatterns() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}

@ -1,79 +0,0 @@
package link.pagan.traqtor.outdated.schema.basic.data;
import java.util.List;
import link.pagan.traqtor.outdated.schema.basic.data.mapping.MappingSchemaImpl;
import link.pagan.traqtor.outdated.schema.data.DataType;
import link.pagan.traqtor.outdated.schema.data.DataTypeSchema;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingSchema;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class DataTypeSchemaReferenceImplementation implements DataTypeSchema {
private static final Name name = Name.of("traqtor", "basic");
// ARRAY(""),
// LIST(""),
// SET(""),
// MAP(""),
public static final DataType BOOLEAN = new DataType("boolean");
public static final DataType BYTE = new DataType("byte");
public static final DataType SHORT = new DataType("short");
public static final DataType INTEGER = new DataType("int");
public static final DataType LONG = new DataType("long");
public static final DataType FLOAT = new DataType("float");
public static final DataType DOUBLE = new DataType("double");
public static final DataType STRING = new DataType("string");
public static final DataType DATE = new DataType("date");
public static final DataType TIME = new DataType("time");
public static final DataType TIMESTAMP = new DataType("timestamp");
public static final DataType ID = new DataType("id");
public static final DataType UUID = new DataType("uuid");
private static final List<DataType> dataTypes = List.of(BOOLEAN, BYTE, SHORT, INTEGER, LONG, FLOAT, DOUBLE, STRING,
DATE, TIME, TIMESTAMP, ID, UUID);
private static final List<MappingSchema> mappingSchemas = List.of(new MappingSchemaImpl());
@Override
public List<DataType> getDataTypes() {
return dataTypes;
}
@Override
public Name getName() {
return name;
}
@Override
public List<MappingSchema> getMappingSchema() {
return mappingSchemas;
}
// @Override
// public Map<String, DataType> register() {
// return new HashMap<String, DataType>(){
// private static final long serialVersionUID = 1L;
// {
// put(BOOLEAN.getName(), BOOLEAN);
// put(BYTE.getName(), BYTE);
// put(SHORT.getName(), SHORT);
// put(INTEGER.getName(), INTEGER);
// put(LONG.getName(), LONG);
// put(FLOAT.getName(), FLOAT);
// put(DOUBLE.getName(), DOUBLE);
// put(STRING.getName(), STRING);
// put(BOOLEAN.getName(), BOOLEAN);
// put(DATE.getName(), DATE);
// put(TIME.getName(), TIME);
// put(TIMESTAMP.getName(), TIMESTAMP);
// put(ID.getName(), ID);
// put(UUID.getName(), UUID);
// }};
// }
}

@ -1,59 +0,0 @@
package link.pagan.traqtor.outdated.schema.basic.data.mapping;
import java.util.List;
import link.pagan.traqtor.outdated.schema.basic.data.DataTypeSchemaReferenceImplementation;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingEntry;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingSchema;
import link.pagan.traqtor.outdated.util.Name;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class MappingSchemaImpl implements MappingSchema {
private static final Name name = Name.of("traqtor", "basic", "default");
public static final MappingEntry NULLABLE_BOOLEAN = new MappingEntry(DataTypeSchemaReferenceImplementation.BOOLEAN , true , false );
public static final MappingEntry BOOLEAN = new MappingEntry(DataTypeSchemaReferenceImplementation.BOOLEAN , false , true );
public static final MappingEntry NULLABLE_BYTE = new MappingEntry(DataTypeSchemaReferenceImplementation.BYTE , true , false );
public static final MappingEntry BYTE = new MappingEntry(DataTypeSchemaReferenceImplementation.BYTE , false , true );
public static final MappingEntry NULLABLE_SHORT = new MappingEntry(DataTypeSchemaReferenceImplementation.SHORT , true , false );
public static final MappingEntry SHORT = new MappingEntry(DataTypeSchemaReferenceImplementation.SHORT , false , true );
public static final MappingEntry NULLABLE_INTEGER = new MappingEntry(DataTypeSchemaReferenceImplementation.INTEGER , true , false );
public static final MappingEntry INTEGER = new MappingEntry(DataTypeSchemaReferenceImplementation.INTEGER , false , true );
public static final MappingEntry NULLABLE_LONG = new MappingEntry(DataTypeSchemaReferenceImplementation.LONG , true , false );
public static final MappingEntry LONG = new MappingEntry(DataTypeSchemaReferenceImplementation.LONG , false , true );
public static final MappingEntry NULLABLE_FLOAT = new MappingEntry(DataTypeSchemaReferenceImplementation.FLOAT , true , false );
public static final MappingEntry FLOAT = new MappingEntry(DataTypeSchemaReferenceImplementation.FLOAT , false , false );
public static final MappingEntry NULLABLE_DOUBLE = new MappingEntry(DataTypeSchemaReferenceImplementation.DOUBLE , true , false );
public static final MappingEntry DOUBLE = new MappingEntry(DataTypeSchemaReferenceImplementation.DOUBLE , false , false );
public static final MappingEntry STRING = new MappingEntry(DataTypeSchemaReferenceImplementation.STRING , true , false );
public static final MappingEntry DATE = new MappingEntry(DataTypeSchemaReferenceImplementation.DATE , true , false );
public static final MappingEntry TIME = new MappingEntry(DataTypeSchemaReferenceImplementation.TIME , true , false );
public static final MappingEntry TIMESTAMP = new MappingEntry(DataTypeSchemaReferenceImplementation.TIMESTAMP , true , false );
public static final MappingEntry ID = new MappingEntry(DataTypeSchemaReferenceImplementation.ID , true , true );
public static final MappingEntry UUID = new MappingEntry(DataTypeSchemaReferenceImplementation.UUID , true , true );
private static final List<MappingEntry> mappings = List.of(NULLABLE_BOOLEAN, BOOLEAN,
NULLABLE_BYTE, BYTE,
NULLABLE_SHORT, SHORT,
NULLABLE_INTEGER, INTEGER,
NULLABLE_LONG, LONG,
NULLABLE_FLOAT, FLOAT,
NULLABLE_DOUBLE, DOUBLE,
STRING,
DATE, TIME, TIMESTAMP,
ID, UUID);
@Override
public List<MappingEntry> getMappings() {
return mappings;
}
@Override
public Name getName() {
return name;
}
}

@ -1,19 +0,0 @@
package link.pagan.traqtor.outdated.schema.data;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class DataType {
private final String name;
public DataType(String name) {
this.name = name;
}
public String getName() {
return name;
}
}

@ -1,17 +0,0 @@
package link.pagan.traqtor.outdated.schema.data;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingSchema;
import link.pagan.traqtor.outdated.util.Named;
import java.util.List;
import link.pagan.traqtor.outdated.util.Registrable;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public interface DataTypeSchema extends Named, Registrable<DataType> {
public List<DataType> getDataTypes();
public List<MappingSchema> getMappingSchema();
}

@ -1,27 +0,0 @@
package link.pagan.traqtor.outdated.schema.data.mapping;
import java.util.HashMap;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public abstract class Mapping {
private final String name;
private final HashMap<MappingEntry, String> mapping;
protected Mapping(String name, HashMap<MappingEntry, String> mapping) {
this.mapping = mapping;
this.name = name;
}
public String getName() {
return name;
}
public HashMap<MappingEntry, String> getMapping() {
return mapping;
}
}

@ -1,35 +0,0 @@
package link.pagan.traqtor.outdated.schema.data.mapping;
import link.pagan.traqtor.outdated.schema.data.DataType;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class MappingEntry {
private final DataType dataType;
private final boolean nullable;
private final boolean keyable;
public MappingEntry(DataType dataType, boolean nullable, boolean keyable) {
this.dataType = dataType;
this.nullable = nullable;
this.keyable = keyable;
}
public DataType getDataType() {
return dataType;
}
public boolean isNullable() {
return nullable;
}
public boolean isKeyable() {
return keyable;
}
}

@ -1,14 +0,0 @@
package link.pagan.traqtor.outdated.schema.data.mapping;
import link.pagan.traqtor.outdated.util.Named;
import java.util.List;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public interface MappingSchema extends Named {
public List<MappingEntry> getMappings ();
}

@ -1,17 +0,0 @@
package link.pagan.traqtor.outdated.schema.data.mapping.backend;
import java.util.HashMap;
import link.pagan.traqtor.outdated.schema.data.mapping.Mapping;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingEntry;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class BackendMapping extends Mapping {
public BackendMapping(String name, HashMap<MappingEntry, String> mapping) {
super(name, mapping);
}
}

@ -1,17 +0,0 @@
package link.pagan.traqtor.outdated.schema.data.mapping.frontend;
import java.util.HashMap;
import link.pagan.traqtor.outdated.schema.data.mapping.Mapping;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingEntry;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class FrontendMapping extends Mapping {
public FrontendMapping(String name, HashMap<MappingEntry, String> mapping) {
super(name, mapping);
}
}

@ -1,18 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.schema.logic;
import java.util.List;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public interface EndpointSchema {
public List<EndpointTemplate> getPatterns();
}

@ -1,16 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.outdated.schema.logic;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class EndpointTemplate {
}

@ -1,135 +0,0 @@
package link.pagan.traqtor.outdated.util;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public class Name {
public static final Comparator<Name> COMPARATOR = new Comparator<Name>() {
@Override
public int compare(Name a, Name b) {
return a.asDotted().compareTo(b.asDotted());
}
};
String[] parts;
public Name(String[] parts) {
this.parts = parts;
}
public static Name of(String... parts) {
if (parts == null) {
throw new NullPointerException("name can not be null");
}
if (parts.length < 1) {
throw new IllegalArgumentException("name can not be empty");
}
return new Name(parts);
}
public String asDotted() {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < this.parts.length; i++) {
sb.append(parts[i]);
if (i != this.parts.length - 1) {
sb.append('.');
}
}
return sb.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null) {
return false;
}
if (getClass() != o.getClass()) {
return false;
}
Name name = (Name) o;
if (name.parts == null) {
return false;
}
if (name.parts.length != this.parts.length) {
return false;
}
for (int i = 0; i < this.parts.length; i++) {
if (!this.parts[i].equals(name.parts[i])) {
return false;
}
}
return true;
}
@Override
public int hashCode() {
int hash = 7;
hash = 43 * hash + Arrays.deepHashCode(this.parts);
return hash;
}
public static final class NameSerializer extends StdSerializer<Name> {
private static final long serialVersionUID = 1L;
public NameSerializer() {
this(null);
}
public NameSerializer(Class<Name> t) {
super(t);
}
@Override
public void serialize(Name value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeArray(value.parts, 0, value.parts.length);
}
}
public static final class NameDeserializer extends StdDeserializer<Name> {
private static final long serialVersionUID = 1L;
public NameDeserializer() {
this(null);
}
public NameDeserializer(Class<Name> t) {
super(t);
}
@Override
public Name deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException {
JsonNode partArray = parser.getCodec().readTree(parser);
String[] parts = new String[partArray.size()];
int i = 0;
for (final JsonNode part : partArray) {
parts[i] = part.asText();
i++;
}
return new Name(parts);
}
}
}

@ -1,11 +0,0 @@
package link.pagan.traqtor.outdated.util;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public interface Named {
public Name getName();
}

@ -1,11 +0,0 @@
package link.pagan.traqtor.outdated.util;
/**
*
* @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
*/
public interface Registrable<T> {
// public Map<String, T> register();
}

@ -1,8 +1,17 @@
package link.pagan.traqtor.project; package link.pagan.traqtor.project;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
public class Project { public abstract class Project {
protected Name name;
protected boolean dirty;
public Name name () {
if (name == null) return Name.NO_NAME;
return this.name;
}
public Project name (String... parts) { public Project name (String... parts) {
@ -10,7 +19,7 @@ public class Project {
} }
public Project name (Name name) { public Project name (Name name) {
this.name = name;
return this; return this;
} }

@ -1,46 +1,45 @@
package link.pagan.traqtor.project.backend.mapping; // package link.pagan.traqtor.project.backend.mapping;
//
import java.util.HashMap; // import java.util.HashMap;
import link.pagan.traqtor.outdated.schema.basic.data.mapping.MappingSchemaImpl; // import link.pagan.traqtor.mapping.MappingEntry;
import link.pagan.traqtor.outdated.schema.data.mapping.backend.BackendMapping; // import link.pagan.traqtor.mapping.backend.BackendMapping;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingEntry; //
/// ** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ // public class JavaBackendMapping extends BackendMapping {
public class JavaBackendMapping extends BackendMapping { //
// public JavaBackendMapping () {
public JavaBackendMapping () { // super("Java", new HashMap<MappingEntry, String>() {
super("Java", new HashMap<MappingEntry, String>() { //
// private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L; // {
{ // put(MappingSchemaImpl.NULLABLE_BOOLEAN, "Boolean");
put(MappingSchemaImpl.NULLABLE_BOOLEAN, "Boolean"); // put(MappingSchemaImpl.NULLABLE_BYTE, "Byte");
put(MappingSchemaImpl.NULLABLE_BYTE, "Byte"); // put(MappingSchemaImpl.NULLABLE_SHORT, "Short");
put(MappingSchemaImpl.NULLABLE_SHORT, "Short"); // put(MappingSchemaImpl.NULLABLE_INTEGER, "Integer");
put(MappingSchemaImpl.NULLABLE_INTEGER, "Integer"); // put(MappingSchemaImpl.NULLABLE_LONG, "Long");
put(MappingSchemaImpl.NULLABLE_LONG, "Long"); //
// put(MappingSchemaImpl.BOOLEAN, "boolean");
put(MappingSchemaImpl.BOOLEAN, "boolean"); // put(MappingSchemaImpl.BYTE, "byte");
put(MappingSchemaImpl.BYTE, "byte"); // put(MappingSchemaImpl.SHORT, "short");
put(MappingSchemaImpl.SHORT, "short"); // put(MappingSchemaImpl.INTEGER, "integer");
put(MappingSchemaImpl.INTEGER, "integer"); // put(MappingSchemaImpl.LONG, "long");
put(MappingSchemaImpl.LONG, "long"); //
// put(MappingSchemaImpl.NULLABLE_DOUBLE, "Double");
put(MappingSchemaImpl.NULLABLE_DOUBLE, "Double"); // put(MappingSchemaImpl.NULLABLE_FLOAT, "Float");
put(MappingSchemaImpl.NULLABLE_FLOAT, "Float"); //
// put(MappingSchemaImpl.DOUBLE, "double");
put(MappingSchemaImpl.DOUBLE, "double"); // put(MappingSchemaImpl.FLOAT, "float");
put(MappingSchemaImpl.FLOAT, "float"); //
// put(MappingSchemaImpl.ID, "long");
put(MappingSchemaImpl.ID, "long"); // put(MappingSchemaImpl.UUID, "String");
put(MappingSchemaImpl.UUID, "String"); //
// put(MappingSchemaImpl.STRING, "String");
put(MappingSchemaImpl.STRING, "String"); // put(MappingSchemaImpl.DATE, "Date");
put(MappingSchemaImpl.DATE, "Date"); // put(MappingSchemaImpl.TIME, "Time");
put(MappingSchemaImpl.TIME, "Time"); // put(MappingSchemaImpl.TIMESTAMP, "Timestamp");
put(MappingSchemaImpl.TIMESTAMP, "Timestamp"); // }
} //
// });
}); // }
} //
// }
}

@ -2,7 +2,7 @@ package link.pagan.traqtor.project.database;
import link.pagan.traqtor.project.universe.UniverseProject; import link.pagan.traqtor.project.universe.UniverseProject;
import link.pagan.traqtor.project.Project; import link.pagan.traqtor.project.Project;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ /** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class DatabaseProject extends Project { public class DatabaseProject extends Project {
@ -11,8 +11,7 @@ public class DatabaseProject extends Project {
@Override @Override
public DatabaseProject name (String... parts) { public DatabaseProject name (String... parts) {
super.name(parts); return name(Name.of(parts));
return this;
} }
@Override @Override

@ -5,7 +5,7 @@
*/ */
package link.pagan.traqtor.project.database; package link.pagan.traqtor.project.database;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ /** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class DatabaseSchema { public class DatabaseSchema {

@ -1,19 +1,19 @@
package link.pagan.traqtor.project.database.mapping; // package link.pagan.traqtor.project.database.mapping;
//
import link.pagan.traqtor.outdated.util.Name; // import link.pagan.traqtor.util.Name;
import link.pagan.traqtor.outdated.util.Named; // import link.pagan.traqtor.util.Named;
import link.pagan.traqtor.outdated.util.Registrable; // import link.pagan.traqtor.util.Registrable;
//
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ /// ** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public abstract class DatabaseAdapter implements Named, Registrable<DatabaseAdapter> { // public abstract class DatabaseAdapter implements Named, Registrable<DatabaseAdapter> {
//
private final Name name; // private final Name name;
//
protected DatabaseAdapter (Name name) { // protected DatabaseAdapter (Name name) {
this.name = name; // this.name = name;
} // }
//
@Override // @Override
public Name getName () { return name; } // public Name getName () { return name; }
//
} // }

@ -1,8 +1,8 @@
package link.pagan.traqtor.project.database.mapping; package link.pagan.traqtor.project.database.mapping;
import java.util.HashMap; import java.util.HashMap;
import link.pagan.traqtor.outdated.schema.data.mapping.Mapping; import link.pagan.traqtor.mapping.Mapping;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingEntry; import link.pagan.traqtor.mapping.MappingEntry;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ /** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class DatabaseMapping extends Mapping { public class DatabaseMapping extends Mapping {

@ -1,32 +1,32 @@
/* /// *
* To change this license header, choose License Headers in Project Properties. // * To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates // * To change this template file, choose Tools | Templates
* and open the template in the editor. // * and open the template in the editor.
*/ // */
package link.pagan.traqtor.project.database.mapping.impl; // package link.pagan.traqtor.project.database.mapping.impl;
//
import link.pagan.traqtor.project.database.mapping.DatabaseAdapter; // import link.pagan.traqtor.project.database.mapping.DatabaseAdapter;
import link.pagan.traqtor.outdated.util.Name; // import link.pagan.traqtor.util.Name;
//
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ /// ** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class PostgresDatabaseAdapter extends DatabaseAdapter { // public class PostgresDatabaseAdapter extends DatabaseAdapter {
//
private static final Name NAME = Name.of("traqtor", "basic", "db", "postgres"); // private static final Name NAME = Name.of("traqtor", "basic", "db", "postgres");
//
public PostgresDatabaseAdapter () { // public PostgresDatabaseAdapter () {
super(NAME); // super(NAME);
} // }
//
// @Override // // @Override
// public Map<String, DatabaseAdapter> register() { // // public Map<String, DatabaseAdapter> register() {
// return new HashMap<String, DatabaseAdapter>(){ // // return new HashMap<String, DatabaseAdapter>(){
// private static final long serialVersionUID = 1L; // // private static final long serialVersionUID = 1L;
// { // // {
// put(NAME, new PostgresDatabaseAdapter()); // // put(NAME, new PostgresDatabaseAdapter());
// }}; // // }};
// } // // }
//
@Override // @Override
public Name getName () { return NAME; } // public Name getName () { return NAME; }
//
} // }

@ -1,46 +1,45 @@
package link.pagan.traqtor.project.database.mapping.impl; // package link.pagan.traqtor.project.database.mapping.impl;
//
import java.util.HashMap; // import java.util.HashMap;
import link.pagan.traqtor.outdated.schema.basic.data.mapping.MappingSchemaImpl; // import link.pagan.traqtor.mapping.MappingEntry;
import link.pagan.traqtor.project.database.mapping.DatabaseMapping; // import link.pagan.traqtor.project.database.mapping.DatabaseMapping;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingEntry; //
/// ** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ // public class PostgresDatabaseMapping extends DatabaseMapping {
public class PostgresDatabaseMapping extends DatabaseMapping { //
// public PostgresDatabaseMapping () {
public PostgresDatabaseMapping () { // super("PostgreSQL", new HashMap<MappingEntry, String>() {
super("PostgreSQL", new HashMap<MappingEntry, String>() { //
// private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L; // {
{ // put(MappingSchemaImpl.NULLABLE_BOOLEAN, "boolean");
put(MappingSchemaImpl.NULLABLE_BOOLEAN, "boolean"); // put(MappingSchemaImpl.NULLABLE_BYTE, "smallint");
put(MappingSchemaImpl.NULLABLE_BYTE, "smallint"); // put(MappingSchemaImpl.NULLABLE_SHORT, "smallint");
put(MappingSchemaImpl.NULLABLE_SHORT, "smallint"); // put(MappingSchemaImpl.NULLABLE_INTEGER, "integer");
put(MappingSchemaImpl.NULLABLE_INTEGER, "integer"); // put(MappingSchemaImpl.NULLABLE_LONG, "bigint");
put(MappingSchemaImpl.NULLABLE_LONG, "bigint"); //
// put(MappingSchemaImpl.BOOLEAN, "boolean");
put(MappingSchemaImpl.BOOLEAN, "boolean"); // put(MappingSchemaImpl.BYTE, "smallint");
put(MappingSchemaImpl.BYTE, "smallint"); // put(MappingSchemaImpl.SHORT, "smallint");
put(MappingSchemaImpl.SHORT, "smallint"); // put(MappingSchemaImpl.INTEGER, "integer");
put(MappingSchemaImpl.INTEGER, "integer"); // put(MappingSchemaImpl.LONG, "bigint");
put(MappingSchemaImpl.LONG, "bigint"); //
// put(MappingSchemaImpl.NULLABLE_DOUBLE, "double precision");
put(MappingSchemaImpl.NULLABLE_DOUBLE, "double precision"); // put(MappingSchemaImpl.NULLABLE_FLOAT, "real");
put(MappingSchemaImpl.NULLABLE_FLOAT, "real"); //
// put(MappingSchemaImpl.DOUBLE, "double precision");
put(MappingSchemaImpl.DOUBLE, "double precision"); // put(MappingSchemaImpl.FLOAT, "real");
put(MappingSchemaImpl.FLOAT, "real"); //
// put(MappingSchemaImpl.ID, "bigserial");
put(MappingSchemaImpl.ID, "bigserial"); // put(MappingSchemaImpl.UUID, "uuid");
put(MappingSchemaImpl.UUID, "uuid"); //
// put(MappingSchemaImpl.STRING, "String");
put(MappingSchemaImpl.STRING, "String"); // put(MappingSchemaImpl.DATE, "date");
put(MappingSchemaImpl.DATE, "date"); // put(MappingSchemaImpl.TIME, "time");
put(MappingSchemaImpl.TIME, "time"); // put(MappingSchemaImpl.TIMESTAMP, "timestamp");
put(MappingSchemaImpl.TIMESTAMP, "timestamp"); // }
} //
// });
}); // }
} //
// }
}

@ -1,46 +1,45 @@
package link.pagan.traqtor.project.frontend.mapping; // package link.pagan.traqtor.project.frontend.mapping;
//
import java.util.HashMap; // import java.util.HashMap;
import link.pagan.traqtor.outdated.schema.basic.data.mapping.MappingSchemaImpl; // import link.pagan.traqtor.mapping.MappingEntry;
import link.pagan.traqtor.outdated.schema.data.mapping.frontend.FrontendMapping; // import link.pagan.traqtor.mapping.frontend.FrontendMapping;
import link.pagan.traqtor.outdated.schema.data.mapping.MappingEntry; //
/// ** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */ // public class JavaScriptFrontendMapping extends FrontendMapping {
public class JavaScriptFrontendMapping extends FrontendMapping { //
// public JavaScriptFrontendMapping () {
public JavaScriptFrontendMapping () { // super("JavaScript", new HashMap<MappingEntry, String>() {
super("JavaScript", new HashMap<MappingEntry, String>() { //
// private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L; // {
{ // put(MappingSchemaImpl.NULLABLE_BOOLEAN, "Boolean");
put(MappingSchemaImpl.NULLABLE_BOOLEAN, "Boolean"); // put(MappingSchemaImpl.NULLABLE_BYTE, "Number");
put(MappingSchemaImpl.NULLABLE_BYTE, "Number"); // put(MappingSchemaImpl.NULLABLE_SHORT, "Number");
put(MappingSchemaImpl.NULLABLE_SHORT, "Number"); // put(MappingSchemaImpl.NULLABLE_INTEGER, "Number");
put(MappingSchemaImpl.NULLABLE_INTEGER, "Number"); // put(MappingSchemaImpl.NULLABLE_LONG, "BigInt");
put(MappingSchemaImpl.NULLABLE_LONG, "BigInt"); //
// put(MappingSchemaImpl.BOOLEAN, "Boolean");
put(MappingSchemaImpl.BOOLEAN, "Boolean"); // put(MappingSchemaImpl.BYTE, "Number");
put(MappingSchemaImpl.BYTE, "Number"); // put(MappingSchemaImpl.SHORT, "Number");
put(MappingSchemaImpl.SHORT, "Number"); // put(MappingSchemaImpl.INTEGER, "Number");
put(MappingSchemaImpl.INTEGER, "Number"); // put(MappingSchemaImpl.LONG, "BigInt");
put(MappingSchemaImpl.LONG, "BigInt"); //
// put(MappingSchemaImpl.NULLABLE_DOUBLE, "Number");
put(MappingSchemaImpl.NULLABLE_DOUBLE, "Number"); // put(MappingSchemaImpl.NULLABLE_FLOAT, "Number");
put(MappingSchemaImpl.NULLABLE_FLOAT, "Number"); //
// put(MappingSchemaImpl.DOUBLE, "Number");
put(MappingSchemaImpl.DOUBLE, "Number"); // put(MappingSchemaImpl.FLOAT, "Number");
put(MappingSchemaImpl.FLOAT, "Number"); //
// put(MappingSchemaImpl.ID, "BigInt");
put(MappingSchemaImpl.ID, "BigInt"); // put(MappingSchemaImpl.UUID, "String");
put(MappingSchemaImpl.UUID, "String"); //
// put(MappingSchemaImpl.STRING, "String");
put(MappingSchemaImpl.STRING, "String"); // put(MappingSchemaImpl.DATE, "Date");
put(MappingSchemaImpl.DATE, "Date"); // put(MappingSchemaImpl.TIME, "Date");
put(MappingSchemaImpl.TIME, "Date"); // put(MappingSchemaImpl.TIMESTAMP, "Date");
put(MappingSchemaImpl.TIMESTAMP, "Date"); // }
} //
// });
}); // }
} //
// }
}

@ -1,19 +1,37 @@
package link.pagan.traqtor.project.universe; package link.pagan.traqtor.project.universe;
import java.util.Arrays;
import java.util.Set;
import java.util.TreeSet;
import link.pagan.traqtor.project.Project; import link.pagan.traqtor.project.Project;
import link.pagan.traqtor.project.universe.schema.DatatypeSchema; import link.pagan.traqtor.project.universe.schema.DatatypeSchema;
import link.pagan.traqtor.outdated.util.Name;
import link.pagan.traqtor.project.universe.link.Link; import link.pagan.traqtor.project.universe.link.Link;
import link.pagan.traqtor.project.universe.element.Element; import link.pagan.traqtor.project.universe.element.Element;
import link.pagan.traqtor.util.Name;
public class UniverseProject extends Project { public class UniverseProject extends Project {
UniverseProject () {} private final Set<DatatypeSchema> schemas;
private final Set<Element> elements;
private final Set<Link> links;
UniverseProject () {
this.schemas = new TreeSet<DatatypeSchema>( (DatatypeSchema a, DatatypeSchema b) -> a.name()
.compareTo(b.name()));
this.elements = new TreeSet<Element>( (Element a, Element b) -> a.name().compareTo(b.name()));
this.links = new TreeSet<Link>( (Link a,
Link b) -> (a.from().name().asDotted() + "_" +
a.fromName().asDotted())
.compareTo((b.from().name().asDotted() +
"_" +
b.fromName().asDotted())));
}
@Override @Override
public UniverseProject name (String... parts) { public UniverseProject name (String... parts) {
super.name(parts); return name(Name.of(parts));
return this;
} }
@Override @Override
@ -22,15 +40,30 @@ public class UniverseProject extends Project {
return this; return this;
} }
public DatatypeSchema[] schemas () {
return this.schemas.toArray(new DatatypeSchema[this.schemas.size()]);
}
public UniverseProject schemas (DatatypeSchema... schemas) { public UniverseProject schemas (DatatypeSchema... schemas) {
this.schemas.addAll(Arrays.asList(schemas));
return this; return this;
} }
public Element[] elements () {
return this.elements.toArray(new Element[this.elements.size()]);
}
public UniverseProject elements (Element... element) { public UniverseProject elements (Element... element) {
this.elements.addAll(Arrays.asList(element));
return this; return this;
} }
public UniverseProject links (Link... link) { public Link[] links () {
return this.links.toArray(new Link[this.links.size()]);
}
public UniverseProject links (Link... links) {
this.links.addAll(Arrays.asList(links));
return this; return this;
} }

@ -0,0 +1,46 @@
package link.pagan.traqtor.project.universe;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import link.pagan.traqtor.project.universe.element.Element;
import link.pagan.traqtor.project.universe.link.Link;
import link.pagan.traqtor.project.universe.schema.DatatypeSchema;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class UniverseProjectSerializer extends StdSerializer<UniverseProject> {
private static final long serialVersionUID = 1L;
public UniverseProjectSerializer () {
this(null);
}
public UniverseProjectSerializer (Class<UniverseProject> t) {
super(t);
}
@Override
public void serialize (UniverseProject value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeObjectField("name", value.name());
gen.writeArrayFieldStart("schemas");
for (DatatypeSchema schema : value.schemas()) { gen.writeObject(schema.name()); }
gen.writeEndArray();
gen.writeArrayFieldStart("elements");
for (Element element : value.elements()) { gen.writeObject(element); }
gen.writeEndArray();
gen.writeArrayFieldStart("links");
for (Link link : value.links()) { gen.writeObject(link); }
gen.writeEndArray();
gen.writeEndObject();
}
}

@ -2,7 +2,7 @@ package link.pagan.traqtor.project.universe.element;
import java.util.List; import java.util.List;
import link.pagan.traqtor.project.universe.schema.DataType; import link.pagan.traqtor.project.universe.schema.DataType;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
public class Atom extends Element { public class Atom extends Element {

@ -1,27 +1,57 @@
package link.pagan.traqtor.project.universe.element; package link.pagan.traqtor.project.universe.element;
import java.util.Arrays; import java.util.Arrays;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import link.pagan.traqtor.project.universe.schema.DataType; import link.pagan.traqtor.project.universe.schema.DataType;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
public class Element { public abstract class Element {
private static final Comparator<Particle<? extends DataType>> PARTICLE_SORT_COMPARATOR = new Comparator<Particle<? extends DataType>>() {
@Override
public int compare (Particle<? extends DataType> a, Particle<? extends DataType> b) {
return a.name().asDotted().compareTo(b.name().asDotted());
}
};
private Name name;
private final Set<Particle<? extends DataType>> particles;
public Element () {
particles = new TreeSet<Particle<? extends DataType>>(PARTICLE_SORT_COMPARATOR);
}
public Name name () {
if (name == null) return Name.NO_NAME;
return name;
}
public Element name (String... parts) { public Element name (String... parts) {
return name(Name.of(parts)); return name(Name.of(parts));
} }
public Element name (Name name) { public Element name (Name name) {
this.name = name;
return this; return this;
} }
public Set<Particle<? extends DataType>> particles () {
return particles;
}
@SafeVarargs @SafeVarargs
public final Element particles (Particle<? extends DataType>... particles) { public final Element particles (Particle<? extends DataType>... particles) {
return particles(Arrays.asList(particles)); return particles(Arrays.asList(particles));
} }
public Element particles (List<Particle<? extends DataType>> particles) { public Element particles (List<Particle<? extends DataType>> particles) {
this.particles.addAll(particles);
return this; return this;
} }

@ -0,0 +1,39 @@
package link.pagan.traqtor.project.universe.element;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import link.pagan.traqtor.project.universe.schema.DataType;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class ElementSerializer extends StdSerializer<Element> {
private static final long serialVersionUID = 1L;
public ElementSerializer () {
this(null);
}
public ElementSerializer (Class<Element> t) {
super(t);
}
@Override
public void serialize (Element value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeObjectField("name", value.name());
if (value.getClass().equals(Isotope.class)) {
Isotope isotope = (Isotope) value;
gen.writeObjectField("base", isotope.base().name());
}
gen.writeArrayFieldStart("particles");
for (Particle<? extends DataType> particle : value.particles()) { gen.writeObject(particle); }
gen.writeEndArray();
gen.writeEndObject();
}
}

@ -2,13 +2,17 @@ package link.pagan.traqtor.project.universe.element;
import java.util.List; import java.util.List;
import link.pagan.traqtor.project.universe.schema.DataType; import link.pagan.traqtor.project.universe.schema.DataType;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
public class Isotope extends Element { public class Isotope extends Element {
Isotope () {} Isotope () {}
Element base; private Element base;
public Element base () {
return base;
}
@Override @Override
public Isotope name (Name name) { public Isotope name (Name name) {

@ -1,25 +1,48 @@
package link.pagan.traqtor.project.universe.element; package link.pagan.traqtor.project.universe.element;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import link.pagan.traqtor.project.universe.schema.Constraint; import link.pagan.traqtor.project.universe.schema.Constraint;
import link.pagan.traqtor.project.universe.schema.ConstraintInfo;
import link.pagan.traqtor.project.universe.schema.DataType; import link.pagan.traqtor.project.universe.schema.DataType;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
public class Particle <T extends DataType> { public class Particle <T extends DataType> extends PaticleInfo {
final DataType type; private final DataType type;
Name name; private Name name;
String description; private String description;
final List<Constraint<? super T>> constraints; @Override
public Name name () {
if (name == null) { return Name.NO_NAME; }
return name;
}
@Override
public String description () {
return description;
}
@Override
public DataType type () {
return type;
}
private final Set<ConstraintInfo> constraints;
public Particle (DataType type) { public Particle (DataType type) {
this.type = type; this.type = type;
this.constraints = new ArrayList<>(); this.constraints = new TreeSet<ConstraintInfo>( (ConstraintInfo a,
ConstraintInfo b) -> a.name()
.asDotted()
.compareTo(b.name()
.asDotted()));
} }
@SafeVarargs @SafeVarargs
@ -37,7 +60,7 @@ public class Particle <T extends DataType> {
} }
public Particle<T> name (Name name) { public Particle<T> name (Name name) {
this.name = name;
return this; return this;
} }
@ -50,4 +73,9 @@ public class Particle <T extends DataType> {
return this; return this;
} }
@Override
public Set<ConstraintInfo> constraints () {
return this.constraints;
}
} }

@ -0,0 +1,24 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package link.pagan.traqtor.project.universe.element;
import java.util.Set;
import link.pagan.traqtor.project.universe.schema.ConstraintInfo;
import link.pagan.traqtor.project.universe.schema.DataType;
import link.pagan.traqtor.util.Name;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public abstract class PaticleInfo {
public abstract Name name ();
public abstract String description ();
public abstract Set<ConstraintInfo> constraints ();
public abstract DataType type ();
}

@ -0,0 +1,37 @@
package link.pagan.traqtor.project.universe.element;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import link.pagan.traqtor.project.universe.schema.ConstraintInfo;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class PaticleInfoSerializer extends StdSerializer<PaticleInfo> {
private static final long serialVersionUID = 1L;
public PaticleInfoSerializer () {
this(null);
}
public PaticleInfoSerializer (Class<PaticleInfo> t) {
super(t);
}
@Override
public void serialize (PaticleInfo value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeObjectField("name", value.name());
gen.writeObjectField("type", value.type().name());
if (value.description() != null) { gen.writeStringField("description", value.description()); }
gen.writeArrayFieldStart("constraints");
for (ConstraintInfo constraint : value.constraints()) { gen.writeObject(constraint); }
gen.writeEndArray();
gen.writeEndObject();
}
}

@ -1,19 +1,42 @@
package link.pagan.traqtor.project.universe.link; package link.pagan.traqtor.project.universe.link;
import link.pagan.traqtor.project.universe.element.Element; import link.pagan.traqtor.project.universe.element.Element;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
public abstract class Link { public abstract class Link {
private Element from;
private Element to;
private Name fromName;
private Name toName;
public Element from () {
return this.from;
}
public Link from (Element element) { public Link from (Element element) {
this.from = element;
return this; return this;
} }
public Element to () {
return this.to;
}
public Link to (Element element) { public Link to (Element element) {
this.to = element;
return this; return this;
} }
public Name fromName () {
return this.fromName;
}
public Link fromName (Name name) { public Link fromName (Name name) {
this.fromName = name;
return this; return this;
} }
@ -21,7 +44,12 @@ public abstract class Link {
return fromName(Name.of(parts)); return fromName(Name.of(parts));
} }
public Name toName () {
return this.toName;
}
public Link toName (Name name) { public Link toName (Name name) {
this.toName = name;
return this; return this;
} }
@ -29,6 +57,8 @@ public abstract class Link {
return toName(Name.of(parts)); return toName(Name.of(parts));
} }
public abstract LinkType type ();
public static OneToOneLink oneToOne () { public static OneToOneLink oneToOne () {
return new OneToOneLink(); return new OneToOneLink();
} }

@ -0,0 +1,32 @@
package link.pagan.traqtor.project.universe.link;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class LinkSerializer extends StdSerializer<Link> {
private static final long serialVersionUID = 1L;
public LinkSerializer () {
this(null);
}
public LinkSerializer (Class<Link> t) {
super(t);
}
@Override
public void serialize (Link value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeStartObject();
gen.writeStringField("type", value.type().code());
gen.writeObjectField("from", value.from().name());
gen.writeObjectField("to", value.to().name());
gen.writeObjectField("from-name", value.fromName());
gen.writeObjectField("to-name", value.toName());
gen.writeEndObject();
}
}

@ -0,0 +1,20 @@
package link.pagan.traqtor.project.universe.link;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public enum LinkType {
ONE_TO_ONE("1->1"),
ONE_TO_MANY("1->N"),
MANY_TO_MANY("N->N");
private final String code;
private LinkType (String code) {
this.code = code;
}
public String code () {
return code;
}
}

@ -1,6 +1,6 @@
package link.pagan.traqtor.project.universe.link; package link.pagan.traqtor.project.universe.link;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
import link.pagan.traqtor.project.universe.element.Element; import link.pagan.traqtor.project.universe.element.Element;
public class ManyToManyLink extends Link { public class ManyToManyLink extends Link {
@ -43,4 +43,9 @@ public class ManyToManyLink extends Link {
return this; return this;
} }
@Override
public LinkType type () {
return LinkType.MANY_TO_MANY;
}
} }

@ -1,6 +1,6 @@
package link.pagan.traqtor.project.universe.link; package link.pagan.traqtor.project.universe.link;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
import link.pagan.traqtor.project.universe.element.Element; import link.pagan.traqtor.project.universe.element.Element;
public class OneToManyLink extends Link { public class OneToManyLink extends Link {
@ -55,4 +55,9 @@ public class OneToManyLink extends Link {
return this; return this;
} }
@Override
public LinkType type () {
return LinkType.ONE_TO_MANY;
}
} }

@ -1,6 +1,6 @@
package link.pagan.traqtor.project.universe.link; package link.pagan.traqtor.project.universe.link;
import link.pagan.traqtor.outdated.util.Name; import link.pagan.traqtor.util.Name;
import link.pagan.traqtor.project.universe.element.Element; import link.pagan.traqtor.project.universe.element.Element;
public class OneToOneLink extends Link { public class OneToOneLink extends Link {
@ -47,4 +47,9 @@ public class OneToOneLink extends Link {
return this; return this;
} }
@Override
public LinkType type () {
return LinkType.ONE_TO_ONE;
}
} }

@ -1,7 +1,28 @@
package link.pagan.traqtor.project.universe.schema; package link.pagan.traqtor.project.universe.schema;
import link.pagan.traqtor.util.Name;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} /** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >}
* @param <T> type to which this constraint is applicable */ * @param <T> type to which this constraint is applicable */
public class Constraint <T extends DataType> { public abstract class Constraint <T extends DataType> extends ConstraintInfo {
protected Name name;
protected Object value;
public Constraint (Name name, Object value) {
this.name = name;
this.value = value;
}
@Override
public Name name () {
return name;
}
@Override
public Object value () {
return value;
}
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save