Reformatting and cleaning up code (step 2/2)

This commit is contained in:
Patrick Gotthard 2013-10-03 22:41:22 +02:00
parent 95b9121a77
commit cb75d15dd1
78 changed files with 1807 additions and 1460 deletions

56
cleanup.xml Normal file
View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="2">
<profile kind="CleanUpProfile" name="ROME" version="2">
<setting id="cleanup.remove_unused_private_fields" value="true"/>
<setting id="cleanup.always_use_parentheses_in_expressions" value="false"/>
<setting id="cleanup.never_use_blocks" value="false"/>
<setting id="cleanup.remove_unused_private_methods" value="true"/>
<setting id="cleanup.add_missing_deprecated_annotations" value="true"/>
<setting id="cleanup.convert_to_enhanced_for_loop" value="true"/>
<setting id="cleanup.remove_unnecessary_nls_tags" value="true"/>
<setting id="cleanup.sort_members" value="false"/>
<setting id="cleanup.remove_unused_local_variables" value="false"/>
<setting id="cleanup.never_use_parentheses_in_expressions" value="true"/>
<setting id="cleanup.remove_unused_private_members" value="false"/>
<setting id="cleanup.remove_unnecessary_casts" value="true"/>
<setting id="cleanup.make_parameters_final" value="true"/>
<setting id="cleanup.use_this_for_non_static_field_access" value="true"/>
<setting id="cleanup.remove_private_constructors" value="true"/>
<setting id="cleanup.use_blocks" value="true"/>
<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/>
<setting id="cleanup.remove_trailing_whitespaces_all" value="true"/>
<setting id="cleanup.always_use_this_for_non_static_field_access" value="false"/>
<setting id="cleanup.use_this_for_non_static_field_access_only_if_necessary" value="true"/>
<setting id="cleanup.add_default_serial_version_id" value="true"/>
<setting id="cleanup.make_type_abstract_if_missing_method" value="false"/>
<setting id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class" value="true"/>
<setting id="cleanup.make_variable_declarations_final" value="true"/>
<setting id="cleanup.add_missing_nls_tags" value="false"/>
<setting id="cleanup.format_source_code" value="true"/>
<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.add_missing_override_annotations" value="true"/>
<setting id="cleanup.remove_unused_private_types" value="true"/>
<setting id="cleanup.add_missing_methods" value="false"/>
<setting id="cleanup.make_local_variable_final" value="true"/>
<setting id="cleanup.correct_indentation" value="true"/>
<setting id="cleanup.add_missing_override_annotations_interface_methods" value="true"/>
<setting id="cleanup.remove_unused_imports" value="true"/>
<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/>
<setting id="cleanup.make_private_fields_final" value="true"/>
<setting id="cleanup.add_generated_serial_version_id" value="false"/>
<setting id="cleanup.organize_imports" value="true"/>
<setting id="cleanup.remove_trailing_whitespaces" value="true"/>
<setting id="cleanup.sort_members_all" value="false"/>
<setting id="cleanup.use_blocks_only_for_return_and_throw" value="false"/>
<setting id="cleanup.add_missing_annotations" value="true"/>
<setting id="cleanup.use_parentheses_in_expressions" value="true"/>
<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.use_this_for_non_static_method_access_only_if_necessary" value="true"/>
<setting id="cleanup.use_this_for_non_static_method_access" value="true"/>
<setting id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class" value="true"/>
<setting id="cleanup.add_serial_version_id" value="false"/>
<setting id="cleanup.format_source_code_changes_only" value="false"/>
<setting id="cleanup.qualify_static_member_accesses_with_declaring_class" value="true"/>
<setting id="cleanup.always_use_blocks" value="true"/>
</profile>
</profiles>

291
formatter.xml Normal file
View file

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="ROME" version="12">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<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_comma_in_type_parameters" value="do not 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_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<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_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" 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.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<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.use_on_off_tags" value="false"/>
<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_new_line_before_else_in_if_statement" 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.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" 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_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<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_binary_operator" 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.brace_position_for_array_initializer" value="end_of_line"/>
<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_new_line_before_finally_in_try_statement" value="do not insert"/>
<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_new_line_before_catch_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<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_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<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_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
<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_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" 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.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<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.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" 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.insert_space_after_opening_paren_in_for" value="do not 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.alignment_for_selector_in_method_invocation" value="16"/>
<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_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" 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.insert_space_before_closing_paren_in_switch" value="do not 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_angle_bracket_in_type_parameters" value="do not insert"/>
<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_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="160"/>
<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_between_brackets_in_array_type_reference" 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_before_comma_in_explicitconstructorcall_arguments" value="do not 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.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<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.enabling_tag" value="@formatter:on"/>
<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.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<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_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" 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.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<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_colon_in_for" value="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.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<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_try" value="do not 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_before_opening_brace_in_enum_constant" 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_after_at_in_annotation_type_declaration" 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_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
<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_before_parenthesized_expression_in_return" value="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_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_opening_paren_in_try" value="do not 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.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<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_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<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.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<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_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<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_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<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.alignment_for_union_type_in_multicatch" value="16"/>
<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_before_opening_brace_in_switch" value="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_after_comma_in_superinterfaces" 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.tabulation.size" value="4"/>
<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_new_line_after_opening_brace_in_array_initializer" 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.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="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_before_opening_paren_in_constructor_declaration" 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_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="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_synchronized" value="do not 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_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" 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_before_closing_paren_in_constructor_declaration" value="do not 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_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<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_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<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_before_unary_operator" value="do not 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_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" 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_space_before_comma_in_constructor_declaration_parameters" value="do not 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_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_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_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="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.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" 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.insert_new_line_after_annotation_on_parameter" 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_between_empty_parens_in_method_invocation" value="do not insert"/>
<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.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<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_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
<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_before_colon_in_conditional" value="insert"/>
<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_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" 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.blank_lines_between_type_declarations" value="1"/>
<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.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<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_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<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_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="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.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<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_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" 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_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<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_allocation_expression" value="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_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<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.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<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_parenthesized_expression" 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_closing_paren_in_catch" 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_opening_paren_in_switch" 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_opening_paren_in_method_invocation" 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.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="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_after_opening_paren_in_method_declaration" 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_space_before_opening_paren_in_catch" 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_after_comma_in_multiple_field_declarations" 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_parameterized_type_reference" value="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.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" 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.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" 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_before_semicolon_in_try_resources" 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.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
</profile>
</profiles>

View file

@ -43,11 +43,11 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
* *
*/ */
public abstract class WireFeed implements Cloneable, Serializable, Extendable { public abstract class WireFeed implements Cloneable, Serializable, Extendable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _feedType; private String feedType;
private String _encoding; private String encoding;
private List<Module> _modules; private List<Module> modules;
private List<Element> _foreignMarkup; private List<Element> foreignMarkup;
/** /**
* Default constructor, for bean cloning purposes only. * Default constructor, for bean cloning purposes only.
@ -55,7 +55,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* *
*/ */
protected WireFeed() { protected WireFeed() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -67,7 +67,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
*/ */
protected WireFeed(final String type) { protected WireFeed(final String type) {
this(); this();
this._feedType = type; feedType = type;
} }
/** /**
@ -81,7 +81,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -104,7 +104,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
// can't use foreign markup in equals, due to JDOM equals impl // can't use foreign markup in equals, due to JDOM equals impl
final List<Element> fm = getForeignMarkup(); final List<Element> fm = getForeignMarkup();
setForeignMarkup(((WireFeed) other).getForeignMarkup()); setForeignMarkup(((WireFeed) other).getForeignMarkup());
final boolean ret = this._objBean.equals(other); final boolean ret = objBean.equals(other);
// restore foreign markup // restore foreign markup
setForeignMarkup(fm); setForeignMarkup(fm);
return ret; return ret;
@ -121,7 +121,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -133,7 +133,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -145,7 +145,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setFeedType(final String feedType) { public void setFeedType(final String feedType) {
this._feedType = feedType; this.feedType = feedType;
} }
/** /**
@ -154,7 +154,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* @return the type of the feed. * @return the type of the feed.
*/ */
public String getFeedType() { public String getFeedType() {
return this._feedType; return feedType;
} }
/** /**
@ -168,7 +168,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getEncoding() { public String getEncoding() {
return this._encoding; return encoding;
} }
/** /**
@ -182,7 +182,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setEncoding(final String encoding) { public void setEncoding(final String encoding) {
this._encoding = encoding; this.encoding = encoding;
} }
/** /**
@ -195,7 +195,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
return this._modules == null ? (this._modules = new ArrayList<Module>()) : this._modules; return modules == null ? (modules = new ArrayList<Module>()) : modules;
} }
/** /**
@ -208,7 +208,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**
@ -220,7 +220,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public Module getModule(final String uri) { public Module getModule(final String uri) {
return ModuleUtils.getModule(this._modules, uri); return ModuleUtils.getModule(modules, uri);
} }
/** /**
@ -231,7 +231,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* *
*/ */
public List<Element> getForeignMarkup() { public List<Element> getForeignMarkup() {
return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList<Element>()) : this._foreignMarkup; return foreignMarkup == null ? (foreignMarkup = new ArrayList<Element>()) : foreignMarkup;
} }
/** /**
@ -242,6 +242,6 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setForeignMarkup(final List<Element> foreignMarkup) { public void setForeignMarkup(final List<Element> foreignMarkup) {
this._foreignMarkup = foreignMarkup; this.foreignMarkup = foreignMarkup;
} }
} }

View file

@ -28,12 +28,12 @@ import com.sun.syndication.feed.impl.ObjectBean;
*/ */
public class Category implements Cloneable, Serializable { public class Category implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _term; private String term;
private String _scheme; private String scheme;
private String _schemeResolved; private String schemeResolved;
private String _label; private String label;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -41,7 +41,7 @@ public class Category implements Cloneable, Serializable {
* *
*/ */
public Category() { public Category() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -55,7 +55,7 @@ public class Category implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -72,7 +72,7 @@ public class Category implements Cloneable, Serializable {
if (!(other instanceof Category)) { if (!(other instanceof Category)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -86,7 +86,7 @@ public class Category implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -98,7 +98,7 @@ public class Category implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -108,7 +108,7 @@ public class Category implements Cloneable, Serializable {
* @return Label for category. * @return Label for category.
*/ */
public String getLabel() { public String getLabel() {
return this._label; return label;
} }
/** /**
@ -118,7 +118,7 @@ public class Category implements Cloneable, Serializable {
* @param label Label for category. * @param label Label for category.
*/ */
public void setLabel(final String label) { public void setLabel(final String label) {
this._label = label; this.label = label;
} }
/** /**
@ -128,7 +128,7 @@ public class Category implements Cloneable, Serializable {
* @return Scheme URI for category. * @return Scheme URI for category.
*/ */
public String getScheme() { public String getScheme() {
return this._scheme; return scheme;
} }
/** /**
@ -138,15 +138,15 @@ public class Category implements Cloneable, Serializable {
* @param scheme Scheme URI for category. * @param scheme Scheme URI for category.
*/ */
public void setScheme(final String scheme) { public void setScheme(final String scheme) {
this._scheme = scheme; this.scheme = scheme;
} }
public void setSchemeResolved(final String schemeResolved) { public void setSchemeResolved(final String schemeResolved) {
this._schemeResolved = schemeResolved; this.schemeResolved = schemeResolved;
} }
public String getSchemeResolved() { public String getSchemeResolved() {
return this._schemeResolved != null ? this._schemeResolved : this._scheme; return schemeResolved != null ? schemeResolved : scheme;
} }
/** /**
@ -156,7 +156,7 @@ public class Category implements Cloneable, Serializable {
* @return Term for category. * @return Term for category.
*/ */
public String getTerm() { public String getTerm() {
return this._term; return term;
} }
/** /**
@ -166,6 +166,6 @@ public class Category implements Cloneable, Serializable {
* @param term Term for category. * @param term Term for category.
*/ */
public void setTerm(final String term) { public void setTerm(final String term) {
this._term = term; this.term = term;
} }
} }

View file

@ -31,11 +31,11 @@ import com.sun.syndication.feed.impl.ObjectBean;
*/ */
public class Content implements Cloneable, Serializable { public class Content implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _type; private String type;
private String _value; private String value;
private String _src; private String src;
/** @since Atom 1.0 */ /** @since Atom 1.0 */
public static final String TEXT = "text"; public static final String TEXT = "text";
@ -55,7 +55,7 @@ public class Content implements Cloneable, Serializable {
/** Atom 0.3 only */ /** Atom 0.3 only */
public static final String ESCAPED = "escaped"; public static final String ESCAPED = "escaped";
private String _mode; private String mode;
private static final Set<String> MODES = new HashSet<String>(); private static final Set<String> MODES = new HashSet<String>();
static { static {
MODES.add(XML); MODES.add(XML);
@ -69,7 +69,7 @@ public class Content implements Cloneable, Serializable {
* *
*/ */
public Content() { public Content() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -83,7 +83,7 @@ public class Content implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -100,7 +100,7 @@ public class Content implements Cloneable, Serializable {
if (!(other instanceof Content)) { if (!(other instanceof Content)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -114,7 +114,7 @@ public class Content implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -126,7 +126,7 @@ public class Content implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -138,7 +138,7 @@ public class Content implements Cloneable, Serializable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getType() { public String getType() {
return this._type; return type;
} }
/** /**
@ -150,7 +150,7 @@ public class Content implements Cloneable, Serializable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setType(final String type) { public void setType(final String type) {
this._type = type; this.type = type;
} }
/** /**
@ -162,7 +162,7 @@ public class Content implements Cloneable, Serializable {
* @return the content mode, <b>null</b> if none. * @return the content mode, <b>null</b> if none.
*/ */
public String getMode() { public String getMode() {
return this._mode; return mode;
} }
/** /**
@ -178,7 +178,7 @@ public class Content implements Cloneable, Serializable {
if (mode == null || !MODES.contains(mode)) { if (mode == null || !MODES.contains(mode)) {
throw new IllegalArgumentException("Invalid mode [" + mode + "]"); throw new IllegalArgumentException("Invalid mode [" + mode + "]");
} }
this._mode = mode; this.mode = mode;
} }
/** /**
@ -191,7 +191,7 @@ public class Content implements Cloneable, Serializable {
* *
*/ */
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -204,7 +204,7 @@ public class Content implements Cloneable, Serializable {
* *
*/ */
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
/** /**
@ -215,7 +215,7 @@ public class Content implements Cloneable, Serializable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getSrc() { public String getSrc() {
return this._src; return src;
} }
/** /**
@ -226,6 +226,6 @@ public class Content implements Cloneable, Serializable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setSrc(final String src) { public void setSrc(final String src) {
this._src = src; this.src = src;
} }
} }

View file

@ -36,24 +36,24 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
* @author Dave Johnson (updated for Atom 1.0) * @author Dave Johnson (updated for Atom 1.0)
*/ */
public class Entry implements Cloneable, Serializable, Extendable { public class Entry implements Cloneable, Serializable, Extendable {
private Content _summary; private Content summary;
private Content _title; private Content title;
private Date _created; // Atom 0.3 only private Date created; // Atom 0.3 only
private Date _published; // AKA issued private Date published; // AKA issued
private Date _updated; // AKA modified private Date updated; // AKA modified
private Feed _source; private Feed source;
private List<Link> _alternateLinks; private List<Link> alternateLinks;
private List<Person> _authors; private List<Person> authors;
private List<Category> _categories; private List<Category> categories;
private List<Content> _contents; private List<Content> contents;
private List<Person> _contributors; private List<Person> contributors;
private List<Element> _foreignMarkup; private List<Element> foreignMarkup;
private List<Module> _modules; private List<Module> modules;
private List<Link> _otherLinks; private List<Link> otherLinks;
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _id; private String id;
private String _rights; private String rights;
private String _xmlBase; private String xmlBase;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -61,7 +61,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public Entry() { public Entry() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -72,7 +72,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* links to set, an empty list or <b>null</b> if none. * links to set, an empty list or <b>null</b> if none.
*/ */
public void setAlternateLinks(final List<Link> alternateLinks) { public void setAlternateLinks(final List<Link> alternateLinks) {
this._alternateLinks = alternateLinks; this.alternateLinks = alternateLinks;
} }
/** /**
@ -83,7 +83,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* list if none. * list if none.
*/ */
public List<Link> getAlternateLinks() { public List<Link> getAlternateLinks() {
return this._alternateLinks == null ? (this._alternateLinks = new ArrayList<Link>()) : this._alternateLinks; return alternateLinks == null ? (alternateLinks = new ArrayList<Link>()) : alternateLinks;
} }
/** /**
@ -94,7 +94,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setAuthors(final List<Person> authors) { public void setAuthors(final List<Person> authors) {
this._authors = authors; this.authors = authors;
} }
/** /**
@ -105,7 +105,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public List<Person> getAuthors() { public List<Person> getAuthors() {
return this._authors == null ? (this._authors = new ArrayList<Person>()) : this._authors; return authors == null ? (authors = new ArrayList<Person>()) : authors;
} }
/** /**
@ -116,7 +116,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setCategories(final List<Category> categories) { public void setCategories(final List<Category> categories) {
this._categories = categories; this.categories = categories;
} }
/** /**
@ -127,7 +127,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public List<Category> getCategories() { public List<Category> getCategories() {
return this._categories == null ? (this._categories = new ArrayList<Category>()) : this._categories; return categories == null ? (categories = new ArrayList<Category>()) : categories;
} }
/** /**
@ -138,7 +138,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* set, an empty list or <b>null</b> if none. * set, an empty list or <b>null</b> if none.
*/ */
public void setContents(final List<Content> contents) { public void setContents(final List<Content> contents) {
this._contents = contents; this.contents = contents;
} }
/** /**
@ -149,7 +149,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* if none. * if none.
*/ */
public List<Content> getContents() { public List<Content> getContents() {
return this._contents == null ? (this._contents = new ArrayList<Content>()) : this._contents; return contents == null ? (contents = new ArrayList<Content>()) : contents;
} }
/** /**
@ -161,7 +161,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setContributors(final List<Person> contributors) { public void setContributors(final List<Person> contributors) {
this._contributors = contributors; this.contributors = contributors;
} }
/** /**
@ -173,7 +173,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public List<Person> getContributors() { public List<Person> getContributors() {
return this._contributors == null ? (this._contributors = new ArrayList<Person>()) : this._contributors; return contributors == null ? (contributors = new ArrayList<Person>()) : contributors;
} }
/** /**
@ -183,7 +183,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @param created the entry created date, <b>null</b> if none. * @param created the entry created date, <b>null</b> if none.
*/ */
public void setCreated(final Date created) { public void setCreated(final Date created) {
this._created = new Date(created.getTime()); this.created = new Date(created.getTime());
} }
/** /**
@ -193,7 +193,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @return the entry created date, <b>null</b> if none. * @return the entry created date, <b>null</b> if none.
*/ */
public Date getCreated() { public Date getCreated() {
return this._created == null ? null : new Date(this._created.getTime()); return created == null ? null : new Date(created.getTime());
} }
/** /**
@ -204,7 +204,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setForeignMarkup(final List<Element> foreignMarkup) { public void setForeignMarkup(final List<Element> foreignMarkup) {
this._foreignMarkup = foreignMarkup; this.foreignMarkup = foreignMarkup;
} }
/** /**
@ -215,7 +215,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public List<Element> getForeignMarkup() { public List<Element> getForeignMarkup() {
return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList<Element>()) : this._foreignMarkup; return foreignMarkup == null ? (foreignMarkup = new ArrayList<Element>()) : foreignMarkup;
} }
/** /**
@ -226,7 +226,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setId(final String id) { public void setId(final String id) {
this._id = id; this.id = id;
} }
/** /**
@ -237,7 +237,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getId() { public String getId() {
return this._id; return id;
} }
/** /**
@ -248,7 +248,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @param issued the entry issued date, <b>null</b> if none. * @param issued the entry issued date, <b>null</b> if none.
*/ */
public void setIssued(final Date issued) { public void setIssued(final Date issued) {
this._published = issued == null ? null : new Date(issued.getTime()); published = issued == null ? null : new Date(issued.getTime());
} }
/** /**
@ -259,7 +259,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @return the entry issued date, <b>null</b> if none. * @return the entry issued date, <b>null</b> if none.
*/ */
public Date getIssued() { public Date getIssued() {
return this._published == null ? null : new Date(this._published.getTime()); return published == null ? null : new Date(published.getTime());
} }
/** /**
@ -290,7 +290,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @param modified the entry modified date, <b>null</b> if none. * @param modified the entry modified date, <b>null</b> if none.
*/ */
public void setModified(final Date modified) { public void setModified(final Date modified) {
this._updated = modified == null ? null : new Date(modified.getTime()); updated = modified == null ? null : new Date(modified.getTime());
} }
/** /**
@ -301,7 +301,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @return the entry modified date, <b>null</b> if none. * @return the entry modified date, <b>null</b> if none.
*/ */
public Date getModified() { public Date getModified() {
return this._updated == null ? null : new Date(this._updated.getTime()); return updated == null ? null : new Date(updated.getTime());
} }
/** /**
@ -313,7 +313,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public Module getModule(final String uri) { public Module getModule(final String uri) {
return ModuleUtils.getModule(this._modules, uri); return ModuleUtils.getModule(modules, uri);
} }
/** /**
@ -326,7 +326,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**
@ -339,7 +339,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
return this._modules == null ? (this._modules = new ArrayList<Module>()) : this._modules; return modules == null ? (modules = new ArrayList<Module>()) : modules;
} }
/** /**
@ -350,7 +350,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* links to set, an empty list or <b>null</b> if none. * links to set, an empty list or <b>null</b> if none.
*/ */
public void setOtherLinks(final List<Link> otherLinks) { public void setOtherLinks(final List<Link> otherLinks) {
this._otherLinks = otherLinks; this.otherLinks = otherLinks;
} }
/** /**
@ -361,7 +361,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* set, an empty list if none. * set, an empty list if none.
*/ */
public List<Link> getOtherLinks() { public List<Link> getOtherLinks() {
return this._otherLinks == null ? (this._otherLinks = new ArrayList<Link>()) : this._otherLinks; return otherLinks == null ? (otherLinks = new ArrayList<Link>()) : otherLinks;
} }
/** /**
@ -372,7 +372,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setPublished(final Date published) { public void setPublished(final Date published) {
this._published = published == null ? null : new Date(published.getTime()); this.published = published == null ? null : new Date(published.getTime());
} }
/** /**
@ -383,7 +383,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public Date getPublished() { public Date getPublished() {
return this._published == null ? null : new Date(this._published.getTime()); return published == null ? null : new Date(published.getTime());
} }
/** /**
@ -394,7 +394,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setRights(final String rights) { public void setRights(final String rights) {
this._rights = rights; this.rights = rights;
} }
/** /**
@ -405,7 +405,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getRights() { public String getRights() {
return this._rights; return rights;
} }
/** /**
@ -415,7 +415,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @param source The source to set. * @param source The source to set.
*/ */
public void setSource(final Feed source) { public void setSource(final Feed source) {
this._source = source; this.source = source;
} }
/** /**
@ -425,7 +425,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @return Returns the source. * @return Returns the source.
*/ */
public Feed getSource() { public Feed getSource() {
return this._source; return source;
} }
/** /**
@ -436,7 +436,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setSummary(final Content summary) { public void setSummary(final Content summary) {
this._summary = summary; this.summary = summary;
} }
/** /**
@ -447,7 +447,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public Content getSummary() { public Content getSummary() {
return this._summary; return summary;
} }
/** /**
@ -458,11 +458,11 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setTitle(final String title) { public void setTitle(final String title) {
if (this._title == null) { if (this.title == null) {
this._title = new Content(); this.title = new Content();
} }
this._title.setValue(title); this.title.setValue(title);
} }
/** /**
@ -473,8 +473,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getTitle() { public String getTitle() {
if (this._title != null) { if (title != null) {
return this._title.getValue(); return title.getValue();
} }
return null; return null;
@ -488,7 +488,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setTitleEx(final Content title) { public void setTitleEx(final Content title) {
this._title = title; this.title = title;
} }
/** /**
@ -499,7 +499,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* *
*/ */
public Content getTitleEx() { public Content getTitleEx() {
return this._title; return title;
} }
/** /**
@ -510,7 +510,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setUpdated(final Date updated) { public void setUpdated(final Date updated) {
this._updated = updated == null ? null : new Date(updated.getTime()); this.updated = updated == null ? null : new Date(updated.getTime());
} }
/** /**
@ -521,7 +521,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public Date getUpdated() { public Date getUpdated() {
return this._updated == null ? null : new Date(this._updated.getTime()); return updated == null ? null : new Date(updated.getTime());
} }
/** /**
@ -532,7 +532,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setXmlBase(final String xmlBase) { public void setXmlBase(final String xmlBase) {
this._xmlBase = xmlBase; this.xmlBase = xmlBase;
} }
/** /**
@ -543,7 +543,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getXmlBase() { public String getXmlBase() {
return this._xmlBase; return xmlBase;
} }
/** /**
@ -557,7 +557,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -581,7 +581,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
final List<Element> fm = getForeignMarkup(); final List<Element> fm = getForeignMarkup();
setForeignMarkup(((Entry) other).getForeignMarkup()); setForeignMarkup(((Entry) other).getForeignMarkup());
final boolean ret = this._objBean.equals(other); final boolean ret = objBean.equals(other);
// restore foreign markup // restore foreign markup
setForeignMarkup(fm); setForeignMarkup(fm);
@ -599,7 +599,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -611,11 +611,11 @@ public class Entry implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
public Link findRelatedLink(final String relation) { public Link findRelatedLink(final String relation) {
for (final Link l : this._otherLinks) { for (final Link l : otherLinks) {
if (relation.equals(l.getRel())) { if (relation.equals(l.getRel())) {
return l; return l;
} }

View file

@ -35,26 +35,26 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
*/ */
public class Feed extends WireFeed { public class Feed extends WireFeed {
private String _xmlBase; private String xmlBase;
private List<Category> _categories; private List<Category> categories;
private List<Person> _authors; private List<Person> authors;
private List<Person> _contributors; private List<Person> contributors;
private Generator _generator; private Generator generator;
private String _icon; private String icon;
private String _id; private String id;
private String _logo; private String logo;
private String _rights; // AKA copyright private String rights; // AKA copyright
private Content _subtitle; // AKA tagline private Content subtitle; // AKA tagline
private Content _title; private Content title;
private Date _updated; // AKA modified private Date updated; // AKA modified
private List<Link> _alternateLinks; private List<Link> alternateLinks;
private List<Link> _otherLinks; private List<Link> otherLinks;
private List<Entry> _entries; private List<Entry> entries;
private List<Module> _modules; private List<Module> modules;
private Content _info; // Atom 0.3 only private Content info; // Atom 0.3 only
private String _language; // Atom 0.3 only private String language; // Atom 0.3 only
/** /**
* Default constructor, for bean cloning purposes only. * Default constructor, for bean cloning purposes only.
@ -83,7 +83,7 @@ public class Feed extends WireFeed {
* *
*/ */
public String getLanguage() { public String getLanguage() {
return this._language; return language;
} }
/** /**
@ -94,7 +94,7 @@ public class Feed extends WireFeed {
* *
*/ */
public void setLanguage(final String language) { public void setLanguage(final String language) {
this._language = language; this.language = language;
} }
/** /**
@ -105,8 +105,8 @@ public class Feed extends WireFeed {
* *
*/ */
public String getTitle() { public String getTitle() {
if (this._title != null) { if (title != null) {
return this._title.getValue(); return title.getValue();
} }
return null; return null;
} }
@ -119,10 +119,10 @@ public class Feed extends WireFeed {
* *
*/ */
public void setTitle(final String title) { public void setTitle(final String title) {
if (this._title == null) { if (this.title == null) {
this._title = new Content(); this.title = new Content();
} }
this._title.setValue(title); this.title.setValue(title);
} }
/** /**
@ -133,7 +133,7 @@ public class Feed extends WireFeed {
* *
*/ */
public Content getTitleEx() { public Content getTitleEx() {
return this._title; return title;
} }
/** /**
@ -144,7 +144,7 @@ public class Feed extends WireFeed {
* *
*/ */
public void setTitleEx(final Content title) { public void setTitleEx(final Content title) {
this._title = title; this.title = title;
} }
/** /**
@ -155,7 +155,7 @@ public class Feed extends WireFeed {
* list if none. * list if none.
*/ */
public List<Link> getAlternateLinks() { public List<Link> getAlternateLinks() {
return this._alternateLinks == null ? (this._alternateLinks = new ArrayList<Link>()) : this._alternateLinks; return alternateLinks == null ? (alternateLinks = new ArrayList<Link>()) : alternateLinks;
} }
/** /**
@ -166,7 +166,7 @@ public class Feed extends WireFeed {
* links to set, an empty list or <b>null</b> if none. * links to set, an empty list or <b>null</b> if none.
*/ */
public void setAlternateLinks(final List<Link> alternateLinks) { public void setAlternateLinks(final List<Link> alternateLinks) {
this._alternateLinks = alternateLinks; this.alternateLinks = alternateLinks;
} }
/** /**
@ -177,7 +177,7 @@ public class Feed extends WireFeed {
* ones), an empty list if none. * ones), an empty list if none.
*/ */
public List<Link> getOtherLinks() { public List<Link> getOtherLinks() {
return this._otherLinks == null ? (this._otherLinks = new ArrayList<Link>()) : this._otherLinks; return otherLinks == null ? (otherLinks = new ArrayList<Link>()) : otherLinks;
} }
/** /**
@ -189,7 +189,7 @@ public class Feed extends WireFeed {
* none. * none.
*/ */
public void setOtherLinks(final List<Link> otherLinks) { public void setOtherLinks(final List<Link> otherLinks) {
this._otherLinks = otherLinks; this.otherLinks = otherLinks;
} }
/** /**
@ -200,7 +200,7 @@ public class Feed extends WireFeed {
* *
*/ */
public List<Person> getAuthors() { public List<Person> getAuthors() {
return this._authors == null ? (this._authors = new ArrayList<Person>()) : this._authors; return authors == null ? (authors = new ArrayList<Person>()) : authors;
} }
/** /**
@ -211,7 +211,7 @@ public class Feed extends WireFeed {
* *
*/ */
public void setAuthors(final List<Person> authors) { public void setAuthors(final List<Person> authors) {
this._authors = authors; this.authors = authors;
} }
/** /**
@ -223,7 +223,7 @@ public class Feed extends WireFeed {
* *
*/ */
public List<Person> getContributors() { public List<Person> getContributors() {
return this._contributors == null ? (this._contributors = new ArrayList<Person>()) : this._contributors; return contributors == null ? (contributors = new ArrayList<Person>()) : contributors;
} }
/** /**
@ -235,7 +235,7 @@ public class Feed extends WireFeed {
* *
*/ */
public void setContributors(final List<Person> contributors) { public void setContributors(final List<Person> contributors) {
this._contributors = contributors; this.contributors = contributors;
} }
/** /**
@ -245,7 +245,7 @@ public class Feed extends WireFeed {
* @return the feed tag line, <b>null</b> if none. * @return the feed tag line, <b>null</b> if none.
*/ */
public Content getTagline() { public Content getTagline() {
return this._subtitle; return subtitle;
} }
/** /**
@ -256,7 +256,7 @@ public class Feed extends WireFeed {
* @param tagline the feed tagline to set, <b>null</b> if none. * @param tagline the feed tagline to set, <b>null</b> if none.
*/ */
public void setTagline(final Content tagline) { public void setTagline(final Content tagline) {
this._subtitle = tagline; subtitle = tagline;
} }
/** /**
@ -267,7 +267,7 @@ public class Feed extends WireFeed {
* *
*/ */
public String getId() { public String getId() {
return this._id; return id;
} }
/** /**
@ -278,7 +278,7 @@ public class Feed extends WireFeed {
* *
*/ */
public void setId(final String id) { public void setId(final String id) {
this._id = id; this.id = id;
} }
/** /**
@ -289,7 +289,7 @@ public class Feed extends WireFeed {
* *
*/ */
public Generator getGenerator() { public Generator getGenerator() {
return this._generator; return generator;
} }
/** /**
@ -300,7 +300,7 @@ public class Feed extends WireFeed {
* *
*/ */
public void setGenerator(final Generator generator) { public void setGenerator(final Generator generator) {
this._generator = generator; this.generator = generator;
} }
/** /**
@ -310,7 +310,7 @@ public class Feed extends WireFeed {
* @return the feed copyright, <b>null</b> if none. * @return the feed copyright, <b>null</b> if none.
*/ */
public String getCopyright() { public String getCopyright() {
return this._rights; return rights;
} }
/** /**
@ -321,7 +321,7 @@ public class Feed extends WireFeed {
* @param copyright the feed copyright to set, <b>null</b> if none. * @param copyright the feed copyright to set, <b>null</b> if none.
*/ */
public void setCopyright(final String copyright) { public void setCopyright(final String copyright) {
this._rights = copyright; rights = copyright;
} }
/** /**
@ -331,7 +331,7 @@ public class Feed extends WireFeed {
* @return the feed info, <b>null</b> if none. * @return the feed info, <b>null</b> if none.
*/ */
public Content getInfo() { public Content getInfo() {
return this._info; return info;
} }
/** /**
@ -341,7 +341,7 @@ public class Feed extends WireFeed {
* @param info the feed info to set, <b>null</b> if none. * @param info the feed info to set, <b>null</b> if none.
*/ */
public void setInfo(final Content info) { public void setInfo(final Content info) {
this._info = info; this.info = info;
} }
/** /**
@ -351,7 +351,7 @@ public class Feed extends WireFeed {
* @return the feed modified date, <b>null</b> if none. * @return the feed modified date, <b>null</b> if none.
*/ */
public Date getModified() { public Date getModified() {
return this._updated; return updated;
} }
/** /**
@ -362,7 +362,7 @@ public class Feed extends WireFeed {
* @param modified the feed modified date to set, <b>null</b> if none. * @param modified the feed modified date to set, <b>null</b> if none.
*/ */
public void setModified(final Date modified) { public void setModified(final Date modified) {
this._updated = modified; updated = modified;
} }
/** /**
@ -374,7 +374,7 @@ public class Feed extends WireFeed {
* *
*/ */
public List<Entry> getEntries() { public List<Entry> getEntries() {
return this._entries == null ? (this._entries = new ArrayList<Entry>()) : this._entries; return entries == null ? (entries = new ArrayList<Entry>()) : entries;
} }
/** /**
@ -386,7 +386,7 @@ public class Feed extends WireFeed {
* *
*/ */
public void setEntries(final List<Entry> entries) { public void setEntries(final List<Entry> entries) {
this._entries = entries; this.entries = entries;
} }
/** /**
@ -399,7 +399,7 @@ public class Feed extends WireFeed {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
return this._modules == null ? (this._modules = new ArrayList<Module>()) : this._modules; return modules == null ? (modules = new ArrayList<Module>()) : modules;
} }
/** /**
@ -412,7 +412,7 @@ public class Feed extends WireFeed {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**
@ -424,7 +424,7 @@ public class Feed extends WireFeed {
*/ */
@Override @Override
public Module getModule(final String uri) { public Module getModule(final String uri) {
return ModuleUtils.getModule(this._modules, uri); return ModuleUtils.getModule(modules, uri);
} }
/** /**
@ -435,7 +435,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public List<Category> getCategories() { public List<Category> getCategories() {
return this._categories == null ? (this._categories = new ArrayList<Category>()) : this._categories; return categories == null ? (categories = new ArrayList<Category>()) : categories;
} }
/** /**
@ -446,7 +446,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setCategories(final List<Category> categories) { public void setCategories(final List<Category> categories) {
this._categories = categories; this.categories = categories;
} }
/** /**
@ -457,7 +457,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getIcon() { public String getIcon() {
return this._icon; return icon;
} }
/** /**
@ -468,7 +468,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setIcon(final String icon) { public void setIcon(final String icon) {
this._icon = icon; this.icon = icon;
} }
/** /**
@ -479,7 +479,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getLogo() { public String getLogo() {
return this._logo; return logo;
} }
/** /**
@ -490,7 +490,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setLogo(final String logo) { public void setLogo(final String logo) {
this._logo = logo; this.logo = logo;
} }
/** /**
@ -501,7 +501,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getRights() { public String getRights() {
return this._rights; return rights;
} }
/** /**
@ -512,7 +512,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setRights(final String rights) { public void setRights(final String rights) {
this._rights = rights; this.rights = rights;
} }
/** /**
@ -523,7 +523,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public Content getSubtitle() { public Content getSubtitle() {
return this._subtitle; return subtitle;
} }
/** /**
@ -534,7 +534,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setSubtitle(final Content subtitle) { public void setSubtitle(final Content subtitle) {
this._subtitle = subtitle; this.subtitle = subtitle;
} }
/** /**
@ -545,7 +545,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public Date getUpdated() { public Date getUpdated() {
return this._updated; return updated;
} }
/** /**
@ -556,7 +556,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setUpdated(final Date updated) { public void setUpdated(final Date updated) {
this._updated = updated; this.updated = updated;
} }
/** /**
@ -567,7 +567,7 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getXmlBase() { public String getXmlBase() {
return this._xmlBase; return xmlBase;
} }
/** /**
@ -578,6 +578,6 @@ public class Feed extends WireFeed {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setXmlBase(final String xmlBase) { public void setXmlBase(final String xmlBase) {
this._xmlBase = xmlBase; this.xmlBase = xmlBase;
} }
} }

View file

@ -28,10 +28,10 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class Generator implements Cloneable, Serializable { public class Generator implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _url; private String url;
private String _version; private String version;
private String _value; private String value;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -39,7 +39,7 @@ public class Generator implements Cloneable, Serializable {
* *
*/ */
public Generator() { public Generator() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -53,7 +53,7 @@ public class Generator implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -70,7 +70,7 @@ public class Generator implements Cloneable, Serializable {
if (!(other instanceof Generator)) { if (!(other instanceof Generator)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -84,7 +84,7 @@ public class Generator implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -96,7 +96,7 @@ public class Generator implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -107,7 +107,7 @@ public class Generator implements Cloneable, Serializable {
* *
*/ */
public String getUrl() { public String getUrl() {
return this._url; return url;
} }
/** /**
@ -118,7 +118,7 @@ public class Generator implements Cloneable, Serializable {
* *
*/ */
public void setUrl(final String url) { public void setUrl(final String url) {
this._url = url; this.url = url;
} }
/** /**
@ -129,7 +129,7 @@ public class Generator implements Cloneable, Serializable {
* *
*/ */
public String getVersion() { public String getVersion() {
return this._version; return version;
} }
/** /**
@ -140,7 +140,7 @@ public class Generator implements Cloneable, Serializable {
* *
*/ */
public void setVersion(final String version) { public void setVersion(final String version) {
this._version = version; this.version = version;
} }
/** /**
@ -151,7 +151,7 @@ public class Generator implements Cloneable, Serializable {
* *
*/ */
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -162,7 +162,7 @@ public class Generator implements Cloneable, Serializable {
* *
*/ */
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
} }

View file

@ -29,15 +29,15 @@ import com.sun.syndication.feed.impl.ObjectBean;
*/ */
public class Link implements Cloneable, Serializable { public class Link implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _href; private String href;
private String _hrefResolved; private String hrefResolved;
private String _rel = "alternate"; private String rel = "alternate";
private String _type; private String type;
private String _hreflang; private String hreflang;
private String _title; private String title;
private long _length; private long length;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -45,7 +45,7 @@ public class Link implements Cloneable, Serializable {
* *
*/ */
public Link() { public Link() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -59,7 +59,7 @@ public class Link implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -73,7 +73,7 @@ public class Link implements Cloneable, Serializable {
*/ */
@Override @Override
public boolean equals(final Object other) { public boolean equals(final Object other) {
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -87,7 +87,7 @@ public class Link implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -99,7 +99,7 @@ public class Link implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -110,7 +110,7 @@ public class Link implements Cloneable, Serializable {
* *
*/ */
public String getRel() { public String getRel() {
return this._rel; return rel;
} }
/** /**
@ -122,7 +122,7 @@ public class Link implements Cloneable, Serializable {
*/ */
public void setRel(final String rel) { public void setRel(final String rel) {
// TODO add check, ask P@ about the check // TODO add check, ask P@ about the check
this._rel = rel; this.rel = rel;
} }
/** /**
@ -133,7 +133,7 @@ public class Link implements Cloneable, Serializable {
* *
*/ */
public String getType() { public String getType() {
return this._type; return type;
} }
/** /**
@ -144,7 +144,7 @@ public class Link implements Cloneable, Serializable {
* *
*/ */
public void setType(final String type) { public void setType(final String type) {
this._type = type; this.type = type;
} }
/** /**
@ -155,7 +155,7 @@ public class Link implements Cloneable, Serializable {
* *
*/ */
public String getHref() { public String getHref() {
return this._href; return href;
} }
/** /**
@ -166,15 +166,15 @@ public class Link implements Cloneable, Serializable {
* *
*/ */
public void setHref(final String href) { public void setHref(final String href) {
this._href = href; this.href = href;
} }
public void setHrefResolved(final String hrefResolved) { public void setHrefResolved(final String hrefResolved) {
this._hrefResolved = hrefResolved; this.hrefResolved = hrefResolved;
} }
public String getHrefResolved() { public String getHrefResolved() {
return this._hrefResolved != null ? this._hrefResolved : this._href; return hrefResolved != null ? hrefResolved : href;
} }
/** /**
@ -185,7 +185,7 @@ public class Link implements Cloneable, Serializable {
* *
*/ */
public String getTitle() { public String getTitle() {
return this._title; return title;
} }
/** /**
@ -196,7 +196,7 @@ public class Link implements Cloneable, Serializable {
* *
*/ */
public void setTitle(final String title) { public void setTitle(final String title) {
this._title = title; this.title = title;
} }
/** /**
@ -207,7 +207,7 @@ public class Link implements Cloneable, Serializable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getHreflang() { public String getHreflang() {
return this._hreflang; return hreflang;
} }
/** /**
@ -218,7 +218,7 @@ public class Link implements Cloneable, Serializable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setHreflang(final String hreflang) { public void setHreflang(final String hreflang) {
this._hreflang = hreflang; this.hreflang = hreflang;
} }
/** /**
@ -228,7 +228,7 @@ public class Link implements Cloneable, Serializable {
* @return Returns the length. * @return Returns the length.
*/ */
public long getLength() { public long getLength() {
return this._length; return length;
} }
/** /**
@ -238,6 +238,6 @@ public class Link implements Cloneable, Serializable {
* @param length The length to set. * @param length The length to set.
*/ */
public void setLength(final long length) { public void setLength(final long length) {
this._length = length; this.length = length;
} }
} }

View file

@ -34,13 +34,13 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
*/ */
public class Person implements Cloneable, Serializable, Extendable { public class Person implements Cloneable, Serializable, Extendable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _name; private String name;
private String _uri; // since Atom 1.0 (was called url) private String uri; // since Atom 1.0 (was called url)
private String _uriResolved; private String uriResolved;
private String _email; private String email;
private List<Module> _modules; private List<Module> modules;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -48,7 +48,7 @@ public class Person implements Cloneable, Serializable, Extendable {
* *
*/ */
public Person() { public Person() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -62,7 +62,7 @@ public class Person implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -76,7 +76,7 @@ public class Person implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public boolean equals(final Object other) { public boolean equals(final Object other) {
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -90,7 +90,7 @@ public class Person implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -102,7 +102,7 @@ public class Person implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -113,7 +113,7 @@ public class Person implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getName() { public String getName() {
return this._name; return name;
} }
/** /**
@ -124,7 +124,7 @@ public class Person implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setName(final String name) { public void setName(final String name) {
this._name = name; this.name = name;
} }
/** /**
@ -134,7 +134,7 @@ public class Person implements Cloneable, Serializable, Extendable {
* @return the person URL, <b>null</b> if none. * @return the person URL, <b>null</b> if none.
*/ */
public String getUrl() { public String getUrl() {
return this._uri; return uri;
} }
/** /**
@ -144,15 +144,15 @@ public class Person implements Cloneable, Serializable, Extendable {
* @param url the person URL, <b>null</b> if none. * @param url the person URL, <b>null</b> if none.
*/ */
public void setUrl(final String url) { public void setUrl(final String url) {
this._uri = url; uri = url;
} }
public void setUriResolved(final String uriResolved) { public void setUriResolved(final String uriResolved) {
this._uriResolved = uriResolved; this.uriResolved = uriResolved;
} }
public String getUriResolved(final String resolveURI) { public String getUriResolved(final String resolveURI) {
return this._uriResolved != null ? this._uriResolved : this._uri; return uriResolved != null ? uriResolved : uri;
} }
/** /**
@ -163,7 +163,7 @@ public class Person implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getEmail() { public String getEmail() {
return this._email; return email;
} }
/** /**
@ -174,7 +174,7 @@ public class Person implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setEmail(final String email) { public void setEmail(final String email) {
this._email = email; this.email = email;
} }
/** /**
@ -185,7 +185,7 @@ public class Person implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public String getUri() { public String getUri() {
return this._uri; return uri;
} }
/** /**
@ -196,7 +196,7 @@ public class Person implements Cloneable, Serializable, Extendable {
* @since Atom 1.0 * @since Atom 1.0
*/ */
public void setUri(final String uri) { public void setUri(final String uri) {
this._uri = uri; this.uri = uri;
} }
/** /**
@ -209,7 +209,7 @@ public class Person implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
return this._modules == null ? (this._modules = new ArrayList<Module>()) : this._modules; return modules == null ? (modules = new ArrayList<Module>()) : modules;
} }
/** /**
@ -222,7 +222,7 @@ public class Person implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**
@ -234,7 +234,7 @@ public class Person implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public Module getModule(final String uri) { public Module getModule(final String uri) {
return ModuleUtils.getModule(this._modules, uri); return ModuleUtils.getModule(modules, uri);
} }
} }

View file

@ -41,13 +41,13 @@ import java.util.Set;
*/ */
public class BeanIntrospector { public class BeanIntrospector {
private static final Map _introspected = new HashMap(); private static final Map introspected = new HashMap();
public static synchronized PropertyDescriptor[] getPropertyDescriptors(final Class klass) throws IntrospectionException { public static synchronized PropertyDescriptor[] getPropertyDescriptors(final Class klass) throws IntrospectionException {
PropertyDescriptor[] descriptors = (PropertyDescriptor[]) _introspected.get(klass); PropertyDescriptor[] descriptors = (PropertyDescriptor[]) introspected.get(klass);
if (descriptors == null) { if (descriptors == null) {
descriptors = getPDs(klass); descriptors = getPDs(klass);
_introspected.put(klass, descriptors); introspected.put(klass, descriptors);
} }
return descriptors; return descriptors;
} }

View file

@ -45,8 +45,8 @@ public class CloneableBean implements Serializable, Cloneable {
private static final Class[] NO_PARAMS_DEF = new Class[0]; private static final Class[] NO_PARAMS_DEF = new Class[0];
private static final Object[] NO_PARAMS = new Object[0]; private static final Object[] NO_PARAMS = new Object[0];
private final Object _obj; private final Object obj;
private Set _ignoreProperties; private Set ignoreProperties;
/** /**
* Default constructor. * Default constructor.
@ -56,7 +56,7 @@ public class CloneableBean implements Serializable, Cloneable {
* *
*/ */
protected CloneableBean() { protected CloneableBean() {
this._obj = this; obj = this;
} }
/** /**
@ -66,14 +66,14 @@ public class CloneableBean implements Serializable, Cloneable {
* <p> * <p>
* <code> * <code>
* public class Foo implements Cloneable { * public class Foo implements Cloneable {
* private CloneableBean _cloneableBean; * private CloneableBean cloneableBean;
* *
* public Foo() { * public Foo() {
* _cloneableBean = new CloneableBean(this); * cloneableBean = new CloneableBean(this);
* } * }
* *
* public Object clone() throws CloneNotSupportedException { * public Object clone() throws CloneNotSupportedException {
* return _cloneableBean.beanClone(); * return cloneableBean.beanClone();
* } * }
* *
* } * }
@ -104,8 +104,8 @@ public class CloneableBean implements Serializable, Cloneable {
* *
*/ */
public CloneableBean(final Object obj, final Set ignoreProperties) { public CloneableBean(final Object obj, final Set ignoreProperties) {
this._obj = obj; this.obj = obj;
this._ignoreProperties = ignoreProperties != null ? ignoreProperties : Collections.EMPTY_SET; this.ignoreProperties = ignoreProperties != null ? ignoreProperties : Collections.EMPTY_SET;
} }
/** /**
@ -142,8 +142,8 @@ public class CloneableBean implements Serializable, Cloneable {
public Object beanClone() throws CloneNotSupportedException { public Object beanClone() throws CloneNotSupportedException {
Object clonedBean; Object clonedBean;
try { try {
clonedBean = this._obj.getClass().newInstance(); clonedBean = obj.getClass().newInstance();
final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(this._obj.getClass()); final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(obj.getClass());
if (pds != null) { if (pds != null) {
for (int i = 0; i < pds.length; i++) { for (int i = 0; i < pds.length; i++) {
final Method pReadMethod = pds[i].getReadMethod(); final Method pReadMethod = pds[i].getReadMethod();
@ -154,7 +154,7 @@ public class CloneableBean implements Serializable, Cloneable {
// and // and
// setter // setter
// methods // methods
!this._ignoreProperties.contains(pds[i].getName()) && // is !ignoreProperties.contains(pds[i].getName()) && // is
// not // not
// in // in
// the // the
@ -173,7 +173,7 @@ public class CloneableBean implements Serializable, Cloneable {
// that // that
// take // take
// parameters // parameters
Object value = pReadMethod.invoke(this._obj, NO_PARAMS); Object value = pReadMethod.invoke(obj, NO_PARAMS);
if (value != null) { if (value != null) {
value = doClone(value); value = doClone(value);
pWriteMethod.invoke(clonedBean, new Object[] { value }); pWriteMethod.invoke(clonedBean, new Object[] { value });
@ -186,7 +186,7 @@ public class CloneableBean implements Serializable, Cloneable {
} catch (final Exception ex) { } catch (final Exception ex) {
System.out.println(ex); System.out.println(ex);
ex.printStackTrace(System.out); ex.printStackTrace(System.out);
throw new CloneNotSupportedException("Cannot clone a " + this._obj.getClass() + " object"); throw new CloneNotSupportedException("Cannot clone a " + obj.getClass() + " object");
} }
return clonedBean; return clonedBean;
} }

View file

@ -36,19 +36,19 @@ import com.sun.syndication.feed.CopyFrom;
public class CopyFromHelper { public class CopyFromHelper {
private static final Object[] NO_PARAMS = new Object[0]; private static final Object[] NO_PARAMS = new Object[0];
private final Class _beanInterfaceClass; private final Class beanInterfaceClass;
private final Map _baseInterfaceMap; // ENTRIES(propertyName,interface.class) private final Map baseInterfaceMap; // ENTRIES(propertyName,interface.class)
private final Map _baseImplMap; // ENTRIES(interface.class,implementation.class) private final Map baseImplMap; // ENTRIES(interface.class,implementation.class)
public CopyFromHelper(final Class beanInterfaceClass, final Map basePropInterfaceMap, final Map basePropClassImplMap) { public CopyFromHelper(final Class beanInterfaceClass, final Map basePropInterfaceMap, final Map basePropClassImplMap) {
this._beanInterfaceClass = beanInterfaceClass; this.beanInterfaceClass = beanInterfaceClass;
this._baseInterfaceMap = basePropInterfaceMap; baseInterfaceMap = basePropInterfaceMap;
this._baseImplMap = basePropClassImplMap; baseImplMap = basePropClassImplMap;
} }
public void copy(final Object target, final Object source) { public void copy(final Object target, final Object source) {
try { try {
final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(this._beanInterfaceClass); final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(beanInterfaceClass);
if (pds != null) { if (pds != null) {
for (final PropertyDescriptor pd : pds) { for (final PropertyDescriptor pd : pds) {
final String propertyName = pd.getName(); final String propertyName = pd.getName();
@ -70,7 +70,7 @@ public class CopyFromHelper {
// that // that
// take // take
// parameters // parameters
this._baseInterfaceMap.containsKey(propertyName)) { // only baseInterfaceMap.containsKey(propertyName)) { // only
// copies // copies
// properties // properties
// defined // defined
@ -78,7 +78,7 @@ public class CopyFromHelper {
// copyFrom-able // copyFrom-able
Object value = pReadMethod.invoke(source, NO_PARAMS); Object value = pReadMethod.invoke(source, NO_PARAMS);
if (value != null) { if (value != null) {
final Class baseInterface = (Class) this._baseInterfaceMap.get(propertyName); final Class baseInterface = (Class) baseInterfaceMap.get(propertyName);
value = doCopy(value, baseInterface); value = doCopy(value, baseInterface);
pWriteMethod.invoke(target, new Object[] { value }); pWriteMethod.invoke(target, new Object[] { value });
} }
@ -91,10 +91,10 @@ public class CopyFromHelper {
} }
private CopyFrom createInstance(final Class interfaceClass) throws Exception { private CopyFrom createInstance(final Class interfaceClass) throws Exception {
if (this._baseImplMap.get(interfaceClass) == null) { if (baseImplMap.get(interfaceClass) == null) {
return null; return null;
} else { } else {
return (CopyFrom) ((Class) this._baseImplMap.get(interfaceClass)).newInstance(); return (CopyFrom) ((Class) baseImplMap.get(interfaceClass)).newInstance();
} }
} }

View file

@ -40,8 +40,8 @@ public class EqualsBean implements Serializable {
private static final Object[] NO_PARAMS = new Object[0]; private static final Object[] NO_PARAMS = new Object[0];
private final Class _beanClass; private final Class beanClass;
private final Object _obj; private final Object obj;
/** /**
* Default constructor. * Default constructor.
@ -53,8 +53,8 @@ public class EqualsBean implements Serializable {
* *
*/ */
protected EqualsBean(final Class beanClass) { protected EqualsBean(final Class beanClass) {
this._beanClass = beanClass; this.beanClass = beanClass;
this._obj = this; obj = this;
} }
/** /**
@ -64,18 +64,18 @@ public class EqualsBean implements Serializable {
* <p> * <p>
* <code> * <code>
* public class Foo implements FooI { * public class Foo implements FooI {
* private EqualsBean _equalsBean; * private EqualsBean equalsBean;
* *
* public Foo() { * public Foo() {
* _equalsBean = new EqualsBean(FooI.class); * equalsBean = new EqualsBean(FooI.class);
* } * }
* *
* public boolean equals(Object obj) { * public boolean equals(Object obj) {
* return _equalsBean.beanEquals(obj); * return equalsBean.beanEquals(obj);
* } * }
* *
* public int hashCode() { * public int hashCode() {
* return _equalsBean.beanHashCode(); * return equalsBean.beanHashCode();
* } * }
* *
* } * }
@ -90,8 +90,8 @@ public class EqualsBean implements Serializable {
if (!beanClass.isInstance(obj)) { if (!beanClass.isInstance(obj)) {
throw new IllegalArgumentException(obj.getClass() + " is not instance of " + beanClass); throw new IllegalArgumentException(obj.getClass() + " is not instance of " + beanClass);
} }
this._beanClass = beanClass; this.beanClass = beanClass;
this._obj = obj; this.obj = obj;
} }
/** /**
@ -127,7 +127,7 @@ public class EqualsBean implements Serializable {
* *
*/ */
public boolean beanEquals(final Object obj) { public boolean beanEquals(final Object obj) {
final Object bean1 = this._obj; final Object bean1 = this.obj;
final Object bean2 = obj; final Object bean2 = obj;
boolean eq; boolean eq;
if (bean1 == null && bean2 == null) { if (bean1 == null && bean2 == null) {
@ -135,12 +135,12 @@ public class EqualsBean implements Serializable {
} else if (bean1 == null || bean2 == null) { } else if (bean1 == null || bean2 == null) {
eq = false; eq = false;
} else { } else {
if (!this._beanClass.isInstance(bean2)) { if (!beanClass.isInstance(bean2)) {
eq = false; eq = false;
} else { } else {
eq = true; eq = true;
try { try {
final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(this._beanClass); final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(beanClass);
if (pds != null) { if (pds != null) {
for (int i = 0; eq && i < pds.length; i++) { for (int i = 0; eq && i < pds.length; i++) {
final Method pReadMethod = pds[i].getReadMethod(); final Method pReadMethod = pds[i].getReadMethod();
@ -208,7 +208,7 @@ public class EqualsBean implements Serializable {
* *
*/ */
public int beanHashCode() { public int beanHashCode() {
return this._obj.toString().hashCode(); return obj.toString().hashCode();
} }
private boolean doEquals(final Object obj1, final Object obj2) { private boolean doEquals(final Object obj1, final Object obj2) {

View file

@ -43,9 +43,9 @@ import java.util.Set;
* *
*/ */
public class ObjectBean implements Serializable, Cloneable { public class ObjectBean implements Serializable, Cloneable {
private final EqualsBean _equalsBean; private final EqualsBean equalsBean;
private final ToStringBean _toStringBean; private final ToStringBean toStringBean;
private final CloneableBean _cloneableBean; private final CloneableBean cloneableBean;
/** /**
* Constructor. * Constructor.
@ -75,9 +75,9 @@ public class ObjectBean implements Serializable, Cloneable {
* *
*/ */
public ObjectBean(final Class beanClass, final Object obj, final Set ignoreProperties) { public ObjectBean(final Class beanClass, final Object obj, final Set ignoreProperties) {
this._equalsBean = new EqualsBean(beanClass, obj); equalsBean = new EqualsBean(beanClass, obj);
this._toStringBean = new ToStringBean(beanClass, obj); toStringBean = new ToStringBean(beanClass, obj);
this._cloneableBean = new CloneableBean(obj, ignoreProperties); cloneableBean = new CloneableBean(obj, ignoreProperties);
} }
/** /**
@ -91,7 +91,7 @@ public class ObjectBean implements Serializable, Cloneable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._cloneableBean.beanClone(); return cloneableBean.beanClone();
} }
/** /**
@ -105,7 +105,7 @@ public class ObjectBean implements Serializable, Cloneable {
*/ */
@Override @Override
public boolean equals(final Object other) { public boolean equals(final Object other) {
return this._equalsBean.beanEquals(other); return equalsBean.beanEquals(other);
} }
/** /**
@ -119,7 +119,7 @@ public class ObjectBean implements Serializable, Cloneable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._equalsBean.beanHashCode(); return equalsBean.beanHashCode();
} }
/** /**
@ -131,7 +131,7 @@ public class ObjectBean implements Serializable, Cloneable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._toStringBean.toString(); return toStringBean.toString();
} }
} }

View file

@ -51,8 +51,8 @@ public class ToStringBean implements Serializable {
private static final Object[] NO_PARAMS = new Object[0]; private static final Object[] NO_PARAMS = new Object[0];
private final Class _beanClass; private final Class beanClass;
private final Object _obj; private final Object obj;
/** /**
* Default constructor. * Default constructor.
@ -65,8 +65,8 @@ public class ToStringBean implements Serializable {
* *
*/ */
protected ToStringBean(final Class beanClass) { protected ToStringBean(final Class beanClass) {
this._beanClass = beanClass; this.beanClass = beanClass;
this._obj = this; obj = this;
} }
/** /**
@ -96,8 +96,8 @@ public class ToStringBean implements Serializable {
* *
*/ */
public ToStringBean(final Class beanClass, final Object obj) { public ToStringBean(final Class beanClass, final Object obj) {
this._beanClass = beanClass; this.beanClass = beanClass;
this._obj = obj; this.obj = obj;
} }
/** /**
@ -115,7 +115,7 @@ public class ToStringBean implements Serializable {
final String[] tsInfo = (String[]) (stack.isEmpty() ? null : stack.peek()); final String[] tsInfo = (String[]) (stack.isEmpty() ? null : stack.peek());
String prefix; String prefix;
if (tsInfo == null) { if (tsInfo == null) {
final String className = this._obj.getClass().getName(); final String className = obj.getClass().getName();
prefix = className.substring(className.lastIndexOf(".") + 1); prefix = className.substring(className.lastIndexOf(".") + 1);
} else { } else {
prefix = tsInfo[0]; prefix = tsInfo[0];
@ -135,7 +135,7 @@ public class ToStringBean implements Serializable {
private String toString(final String prefix) { private String toString(final String prefix) {
final StringBuffer sb = new StringBuffer(128); final StringBuffer sb = new StringBuffer(128);
try { try {
final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(this._beanClass); final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(beanClass);
if (pds != null) { if (pds != null) {
for (final PropertyDescriptor pd : pds) { for (final PropertyDescriptor pd : pds) {
final String pName = pd.getName(); final String pName = pd.getName();
@ -151,13 +151,13 @@ public class ToStringBean implements Serializable {
// that // that
// take // take
// parameters // parameters
final Object value = pReadMethod.invoke(this._obj, NO_PARAMS); final Object value = pReadMethod.invoke(obj, NO_PARAMS);
printProperty(sb, prefix + "." + pName, value); printProperty(sb, prefix + "." + pName, value);
} }
} }
} }
} catch (final Exception ex) { } catch (final Exception ex) {
sb.append("\n\nEXCEPTION: Could not complete " + this._obj.getClass() + ".toString(): " + ex.getMessage() + "\n"); sb.append("\n\nEXCEPTION: Could not complete " + obj.getClass() + ".toString(): " + ex.getMessage() + "\n");
} }
return sb.toString(); return sb.toString();
} }

View file

@ -39,22 +39,22 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class DCModuleImpl extends ModuleImpl implements DCModule { public class DCModuleImpl extends ModuleImpl implements DCModule {
private final ObjectBean _objBean; private final ObjectBean objBean;
private List<String> _title; private List<String> title;
private List<String> _creator; private List<String> creator;
private List<DCSubject> _subject; private List<DCSubject> subject;
private List<String> _description; private List<String> description;
private List<String> _publisher; private List<String> publisher;
private List<String> _contributors; private List<String> contributors;
private List<Date> _date; private List<Date> date;
private List<String> _type; private List<String> type;
private List<String> _format; private List<String> format;
private List<String> _identifier; private List<String> identifier;
private List<String> _source; private List<String> source;
private List<String> _language; private List<String> language;
private List<String> _relation; private List<String> relation;
private List<String> _coverage; private List<String> coverage;
private List<String> _rights; private List<String> rights;
/** /**
* Properties to be ignored when cloning. * Properties to be ignored when cloning.
@ -95,7 +95,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
public DCModuleImpl() { public DCModuleImpl() {
super(DCModule.class, URI); super(DCModule.class, URI);
this._objBean = new ObjectBean(DCModule.class, this, CONVENIENCE_PROPERTIES); objBean = new ObjectBean(DCModule.class, this, CONVENIENCE_PROPERTIES);
} }
/** /**
@ -108,7 +108,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getTitles() { public List<String> getTitles() {
return this._title == null ? (this._title = new ArrayList<String>()) : this._title; return title == null ? (title = new ArrayList<String>()) : title;
} }
/** /**
@ -121,7 +121,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setTitles(final List<String> titles) { public void setTitles(final List<String> titles) {
this._title = titles; title = titles;
} }
/** /**
@ -133,7 +133,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getTitle() { public String getTitle() {
return this._title != null && this._title.size() > 0 ? (String) this._title.get(0) : null; return title != null && title.size() > 0 ? (String) title.get(0) : null;
} }
/** /**
@ -146,8 +146,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setTitle(final String title) { public void setTitle(final String title) {
this._title = new ArrayList<String>(); this.title = new ArrayList<String>();
this._title.add(title); this.title.add(title);
} }
/** /**
@ -160,7 +160,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getCreators() { public List<String> getCreators() {
return this._creator == null ? (this._creator = new ArrayList<String>()) : this._creator; return creator == null ? (creator = new ArrayList<String>()) : creator;
} }
/** /**
@ -173,7 +173,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setCreators(final List<String> creators) { public void setCreators(final List<String> creators) {
this._creator = creators; creator = creators;
} }
/** /**
@ -185,7 +185,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getCreator() { public String getCreator() {
return this._creator != null && this._creator.size() > 0 ? (String) this._creator.get(0) : null; return creator != null && creator.size() > 0 ? (String) creator.get(0) : null;
} }
/** /**
@ -198,8 +198,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setCreator(final String creator) { public void setCreator(final String creator) {
this._creator = new ArrayList<String>(); this.creator = new ArrayList<String>();
this._creator.add(creator); this.creator.add(creator);
} }
/** /**
@ -212,7 +212,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<DCSubject> getSubjects() { public List<DCSubject> getSubjects() {
return this._subject == null ? (this._subject = new ArrayList<DCSubject>()) : this._subject; return subject == null ? (subject = new ArrayList<DCSubject>()) : subject;
} }
/** /**
@ -225,7 +225,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setSubjects(final List<DCSubject> subjects) { public void setSubjects(final List<DCSubject> subjects) {
this._subject = subjects; subject = subjects;
} }
/** /**
@ -237,7 +237,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public DCSubject getSubject() { public DCSubject getSubject() {
return this._subject != null && this._subject.size() > 0 ? (DCSubject) this._subject.get(0) : null; return subject != null && subject.size() > 0 ? (DCSubject) subject.get(0) : null;
} }
/** /**
@ -250,8 +250,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setSubject(final DCSubject subject) { public void setSubject(final DCSubject subject) {
this._subject = new ArrayList<DCSubject>(); this.subject = new ArrayList<DCSubject>();
this._subject.add(subject); this.subject.add(subject);
} }
/** /**
@ -264,7 +264,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getDescriptions() { public List<String> getDescriptions() {
return this._description == null ? (this._description = new ArrayList<String>()) : this._description; return description == null ? (description = new ArrayList<String>()) : description;
} }
/** /**
@ -277,7 +277,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setDescriptions(final List<String> descriptions) { public void setDescriptions(final List<String> descriptions) {
this._description = descriptions; description = descriptions;
} }
/** /**
@ -289,7 +289,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getDescription() { public String getDescription() {
return this._description != null && this._description.size() > 0 ? (String) this._description.get(0) : null; return description != null && description.size() > 0 ? (String) description.get(0) : null;
} }
/** /**
@ -303,8 +303,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setDescription(final String description) { public void setDescription(final String description) {
this._description = new ArrayList<String>(); this.description = new ArrayList<String>();
this._description.add(description); this.description.add(description);
} }
/** /**
@ -317,7 +317,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getPublishers() { public List<String> getPublishers() {
return this._publisher == null ? (this._publisher = new ArrayList<String>()) : this._publisher; return publisher == null ? (publisher = new ArrayList<String>()) : publisher;
} }
/** /**
@ -330,7 +330,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setPublishers(final List<String> publishers) { public void setPublishers(final List<String> publishers) {
this._publisher = publishers; publisher = publishers;
} }
/** /**
@ -342,7 +342,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getPublisher() { public String getPublisher() {
return this._publisher != null && this._publisher.size() > 0 ? (String) this._publisher.get(0) : null; return publisher != null && publisher.size() > 0 ? (String) publisher.get(0) : null;
} }
/** /**
@ -356,8 +356,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setPublisher(final String publisher) { public void setPublisher(final String publisher) {
this._publisher = new ArrayList<String>(); this.publisher = new ArrayList<String>();
this._publisher.add(publisher); this.publisher.add(publisher);
} }
/** /**
@ -370,7 +370,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getContributors() { public List<String> getContributors() {
return this._contributors == null ? (this._contributors = new ArrayList<String>()) : this._contributors; return contributors == null ? (contributors = new ArrayList<String>()) : contributors;
} }
/** /**
@ -383,7 +383,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setContributors(final List<String> contributors) { public void setContributors(final List<String> contributors) {
this._contributors = contributors; this.contributors = contributors;
} }
/** /**
@ -395,7 +395,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getContributor() { public String getContributor() {
return this._contributors != null && this._contributors.size() > 0 ? (String) this._contributors.get(0) : null; return contributors != null && contributors.size() > 0 ? (String) contributors.get(0) : null;
} }
/** /**
@ -409,8 +409,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setContributor(final String contributor) { public void setContributor(final String contributor) {
this._contributors = new ArrayList<String>(); contributors = new ArrayList<String>();
this._contributors.add(contributor); contributors.add(contributor);
} }
/** /**
@ -423,7 +423,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<Date> getDates() { public List<Date> getDates() {
return this._date == null ? (this._date = new ArrayList<Date>()) : this._date; return date == null ? (date = new ArrayList<Date>()) : date;
} }
/** /**
@ -436,7 +436,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setDates(final List<Date> dates) { public void setDates(final List<Date> dates) {
this._date = dates; date = dates;
} }
/** /**
@ -448,7 +448,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public Date getDate() { public Date getDate() {
return this._date != null && this._date.size() > 0 ? (Date) this._date.get(0) : null; return date != null && date.size() > 0 ? (Date) date.get(0) : null;
} }
/** /**
@ -461,8 +461,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setDate(final Date date) { public void setDate(final Date date) {
this._date = new ArrayList<Date>(); this.date = new ArrayList<Date>();
this._date.add(date); this.date.add(date);
} }
/** /**
@ -475,7 +475,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getTypes() { public List<String> getTypes() {
return this._type == null ? (this._type = new ArrayList<String>()) : this._type; return type == null ? (type = new ArrayList<String>()) : type;
} }
/** /**
@ -488,7 +488,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setTypes(final List<String> types) { public void setTypes(final List<String> types) {
this._type = types; type = types;
} }
/** /**
@ -500,7 +500,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getType() { public String getType() {
return this._type != null && this._type.size() > 0 ? (String) this._type.get(0) : null; return type != null && type.size() > 0 ? (String) type.get(0) : null;
} }
/** /**
@ -513,8 +513,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setType(final String type) { public void setType(final String type) {
this._type = new ArrayList<String>(); this.type = new ArrayList<String>();
this._type.add(type); this.type.add(type);
} }
/** /**
@ -527,7 +527,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getFormats() { public List<String> getFormats() {
return this._format == null ? (this._format = new ArrayList<String>()) : this._format; return format == null ? (format = new ArrayList<String>()) : format;
} }
/** /**
@ -540,7 +540,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setFormats(final List<String> formats) { public void setFormats(final List<String> formats) {
this._format = formats; format = formats;
} }
/** /**
@ -552,7 +552,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getFormat() { public String getFormat() {
return this._format != null && this._format.size() > 0 ? (String) this._format.get(0) : null; return format != null && format.size() > 0 ? (String) format.get(0) : null;
} }
/** /**
@ -565,8 +565,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setFormat(final String format) { public void setFormat(final String format) {
this._format = new ArrayList<String>(); this.format = new ArrayList<String>();
this._format.add(format); this.format.add(format);
} }
/** /**
@ -579,7 +579,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getIdentifiers() { public List<String> getIdentifiers() {
return this._identifier == null ? (this._identifier = new ArrayList<String>()) : this._identifier; return identifier == null ? (identifier = new ArrayList<String>()) : identifier;
} }
/** /**
@ -592,7 +592,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setIdentifiers(final List<String> identifiers) { public void setIdentifiers(final List<String> identifiers) {
this._identifier = identifiers; identifier = identifiers;
} }
/** /**
@ -604,7 +604,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getIdentifier() { public String getIdentifier() {
return this._identifier != null && this._identifier.size() > 0 ? (String) this._identifier.get(0) : null; return identifier != null && identifier.size() > 0 ? (String) identifier.get(0) : null;
} }
/** /**
@ -618,8 +618,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setIdentifier(final String identifier) { public void setIdentifier(final String identifier) {
this._identifier = new ArrayList<String>(); this.identifier = new ArrayList<String>();
this._identifier.add(identifier); this.identifier.add(identifier);
} }
/** /**
@ -632,7 +632,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getSources() { public List<String> getSources() {
return this._source == null ? (this._source = new ArrayList<String>()) : this._source; return source == null ? (source = new ArrayList<String>()) : source;
} }
/** /**
@ -645,7 +645,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setSources(final List<String> sources) { public void setSources(final List<String> sources) {
this._source = sources; source = sources;
} }
/** /**
@ -657,7 +657,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getSource() { public String getSource() {
return this._source != null && this._source.size() > 0 ? (String) this._source.get(0) : null; return source != null && source.size() > 0 ? (String) source.get(0) : null;
} }
/** /**
@ -670,8 +670,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setSource(final String source) { public void setSource(final String source) {
this._source = new ArrayList<String>(); this.source = new ArrayList<String>();
this._source.add(source); this.source.add(source);
} }
/** /**
@ -684,7 +684,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getLanguages() { public List<String> getLanguages() {
return this._language == null ? (this._language = new ArrayList<String>()) : this._language; return language == null ? (language = new ArrayList<String>()) : language;
} }
/** /**
@ -697,7 +697,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setLanguages(final List<String> languages) { public void setLanguages(final List<String> languages) {
this._language = languages; language = languages;
} }
/** /**
@ -709,7 +709,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getLanguage() { public String getLanguage() {
return this._language != null && this._language.size() > 0 ? (String) this._language.get(0) : null; return language != null && language.size() > 0 ? (String) language.get(0) : null;
} }
/** /**
@ -723,8 +723,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setLanguage(final String language) { public void setLanguage(final String language) {
this._language = new ArrayList<String>(); this.language = new ArrayList<String>();
this._language.add(language); this.language.add(language);
} }
/** /**
@ -737,7 +737,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getRelations() { public List<String> getRelations() {
return this._relation == null ? (this._relation = new ArrayList<String>()) : this._relation; return relation == null ? (relation = new ArrayList<String>()) : relation;
} }
/** /**
@ -750,7 +750,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setRelations(final List<String> relations) { public void setRelations(final List<String> relations) {
this._relation = relations; relation = relations;
} }
/** /**
@ -762,7 +762,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getRelation() { public String getRelation() {
return this._relation != null && this._relation.size() > 0 ? (String) this._relation.get(0) : null; return relation != null && relation.size() > 0 ? (String) relation.get(0) : null;
} }
/** /**
@ -776,8 +776,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setRelation(final String relation) { public void setRelation(final String relation) {
this._relation = new ArrayList<String>(); this.relation = new ArrayList<String>();
this._relation.add(relation); this.relation.add(relation);
} }
/** /**
@ -790,7 +790,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getCoverages() { public List<String> getCoverages() {
return this._coverage == null ? (this._coverage = new ArrayList<String>()) : this._coverage; return coverage == null ? (coverage = new ArrayList<String>()) : coverage;
} }
/** /**
@ -803,7 +803,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setCoverages(final List<String> coverages) { public void setCoverages(final List<String> coverages) {
this._coverage = coverages; coverage = coverages;
} }
/** /**
@ -815,7 +815,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getCoverage() { public String getCoverage() {
return this._coverage != null && this._coverage.size() > 0 ? (String) this._coverage.get(0) : null; return coverage != null && coverage.size() > 0 ? (String) coverage.get(0) : null;
} }
/** /**
@ -829,8 +829,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setCoverage(final String coverage) { public void setCoverage(final String coverage) {
this._coverage = new ArrayList<String>(); this.coverage = new ArrayList<String>();
this._coverage.add(coverage); this.coverage.add(coverage);
} }
/** /**
@ -843,7 +843,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public List<String> getRightsList() { public List<String> getRightsList() {
return this._rights == null ? (this._rights = new ArrayList<String>()) : this._rights; return rights == null ? (rights = new ArrayList<String>()) : rights;
} }
/** /**
@ -856,7 +856,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setRightsList(final List<String> rights) { public void setRightsList(final List<String> rights) {
this._rights = rights; this.rights = rights;
} }
/** /**
@ -868,7 +868,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public String getRights() { public String getRights() {
return this._rights != null && this._rights.size() > 0 ? (String) this._rights.get(0) : null; return rights != null && rights.size() > 0 ? (String) rights.get(0) : null;
} }
/** /**
@ -881,8 +881,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public void setRights(final String rights) { public void setRights(final String rights) {
this._rights = new ArrayList<String>(); this.rights = new ArrayList<String>();
this._rights.add(rights); this.rights.add(rights);
} }
/** /**
@ -896,7 +896,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public final Object clone() throws CloneNotSupportedException { public final Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -910,7 +910,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public final boolean equals(final Object other) { public final boolean equals(final Object other) {
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -924,7 +924,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public final int hashCode() { public final int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -936,7 +936,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*/ */
@Override @Override
public final String toString() { public final String toString() {
return this._objBean.toString(); return objBean.toString();
} }
@Override @Override

View file

@ -35,9 +35,9 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _taxonomyUri; private String taxonomyUri;
private String _value; private String value;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -45,7 +45,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
* *
*/ */
public DCSubjectImpl() { public DCSubjectImpl() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -59,7 +59,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -76,7 +76,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
if (!(other instanceof DCSubjectImpl)) { if (!(other instanceof DCSubjectImpl)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -90,7 +90,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -102,7 +102,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -114,7 +114,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
*/ */
@Override @Override
public String getTaxonomyUri() { public String getTaxonomyUri() {
return this._taxonomyUri; return taxonomyUri;
} }
/** /**
@ -127,7 +127,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
*/ */
@Override @Override
public void setTaxonomyUri(final String taxonomyUri) { public void setTaxonomyUri(final String taxonomyUri) {
this._taxonomyUri = taxonomyUri; this.taxonomyUri = taxonomyUri;
} }
/** /**
@ -139,7 +139,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
*/ */
@Override @Override
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -151,7 +151,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject {
*/ */
@Override @Override
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
@Override @Override

View file

@ -29,8 +29,8 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public abstract class ModuleImpl implements Cloneable, Serializable, Module { public abstract class ModuleImpl implements Cloneable, Serializable, Module {
private final ObjectBean _objBean; private final ObjectBean objBean;
private final String _uri; private final String uri;
/** /**
* Constructor. * Constructor.
@ -40,8 +40,8 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module {
* *
*/ */
protected ModuleImpl(final Class beanClass, final String uri) { protected ModuleImpl(final Class beanClass, final String uri) {
this._objBean = new ObjectBean(beanClass, this); objBean = new ObjectBean(beanClass, this);
this._uri = uri; this.uri = uri;
} }
/** /**
@ -55,7 +55,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -72,7 +72,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module {
if (!(other instanceof ModuleImpl)) { if (!(other instanceof ModuleImpl)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -86,7 +86,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -98,7 +98,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -110,7 +110,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module {
*/ */
@Override @Override
public String getUri() { public String getUri() {
return this._uri; return uri;
} }
} }

View file

@ -47,9 +47,9 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
PERIODS.add(YEARLY); PERIODS.add(YEARLY);
} }
private String _updatePeriod; private String updatePeriod;
private int _updateFrequency; private int updateFrequency;
private Date _updateBase; private Date updateBase;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -69,7 +69,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
*/ */
@Override @Override
public String getUpdatePeriod() { public String getUpdatePeriod() {
return this._updatePeriod; return updatePeriod;
} }
/** /**
@ -85,7 +85,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
if (!PERIODS.contains(updatePeriod)) { if (!PERIODS.contains(updatePeriod)) {
throw new IllegalArgumentException("Invalid period [" + updatePeriod + "]"); throw new IllegalArgumentException("Invalid period [" + updatePeriod + "]");
} }
this._updatePeriod = updatePeriod; this.updatePeriod = updatePeriod;
} }
/** /**
@ -97,7 +97,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
*/ */
@Override @Override
public int getUpdateFrequency() { public int getUpdateFrequency() {
return this._updateFrequency; return updateFrequency;
} }
/** /**
@ -110,7 +110,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
*/ */
@Override @Override
public void setUpdateFrequency(final int updateFrequency) { public void setUpdateFrequency(final int updateFrequency) {
this._updateFrequency = updateFrequency; this.updateFrequency = updateFrequency;
} }
/** /**
@ -122,7 +122,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
*/ */
@Override @Override
public Date getUpdateBase() { public Date getUpdateBase() {
return new Date(this._updateBase.getTime()); return new Date(updateBase.getTime());
} }
/** /**
@ -135,7 +135,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule {
*/ */
@Override @Override
public void setUpdateBase(final Date updateBase) { public void setUpdateBase(final Date updateBase) {
this._updateBase = new Date(updateBase.getTime()); this.updateBase = new Date(updateBase.getTime());
} }
@Override @Override

View file

@ -29,9 +29,9 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class Category implements Cloneable, Serializable { public class Category implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _domain; private String domain;
private String _value; private String value;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -39,7 +39,7 @@ public class Category implements Cloneable, Serializable {
* *
*/ */
public Category() { public Category() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -53,7 +53,7 @@ public class Category implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -70,7 +70,7 @@ public class Category implements Cloneable, Serializable {
if (!(other instanceof Category)) { if (!(other instanceof Category)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -84,7 +84,7 @@ public class Category implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -96,7 +96,7 @@ public class Category implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -107,7 +107,7 @@ public class Category implements Cloneable, Serializable {
* *
*/ */
public String getDomain() { public String getDomain() {
return this._domain; return domain;
} }
/** /**
@ -118,7 +118,7 @@ public class Category implements Cloneable, Serializable {
* *
*/ */
public void setDomain(final String domain) { public void setDomain(final String domain) {
this._domain = domain; this.domain = domain;
} }
/** /**
@ -129,7 +129,7 @@ public class Category implements Cloneable, Serializable {
* *
*/ */
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -140,7 +140,7 @@ public class Category implements Cloneable, Serializable {
* *
*/ */
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
} }

View file

@ -61,28 +61,28 @@ public class Channel extends WireFeed {
DAYS = Collections.unmodifiableSet(days); DAYS = Collections.unmodifiableSet(days);
} }
private String _title; private String title;
private String _description; private String description;
private String _link; private String link;
private String _uri; private String uri;
private Image _image; private Image image;
private List<Item> _items; private List<Item> items;
private TextInput _textInput; private TextInput textInput;
private String _language; private String language;
private String _rating; private String rating;
private String _copyright; private String copyright;
private Date _pubDate; private Date pubDate;
private Date _lastBuildDate; private Date lastBuildDate;
private String _docs; private String docs;
private String _managingEditor; private String managingEditor;
private String _webMaster; private String webMaster;
private List<Integer> _skipHours; private List<Integer> skipHours;
private List<String> _skipDays; private List<String> skipDays;
private Cloud _cloud; private Cloud cloud;
private List<Category> _categories; private List<Category> categories;
private String _generator; private String generator;
private int _ttl = -1; private int ttl = -1;
private List<Module> _modules; private List<Module> modules;
/** /**
* Default constructor, for bean cloning purposes only. * Default constructor, for bean cloning purposes only.
@ -111,7 +111,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getTitle() { public String getTitle() {
return this._title; return title;
} }
/** /**
@ -122,7 +122,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setTitle(final String title) { public void setTitle(final String title) {
this._title = title; this.title = title;
} }
/** /**
@ -133,7 +133,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getDescription() { public String getDescription() {
return this._description; return description;
} }
/** /**
@ -144,7 +144,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setDescription(final String description) { public void setDescription(final String description) {
this._description = description; this.description = description;
} }
/** /**
@ -155,7 +155,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getLink() { public String getLink() {
return this._link; return link;
} }
/** /**
@ -166,7 +166,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setLink(final String link) { public void setLink(final String link) {
this._link = link; this.link = link;
} }
/** /**
@ -176,7 +176,7 @@ public class Channel extends WireFeed {
* @return the channel uri, <b>null</b> if none. * @return the channel uri, <b>null</b> if none.
*/ */
public String getUri() { public String getUri() {
return this._uri; return uri;
} }
/** /**
@ -186,7 +186,7 @@ public class Channel extends WireFeed {
* @param uri the channel uri, <b>null</b> if none. * @param uri the channel uri, <b>null</b> if none.
*/ */
public void setUri(final String uri) { public void setUri(final String uri) {
this._uri = uri; this.uri = uri;
} }
/** /**
@ -197,7 +197,7 @@ public class Channel extends WireFeed {
* *
*/ */
public Image getImage() { public Image getImage() {
return this._image; return image;
} }
/** /**
@ -208,7 +208,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setImage(final Image image) { public void setImage(final Image image) {
this._image = image; this.image = image;
} }
/** /**
@ -220,7 +220,7 @@ public class Channel extends WireFeed {
* *
*/ */
public List<Item> getItems() { public List<Item> getItems() {
return this._items == null ? (this._items = new ArrayList<Item>()) : this._items; return items == null ? (items = new ArrayList<Item>()) : items;
} }
/** /**
@ -232,7 +232,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setItems(final List<Item> items) { public void setItems(final List<Item> items) {
this._items = items; this.items = items;
} }
/** /**
@ -243,7 +243,7 @@ public class Channel extends WireFeed {
* *
*/ */
public TextInput getTextInput() { public TextInput getTextInput() {
return this._textInput; return textInput;
} }
/** /**
@ -254,7 +254,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setTextInput(final TextInput textInput) { public void setTextInput(final TextInput textInput) {
this._textInput = textInput; this.textInput = textInput;
} }
/** /**
@ -265,7 +265,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getLanguage() { public String getLanguage() {
return this._language; return language;
} }
/** /**
@ -276,7 +276,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setLanguage(final String language) { public void setLanguage(final String language) {
this._language = language; this.language = language;
} }
/** /**
@ -287,7 +287,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getRating() { public String getRating() {
return this._rating; return rating;
} }
/** /**
@ -298,7 +298,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setRating(final String rating) { public void setRating(final String rating) {
this._rating = rating; this.rating = rating;
} }
/** /**
@ -309,7 +309,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getCopyright() { public String getCopyright() {
return this._copyright; return copyright;
} }
/** /**
@ -320,7 +320,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setCopyright(final String copyright) { public void setCopyright(final String copyright) {
this._copyright = copyright; this.copyright = copyright;
} }
/** /**
@ -331,7 +331,7 @@ public class Channel extends WireFeed {
* *
*/ */
public Date getPubDate() { public Date getPubDate() {
return this._pubDate == null ? null : new Date(this._pubDate.getTime()); return pubDate == null ? null : new Date(pubDate.getTime());
} }
/** /**
@ -342,7 +342,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setPubDate(final Date pubDate) { public void setPubDate(final Date pubDate) {
this._pubDate = pubDate == null ? null : new Date(pubDate.getTime()); this.pubDate = pubDate == null ? null : new Date(pubDate.getTime());
} }
/** /**
@ -353,7 +353,7 @@ public class Channel extends WireFeed {
* *
*/ */
public Date getLastBuildDate() { public Date getLastBuildDate() {
return this._lastBuildDate == null ? null : new Date(this._lastBuildDate.getTime()); return lastBuildDate == null ? null : new Date(lastBuildDate.getTime());
} }
/** /**
@ -365,7 +365,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setLastBuildDate(final Date lastBuildDate) { public void setLastBuildDate(final Date lastBuildDate) {
this._lastBuildDate = lastBuildDate == null ? null : new Date(lastBuildDate.getTime()); this.lastBuildDate = lastBuildDate == null ? null : new Date(lastBuildDate.getTime());
} }
/** /**
@ -376,7 +376,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getDocs() { public String getDocs() {
return this._docs; return docs;
} }
/** /**
@ -387,7 +387,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setDocs(final String docs) { public void setDocs(final String docs) {
this._docs = docs; this.docs = docs;
} }
/** /**
@ -398,7 +398,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getManagingEditor() { public String getManagingEditor() {
return this._managingEditor; return managingEditor;
} }
/** /**
@ -410,7 +410,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setManagingEditor(final String managingEditor) { public void setManagingEditor(final String managingEditor) {
this._managingEditor = managingEditor; this.managingEditor = managingEditor;
} }
/** /**
@ -421,7 +421,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getWebMaster() { public String getWebMaster() {
return this._webMaster; return webMaster;
} }
/** /**
@ -432,7 +432,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setWebMaster(final String webMaster) { public void setWebMaster(final String webMaster) {
this._webMaster = webMaster; this.webMaster = webMaster;
} }
/** /**
@ -444,7 +444,7 @@ public class Channel extends WireFeed {
* *
*/ */
public List<Integer> getSkipHours() { public List<Integer> getSkipHours() {
return this._skipHours != null ? this._skipHours : new ArrayList<Integer>(); return skipHours != null ? skipHours : new ArrayList<Integer>();
} }
/** /**
@ -469,7 +469,7 @@ public class Channel extends WireFeed {
} }
} }
} }
this._skipHours = skipHours; this.skipHours = skipHours;
} }
/** /**
@ -481,7 +481,7 @@ public class Channel extends WireFeed {
* *
*/ */
public List<String> getSkipDays() { public List<String> getSkipDays() {
return this._skipDays != null ? this._skipDays : new ArrayList<String>(); return skipDays != null ? skipDays : new ArrayList<String>();
} }
/** /**
@ -507,7 +507,7 @@ public class Channel extends WireFeed {
} }
} }
} }
this._skipDays = skipDays; this.skipDays = skipDays;
} }
/** /**
@ -518,7 +518,7 @@ public class Channel extends WireFeed {
* *
*/ */
public Cloud getCloud() { public Cloud getCloud() {
return this._cloud; return cloud;
} }
/** /**
@ -529,7 +529,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setCloud(final Cloud cloud) { public void setCloud(final Cloud cloud) {
this._cloud = cloud; this.cloud = cloud;
} }
/** /**
@ -541,7 +541,7 @@ public class Channel extends WireFeed {
* *
*/ */
public List<Category> getCategories() { public List<Category> getCategories() {
return this._categories == null ? (this._categories = new ArrayList<Category>()) : this._categories; return categories == null ? (categories = new ArrayList<Category>()) : categories;
} }
/** /**
@ -553,7 +553,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setCategories(final List<Category> categories) { public void setCategories(final List<Category> categories) {
this._categories = categories; this.categories = categories;
} }
/** /**
@ -564,7 +564,7 @@ public class Channel extends WireFeed {
* *
*/ */
public String getGenerator() { public String getGenerator() {
return this._generator; return generator;
} }
/** /**
@ -575,7 +575,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setGenerator(final String generator) { public void setGenerator(final String generator) {
this._generator = generator; this.generator = generator;
} }
/** /**
@ -586,7 +586,7 @@ public class Channel extends WireFeed {
* *
*/ */
public int getTtl() { public int getTtl() {
return this._ttl; return ttl;
} }
/** /**
@ -597,7 +597,7 @@ public class Channel extends WireFeed {
* *
*/ */
public void setTtl(final int ttl) { public void setTtl(final int ttl) {
this._ttl = ttl; this.ttl = ttl;
} }
/** /**
@ -610,7 +610,7 @@ public class Channel extends WireFeed {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
return this._modules == null ? (this._modules = new ArrayList<Module>()) : this._modules; return modules == null ? (modules = new ArrayList<Module>()) : modules;
} }
/** /**
@ -623,7 +623,7 @@ public class Channel extends WireFeed {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**
@ -635,7 +635,7 @@ public class Channel extends WireFeed {
*/ */
@Override @Override
public Module getModule(final String uri) { public Module getModule(final String uri) {
return ModuleUtils.getModule(this._modules, uri); return ModuleUtils.getModule(modules, uri);
} }
} }

View file

@ -29,12 +29,12 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class Cloud implements Cloneable, Serializable { public class Cloud implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _domain; private String domain;
private int _port; private int port;
private String _path; private String path;
private String _registerProcedure; private String registerProcedure;
private String _protocol; private String protocol;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -42,7 +42,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public Cloud() { public Cloud() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -56,7 +56,7 @@ public class Cloud implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -70,7 +70,7 @@ public class Cloud implements Cloneable, Serializable {
*/ */
@Override @Override
public boolean equals(final Object other) { public boolean equals(final Object other) {
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -84,7 +84,7 @@ public class Cloud implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -96,7 +96,7 @@ public class Cloud implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -107,7 +107,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public String getDomain() { public String getDomain() {
return this._domain; return domain;
} }
/** /**
@ -118,7 +118,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public void setDomain(final String domain) { public void setDomain(final String domain) {
this._domain = domain; this.domain = domain;
} }
/** /**
@ -129,7 +129,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public int getPort() { public int getPort() {
return this._port; return port;
} }
/** /**
@ -140,7 +140,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public void setPort(final int port) { public void setPort(final int port) {
this._port = port; this.port = port;
} }
/** /**
@ -151,7 +151,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public String getPath() { public String getPath() {
return this._path; return path;
} }
/** /**
@ -162,7 +162,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public void setPath(final String path) { public void setPath(final String path) {
this._path = path; this.path = path;
} }
/** /**
@ -173,7 +173,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public String getRegisterProcedure() { public String getRegisterProcedure() {
return this._registerProcedure; return registerProcedure;
} }
/** /**
@ -185,7 +185,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public void setRegisterProcedure(final String registerProcedure) { public void setRegisterProcedure(final String registerProcedure) {
this._registerProcedure = registerProcedure; this.registerProcedure = registerProcedure;
} }
/** /**
@ -196,7 +196,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public String getProtocol() { public String getProtocol() {
return this._protocol; return protocol;
} }
/** /**
@ -207,7 +207,7 @@ public class Cloud implements Cloneable, Serializable {
* *
*/ */
public void setProtocol(final String protocol) { public void setProtocol(final String protocol) {
this._protocol = protocol; this.protocol = protocol;
} }
} }

View file

@ -31,9 +31,9 @@ import com.sun.syndication.feed.impl.ObjectBean;
public class Content implements Cloneable, Serializable { public class Content implements Cloneable, Serializable {
public static final String HTML = "html"; public static final String HTML = "html";
public static final String TEXT = "text"; public static final String TEXT = "text";
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _type; private String type;
private String _value; private String value;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -41,7 +41,7 @@ public class Content implements Cloneable, Serializable {
* *
*/ */
public Content() { public Content() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -52,7 +52,7 @@ public class Content implements Cloneable, Serializable {
* *
*/ */
public void setType(final String type) { public void setType(final String type) {
this._type = type; this.type = type;
} }
/** /**
@ -63,7 +63,7 @@ public class Content implements Cloneable, Serializable {
* *
*/ */
public String getType() { public String getType() {
return this._type; return type;
} }
/** /**
@ -74,7 +74,7 @@ public class Content implements Cloneable, Serializable {
* *
*/ */
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
/** /**
@ -85,7 +85,7 @@ public class Content implements Cloneable, Serializable {
* *
*/ */
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -99,7 +99,7 @@ public class Content implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -117,7 +117,7 @@ public class Content implements Cloneable, Serializable {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -131,7 +131,7 @@ public class Content implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -143,6 +143,6 @@ public class Content implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
} }

View file

@ -29,9 +29,9 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class Description implements Cloneable, Serializable { public class Description implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _type; private String type;
private String _value; private String value;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -39,7 +39,7 @@ public class Description implements Cloneable, Serializable {
* *
*/ */
public Description() { public Description() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -53,7 +53,7 @@ public class Description implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -70,7 +70,7 @@ public class Description implements Cloneable, Serializable {
if (!(other instanceof Description)) { if (!(other instanceof Description)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -84,7 +84,7 @@ public class Description implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -96,7 +96,7 @@ public class Description implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -107,7 +107,7 @@ public class Description implements Cloneable, Serializable {
* *
*/ */
public String getType() { public String getType() {
return this._type; return type;
} }
/** /**
@ -118,7 +118,7 @@ public class Description implements Cloneable, Serializable {
* *
*/ */
public void setType(final String type) { public void setType(final String type) {
this._type = type; this.type = type;
} }
/** /**
@ -129,7 +129,7 @@ public class Description implements Cloneable, Serializable {
* *
*/ */
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -140,7 +140,7 @@ public class Description implements Cloneable, Serializable {
* *
*/ */
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
} }

View file

@ -29,10 +29,10 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class Enclosure implements Cloneable, Serializable { public class Enclosure implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _url; private String url;
private long _length; private long length;
private String _type; private String type;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -40,7 +40,7 @@ public class Enclosure implements Cloneable, Serializable {
* *
*/ */
public Enclosure() { public Enclosure() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -54,7 +54,7 @@ public class Enclosure implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -71,7 +71,7 @@ public class Enclosure implements Cloneable, Serializable {
if (!(other instanceof Enclosure)) { if (!(other instanceof Enclosure)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -85,7 +85,7 @@ public class Enclosure implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -97,7 +97,7 @@ public class Enclosure implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -108,7 +108,7 @@ public class Enclosure implements Cloneable, Serializable {
* *
*/ */
public String getUrl() { public String getUrl() {
return this._url; return url;
} }
/** /**
@ -119,7 +119,7 @@ public class Enclosure implements Cloneable, Serializable {
* *
*/ */
public void setUrl(final String url) { public void setUrl(final String url) {
this._url = url; this.url = url;
} }
/** /**
@ -130,7 +130,7 @@ public class Enclosure implements Cloneable, Serializable {
* *
*/ */
public long getLength() { public long getLength() {
return this._length; return length;
} }
/** /**
@ -141,7 +141,7 @@ public class Enclosure implements Cloneable, Serializable {
* *
*/ */
public void setLength(final long length) { public void setLength(final long length) {
this._length = length; this.length = length;
} }
/** /**
@ -152,7 +152,7 @@ public class Enclosure implements Cloneable, Serializable {
* *
*/ */
public String getType() { public String getType() {
return this._type; return type;
} }
/** /**
@ -163,7 +163,7 @@ public class Enclosure implements Cloneable, Serializable {
* *
*/ */
public void setType(final String type) { public void setType(final String type) {
this._type = type; this.type = type;
} }
} }

View file

@ -29,9 +29,9 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class Guid implements Cloneable, Serializable { public class Guid implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private boolean _permaLink; private boolean permaLink;
private String _value; private String value;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -39,7 +39,7 @@ public class Guid implements Cloneable, Serializable {
* *
*/ */
public Guid() { public Guid() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -53,7 +53,7 @@ public class Guid implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -70,7 +70,7 @@ public class Guid implements Cloneable, Serializable {
if (!(other instanceof Guid)) { if (!(other instanceof Guid)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -84,7 +84,7 @@ public class Guid implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -96,7 +96,7 @@ public class Guid implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -107,7 +107,7 @@ public class Guid implements Cloneable, Serializable {
* *
*/ */
public boolean isPermaLink() { public boolean isPermaLink() {
return this._permaLink; return permaLink;
} }
/** /**
@ -118,7 +118,7 @@ public class Guid implements Cloneable, Serializable {
* *
*/ */
public void setPermaLink(final boolean permaLink) { public void setPermaLink(final boolean permaLink) {
this._permaLink = permaLink; this.permaLink = permaLink;
} }
/** /**
@ -129,7 +129,7 @@ public class Guid implements Cloneable, Serializable {
* *
*/ */
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -140,7 +140,7 @@ public class Guid implements Cloneable, Serializable {
* *
*/ */
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
} }

View file

@ -28,13 +28,13 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class Image implements Cloneable, Serializable { public class Image implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _title; private String title;
private String _url; private String url;
private String _link; private String link;
private Integer _width = -1; private Integer width = -1;
private Integer _height = -1; private Integer height = -1;
private String _description; private String description;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -42,7 +42,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public Image() { public Image() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -56,7 +56,7 @@ public class Image implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -73,7 +73,7 @@ public class Image implements Cloneable, Serializable {
if (!(other instanceof Image)) { if (!(other instanceof Image)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -87,7 +87,7 @@ public class Image implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -99,7 +99,7 @@ public class Image implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -110,7 +110,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public String getTitle() { public String getTitle() {
return this._title; return title;
} }
/** /**
@ -121,7 +121,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public void setTitle(final String title) { public void setTitle(final String title) {
this._title = title; this.title = title;
} }
/** /**
@ -132,7 +132,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public String getUrl() { public String getUrl() {
return this._url; return url;
} }
/** /**
@ -143,7 +143,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public void setUrl(final String url) { public void setUrl(final String url) {
this._url = url; this.url = url;
} }
/** /**
@ -154,7 +154,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public String getLink() { public String getLink() {
return this._link; return link;
} }
/** /**
@ -165,7 +165,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public void setLink(final String link) { public void setLink(final String link) {
this._link = link; this.link = link;
} }
/** /**
@ -176,7 +176,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public Integer getWidth() { public Integer getWidth() {
return this._width; return width;
} }
/** /**
@ -187,7 +187,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public void setWidth(final Integer width) { public void setWidth(final Integer width) {
this._width = width; this.width = width;
} }
/** /**
@ -198,7 +198,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public Integer getHeight() { public Integer getHeight() {
return this._height; return height;
} }
/** /**
@ -209,7 +209,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public void setHeight(final Integer height) { public void setHeight(final Integer height) {
this._height = height; this.height = height;
} }
/** /**
@ -220,7 +220,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public String getDescription() { public String getDescription() {
return this._description; return description;
} }
/** /**
@ -231,7 +231,7 @@ public class Image implements Cloneable, Serializable {
* *
*/ */
public void setDescription(final String description) { public void setDescription(final String description) {
this._description = description; this.description = description;
} }
} }

View file

@ -42,22 +42,22 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
* *
*/ */
public class Item implements Cloneable, Serializable, Extendable { public class Item implements Cloneable, Serializable, Extendable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _title; private String title;
private String _link; private String link;
private String _uri; private String uri;
private Description _description; private Description description;
private Content _content; private Content content;
private Source _source; private Source source;
private List<Enclosure> _enclosures; private List<Enclosure> enclosures;
private List<Category> _categories; private List<Category> categories;
private Guid _guid; private Guid guid;
private String _comments; private String comments;
private String _author; private String author;
private Date _pubDate; private Date pubDate;
private Date _expirationDate; private Date expirationDate;
private List<Module> _modules; private List<Module> modules;
private List<Element> _foreignMarkup; private List<Element> foreignMarkup;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -65,7 +65,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public Item() { public Item() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -79,7 +79,7 @@ public class Item implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -99,7 +99,7 @@ public class Item implements Cloneable, Serializable, Extendable {
// can't use foreign markup in equals, due to JDOM equals impl // can't use foreign markup in equals, due to JDOM equals impl
final List<Element> fm = getForeignMarkup(); final List<Element> fm = getForeignMarkup();
setForeignMarkup(((Item) other).getForeignMarkup()); setForeignMarkup(((Item) other).getForeignMarkup());
final boolean ret = this._objBean.equals(other); final boolean ret = objBean.equals(other);
// restore foreign markup // restore foreign markup
setForeignMarkup(fm); setForeignMarkup(fm);
return ret; return ret;
@ -116,7 +116,7 @@ public class Item implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -128,7 +128,7 @@ public class Item implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -139,7 +139,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getTitle() { public String getTitle() {
return this._title; return title;
} }
/** /**
@ -150,7 +150,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setTitle(final String title) { public void setTitle(final String title) {
this._title = title; this.title = title;
} }
/** /**
@ -161,7 +161,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getLink() { public String getLink() {
return this._link; return link;
} }
/** /**
@ -172,7 +172,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setLink(final String link) { public void setLink(final String link) {
this._link = link; this.link = link;
} }
/** /**
@ -182,7 +182,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* @return the item uri, <b>null</b> if none. * @return the item uri, <b>null</b> if none.
*/ */
public String getUri() { public String getUri() {
return this._uri; return uri;
} }
/** /**
@ -192,7 +192,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* @param uri the item uri to set, <b>null</b> if none. * @param uri the item uri to set, <b>null</b> if none.
*/ */
public void setUri(final String uri) { public void setUri(final String uri) {
this._uri = uri; this.uri = uri;
} }
/** /**
@ -203,7 +203,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public Description getDescription() { public Description getDescription() {
return this._description; return description;
} }
/** /**
@ -214,7 +214,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setDescription(final Description description) { public void setDescription(final Description description) {
this._description = description; this.description = description;
} }
/** /**
@ -225,7 +225,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public Content getContent() { public Content getContent() {
return this._content; return content;
} }
/** /**
@ -236,7 +236,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setContent(final Content content) { public void setContent(final Content content) {
this._content = content; this.content = content;
} }
/** /**
@ -247,7 +247,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public Source getSource() { public Source getSource() {
return this._source; return source;
} }
/** /**
@ -258,7 +258,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setSource(final Source source) { public void setSource(final Source source) {
this._source = source; this.source = source;
} }
/** /**
@ -270,7 +270,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public List<Enclosure> getEnclosures() { public List<Enclosure> getEnclosures() {
return this._enclosures == null ? (this._enclosures = new ArrayList<Enclosure>()) : this._enclosures; return enclosures == null ? (enclosures = new ArrayList<Enclosure>()) : enclosures;
} }
/** /**
@ -282,7 +282,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setEnclosures(final List<Enclosure> enclosures) { public void setEnclosures(final List<Enclosure> enclosures) {
this._enclosures = enclosures; this.enclosures = enclosures;
} }
/** /**
@ -294,7 +294,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public List<Category> getCategories() { public List<Category> getCategories() {
return this._categories == null ? (this._categories = new ArrayList<Category>()) : this._categories; return categories == null ? (categories = new ArrayList<Category>()) : categories;
} }
/** /**
@ -306,7 +306,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setCategories(final List<Category> categories) { public void setCategories(final List<Category> categories) {
this._categories = categories; this.categories = categories;
} }
/** /**
@ -317,7 +317,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public Guid getGuid() { public Guid getGuid() {
return this._guid; return guid;
} }
/** /**
@ -328,7 +328,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setGuid(final Guid guid) { public void setGuid(final Guid guid) {
this._guid = guid; this.guid = guid;
} }
/** /**
@ -339,7 +339,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getComments() { public String getComments() {
return this._comments; return comments;
} }
/** /**
@ -350,7 +350,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setComments(final String comments) { public void setComments(final String comments) {
this._comments = comments; this.comments = comments;
} }
/** /**
@ -361,7 +361,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public String getAuthor() { public String getAuthor() {
return this._author; return author;
} }
/** /**
@ -372,7 +372,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setAuthor(final String author) { public void setAuthor(final String author) {
this._author = author; this.author = author;
} }
/** /**
@ -385,7 +385,7 @@ public class Item implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
return this._modules == null ? (this._modules = new ArrayList<Module>()) : this._modules; return modules == null ? (modules = new ArrayList<Module>()) : modules;
} }
/** /**
@ -398,7 +398,7 @@ public class Item implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**
@ -410,7 +410,7 @@ public class Item implements Cloneable, Serializable, Extendable {
*/ */
@Override @Override
public Module getModule(final String uri) { public Module getModule(final String uri) {
return ModuleUtils.getModule(this._modules, uri); return ModuleUtils.getModule(modules, uri);
} }
/** /**
@ -421,7 +421,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public Date getPubDate() { public Date getPubDate() {
return this._pubDate == null ? null : new Date(this._pubDate.getTime()); return pubDate == null ? null : new Date(pubDate.getTime());
} }
/** /**
@ -432,7 +432,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setPubDate(final Date pubDate) { public void setPubDate(final Date pubDate) {
this._pubDate = pubDate == null ? null : new Date(pubDate.getTime()); this.pubDate = pubDate == null ? null : new Date(pubDate.getTime());
} }
/** /**
@ -443,7 +443,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public Date getExpirationDate() { public Date getExpirationDate() {
return this._expirationDate == null ? null : new Date(this._expirationDate.getTime()); return expirationDate == null ? null : new Date(expirationDate.getTime());
} }
/** /**
@ -455,7 +455,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setExpirationDate(final Date expirationDate) { public void setExpirationDate(final Date expirationDate) {
this._expirationDate = expirationDate == null ? null : new Date(expirationDate.getTime()); this.expirationDate = expirationDate == null ? null : new Date(expirationDate.getTime());
} }
/** /**
@ -466,7 +466,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public List<Element> getForeignMarkup() { public List<Element> getForeignMarkup() {
return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList<Element>()) : this._foreignMarkup; return foreignMarkup == null ? (foreignMarkup = new ArrayList<Element>()) : foreignMarkup;
} }
/** /**
@ -477,7 +477,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* *
*/ */
public void setForeignMarkup(final List<Element> foreignMarkup) { public void setForeignMarkup(final List<Element> foreignMarkup) {
this._foreignMarkup = foreignMarkup; this.foreignMarkup = foreignMarkup;
} }
} }

View file

@ -29,9 +29,9 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class Source implements Cloneable, Serializable { public class Source implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _url; private String url;
private String _value; private String value;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -39,7 +39,7 @@ public class Source implements Cloneable, Serializable {
* *
*/ */
public Source() { public Source() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -53,7 +53,7 @@ public class Source implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -70,7 +70,7 @@ public class Source implements Cloneable, Serializable {
if (!(other instanceof Source)) { if (!(other instanceof Source)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -84,7 +84,7 @@ public class Source implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -96,7 +96,7 @@ public class Source implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -107,7 +107,7 @@ public class Source implements Cloneable, Serializable {
* *
*/ */
public String getUrl() { public String getUrl() {
return this._url; return url;
} }
/** /**
@ -118,7 +118,7 @@ public class Source implements Cloneable, Serializable {
* *
*/ */
public void setUrl(final String url) { public void setUrl(final String url) {
this._url = url; this.url = url;
} }
/** /**
@ -129,7 +129,7 @@ public class Source implements Cloneable, Serializable {
* *
*/ */
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -140,6 +140,6 @@ public class Source implements Cloneable, Serializable {
* *
*/ */
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
} }

View file

@ -29,11 +29,11 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class TextInput implements Cloneable, Serializable { public class TextInput implements Cloneable, Serializable {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _title; private String title;
private String _description; private String description;
private String _name; private String name;
private String _link; private String link;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -41,7 +41,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public TextInput() { public TextInput() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -55,7 +55,7 @@ public class TextInput implements Cloneable, Serializable {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -72,7 +72,7 @@ public class TextInput implements Cloneable, Serializable {
if (!(other instanceof TextInput)) { if (!(other instanceof TextInput)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -86,7 +86,7 @@ public class TextInput implements Cloneable, Serializable {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -98,7 +98,7 @@ public class TextInput implements Cloneable, Serializable {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -109,7 +109,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public String getTitle() { public String getTitle() {
return this._title; return title;
} }
/** /**
@ -120,7 +120,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public void setTitle(final String title) { public void setTitle(final String title) {
this._title = title; this.title = title;
} }
/** /**
@ -131,7 +131,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public String getDescription() { public String getDescription() {
return this._description; return description;
} }
/** /**
@ -143,7 +143,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public void setDescription(final String description) { public void setDescription(final String description) {
this._description = description; this.description = description;
} }
/** /**
@ -154,7 +154,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public String getName() { public String getName() {
return this._name; return name;
} }
/** /**
@ -165,7 +165,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public void setName(final String name) { public void setName(final String name) {
this._name = name; this.name = name;
} }
/** /**
@ -176,7 +176,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public String getLink() { public String getLink() {
return this._link; return link;
} }
/** /**
@ -187,7 +187,7 @@ public class TextInput implements Cloneable, Serializable {
* *
*/ */
public void setLink(final String link) { public void setLink(final String link) {
this._link = link; this.link = link;
} }
} }

View file

@ -34,8 +34,8 @@ import com.sun.syndication.feed.module.DCSubjectImpl;
* *
*/ */
public class SyndCategoryImpl implements Serializable, SyndCategory { public class SyndCategoryImpl implements Serializable, SyndCategory {
private final ObjectBean _objBean; private final ObjectBean objBean;
private final DCSubject _subject; private final DCSubject subject;
/** /**
* For implementations extending SyndContentImpl to be able to use the * For implementations extending SyndContentImpl to be able to use the
@ -45,8 +45,8 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
* @param subject the DC subject to wrap. * @param subject the DC subject to wrap.
*/ */
SyndCategoryImpl(final DCSubject subject) { SyndCategoryImpl(final DCSubject subject) {
this._objBean = new ObjectBean(SyndCategory.class, this); objBean = new ObjectBean(SyndCategory.class, this);
this._subject = subject; this.subject = subject;
} }
/** /**
@ -60,7 +60,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -77,7 +77,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
if (!(other instanceof SyndCategoryImpl)) { if (!(other instanceof SyndCategoryImpl)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -91,7 +91,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -103,7 +103,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -114,7 +114,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
* *
*/ */
DCSubject getSubject() { DCSubject getSubject() {
return this._subject; return subject;
} }
/** /**
@ -135,7 +135,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
*/ */
@Override @Override
public String getName() { public String getName() {
return this._subject.getValue(); return subject.getValue();
} }
/** /**
@ -147,7 +147,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
*/ */
@Override @Override
public void setName(final String name) { public void setName(final String name) {
this._subject.setValue(name); subject.setValue(name);
} }
/** /**
@ -159,7 +159,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
*/ */
@Override @Override
public String getTaxonomyUri() { public String getTaxonomyUri() {
return this._subject.getTaxonomyUri(); return subject.getTaxonomyUri();
} }
/** /**
@ -171,7 +171,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
*/ */
@Override @Override
public void setTaxonomyUri(final String taxonomyUri) { public void setTaxonomyUri(final String taxonomyUri) {
this._subject.setTaxonomyUri(taxonomyUri); subject.setTaxonomyUri(taxonomyUri);
} }
} }
@ -195,7 +195,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory {
* *
*/ */
class SyndCategoryListFacade extends AbstractList<SyndCategory> { class SyndCategoryListFacade extends AbstractList<SyndCategory> {
private final List<DCSubject> _subjects; private final List<DCSubject> subjects;
/** /**
* Default constructor. Creates and empty list. * Default constructor. Creates and empty list.
@ -212,7 +212,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
* *
*/ */
public SyndCategoryListFacade(final List<DCSubject> subjects) { public SyndCategoryListFacade(final List<DCSubject> subjects) {
this._subjects = subjects; this.subjects = subjects;
} }
/** /**
@ -225,7 +225,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
*/ */
@Override @Override
public SyndCategory get(final int index) { public SyndCategory get(final int index) {
return new SyndCategoryImpl(this._subjects.get(index)); return new SyndCategoryImpl(subjects.get(index));
} }
/** /**
@ -237,7 +237,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
*/ */
@Override @Override
public int size() { public int size() {
return this._subjects.size(); return subjects.size();
} }
/** /**
@ -254,7 +254,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
public SyndCategory set(final int index, final SyndCategory obj) { public SyndCategory set(final int index, final SyndCategory obj) {
final SyndCategoryImpl sCat = (SyndCategoryImpl) obj; final SyndCategoryImpl sCat = (SyndCategoryImpl) obj;
DCSubject subject = sCat != null ? sCat.getSubject() : null; DCSubject subject = sCat != null ? sCat.getSubject() : null;
subject = this._subjects.set(index, subject); subject = subjects.set(index, subject);
return subject != null ? new SyndCategoryImpl(subject) : null; return subject != null ? new SyndCategoryImpl(subject) : null;
} }
@ -270,7 +270,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
public void add(final int index, final SyndCategory obj) { public void add(final int index, final SyndCategory obj) {
final SyndCategoryImpl sCat = (SyndCategoryImpl) obj; final SyndCategoryImpl sCat = (SyndCategoryImpl) obj;
final DCSubject subject = sCat != null ? sCat.getSubject() : null; final DCSubject subject = sCat != null ? sCat.getSubject() : null;
this._subjects.add(index, subject); subjects.add(index, subject);
} }
/** /**
@ -284,7 +284,7 @@ class SyndCategoryListFacade extends AbstractList<SyndCategory> {
*/ */
@Override @Override
public SyndCategory remove(final int index) { public SyndCategory remove(final int index) {
final DCSubject subject = this._subjects.remove(index); final DCSubject subject = subjects.remove(index);
return subject != null ? new SyndCategoryImpl(subject) : null; return subject != null ? new SyndCategoryImpl(subject) : null;
} }

View file

@ -33,10 +33,10 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class SyndContentImpl implements Serializable, SyndContent { public class SyndContentImpl implements Serializable, SyndContent {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _type; private String type;
private String _value; private String value;
private String _mode; private String mode;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -44,7 +44,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
* *
*/ */
public SyndContentImpl() { public SyndContentImpl() {
this._objBean = new ObjectBean(SyndContent.class, this); objBean = new ObjectBean(SyndContent.class, this);
} }
/** /**
@ -58,7 +58,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -72,7 +72,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public boolean equals(final Object other) { public boolean equals(final Object other) {
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -86,7 +86,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -98,7 +98,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -113,7 +113,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public String getType() { public String getType() {
return this._type; return type;
} }
/** /**
@ -128,7 +128,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public void setType(final String type) { public void setType(final String type) {
this._type = type; this.type = type;
} }
/** /**
@ -139,7 +139,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public String getMode() { public String getMode() {
return this._mode; return mode;
} }
/** /**
@ -150,7 +150,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public void setMode(final String mode) { public void setMode(final String mode) {
this._mode = mode; this.mode = mode;
} }
/** /**
@ -162,7 +162,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public String getValue() { public String getValue() {
return this._value; return value;
} }
/** /**
@ -174,7 +174,7 @@ public class SyndContentImpl implements Serializable, SyndContent {
*/ */
@Override @Override
public void setValue(final String value) { public void setValue(final String value) {
this._value = value; this.value = value;
} }
@Override @Override

View file

@ -13,10 +13,10 @@ import com.sun.syndication.feed.impl.ObjectBean;
* @author Alejandro Abdelnur * @author Alejandro Abdelnur
*/ */
public class SyndEnclosureImpl implements Serializable, SyndEnclosure { public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _url; private String url;
private String _type; private String type;
private long _length; private long length;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -24,7 +24,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
* *
*/ */
public SyndEnclosureImpl() { public SyndEnclosureImpl() {
this._objBean = new ObjectBean(SyndEnclosure.class, this); objBean = new ObjectBean(SyndEnclosure.class, this);
} }
/** /**
@ -38,7 +38,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -52,7 +52,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public boolean equals(final Object other) { public boolean equals(final Object other) {
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -66,7 +66,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -78,7 +78,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -89,7 +89,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public String getUrl() { public String getUrl() {
return this._url; return url;
} }
/** /**
@ -100,7 +100,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public void setUrl(final String url) { public void setUrl(final String url) {
this._url = url; this.url = url;
} }
/** /**
@ -111,7 +111,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public long getLength() { public long getLength() {
return this._length; return length;
} }
/** /**
@ -122,7 +122,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public void setLength(final long length) { public void setLength(final long length) {
this._length = length; this.length = length;
} }
/** /**
@ -133,7 +133,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public String getType() { public String getType() {
return this._type; return type;
} }
/** /**
@ -144,7 +144,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure {
*/ */
@Override @Override
public void setType(final String type) { public void setType(final String type) {
this._type = type; this.type = type;
} }
@Override @Override

View file

@ -47,25 +47,25 @@ import com.sun.syndication.feed.synd.impl.URINormalizer;
* *
*/ */
public class SyndEntryImpl implements Serializable, SyndEntry { public class SyndEntryImpl implements Serializable, SyndEntry {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _uri; private String uri;
private String _link; private String link;
private Date _updatedDate; private Date updatedDate;
private SyndContent _title; private SyndContent title;
private SyndContent _description; private SyndContent description;
private List<SyndLink> _links; private List<SyndLink> links;
private List<SyndContent> _contents; // deprecated by Atom 1.0 private List<SyndContent> contents; // deprecated by Atom 1.0
private List<Module> _modules; private List<Module> modules;
private List<SyndEnclosure> _enclosures; private List<SyndEnclosure> enclosures;
private List<SyndPerson> _authors; private List<SyndPerson> authors;
private List<SyndPerson> _contributors; private List<SyndPerson> contributors;
private SyndFeed _source; private SyndFeed source;
private List<Element> _foreignMarkup; private List<Element> foreignMarkup;
private Object wireEntry; // com.sun.syndication.feed.atom.Entry or private Object wireEntry; // com.sun.syndication.feed.atom.Entry or
// com.sun.syndication.feed.rss.Item // com.sun.syndication.feed.rss.Item
// ISSUE: some converters assume this is never null // ISSUE: some converters assume this is never null
private List<SyndCategory> _categories = new ArrayList<SyndCategory>(); private List<SyndCategory> categories = new ArrayList<SyndCategory>();
private static final Set<String> IGNORE_PROPERTIES = new HashSet<String>(); private static final Set<String> IGNORE_PROPERTIES = new HashSet<String>();
@ -95,7 +95,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
* *
*/ */
protected SyndEntryImpl(final Class beanClass, final Set convenienceProperties) { protected SyndEntryImpl(final Class beanClass, final Set convenienceProperties) {
this._objBean = new ObjectBean(beanClass, this, convenienceProperties); objBean = new ObjectBean(beanClass, this, convenienceProperties);
} }
/** /**
@ -118,7 +118,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -144,7 +144,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
// can't use foreign markup in equals, due to JDOM equals impl // can't use foreign markup in equals, due to JDOM equals impl
final List<Element> fm = getForeignMarkup(); final List<Element> fm = getForeignMarkup();
setForeignMarkup(((SyndEntryImpl) other).getForeignMarkup()); setForeignMarkup(((SyndEntryImpl) other).getForeignMarkup());
final boolean ret = this._objBean.equals(other); final boolean ret = objBean.equals(other);
// restore foreign markup // restore foreign markup
setForeignMarkup(fm); setForeignMarkup(fm);
return ret; return ret;
@ -161,7 +161,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -173,7 +173,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -193,7 +193,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public String getUri() { public String getUri() {
return this._uri; return uri;
} }
/** /**
@ -211,7 +211,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setUri(final String uri) { public void setUri(final String uri) {
this._uri = URINormalizer.normalize(uri); this.uri = URINormalizer.normalize(uri);
} }
/** /**
@ -223,8 +223,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public String getTitle() { public String getTitle() {
if (this._title != null) { if (title != null) {
return this._title.getValue(); return title.getValue();
} }
return null; return null;
} }
@ -238,10 +238,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setTitle(final String title) { public void setTitle(final String title) {
if (this._title == null) { if (this.title == null) {
this._title = new SyndContentImpl(); this.title = new SyndContentImpl();
} }
this._title.setValue(title); this.title.setValue(title);
} }
/** /**
@ -253,7 +253,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public SyndContent getTitleEx() { public SyndContent getTitleEx() {
return this._title; return title;
} }
/** /**
@ -265,7 +265,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setTitleEx(final SyndContent title) { public void setTitleEx(final SyndContent title) {
this._title = title; this.title = title;
} }
/** /**
@ -277,7 +277,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public String getLink() { public String getLink() {
return this._link; return link;
} }
/** /**
@ -289,7 +289,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setLink(final String link) { public void setLink(final String link) {
this._link = link; this.link = link;
} }
/** /**
@ -301,7 +301,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public SyndContent getDescription() { public SyndContent getDescription() {
return this._description; return description;
} }
/** /**
@ -313,7 +313,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setDescription(final SyndContent description) { public void setDescription(final SyndContent description) {
this._description = description; this.description = description;
} }
/** /**
@ -326,7 +326,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public List<SyndContent> getContents() { public List<SyndContent> getContents() {
return this._contents == null ? (this._contents = new ArrayList<SyndContent>()) : this._contents; return contents == null ? (contents = new ArrayList<SyndContent>()) : contents;
} }
/** /**
@ -339,7 +339,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setContents(final List<SyndContent> contents) { public void setContents(final List<SyndContent> contents) {
this._contents = contents; this.contents = contents;
} }
/** /**
@ -352,7 +352,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public List<SyndEnclosure> getEnclosures() { public List<SyndEnclosure> getEnclosures() {
return this._enclosures == null ? (this._enclosures = new ArrayList<SyndEnclosure>()) : this._enclosures; return enclosures == null ? (enclosures = new ArrayList<SyndEnclosure>()) : enclosures;
} }
/** /**
@ -365,7 +365,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setEnclosures(final List<SyndEnclosure> enclosures) { public void setEnclosures(final List<SyndEnclosure> enclosures) {
this._enclosures = enclosures; this.enclosures = enclosures;
} }
/** /**
@ -409,7 +409,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public List<SyndCategory> getCategories() { public List<SyndCategory> getCategories() {
return this._categories; return categories;
} }
/** /**
@ -425,7 +425,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setCategories(final List<SyndCategory> categories) { public void setCategories(final List<SyndCategory> categories) {
this._categories = categories; this.categories = categories;
} }
/** /**
@ -438,13 +438,13 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
if (this._modules == null) { if (modules == null) {
this._modules = new ArrayList<Module>(); modules = new ArrayList<Module>();
} }
if (ModuleUtils.getModule(this._modules, DCModule.URI) == null) { if (ModuleUtils.getModule(modules, DCModule.URI) == null) {
this._modules.add(new DCModuleImpl()); modules.add(new DCModuleImpl());
} }
return this._modules; return modules;
} }
/** /**
@ -457,7 +457,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**
@ -522,7 +522,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public List<SyndLink> getLinks() { public List<SyndLink> getLinks() {
return this._links == null ? (this._links = new ArrayList<SyndLink>()) : this._links; return links == null ? (links = new ArrayList<SyndLink>()) : links;
} }
/** /**
@ -533,7 +533,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setLinks(final List<SyndLink> links) { public void setLinks(final List<SyndLink> links) {
this._links = links; this.links = links;
} }
/** /**
@ -544,7 +544,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public Date getUpdatedDate() { public Date getUpdatedDate() {
return this._updatedDate == null ? null : new Date(this._updatedDate.getTime()); return updatedDate == null ? null : new Date(updatedDate.getTime());
} }
/** /**
@ -555,12 +555,12 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setUpdatedDate(final Date updatedDate) { public void setUpdatedDate(final Date updatedDate) {
this._updatedDate = new Date(updatedDate.getTime()); this.updatedDate = new Date(updatedDate.getTime());
} }
@Override @Override
public List<SyndPerson> getAuthors() { public List<SyndPerson> getAuthors() {
return this._authors == null ? (this._authors = new ArrayList<SyndPerson>()) : this._authors; return authors == null ? (authors = new ArrayList<SyndPerson>()) : authors;
} }
/* /*
@ -569,7 +569,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setAuthors(final List<SyndPerson> authors) { public void setAuthors(final List<SyndPerson> authors) {
this._authors = authors; this.authors = authors;
} }
/** /**
@ -586,10 +586,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
public String getAuthor() { public String getAuthor() {
String author; String author;
// Start out looking for one or more authors in _authors. For non-Atom // Start out looking for one or more authors in authors. For non-Atom
// feeds, _authors may actually be null. // feeds, authors may actually be null.
if (this._authors != null && this._authors.size() > 0) { if (authors != null && authors.size() > 0) {
author = this._authors.get(0).getName(); author = authors.get(0).getName();
} else { } else {
author = getDCModule().getCreator(); author = getDCModule().getCreator();
} }
@ -624,7 +624,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
@Override @Override
public List<SyndPerson> getContributors() { public List<SyndPerson> getContributors() {
return this._contributors == null ? (this._contributors = new ArrayList<SyndPerson>()) : this._contributors; return contributors == null ? (contributors = new ArrayList<SyndPerson>()) : contributors;
} }
/* /*
@ -634,17 +634,17 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setContributors(final List<SyndPerson> contributors) { public void setContributors(final List<SyndPerson> contributors) {
this._contributors = contributors; this.contributors = contributors;
} }
@Override @Override
public SyndFeed getSource() { public SyndFeed getSource() {
return this._source; return source;
} }
@Override @Override
public void setSource(final SyndFeed source) { public void setSource(final SyndFeed source) {
this._source = source; this.source = source;
} }
/** /**
@ -657,7 +657,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public List<Element> getForeignMarkup() { public List<Element> getForeignMarkup() {
return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList<Element>()) : this._foreignMarkup; return foreignMarkup == null ? (foreignMarkup = new ArrayList<Element>()) : foreignMarkup;
} }
/** /**
@ -670,12 +670,12 @@ public class SyndEntryImpl implements Serializable, SyndEntry {
*/ */
@Override @Override
public void setForeignMarkup(final List<Element> foreignMarkup) { public void setForeignMarkup(final List<Element> foreignMarkup) {
this._foreignMarkup = foreignMarkup; this.foreignMarkup = foreignMarkup;
} }
@Override @Override
public Object getWireEntry() { public Object getWireEntry() {
return this.wireEntry; return wireEntry;
} }
public void setWireEntry(final Object wireEntry) { public void setWireEntry(final Object wireEntry) {

View file

@ -53,21 +53,21 @@ import com.sun.syndication.feed.synd.impl.URINormalizer;
*/ */
public class SyndFeedImpl implements Serializable, SyndFeed { public class SyndFeedImpl implements Serializable, SyndFeed {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _encoding; private String encoding;
private String _uri; private String uri;
private SyndContent _title; private SyndContent title;
private SyndContent _description; private SyndContent description;
private String _feedType; private String feedType;
private String _link; private String link;
private List<SyndLink> _links; private List<SyndLink> links;
private SyndImage _image; private SyndImage image;
private List<SyndEntry> _entries; private List<SyndEntry> entries;
private List<Module> _modules; private List<Module> modules;
private List<SyndPerson> _authors; private List<SyndPerson> authors;
private List<SyndPerson> _contributors; private List<SyndPerson> contributors;
private List<Element> _foreignMarkup; private List<Element> foreignMarkup;
private WireFeed wireFeed = null; private WireFeed wireFeed = null;
private boolean preserveWireFeed = false; private boolean preserveWireFeed = false;
@ -118,7 +118,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* *
*/ */
protected SyndFeedImpl(final Class beanClass, final Set convenienceProperties) { protected SyndFeedImpl(final Class beanClass, final Set convenienceProperties) {
this._objBean = new ObjectBean(beanClass, this, convenienceProperties); objBean = new ObjectBean(beanClass, this, convenienceProperties);
} }
/** /**
@ -155,15 +155,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
this(SyndFeed.class, IGNORE_PROPERTIES); this(SyndFeed.class, IGNORE_PROPERTIES);
if (preserveWireFeed) { if (preserveWireFeed) {
this.wireFeed = feed; wireFeed = feed;
this.preserveWireFeed = preserveWireFeed; this.preserveWireFeed = preserveWireFeed;
} }
if (feed != null) { if (feed != null) {
this._feedType = feed.getFeedType(); feedType = feed.getFeedType();
final Converter converter = CONVERTERS.getConverter(this._feedType); final Converter converter = CONVERTERS.getConverter(feedType);
if (converter == null) { if (converter == null) {
throw new IllegalArgumentException("Invalid feed type [" + this._feedType + "]"); throw new IllegalArgumentException("Invalid feed type [" + feedType + "]");
} }
converter.copyInto(feed, this); converter.copyInto(feed, this);
} }
@ -181,7 +181,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -201,7 +201,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
// can't use foreign markup in equals, due to JDOM equals impl // can't use foreign markup in equals, due to JDOM equals impl
final List<Element> fm = getForeignMarkup(); final List<Element> fm = getForeignMarkup();
setForeignMarkup(((SyndFeedImpl) other).getForeignMarkup()); setForeignMarkup(((SyndFeedImpl) other).getForeignMarkup());
final boolean ret = this._objBean.equals(other); final boolean ret = objBean.equals(other);
setForeignMarkup(fm); // restore foreign markup setForeignMarkup(fm); // restore foreign markup
return ret; return ret;
} }
@ -217,7 +217,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -229,7 +229,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -244,7 +244,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public WireFeed createWireFeed() { public WireFeed createWireFeed() {
return this.createWireFeed(this._feedType); return this.createWireFeed(feedType);
} }
/** /**
@ -281,7 +281,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public WireFeed originalWireFeed() { public WireFeed originalWireFeed() {
return this.wireFeed; return wireFeed;
} }
/** /**
@ -294,7 +294,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public String getFeedType() { public String getFeedType() {
return this._feedType; return feedType;
} }
/** /**
@ -306,7 +306,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setFeedType(final String feedType) { public void setFeedType(final String feedType) {
this._feedType = feedType; this.feedType = feedType;
} }
/** /**
@ -319,7 +319,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public String getEncoding() { public String getEncoding() {
return this._encoding; return encoding;
} }
/** /**
@ -331,7 +331,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setEncoding(final String encoding) { public void setEncoding(final String encoding) {
this._encoding = encoding; this.encoding = encoding;
} }
/** /**
@ -363,7 +363,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public String getUri() { public String getUri() {
return this._uri; return uri;
} }
/** /**
@ -393,7 +393,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setUri(final String uri) { public void setUri(final String uri) {
this._uri = URINormalizer.normalize(uri); this.uri = URINormalizer.normalize(uri);
} }
/** /**
@ -405,8 +405,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public String getTitle() { public String getTitle() {
if (this._title != null) { if (title != null) {
return this._title.getValue(); return title.getValue();
} }
return null; return null;
} }
@ -420,10 +420,10 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setTitle(final String title) { public void setTitle(final String title) {
if (this._title == null) { if (this.title == null) {
this._title = new SyndContentImpl(); this.title = new SyndContentImpl();
} }
this._title.setValue(title); this.title.setValue(title);
} }
/** /**
@ -435,7 +435,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public SyndContent getTitleEx() { public SyndContent getTitleEx() {
return this._title; return title;
} }
/** /**
@ -447,7 +447,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setTitleEx(final SyndContent title) { public void setTitleEx(final SyndContent title) {
this._title = title; this.title = title;
} }
/** /**
@ -471,7 +471,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public String getLink() { public String getLink() {
return this._link; return link;
} }
/** /**
@ -495,7 +495,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setLink(final String link) { public void setLink(final String link) {
this._link = link; this.link = link;
} }
/** /**
@ -507,8 +507,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public String getDescription() { public String getDescription() {
if (this._description != null) { if (description != null) {
return this._description.getValue(); return description.getValue();
} }
return null; return null;
} }
@ -522,10 +522,10 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setDescription(final String description) { public void setDescription(final String description) {
if (this._description == null) { if (this.description == null) {
this._description = new SyndContentImpl(); this.description = new SyndContentImpl();
} }
this._description.setValue(description); this.description.setValue(description);
} }
/** /**
@ -537,7 +537,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public SyndContent getDescriptionEx() { public SyndContent getDescriptionEx() {
return this._description; return description;
} }
/** /**
@ -549,7 +549,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setDescriptionEx(final SyndContent description) { public void setDescriptionEx(final SyndContent description) {
this._description = description; this.description = description;
} }
/** /**
@ -621,7 +621,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public SyndImage getImage() { public SyndImage getImage() {
return this._image; return image;
} }
/** /**
@ -633,7 +633,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setImage(final SyndImage image) { public void setImage(final SyndImage image) {
this._image = image; this.image = image;
} }
/** /**
@ -678,7 +678,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public List<SyndEntry> getEntries() { public List<SyndEntry> getEntries() {
return this._entries == null ? (this._entries = new ArrayList<SyndEntry>()) : this._entries; return entries == null ? (entries = new ArrayList<SyndEntry>()) : entries;
} }
/** /**
@ -691,7 +691,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setEntries(final List<SyndEntry> entries) { public void setEntries(final List<SyndEntry> entries) {
this._entries = entries; this.entries = entries;
} }
/** /**
@ -734,13 +734,13 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
if (this._modules == null) { if (modules == null) {
this._modules = new ArrayList<Module>(); modules = new ArrayList<Module>();
} }
if (ModuleUtils.getModule(this._modules, DCModule.URI) == null) { if (ModuleUtils.getModule(modules, DCModule.URI) == null) {
this._modules.add(new DCModuleImpl()); modules.add(new DCModuleImpl());
} }
return this._modules; return modules;
} }
/** /**
@ -753,7 +753,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**
@ -821,7 +821,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public List<SyndLink> getLinks() { public List<SyndLink> getLinks() {
return this._links == null ? (this._links = new ArrayList<SyndLink>()) : this._links; return links == null ? (links = new ArrayList<SyndLink>()) : links;
} }
/** /**
@ -832,17 +832,17 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setLinks(final List<SyndLink> links) { public void setLinks(final List<SyndLink> links) {
this._links = links; this.links = links;
} }
@Override @Override
public List<SyndPerson> getAuthors() { public List<SyndPerson> getAuthors() {
return this._authors == null ? (this._authors = new ArrayList<SyndPerson>()) : this._authors; return authors == null ? (authors = new ArrayList<SyndPerson>()) : authors;
} }
@Override @Override
public void setAuthors(final List<SyndPerson> authors) { public void setAuthors(final List<SyndPerson> authors) {
this._authors = authors; this.authors = authors;
} }
/** /**
@ -877,12 +877,12 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
@Override @Override
public List<SyndPerson> getContributors() { public List<SyndPerson> getContributors() {
return this._contributors == null ? (this._contributors = new ArrayList<SyndPerson>()) : this._contributors; return contributors == null ? (contributors = new ArrayList<SyndPerson>()) : contributors;
} }
@Override @Override
public void setContributors(final List<SyndPerson> contributors) { public void setContributors(final List<SyndPerson> contributors) {
this._contributors = contributors; this.contributors = contributors;
} }
/** /**
@ -894,7 +894,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public List<Element> getForeignMarkup() { public List<Element> getForeignMarkup() {
return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList<Element>()) : this._foreignMarkup; return foreignMarkup == null ? (foreignMarkup = new ArrayList<Element>()) : foreignMarkup;
} }
/** /**
@ -906,11 +906,11 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*/ */
@Override @Override
public void setForeignMarkup(final List<Element> foreignMarkup) { public void setForeignMarkup(final List<Element> foreignMarkup) {
this._foreignMarkup = foreignMarkup; this.foreignMarkup = foreignMarkup;
} }
@Override @Override
public boolean isPreservingWireFeed() { public boolean isPreservingWireFeed() {
return this.preserveWireFeed; return preserveWireFeed;
} }
} }

View file

@ -33,11 +33,11 @@ import com.sun.syndication.feed.impl.ObjectBean;
* *
*/ */
public class SyndImageImpl implements Serializable, SyndImage { public class SyndImageImpl implements Serializable, SyndImage {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _title; private String title;
private String _url; private String url;
private String _link; private String link;
private String _description; private String description;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -45,7 +45,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
* *
*/ */
public SyndImageImpl() { public SyndImageImpl() {
this._objBean = new ObjectBean(SyndImage.class, this); objBean = new ObjectBean(SyndImage.class, this);
} }
/** /**
@ -59,7 +59,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -73,7 +73,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public boolean equals(final Object other) { public boolean equals(final Object other) {
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -87,7 +87,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -99,7 +99,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -111,7 +111,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public String getTitle() { public String getTitle() {
return this._title; return title;
} }
/** /**
@ -123,7 +123,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public void setTitle(final String title) { public void setTitle(final String title) {
this._title = title; this.title = title;
} }
/** /**
@ -135,7 +135,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public String getUrl() { public String getUrl() {
return this._url; return url;
} }
/** /**
@ -147,7 +147,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public void setUrl(final String url) { public void setUrl(final String url) {
this._url = url; this.url = url;
} }
/** /**
@ -159,7 +159,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public String getLink() { public String getLink() {
return this._link; return link;
} }
/** /**
@ -171,7 +171,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public void setLink(final String link) { public void setLink(final String link) {
this._link = link; this.link = link;
} }
/** /**
@ -183,7 +183,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public String getDescription() { public String getDescription() {
return this._description; return description;
} }
/** /**
@ -195,7 +195,7 @@ public class SyndImageImpl implements Serializable, SyndImage {
*/ */
@Override @Override
public void setDescription(final String description) { public void setDescription(final String description) {
this._description = description; this.description = description;
} }
@Override @Override

View file

@ -30,14 +30,14 @@ import com.sun.syndication.feed.impl.ObjectBean;
*/ */
public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _href; private String href;
private String _rel; private String rel;
private String _type; private String type;
private String _hreflang; private String hreflang;
private String _title; private String title;
private long _length; private long length;
/** /**
* Default constructor. All properties are set to <b>null</b>. * Default constructor. All properties are set to <b>null</b>.
@ -45,7 +45,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
* *
*/ */
public SyndLinkImpl() { public SyndLinkImpl() {
this._objBean = new ObjectBean(this.getClass(), this); objBean = new ObjectBean(this.getClass(), this);
} }
/** /**
@ -59,7 +59,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -76,7 +76,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
if (!(other instanceof SyndLinkImpl)) { if (!(other instanceof SyndLinkImpl)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -90,7 +90,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -102,7 +102,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -114,7 +114,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public String getRel() { public String getRel() {
return this._rel; return rel;
} }
/** /**
@ -127,7 +127,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
@Override @Override
public void setRel(final String rel) { public void setRel(final String rel) {
// TODO add check, ask P@ about the check // TODO add check, ask P@ about the check
this._rel = rel; this.rel = rel;
} }
/** /**
@ -139,7 +139,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public String getType() { public String getType() {
return this._type; return type;
} }
/** /**
@ -151,7 +151,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public void setType(final String type) { public void setType(final String type) {
this._type = type; this.type = type;
} }
/** /**
@ -163,7 +163,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public String getHref() { public String getHref() {
return this._href; return href;
} }
/** /**
@ -175,7 +175,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public void setHref(final String href) { public void setHref(final String href) {
this._href = href; this.href = href;
} }
/** /**
@ -187,7 +187,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public String getTitle() { public String getTitle() {
return this._title; return title;
} }
/** /**
@ -199,7 +199,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public void setTitle(final String title) { public void setTitle(final String title) {
this._title = title; this.title = title;
} }
/** /**
@ -210,7 +210,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public String getHreflang() { public String getHreflang() {
return this._hreflang; return hreflang;
} }
/** /**
@ -221,7 +221,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public void setHreflang(final String hreflang) { public void setHreflang(final String hreflang) {
this._hreflang = hreflang; this.hreflang = hreflang;
} }
/** /**
@ -232,7 +232,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public long getLength() { public long getLength() {
return this._length; return length;
} }
/** /**
@ -243,6 +243,6 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink {
*/ */
@Override @Override
public void setLength(final long length) { public void setLength(final long length) {
this._length = length; this.length = length;
} }
} }

View file

@ -33,18 +33,18 @@ import com.sun.syndication.feed.module.impl.ModuleUtils;
* *
*/ */
public class SyndPersonImpl implements Serializable, SyndPerson { public class SyndPersonImpl implements Serializable, SyndPerson {
private final ObjectBean _objBean; private final ObjectBean objBean;
private String _name; private String name;
private String _uri; private String uri;
private String _email; private String email;
private List<Module> _modules; private List<Module> modules;
/** /**
* For implementations extending SyndContentImpl to be able to use the * For implementations extending SyndContentImpl to be able to use the
* ObjectBean functionality with extended interfaces. * ObjectBean functionality with extended interfaces.
*/ */
public SyndPersonImpl() { public SyndPersonImpl() {
this._objBean = new ObjectBean(SyndPerson.class, this); objBean = new ObjectBean(SyndPerson.class, this);
} }
/** /**
@ -58,7 +58,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return this._objBean.clone(); return objBean.clone();
} }
/** /**
@ -75,7 +75,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
if (!(other instanceof SyndPersonImpl)) { if (!(other instanceof SyndPersonImpl)) {
return false; return false;
} }
return this._objBean.equals(other); return objBean.equals(other);
} }
/** /**
@ -89,7 +89,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return this._objBean.hashCode(); return objBean.hashCode();
} }
/** /**
@ -101,7 +101,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public String toString() { public String toString() {
return this._objBean.toString(); return objBean.toString();
} }
/** /**
@ -113,7 +113,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public String getName() { public String getName() {
return this._name; return name;
} }
/** /**
@ -125,7 +125,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public void setName(final String name) { public void setName(final String name) {
this._name = name; this.name = name;
} }
/** /**
@ -137,7 +137,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public String getEmail() { public String getEmail() {
return this._email; return email;
} }
/** /**
@ -149,7 +149,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public void setEmail(final String email) { public void setEmail(final String email) {
this._email = email; this.email = email;
} }
/** /**
@ -161,7 +161,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public String getUri() { public String getUri() {
return this._uri; return uri;
} }
/** /**
@ -173,7 +173,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public void setUri(final String uri) { public void setUri(final String uri) {
this._uri = uri; this.uri = uri;
} }
/** /**
@ -185,10 +185,10 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public List<Module> getModules() { public List<Module> getModules() {
if (this._modules == null) { if (modules == null) {
this._modules = new ArrayList<Module>(); modules = new ArrayList<Module>();
} }
return this._modules; return modules;
} }
/** /**
@ -201,7 +201,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
*/ */
@Override @Override
public void setModules(final List<Module> modules) { public void setModules(final List<Module> modules) {
this._modules = modules; this.modules = modules;
} }
/** /**

View file

@ -44,19 +44,19 @@ import com.sun.syndication.feed.synd.SyndPersonImpl;
/** /**
*/ */
public class ConverterForAtom03 implements Converter { public class ConverterForAtom03 implements Converter {
private final String _type; private final String type;
public ConverterForAtom03() { public ConverterForAtom03() {
this("atom_0.3"); this("atom_0.3");
} }
protected ConverterForAtom03(final String type) { protected ConverterForAtom03(final String type) {
this._type = type; this.type = type;
} }
@Override @Override
public String getType() { public String getType() {
return this._type; return type;
} }
@Override @Override

View file

@ -46,19 +46,19 @@ import com.sun.syndication.feed.synd.SyndPerson;
/** /**
*/ */
public class ConverterForAtom10 implements Converter { public class ConverterForAtom10 implements Converter {
private final String _type; private final String type;
public ConverterForAtom10() { public ConverterForAtom10() {
this("atom_1.0"); this("atom_1.0");
} }
protected ConverterForAtom10(final String type) { protected ConverterForAtom10(final String type) {
this._type = type; this.type = type;
} }
@Override @Override
public String getType() { public String getType() {
return this._type; return type;
} }
@Override @Override

View file

@ -34,19 +34,19 @@ import com.sun.syndication.feed.synd.SyndImageImpl;
/** /**
*/ */
public class ConverterForRSS090 implements Converter { public class ConverterForRSS090 implements Converter {
private final String _type; private final String type;
public ConverterForRSS090() { public ConverterForRSS090() {
this("rss_0.9"); this("rss_0.9");
} }
protected ConverterForRSS090(final String type) { protected ConverterForRSS090(final String type) {
this._type = type; this.type = type;
} }
@Override @Override
public String getType() { public String getType() {
return this._type; return type;
} }
@Override @Override

View file

@ -25,11 +25,11 @@ public class SAXBuilder extends org.jdom2.input.SAXBuilder {
* *
* @deprecated use SAXBuilder(XMLReaderJDOMFactory) with either * @deprecated use SAXBuilder(XMLReaderJDOMFactory) with either
* XMLReaders.DTDVALIDATING or XMLReaders.NONVALIDATING * XMLReaders.DTDVALIDATING or XMLReaders.NONVALIDATING
* @param _validate * @param validate
*/ */
@Deprecated @Deprecated
public SAXBuilder(final boolean _validate) { public SAXBuilder(final boolean validate) {
super(_validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING); super(validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING);
} }
@Override @Override

View file

@ -38,7 +38,7 @@ import com.sun.syndication.feed.synd.SyndFeedImpl;
* *
*/ */
public class SyndFeedInput { public class SyndFeedInput {
private final WireFeedInput _feedInput; private final WireFeedInput feedInput;
private boolean preserveWireFeed = false; private boolean preserveWireFeed = false;
/** /**
@ -59,7 +59,7 @@ public class SyndFeedInput {
* *
*/ */
public SyndFeedInput(final boolean validate) { public SyndFeedInput(final boolean validate) {
this._feedInput = new WireFeedInput(validate); feedInput = new WireFeedInput(validate);
} }
/** /**
@ -81,7 +81,7 @@ public class SyndFeedInput {
* *
*/ */
public void setXmlHealerOn(final boolean heals) { public void setXmlHealerOn(final boolean heals) {
this._feedInput.setXmlHealerOn(heals); feedInput.setXmlHealerOn(heals);
} }
/** /**
@ -104,7 +104,7 @@ public class SyndFeedInput {
* *
*/ */
public boolean getXmlHealerOn() { public boolean getXmlHealerOn() {
return this._feedInput.getXmlHealerOn(); return feedInput.getXmlHealerOn();
} }
/** /**
@ -121,7 +121,7 @@ public class SyndFeedInput {
* *
*/ */
public SyndFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException { public SyndFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException {
return new SyndFeedImpl(this._feedInput.build(file), this.preserveWireFeed); return new SyndFeedImpl(feedInput.build(file), preserveWireFeed);
} }
/** /**
@ -136,7 +136,7 @@ public class SyndFeedInput {
* *
*/ */
public SyndFeed build(final Reader reader) throws IllegalArgumentException, FeedException { public SyndFeed build(final Reader reader) throws IllegalArgumentException, FeedException {
return new SyndFeedImpl(this._feedInput.build(reader), this.preserveWireFeed); return new SyndFeedImpl(feedInput.build(reader), preserveWireFeed);
} }
/** /**
@ -151,7 +151,7 @@ public class SyndFeedInput {
* *
*/ */
public SyndFeed build(final InputSource is) throws IllegalArgumentException, FeedException { public SyndFeed build(final InputSource is) throws IllegalArgumentException, FeedException {
return new SyndFeedImpl(this._feedInput.build(is), this.preserveWireFeed); return new SyndFeedImpl(feedInput.build(is), preserveWireFeed);
} }
/** /**
@ -166,7 +166,7 @@ public class SyndFeedInput {
* *
*/ */
public SyndFeed build(final org.w3c.dom.Document document) throws IllegalArgumentException, FeedException { public SyndFeed build(final org.w3c.dom.Document document) throws IllegalArgumentException, FeedException {
return new SyndFeedImpl(this._feedInput.build(document), this.preserveWireFeed); return new SyndFeedImpl(feedInput.build(document), preserveWireFeed);
} }
/** /**
@ -181,7 +181,7 @@ public class SyndFeedInput {
* *
*/ */
public SyndFeed build(final Document document) throws IllegalArgumentException, FeedException { public SyndFeed build(final Document document) throws IllegalArgumentException, FeedException {
return new SyndFeedImpl(this._feedInput.build(document), this.preserveWireFeed); return new SyndFeedImpl(feedInput.build(document), preserveWireFeed);
} }
/** /**
@ -190,7 +190,7 @@ public class SyndFeedInput {
* default. * default.
*/ */
public boolean isPreserveWireFeed() { public boolean isPreserveWireFeed() {
return this.preserveWireFeed; return preserveWireFeed;
} }
/** /**

View file

@ -35,7 +35,7 @@ import com.sun.syndication.feed.synd.SyndFeed;
* *
*/ */
public class SyndFeedOutput { public class SyndFeedOutput {
private final WireFeedOutput _feedOutput; private final WireFeedOutput feedOutput;
/** /**
* Creates a SyndFeedOutput instance. * Creates a SyndFeedOutput instance.
@ -43,7 +43,7 @@ public class SyndFeedOutput {
* *
*/ */
public SyndFeedOutput() { public SyndFeedOutput() {
this._feedOutput = new WireFeedOutput(); feedOutput = new WireFeedOutput();
} }
/** /**
@ -64,7 +64,7 @@ public class SyndFeedOutput {
* *
*/ */
public String outputString(final SyndFeed feed) throws FeedException { public String outputString(final SyndFeed feed) throws FeedException {
return this._feedOutput.outputString(feed.createWireFeed()); return feedOutput.outputString(feed.createWireFeed());
} }
/** /**
@ -86,7 +86,7 @@ public class SyndFeedOutput {
* *
*/ */
public String outputString(final SyndFeed feed, final boolean prettyPrint) throws FeedException { public String outputString(final SyndFeed feed, final boolean prettyPrint) throws FeedException {
return this._feedOutput.outputString(feed.createWireFeed(), prettyPrint); return feedOutput.outputString(feed.createWireFeed(), prettyPrint);
} }
/** /**
@ -110,7 +110,7 @@ public class SyndFeedOutput {
* *
*/ */
public void output(final SyndFeed feed, final File file) throws IOException, FeedException { public void output(final SyndFeed feed, final File file) throws IOException, FeedException {
this._feedOutput.output(feed.createWireFeed(), file); feedOutput.output(feed.createWireFeed(), file);
} }
/** /**
@ -135,7 +135,7 @@ public class SyndFeedOutput {
* *
*/ */
public void output(final SyndFeed feed, final File file, final boolean prettyPrint) throws IOException, FeedException { public void output(final SyndFeed feed, final File file, final boolean prettyPrint) throws IOException, FeedException {
this._feedOutput.output(feed.createWireFeed(), file, prettyPrint); feedOutput.output(feed.createWireFeed(), file, prettyPrint);
} }
/** /**
@ -159,7 +159,7 @@ public class SyndFeedOutput {
* *
*/ */
public void output(final SyndFeed feed, final Writer writer) throws IOException, FeedException { public void output(final SyndFeed feed, final Writer writer) throws IOException, FeedException {
this._feedOutput.output(feed.createWireFeed(), writer); feedOutput.output(feed.createWireFeed(), writer);
} }
/** /**
@ -184,7 +184,7 @@ public class SyndFeedOutput {
* *
*/ */
public void output(final SyndFeed feed, final Writer writer, final boolean prettyPrint) throws IOException, FeedException { public void output(final SyndFeed feed, final Writer writer, final boolean prettyPrint) throws IOException, FeedException {
this._feedOutput.output(feed.createWireFeed(), writer, prettyPrint); feedOutput.output(feed.createWireFeed(), writer, prettyPrint);
} }
/** /**
@ -202,7 +202,7 @@ public class SyndFeedOutput {
* *
*/ */
public org.w3c.dom.Document outputW3CDom(final SyndFeed feed) throws FeedException { public org.w3c.dom.Document outputW3CDom(final SyndFeed feed) throws FeedException {
return this._feedOutput.outputW3CDom(feed.createWireFeed()); return feedOutput.outputW3CDom(feed.createWireFeed());
} }
/** /**
@ -220,7 +220,7 @@ public class SyndFeedOutput {
* *
*/ */
public Document outputJDom(final SyndFeed feed) throws FeedException { public Document outputJDom(final SyndFeed feed) throws FeedException {
return this._feedOutput.outputJDom(feed.createWireFeed()); return feedOutput.outputJDom(feed.createWireFeed());
} }
} }

View file

@ -83,9 +83,9 @@ public class WireFeedInput {
} }
} }
private final boolean _validate; private final boolean validate;
private boolean _xmlHealerOn; private boolean xmlHealerOn;
/** /**
* Returns the list of supported input feed types. * Returns the list of supported input feed types.
@ -118,8 +118,8 @@ public class WireFeedInput {
* *
*/ */
public WireFeedInput(final boolean validate) { public WireFeedInput(final boolean validate) {
this._validate = false; // TODO FIX THIS THINGY this.validate = false; // TODO FIX THIS THINGY
this._xmlHealerOn = true; xmlHealerOn = true;
} }
/** /**
@ -141,7 +141,7 @@ public class WireFeedInput {
* *
*/ */
public void setXmlHealerOn(final boolean heals) { public void setXmlHealerOn(final boolean heals) {
this._xmlHealerOn = heals; xmlHealerOn = heals;
} }
/** /**
@ -164,7 +164,7 @@ public class WireFeedInput {
* *
*/ */
public boolean getXmlHealerOn() { public boolean getXmlHealerOn() {
return this._xmlHealerOn; return xmlHealerOn;
} }
/** /**
@ -186,7 +186,7 @@ public class WireFeedInput {
public WireFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException { public WireFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException {
WireFeed feed; WireFeed feed;
Reader reader = new FileReader(file); Reader reader = new FileReader(file);
if (this._xmlHealerOn) { if (xmlHealerOn) {
reader = new XmlFixerReader(reader); reader = new XmlFixerReader(reader);
} }
feed = this.build(reader); feed = this.build(reader);
@ -211,7 +211,7 @@ public class WireFeedInput {
public WireFeed build(Reader reader) throws IllegalArgumentException, FeedException { public WireFeed build(Reader reader) throws IllegalArgumentException, FeedException {
final SAXBuilder saxBuilder = createSAXBuilder(); final SAXBuilder saxBuilder = createSAXBuilder();
try { try {
if (this._xmlHealerOn) { if (xmlHealerOn) {
reader = new XmlFixerReader(reader); reader = new XmlFixerReader(reader);
} }
final Document document = saxBuilder.build(reader); final Document document = saxBuilder.build(reader);
@ -297,7 +297,7 @@ public class WireFeedInput {
if (parser == null) { if (parser == null) {
throw new IllegalArgumentException("Invalid document"); throw new IllegalArgumentException("Invalid document");
} }
return parser.parse(document, this._validate); return parser.parse(document, validate);
} }
/** /**
@ -306,7 +306,7 @@ public class WireFeedInput {
* @return a new org.jdom2.input.SAXBuilder object * @return a new org.jdom2.input.SAXBuilder object
*/ */
protected SAXBuilder createSAXBuilder() { protected SAXBuilder createSAXBuilder() {
final SAXBuilder saxBuilder = new SAXBuilder(this._validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING); final SAXBuilder saxBuilder = new SAXBuilder(validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING);
saxBuilder.setEntityResolver(RESOLVER); saxBuilder.setEntityResolver(RESOLVER);
// //

View file

@ -67,11 +67,11 @@ public class XmlReader extends Reader {
private static final String UTF_16LE = "UTF-16LE"; private static final String UTF_16LE = "UTF-16LE";
private static final String UTF_16 = "UTF-16"; private static final String UTF_16 = "UTF-16";
private static String _staticDefaultEncoding = null; private static String staticDefaultEncoding = null;
private Reader _reader; private Reader reader;
private String _encoding; private String encoding;
private final String _defaultEncoding; private final String defaultEncoding;
/** /**
* Sets the default encoding to use if none is set in HTTP content-type, XML * Sets the default encoding to use if none is set in HTTP content-type, XML
@ -85,7 +85,7 @@ public class XmlReader extends Reader {
* @param encoding charset encoding to default to. * @param encoding charset encoding to default to.
*/ */
public static void setDefaultEncoding(final String encoding) { public static void setDefaultEncoding(final String encoding) {
_staticDefaultEncoding = encoding; staticDefaultEncoding = encoding;
} }
/** /**
@ -98,7 +98,7 @@ public class XmlReader extends Reader {
* @return the default encoding to use. * @return the default encoding to use.
*/ */
public static String getDefaultEncoding() { public static String getDefaultEncoding() {
return _staticDefaultEncoding; return staticDefaultEncoding;
} }
/** /**
@ -167,7 +167,7 @@ public class XmlReader extends Reader {
* *
*/ */
public XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding) throws IOException, XmlReaderException { public XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding) throws IOException, XmlReaderException {
this._defaultEncoding = defaultEncoding == null ? _staticDefaultEncoding : defaultEncoding; this.defaultEncoding = defaultEncoding == null ? staticDefaultEncoding : defaultEncoding;
try { try {
doRawStream(is, lenient); doRawStream(is, lenient);
} catch (final XmlReaderException ex) { } catch (final XmlReaderException ex) {
@ -255,7 +255,7 @@ public class XmlReader extends Reader {
* *
*/ */
public XmlReader(final URLConnection conn) throws IOException { public XmlReader(final URLConnection conn) throws IOException {
this._defaultEncoding = _staticDefaultEncoding; defaultEncoding = staticDefaultEncoding;
final boolean lenient = true; final boolean lenient = true;
if (conn instanceof HttpURLConnection) { if (conn instanceof HttpURLConnection) {
try { try {
@ -338,7 +338,7 @@ public class XmlReader extends Reader {
*/ */
public XmlReader(final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding) throws IOException, public XmlReader(final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding) throws IOException,
XmlReaderException { XmlReaderException {
this._defaultEncoding = defaultEncoding == null ? _staticDefaultEncoding : defaultEncoding; this.defaultEncoding = defaultEncoding == null ? staticDefaultEncoding : defaultEncoding;
try { try {
doHttpStream(is, httpContentType, lenient); doHttpStream(is, httpContentType, lenient);
} catch (final XmlReaderException ex) { } catch (final XmlReaderException ex) {
@ -407,7 +407,7 @@ public class XmlReader extends Reader {
encoding = ex.getContentTypeEncoding(); encoding = ex.getContentTypeEncoding();
} }
if (encoding == null) { if (encoding == null) {
encoding = this._defaultEncoding == null ? UTF_8 : this._defaultEncoding; encoding = defaultEncoding == null ? UTF_8 : defaultEncoding;
} }
prepareReader(ex.getInputStream(), encoding); prepareReader(ex.getInputStream(), encoding);
} }
@ -421,12 +421,12 @@ public class XmlReader extends Reader {
* *
*/ */
public String getEncoding() { public String getEncoding() {
return this._encoding; return encoding;
} }
@Override @Override
public int read(final char[] buf, final int offset, final int len) throws IOException { public int read(final char[] buf, final int offset, final int len) throws IOException {
return this._reader.read(buf, offset, len); return reader.read(buf, offset, len);
} }
/** /**
@ -438,7 +438,7 @@ public class XmlReader extends Reader {
*/ */
@Override @Override
public void close() throws IOException { public void close() throws IOException {
this._reader.close(); reader.close();
} }
private void doRawStream(final InputStream is, final boolean lenient) throws IOException { private void doRawStream(final InputStream is, final boolean lenient) throws IOException {
@ -462,8 +462,8 @@ public class XmlReader extends Reader {
} }
private void prepareReader(final InputStream is, final String encoding) throws IOException { private void prepareReader(final InputStream is, final String encoding) throws IOException {
this._reader = new InputStreamReader(is, encoding); reader = new InputStreamReader(is, encoding);
this._encoding = encoding; this.encoding = encoding;
} }
// InputStream is passed for XmlReaderException creation only // InputStream is passed for XmlReaderException creation only
@ -471,7 +471,7 @@ public class XmlReader extends Reader {
String encoding; String encoding;
if (bomEnc == null) { if (bomEnc == null) {
if (xmlGuessEnc == null || xmlEnc == null) { if (xmlGuessEnc == null || xmlEnc == null) {
encoding = this._defaultEncoding == null ? UTF_8 : this._defaultEncoding; encoding = defaultEncoding == null ? UTF_8 : defaultEncoding;
} else if (xmlEnc.equals(UTF_16) && (xmlGuessEnc.equals(UTF_16BE) || xmlGuessEnc.equals(UTF_16LE))) { } else if (xmlEnc.equals(UTF_16) && (xmlGuessEnc.equals(UTF_16BE) || xmlGuessEnc.equals(UTF_16LE))) {
encoding = xmlGuessEnc; encoding = xmlGuessEnc;
} else { } else {
@ -513,7 +513,7 @@ public class XmlReader extends Reader {
if (appXml) { if (appXml) {
encoding = calculateRawEncoding(bomEnc, xmlGuessEnc, xmlEnc, is); encoding = calculateRawEncoding(bomEnc, xmlGuessEnc, xmlEnc, is);
} else { } else {
encoding = this._defaultEncoding == null ? US_ASCII : this._defaultEncoding; encoding = defaultEncoding == null ? US_ASCII : defaultEncoding;
} }
} else if (bomEnc != null && (cTEnc.equals(UTF_16BE) || cTEnc.equals(UTF_16LE))) { } else if (bomEnc != null && (cTEnc.equals(UTF_16BE) || cTEnc.equals(UTF_16LE))) {
throw new XmlReaderException(HTTP_EX_1.format(new Object[] { cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc }), cTMime, cTEnc, bomEnc, throw new XmlReaderException(HTTP_EX_1.format(new Object[] { cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc }), cTMime, cTEnc, bomEnc,

View file

@ -18,12 +18,12 @@ import java.io.InputStream;
* *
*/ */
public class XmlReaderException extends IOException { public class XmlReaderException extends IOException {
private final String _bomEncoding; private final String bomEncoding;
private final String _xmlGuessEncoding; private final String xmlGuessEncoding;
private final String _xmlEncoding; private final String xmlEncoding;
private final String _contentTypeMime; private final String contentTypeMime;
private final String _contentTypeEncoding; private final String contentTypeEncoding;
private final InputStream _is; private final InputStream is;
/** /**
* Creates an exception instance if the charset encoding could not be * Creates an exception instance if the charset encoding could not be
@ -62,12 +62,12 @@ public class XmlReaderException extends IOException {
public XmlReaderException(final String msg, final String ctMime, final String ctEnc, final String bomEnc, final String xmlGuessEnc, final String xmlEnc, public XmlReaderException(final String msg, final String ctMime, final String ctEnc, final String bomEnc, final String xmlGuessEnc, final String xmlEnc,
final InputStream is) { final InputStream is) {
super(msg); super(msg);
this._contentTypeMime = ctMime; contentTypeMime = ctMime;
this._contentTypeEncoding = ctEnc; contentTypeEncoding = ctEnc;
this._bomEncoding = bomEnc; bomEncoding = bomEnc;
this._xmlGuessEncoding = xmlGuessEnc; xmlGuessEncoding = xmlGuessEnc;
this._xmlEncoding = xmlEnc; xmlEncoding = xmlEnc;
this._is = is; this.is = is;
} }
/** /**
@ -78,7 +78,7 @@ public class XmlReaderException extends IOException {
* *
*/ */
public String getBomEncoding() { public String getBomEncoding() {
return this._bomEncoding; return bomEncoding;
} }
/** /**
@ -89,7 +89,7 @@ public class XmlReaderException extends IOException {
* *
*/ */
public String getXmlGuessEncoding() { public String getXmlGuessEncoding() {
return this._xmlGuessEncoding; return xmlGuessEncoding;
} }
/** /**
@ -100,7 +100,7 @@ public class XmlReaderException extends IOException {
* *
*/ */
public String getXmlEncoding() { public String getXmlEncoding() {
return this._xmlEncoding; return xmlEncoding;
} }
/** /**
@ -113,7 +113,7 @@ public class XmlReaderException extends IOException {
* *
*/ */
public String getContentTypeMime() { public String getContentTypeMime() {
return this._contentTypeMime; return contentTypeMime;
} }
/** /**
@ -127,7 +127,7 @@ public class XmlReaderException extends IOException {
* *
*/ */
public String getContentTypeEncoding() { public String getContentTypeEncoding() {
return this._contentTypeEncoding; return contentTypeEncoding;
} }
/** /**
@ -139,6 +139,6 @@ public class XmlReaderException extends IOException {
* *
*/ */
public InputStream getInputStream() { public InputStream getInputStream() {
return this._is; return is;
} }
} }

View file

@ -46,7 +46,7 @@ public class Atom03Generator extends BaseWireFeedGenerator {
private static final String ATOM_03_URI = "http://purl.org/atom/ns#"; private static final String ATOM_03_URI = "http://purl.org/atom/ns#";
private static final Namespace ATOM_NS = Namespace.getNamespace(ATOM_03_URI); private static final Namespace ATOM_NS = Namespace.getNamespace(ATOM_03_URI);
private final String _version; private final String version;
public Atom03Generator() { public Atom03Generator() {
this("atom_0.3", "0.3"); this("atom_0.3", "0.3");
@ -54,11 +54,11 @@ public class Atom03Generator extends BaseWireFeedGenerator {
protected Atom03Generator(final String type, final String version) { protected Atom03Generator(final String type, final String version) {
super(type); super(type);
this._version = version; this.version = version;
} }
protected String getVersion() { protected String getVersion() {
return this._version; return version;
} }
protected Namespace getFeedNamespace() { protected Namespace getFeedNamespace() {

View file

@ -53,7 +53,7 @@ public class Atom10Generator extends BaseWireFeedGenerator {
private static final String ATOM_10_URI = "http://www.w3.org/2005/Atom"; private static final String ATOM_10_URI = "http://www.w3.org/2005/Atom";
private static final Namespace ATOM_NS = Namespace.getNamespace(ATOM_10_URI); private static final Namespace ATOM_NS = Namespace.getNamespace(ATOM_10_URI);
private final String _version; private final String version;
public Atom10Generator() { public Atom10Generator() {
this("atom_1.0", "1.0"); this("atom_1.0", "1.0");
@ -61,11 +61,11 @@ public class Atom10Generator extends BaseWireFeedGenerator {
protected Atom10Generator(final String type, final String version) { protected Atom10Generator(final String type, final String version) {
super(type); super(type);
this._version = version; this.version = version;
} }
protected String getVersion() { protected String getVersion() {
return this._version; return version;
} }
protected Namespace getFeedNamespace() { protected Namespace getFeedNamespace() {

View file

@ -31,55 +31,55 @@ public abstract class BaseWireFeedGenerator implements WireFeedGenerator {
*/ */
private static final String PERSON_MODULE_GENERATORS_POSFIX_KEY = ".person.ModuleGenerator.classes"; private static final String PERSON_MODULE_GENERATORS_POSFIX_KEY = ".person.ModuleGenerator.classes";
private final String _type; private final String type;
private final ModuleGenerators _feedModuleGenerators; private final ModuleGenerators feedModuleGenerators;
private final ModuleGenerators _itemModuleGenerators; private final ModuleGenerators itemModuleGenerators;
private final ModuleGenerators _personModuleGenerators; private final ModuleGenerators personModuleGenerators;
private final Namespace[] _allModuleNamespaces; private final Namespace[] allModuleNamespaces;
protected BaseWireFeedGenerator(final String type) { protected BaseWireFeedGenerator(final String type) {
this._type = type; this.type = type;
this._feedModuleGenerators = new ModuleGenerators(type + FEED_MODULE_GENERATORS_POSFIX_KEY, this); feedModuleGenerators = new ModuleGenerators(type + FEED_MODULE_GENERATORS_POSFIX_KEY, this);
this._itemModuleGenerators = new ModuleGenerators(type + ITEM_MODULE_GENERATORS_POSFIX_KEY, this); itemModuleGenerators = new ModuleGenerators(type + ITEM_MODULE_GENERATORS_POSFIX_KEY, this);
this._personModuleGenerators = new ModuleGenerators(type + PERSON_MODULE_GENERATORS_POSFIX_KEY, this); personModuleGenerators = new ModuleGenerators(type + PERSON_MODULE_GENERATORS_POSFIX_KEY, this);
final Set allModuleNamespaces = new HashSet(); final Set allModuleNamespaces = new HashSet();
Iterator i = this._feedModuleGenerators.getAllNamespaces().iterator(); Iterator i = feedModuleGenerators.getAllNamespaces().iterator();
while (i.hasNext()) { while (i.hasNext()) {
allModuleNamespaces.add(i.next()); allModuleNamespaces.add(i.next());
} }
i = this._itemModuleGenerators.getAllNamespaces().iterator(); i = itemModuleGenerators.getAllNamespaces().iterator();
while (i.hasNext()) { while (i.hasNext()) {
allModuleNamespaces.add(i.next()); allModuleNamespaces.add(i.next());
} }
i = this._personModuleGenerators.getAllNamespaces().iterator(); i = personModuleGenerators.getAllNamespaces().iterator();
while (i.hasNext()) { while (i.hasNext()) {
allModuleNamespaces.add(i.next()); allModuleNamespaces.add(i.next());
} }
this._allModuleNamespaces = new Namespace[allModuleNamespaces.size()]; this.allModuleNamespaces = new Namespace[allModuleNamespaces.size()];
allModuleNamespaces.toArray(this._allModuleNamespaces); allModuleNamespaces.toArray(this.allModuleNamespaces);
} }
@Override @Override
public String getType() { public String getType() {
return this._type; return type;
} }
protected void generateModuleNamespaceDefs(final Element root) { protected void generateModuleNamespaceDefs(final Element root) {
for (final Namespace _allModuleNamespace : this._allModuleNamespaces) { for (final Namespace _allModuleNamespace : allModuleNamespaces) {
root.addNamespaceDeclaration(_allModuleNamespace); root.addNamespaceDeclaration(_allModuleNamespace);
} }
} }
protected void generateFeedModules(final List modules, final Element feed) { protected void generateFeedModules(final List modules, final Element feed) {
this._feedModuleGenerators.generateModules(modules, feed); feedModuleGenerators.generateModules(modules, feed);
} }
public void generateItemModules(final List modules, final Element item) { public void generateItemModules(final List modules, final Element item) {
this._itemModuleGenerators.generateModules(modules, item); itemModuleGenerators.generateModules(modules, item);
} }
public void generatePersonModules(final List modules, final Element person) { public void generatePersonModules(final List modules, final Element person) {
this._personModuleGenerators.generateModules(modules, person); personModuleGenerators.generateModules(modules, person);
} }
protected void generateForeignMarkup(final Element e, final List foreignMarkup) { protected void generateForeignMarkup(final Element e, final List foreignMarkup) {

View file

@ -35,18 +35,18 @@ public abstract class BaseWireFeedParser implements WireFeedParser {
*/ */
private static final String PERSON_MODULE_PARSERS_POSFIX_KEY = ".person.ModuleParser.classes"; private static final String PERSON_MODULE_PARSERS_POSFIX_KEY = ".person.ModuleParser.classes";
private final String _type; private final String type;
private final ModuleParsers _feedModuleParsers; private final ModuleParsers feedModuleParsers;
private final ModuleParsers _itemModuleParsers; private final ModuleParsers itemModuleParsers;
private final ModuleParsers _personModuleParsers; private final ModuleParsers personModuleParsers;
private final Namespace _namespace; private final Namespace namespace;
protected BaseWireFeedParser(final String type, final Namespace namespace) { protected BaseWireFeedParser(final String type, final Namespace namespace) {
this._type = type; this.type = type;
this._namespace = namespace; this.namespace = namespace;
this._feedModuleParsers = new ModuleParsers(type + FEED_MODULE_PARSERS_POSFIX_KEY, this); feedModuleParsers = new ModuleParsers(type + FEED_MODULE_PARSERS_POSFIX_KEY, this);
this._itemModuleParsers = new ModuleParsers(type + ITEM_MODULE_PARSERS_POSFIX_KEY, this); itemModuleParsers = new ModuleParsers(type + ITEM_MODULE_PARSERS_POSFIX_KEY, this);
this._personModuleParsers = new ModuleParsers(type + PERSON_MODULE_PARSERS_POSFIX_KEY, this); personModuleParsers = new ModuleParsers(type + PERSON_MODULE_PARSERS_POSFIX_KEY, this);
} }
/** /**
@ -60,19 +60,19 @@ public abstract class BaseWireFeedParser implements WireFeedParser {
*/ */
@Override @Override
public String getType() { public String getType() {
return this._type; return type;
} }
protected List<Module> parseFeedModules(final Element feedElement) { protected List<Module> parseFeedModules(final Element feedElement) {
return this._feedModuleParsers.parseModules(feedElement); return feedModuleParsers.parseModules(feedElement);
} }
protected List<Module> parseItemModules(final Element itemElement) { protected List<Module> parseItemModules(final Element itemElement) {
return this._itemModuleParsers.parseModules(itemElement); return itemModuleParsers.parseModules(itemElement);
} }
protected List<Module> parsePersonModules(final Element itemElement) { protected List<Module> parsePersonModules(final Element itemElement) {
return this._personModuleParsers.parseModules(itemElement); return personModuleParsers.parseModules(itemElement);
} }
protected List<Element> extractForeignMarkup(final Element e, final Extendable ext, final Namespace basens) { protected List<Element> extractForeignMarkup(final Element e, final Extendable ext, final Namespace basens) {
@ -103,7 +103,7 @@ public abstract class BaseWireFeedParser implements WireFeedParser {
protected Attribute getAttribute(final Element e, final String attributeName) { protected Attribute getAttribute(final Element e, final String attributeName) {
Attribute attribute = e.getAttribute(attributeName); Attribute attribute = e.getAttribute(attributeName);
if (attribute == null) { if (attribute == null) {
attribute = e.getAttribute(attributeName, this._namespace); attribute = e.getAttribute(attributeName, namespace);
} }
return attribute; return attribute;
} }

View file

@ -29,7 +29,7 @@ import com.sun.syndication.io.ModuleGenerator;
/** /**
*/ */
public class ModuleGenerators extends PluginManager { public class ModuleGenerators extends PluginManager {
private Set _allNamespaces; private Set allNamespaces;
public ModuleGenerators(final String propertyKey, final BaseWireFeedGenerator parentGenerator) { public ModuleGenerators(final String propertyKey, final BaseWireFeedGenerator parentGenerator) {
super(propertyKey, null, parentGenerator); super(propertyKey, null, parentGenerator);
@ -61,14 +61,14 @@ public class ModuleGenerators extends PluginManager {
} }
public Set getAllNamespaces() { public Set getAllNamespaces() {
if (this._allNamespaces == null) { if (allNamespaces == null) {
this._allNamespaces = new HashSet(); allNamespaces = new HashSet();
final List mUris = getModuleNamespaces(); final List mUris = getModuleNamespaces();
for (int i = 0; i < mUris.size(); i++) { for (int i = 0; i < mUris.size(); i++) {
final ModuleGenerator mGen = getGenerator((String) mUris.get(i)); final ModuleGenerator mGen = getGenerator((String) mUris.get(i));
this._allNamespaces.addAll(mGen.getNamespaces()); allNamespaces.addAll(mGen.getNamespaces());
} }
} }
return this._allNamespaces; return allNamespaces;
} }
} }

View file

@ -35,12 +35,12 @@ import com.sun.syndication.io.WireFeedParser;
* *
*/ */
public abstract class PluginManager { public abstract class PluginManager {
private final String[] _propertyValues; private final String[] propertyValues;
private Map _pluginsMap; private Map pluginsMap;
private List _pluginsList; private List pluginsList;
private final List _keys; private final List keys;
private final WireFeedParser _parentParser; private final WireFeedParser parentParser;
private final WireFeedGenerator _parentGenerator; private final WireFeedGenerator parentGenerator;
/** /**
* Creates a PluginManager * Creates a PluginManager
@ -54,39 +54,39 @@ public abstract class PluginManager {
} }
protected PluginManager(final String propertyKey, final WireFeedParser parentParser, final WireFeedGenerator parentGenerator) { protected PluginManager(final String propertyKey, final WireFeedParser parentParser, final WireFeedGenerator parentGenerator) {
this._parentParser = parentParser; this.parentParser = parentParser;
this._parentGenerator = parentGenerator; this.parentGenerator = parentGenerator;
this._propertyValues = PropertiesLoader.getPropertiesLoader().getTokenizedProperty(propertyKey, ", "); propertyValues = PropertiesLoader.getPropertiesLoader().getTokenizedProperty(propertyKey, ", ");
loadPlugins(); loadPlugins();
this._pluginsMap = Collections.unmodifiableMap(this._pluginsMap); pluginsMap = Collections.unmodifiableMap(pluginsMap);
this._pluginsList = Collections.unmodifiableList(this._pluginsList); pluginsList = Collections.unmodifiableList(pluginsList);
this._keys = Collections.unmodifiableList(new ArrayList(this._pluginsMap.keySet())); keys = Collections.unmodifiableList(new ArrayList(pluginsMap.keySet()));
} }
protected abstract String getKey(Object obj); protected abstract String getKey(Object obj);
protected List getKeys() { protected List getKeys() {
return this._keys; return keys;
} }
protected List getPlugins() { protected List getPlugins() {
return this._pluginsList; return pluginsList;
} }
protected Map getPluginMap() { protected Map getPluginMap() {
return this._pluginsMap; return pluginsMap;
} }
protected Object getPlugin(final String key) { protected Object getPlugin(final String key) {
return this._pluginsMap.get(key); return pluginsMap.get(key);
} }
// PRIVATE - LOADER PART // PRIVATE - LOADER PART
private void loadPlugins() { private void loadPlugins() {
final List finalPluginsList = new ArrayList(); final List finalPluginsList = new ArrayList();
this._pluginsList = new ArrayList(); pluginsList = new ArrayList();
this._pluginsMap = new HashMap(); pluginsMap = new HashMap();
String className = null; String className = null;
try { try {
final Class[] classes = getClasses(); final Class[] classes = getClasses();
@ -94,24 +94,24 @@ public abstract class PluginManager {
className = classe.getName(); className = classe.getName();
final Object plugin = classe.newInstance(); final Object plugin = classe.newInstance();
if (plugin instanceof DelegatingModuleParser) { if (plugin instanceof DelegatingModuleParser) {
((DelegatingModuleParser) plugin).setFeedParser(this._parentParser); ((DelegatingModuleParser) plugin).setFeedParser(parentParser);
} }
if (plugin instanceof DelegatingModuleGenerator) { if (plugin instanceof DelegatingModuleGenerator) {
((DelegatingModuleGenerator) plugin).setFeedGenerator(this._parentGenerator); ((DelegatingModuleGenerator) plugin).setFeedGenerator(parentGenerator);
} }
this._pluginsMap.put(getKey(plugin), plugin); pluginsMap.put(getKey(plugin), plugin);
this._pluginsList.add(plugin); // to preserve the order of pluginsList.add(plugin); // to preserve the order of
// definition // definition
// in the rome.properties files // in the rome.properties files
} }
Iterator i = this._pluginsMap.values().iterator(); Iterator i = pluginsMap.values().iterator();
while (i.hasNext()) { while (i.hasNext()) {
finalPluginsList.add(i.next()); // to remove overridden plugin finalPluginsList.add(i.next()); // to remove overridden plugin
// impls // impls
} }
i = this._pluginsList.iterator(); i = pluginsList.iterator();
while (i.hasNext()) { while (i.hasNext()) {
final Object plugin = i.next(); final Object plugin = i.next();
if (!finalPluginsList.contains(plugin)) { if (!finalPluginsList.contains(plugin)) {
@ -144,7 +144,7 @@ public abstract class PluginManager {
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
final List classes = new ArrayList(); final List classes = new ArrayList();
final boolean useLoadClass = Boolean.valueOf(System.getProperty("rome.pluginmanager.useloadclass", "false")).booleanValue(); final boolean useLoadClass = Boolean.valueOf(System.getProperty("rome.pluginmanager.useloadclass", "false")).booleanValue();
for (final String _propertyValue : this._propertyValues) { for (final String _propertyValue : propertyValues) {
final Class mClass = useLoadClass ? classLoader.loadClass(_propertyValue) : Class.forName(_propertyValue, true, classLoader); final Class mClass = useLoadClass ? classLoader.loadClass(_propertyValue) : Class.forName(_propertyValue, true, classLoader);
classes.add(mClass); classes.add(mClass);
} }

View file

@ -56,7 +56,7 @@ public class PropertiesLoader {
} }
} }
private final Properties[] _properties; private final Properties[] properties;
/** /**
* Creates a PropertiesLoader. * Creates a PropertiesLoader.
@ -100,8 +100,8 @@ public class PropertiesLoader {
propertiesList.add(p); propertiesList.add(p);
} }
this._properties = new Properties[propertiesList.size()]; properties = new Properties[propertiesList.size()];
propertiesList.toArray(this._properties); propertiesList.toArray(properties);
} }
/** /**
@ -119,8 +119,8 @@ public class PropertiesLoader {
*/ */
public String[] getTokenizedProperty(final String key, final String separator) { public String[] getTokenizedProperty(final String key, final String separator) {
final List<String> entriesList = new ArrayList<String>(); final List<String> entriesList = new ArrayList<String>();
for (final Properties _propertie : this._properties) { for (final Properties property : properties) {
final String values = _propertie.getProperty(key); final String values = property.getProperty(key);
if (values != null) { if (values != null) {
final StringTokenizer st = new StringTokenizer(values, separator); final StringTokenizer st = new StringTokenizer(values, separator);
while (st.hasMoreTokens()) { while (st.hasMoreTokens()) {
@ -147,8 +147,8 @@ public class PropertiesLoader {
*/ */
public String[] getProperty(final String key) { public String[] getProperty(final String key) {
final List<String> entriesList = new ArrayList<String>(); final List<String> entriesList = new ArrayList<String>();
for (final Properties _propertie : this._properties) { for (final Properties property : properties) {
final String values = _propertie.getProperty(key); final String values = property.getProperty(key);
if (values != null) { if (values != null) {
entriesList.add(values); entriesList.add(values);
} }

View file

@ -28,7 +28,7 @@ import org.jdom2.Element;
* *
*/ */
public class RSS091NetscapeGenerator extends RSS091UserlandGenerator { public class RSS091NetscapeGenerator extends RSS091UserlandGenerator {
private String _version; private String version;
public RSS091NetscapeGenerator() { public RSS091NetscapeGenerator() {
this("rss_0.91N", "0.91"); this("rss_0.91N", "0.91");

View file

@ -38,7 +38,7 @@ import com.sun.syndication.io.FeedException;
* *
*/ */
public class RSS091UserlandGenerator extends RSS090Generator { public class RSS091UserlandGenerator extends RSS090Generator {
private final String _version; private final String version;
public RSS091UserlandGenerator() { public RSS091UserlandGenerator() {
this("rss_0.91U", "0.91"); this("rss_0.91U", "0.91");
@ -46,7 +46,7 @@ public class RSS091UserlandGenerator extends RSS090Generator {
protected RSS091UserlandGenerator(final String type, final String version) { protected RSS091UserlandGenerator(final String type, final String version) {
super(type); super(type);
this._version = version; this.version = version;
} }
@Override @Override
@ -62,7 +62,7 @@ public class RSS091UserlandGenerator extends RSS090Generator {
} }
protected String getVersion() { protected String getVersion() {
return this._version; return version;
} }
@Override @Override

View file

@ -33,14 +33,14 @@ public class XmlFixerReader extends Reader {
public XmlFixerReader(final Reader in) { public XmlFixerReader(final Reader in) {
super(in); super(in);
this.in = in; this.in = in;
this._buffer = new StringBuffer(); buffer = new StringBuffer();
this._state = 0; state = 0;
} }
private boolean trimmed; private boolean trimmed;
private final StringBuffer _buffer; private final StringBuffer buffer;
private int _bufferPos; private int bufferPos;
private int _state = 0; private int state = 0;
private boolean trimStream() throws IOException { private boolean trimStream() throws IOException {
boolean hasContent = true; boolean hasContent = true;
@ -50,7 +50,7 @@ public class XmlFixerReader extends Reader {
do { do {
switch (state) { switch (state) {
case 0: case 0:
c = this.in.read(); c = in.read();
if (c == -1) { if (c == -1) {
loop = false; loop = false;
hasContent = false; hasContent = false;
@ -58,114 +58,114 @@ public class XmlFixerReader extends Reader {
loop = true; loop = true;
} else if (c == '<') { } else if (c == '<') {
state = 1; state = 1;
this._buffer.setLength(0); buffer.setLength(0);
this._bufferPos = 0; bufferPos = 0;
this._buffer.append((char) c); buffer.append((char) c);
loop = true; loop = true;
} else { } else {
this._buffer.setLength(0); buffer.setLength(0);
this._bufferPos = 0; bufferPos = 0;
this._buffer.append((char) c); buffer.append((char) c);
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} }
break; break;
case 1: case 1:
c = this.in.read(); c = in.read();
if (c == -1) { if (c == -1) {
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} else if (c != '!') { } else if (c != '!') {
this._buffer.append((char) c); buffer.append((char) c);
this._state = 3; this.state = 3;
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} else { } else {
this._buffer.append((char) c); buffer.append((char) c);
state = 2; state = 2;
loop = true; loop = true;
} }
break; break;
case 2: case 2:
c = this.in.read(); c = in.read();
if (c == -1) { if (c == -1) {
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} else if (c == '-') { } else if (c == '-') {
this._buffer.append((char) c); buffer.append((char) c);
state = 3; state = 3;
loop = true; loop = true;
} else { } else {
this._buffer.append((char) c); buffer.append((char) c);
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} }
break; break;
case 3: case 3:
c = this.in.read(); c = in.read();
if (c == -1) { if (c == -1) {
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} else if (c == '-') { } else if (c == '-') {
this._buffer.append((char) c); buffer.append((char) c);
state = 4; state = 4;
loop = true; loop = true;
} else { } else {
this._buffer.append((char) c); buffer.append((char) c);
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} }
break; break;
case 4: case 4:
c = this.in.read(); c = in.read();
if (c == -1) { if (c == -1) {
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} else if (c != '-') { } else if (c != '-') {
this._buffer.append((char) c); buffer.append((char) c);
loop = true; loop = true;
} else { } else {
this._buffer.append((char) c); buffer.append((char) c);
state = 5; state = 5;
loop = true; loop = true;
} }
break; break;
case 5: case 5:
c = this.in.read(); c = in.read();
if (c == -1) { if (c == -1) {
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} else if (c != '-') { } else if (c != '-') {
this._buffer.append((char) c); buffer.append((char) c);
loop = true; loop = true;
state = 4; state = 4;
} else { } else {
this._buffer.append((char) c); buffer.append((char) c);
state = 6; state = 6;
loop = true; loop = true;
} }
break; break;
case 6: case 6:
c = this.in.read(); c = in.read();
if (c == -1) { if (c == -1) {
loop = false; loop = false;
hasContent = true; hasContent = true;
this._state = 3; this.state = 3;
} else if (c != '>') { } else if (c != '>') {
this._buffer.append((char) c); buffer.append((char) c);
loop = true; loop = true;
state = 4; state = 4;
} else { } else {
this._buffer.setLength(0); buffer.setLength(0);
state = 0; state = 0;
loop = true; loop = true;
} }
@ -180,24 +180,24 @@ public class XmlFixerReader extends Reader {
@Override @Override
public int read() throws IOException { public int read() throws IOException {
boolean loop; boolean loop;
if (!this.trimmed) { // trims XML stream if (!trimmed) { // trims XML stream
this.trimmed = true; trimmed = true;
if (!trimStream()) { if (!trimStream()) {
return -1; return -1;
} }
} }
int c; int c;
do { // converts literal entities to coded entities do { // converts literal entities to coded entities
switch (this._state) { switch (state) {
case 0: // reading chars from stream case 0: // reading chars from stream
c = this.in.read(); c = in.read();
if (c > -1) { if (c > -1) {
if (c == '&') { if (c == '&') {
this._state = 1; state = 1;
this._buffer.setLength(0); buffer.setLength(0);
this._bufferPos = 0; bufferPos = 0;
this._buffer.append((char) c); buffer.append((char) c);
this._state = 1; state = 1;
loop = true; loop = true;
} else { } else {
loop = false; loop = false;
@ -207,49 +207,49 @@ public class XmlFixerReader extends Reader {
} }
break; break;
case 1: // reading entity from stream case 1: // reading entity from stream
c = this.in.read(); c = in.read();
if (c > -1) { if (c > -1) {
if (c == ';') { if (c == ';') {
this._buffer.append((char) c); buffer.append((char) c);
this._state = 2; state = 2;
loop = true; loop = true;
} else if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '#' || c >= '0' && c <= '9') { } else if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '#' || c >= '0' && c <= '9') {
this._buffer.append((char) c); buffer.append((char) c);
loop = true; loop = true;
} else { } else {
// no ';' to match the '&' lets just make the '&' // no ';' to match the '&' lets just make the '&'
// a legal xml character entity '&amp;' // a legal xml character entity '&amp;'
this._buffer.insert(1, "amp;"); buffer.insert(1, "amp;");
this._buffer.append((char) c); buffer.append((char) c);
this._state = 3; state = 3;
loop = true; loop = true;
} }
} else { } else {
// no ';' to match the '&' lets just make the '&' // no ';' to match the '&' lets just make the '&'
// a legal xml character entity '&amp;' // a legal xml character entity '&amp;'
this._buffer.insert(1, "amp;"); buffer.insert(1, "amp;");
this._state = 3; state = 3;
loop = true; loop = true;
} }
break; break;
case 2: // replacing entity case 2: // replacing entity
c = 0; c = 0;
final String literalEntity = this._buffer.toString(); final String literalEntity = buffer.toString();
final String codedEntity = CODED_ENTITIES.get(literalEntity); final String codedEntity = CODED_ENTITIES.get(literalEntity);
if (codedEntity != null) { if (codedEntity != null) {
this._buffer.setLength(0); buffer.setLength(0);
this._buffer.append(codedEntity); buffer.append(codedEntity);
} // else we leave what was in the stream } // else we leave what was in the stream
this._state = 3; state = 3;
loop = true; loop = true;
break; break;
case 3: // consuming buffer case 3: // consuming buffer
if (this._bufferPos < this._buffer.length()) { if (bufferPos < buffer.length()) {
c = this._buffer.charAt(this._bufferPos++); c = buffer.charAt(bufferPos++);
loop = false; loop = false;
} else { } else {
c = 0; c = 0;
this._state = 0; state = 0;
loop = true; loop = true;
} }
break; break;
@ -292,7 +292,7 @@ public class XmlFixerReader extends Reader {
@Override @Override
public boolean ready() throws IOException { public boolean ready() throws IOException {
return this._state != 0 || this.in.ready(); return state != 0 || in.ready();
} }
@Override @Override
@ -312,7 +312,7 @@ public class XmlFixerReader extends Reader {
@Override @Override
public void close() throws IOException { public void close() throws IOException {
this.in.close(); in.close();
} }
private static Map<String, String> CODED_ENTITIES = new HashMap<String, String>(); private static Map<String, String> CODED_ENTITIES = new HashMap<String, String>();

View file

@ -19,19 +19,19 @@ import com.sun.syndication.io.WireFeedInput;
* *
*/ */
public abstract class FeedTest extends TestCase { public abstract class FeedTest extends TestCase {
private final String _feedFileName; private final String feedFileName;
private Document _jDomDoc = null; private Document jDomDoc = null;
private WireFeed _wireFeed = null; private WireFeed wireFeed = null;
private SyndFeed _syndFeed = null; private SyndFeed syndFeed = null;
private boolean preservingWireFeed = false; private boolean preservingWireFeed = false;
protected FeedTest(final String feedFileName) { protected FeedTest(final String feedFileName) {
this._feedFileName = feedFileName; this.feedFileName = feedFileName;
} }
protected String getFeedFileName() { protected String getFeedFileName() {
return this._feedFileName; return feedFileName;
} }
protected Reader getFeedReader() throws Exception { protected Reader getFeedReader() throws Exception {
@ -57,26 +57,26 @@ public abstract class FeedTest extends TestCase {
} }
protected Document getCachedJDomDoc() throws Exception { protected Document getCachedJDomDoc() throws Exception {
if (this._jDomDoc == null) { if (jDomDoc == null) {
this._jDomDoc = getJDomDoc(); jDomDoc = getJDomDoc();
} }
return this._jDomDoc; return jDomDoc;
} }
protected WireFeed getCachedWireFeed() throws Exception { protected WireFeed getCachedWireFeed() throws Exception {
if (this._wireFeed == null) { if (wireFeed == null) {
this._wireFeed = getWireFeed(); wireFeed = getWireFeed();
} }
return this._wireFeed; return wireFeed;
} }
protected SyndFeed getCachedSyndFeed(final boolean preserveWireFeed) throws Exception { protected SyndFeed getCachedSyndFeed(final boolean preserveWireFeed) throws Exception {
if (this._syndFeed == null || this.preservingWireFeed != preserveWireFeed) { if (syndFeed == null || preservingWireFeed != preserveWireFeed) {
this._syndFeed = getSyndFeed(preserveWireFeed); syndFeed = getSyndFeed(preserveWireFeed);
this.preservingWireFeed = preserveWireFeed; preservingWireFeed = preserveWireFeed;
} }
return this._syndFeed; return syndFeed;
} }

View file

@ -18,7 +18,7 @@ import com.sun.syndication.io.impl.DateParser;
* *
*/ */
public abstract class SyndFeedTest extends FeedTest { public abstract class SyndFeedTest extends FeedTest {
private String _prefix = null; private String prefix = null;
protected SyndFeedTest(final String feedType) { protected SyndFeedTest(final String feedType) {
this(feedType, feedType + ".xml"); this(feedType, feedType + ".xml");
@ -26,11 +26,11 @@ public abstract class SyndFeedTest extends FeedTest {
protected SyndFeedTest(final String feedType, final String feedFileName) { protected SyndFeedTest(final String feedType, final String feedFileName) {
super(feedFileName); super(feedFileName);
this._prefix = feedType; prefix = feedType;
} }
protected String getPrefix() { protected String getPrefix() {
return this._prefix; return prefix;
} }
protected void assertProperty(final String property, final String value) { protected void assertProperty(final String property, final String value) {
@ -38,7 +38,7 @@ public abstract class SyndFeedTest extends FeedTest {
} }
protected void assertEqualsStr(final String expected, final String actual) { protected void assertEqualsStr(final String expected, final String actual) {
assertEquals(this._prefix + "." + expected, actual); assertEquals(prefix + "." + expected, actual);
} }
public void testPreserveWireFeed() throws Exception { public void testPreserveWireFeed() throws Exception {

View file

@ -6,24 +6,24 @@ import com.sun.syndication.io.impl.Base64;
public class TestBase64 extends TestCase { public class TestBase64 extends TestCase {
private void _testEncodeDecode(final String s) { private void testEncodeDecode(final String s) {
final String encoded = Base64.encode(s); final String encoded = Base64.encode(s);
final String decoded = Base64.decode(encoded); final String decoded = Base64.decode(encoded);
assertEquals(s, decoded); assertEquals(s, decoded);
} }
public void testEncodeDecode() { public void testEncodeDecode() {
_testEncodeDecode(""); testEncodeDecode("");
_testEncodeDecode("A"); testEncodeDecode("A");
_testEncodeDecode("AB"); testEncodeDecode("AB");
_testEncodeDecode("ABC"); testEncodeDecode("ABC");
_testEncodeDecode("ABCD"); testEncodeDecode("ABCD");
_testEncodeDecode("ABCDE"); testEncodeDecode("ABCDE");
_testEncodeDecode("&"); testEncodeDecode("&");
_testEncodeDecode("a&"); testEncodeDecode("a&");
_testEncodeDecode("ab&"); testEncodeDecode("ab&");
_testEncodeDecode("abc&"); testEncodeDecode("abc&");
_testEncodeDecode("abcd&"); testEncodeDecode("abcd&");
} }

View file

@ -52,7 +52,7 @@ public class TestSyndFeedAtom03 extends SyndFeedTest {
assertEquals(this.getCachedSyndFeed().getPublishedDate(), d); assertEquals(this.getCachedSyndFeed().getPublishedDate(), d);
} }
protected void _testEntry(final int i) throws Exception { protected void testEntry(final int i) throws Exception {
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
assertProperty(entry.getTitle(), "feed.entry[" + i + "].title"); assertProperty(entry.getTitle(), "feed.entry[" + i + "].title");
@ -66,11 +66,11 @@ public class TestSyndFeedAtom03 extends SyndFeedTest {
} }
public void testEntry0() throws Exception { public void testEntry0() throws Exception {
_testEntry(0); testEntry(0);
} }
public void testEntry1() throws Exception { public void testEntry1() throws Exception {
_testEntry(1); testEntry(1);
} }
@Override @Override

View file

@ -43,10 +43,10 @@ public class TestSyndFeedAtom03DCSyModules extends TestSyndFeedAtom03 {
public void testFeedDCModule() throws Exception { public void testFeedDCModule() throws Exception {
final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI); final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI);
_testDCModule(dc, "feed.", false, 0); testDCModule(dc, "feed.", false, 0);
} }
protected void _testDCModule(final DCModule dc, final String prefix, final boolean isEntry, final int index) throws Exception { protected void testDCModule(final DCModule dc, final String prefix, final boolean isEntry, final int index) throws Exception {
assertNotNull(dc); assertNotNull(dc);
assertProperty(dc.getTitle(), prefix + "dc:title"); assertProperty(dc.getTitle(), prefix + "dc:title");
@ -98,15 +98,15 @@ public class TestSyndFeedAtom03DCSyModules extends TestSyndFeedAtom03 {
} }
public void testEntriesDCModule() throws Exception { public void testEntriesDCModule() throws Exception {
_testEntryDCModule(0); testEntryDCModule(0);
_testEntryDCModule(1); testEntryDCModule(1);
} }
protected void _testEntryDCModule(final int i) throws Exception { protected void testEntryDCModule(final int i) throws Exception {
final List<SyndEntry> entries = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> entries = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = entries.get(i); final SyndEntry entry = entries.get(i);
final DCModule dc = (DCModule) entry.getModule(DCModule.URI); final DCModule dc = (DCModule) entry.getModule(DCModule.URI);
_testDCModule(dc, "feed.entry[" + i + "].", true, i); testDCModule(dc, "feed.entry[" + i + "].", true, i);
} }

View file

@ -73,7 +73,7 @@ public class TestSyndFeedAtom10 extends TestSyndFeedAtom03 {
} }
@Override @Override
protected void _testEntry(final int i) throws Exception { protected void testEntry(final int i) throws Exception {
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
@ -111,12 +111,12 @@ public class TestSyndFeedAtom10 extends TestSyndFeedAtom03 {
@Override @Override
public void testEntry0() throws Exception { public void testEntry0() throws Exception {
_testEntry(0); testEntry(0);
} }
@Override @Override
public void testEntry1() throws Exception { public void testEntry1() throws Exception {
_testEntry(1); testEntry(1);
} }
@Override @Override

View file

@ -53,24 +53,24 @@ public class TestSyndFeedRSS090 extends SyndFeedTest {
assertProperty(this.getCachedSyndFeed().getImage().getLink(), "image.link"); assertProperty(this.getCachedSyndFeed().getImage().getLink(), "image.link");
} }
protected void _testItem(final int i) throws Exception { protected void testItem(final int i) throws Exception {
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
assertProperty(entry.getTitle(), "item[" + i + "].title"); assertProperty(entry.getTitle(), "item[" + i + "].title");
assertProperty(entry.getLink(), "item[" + i + "].link"); assertProperty(entry.getLink(), "item[" + i + "].link");
_testUri(entry, i); testUri(entry, i);
} }
public void testItem0() throws Exception { public void testItem0() throws Exception {
_testItem(0); testItem(0);
} }
public void testItem1() throws Exception { public void testItem1() throws Exception {
_testItem(1); testItem(1);
} }
protected void _testUri(final SyndEntry entry, final int i) throws Exception { protected void testUri(final SyndEntry entry, final int i) throws Exception {
assertProperty(entry.getUri(), "item[" + i + "].link"); assertProperty(entry.getUri(), "item[" + i + "].link");
} }

View file

@ -63,7 +63,7 @@ public class TestSyndFeedRSS091N extends SyndFeedTest {
assertProperty(this.getCachedSyndFeed().getImage().getDescription(), "channel.image.description"); assertProperty(this.getCachedSyndFeed().getImage().getDescription(), "channel.image.description");
} }
protected void _testItem(final int i) throws Exception { protected void testItem(final int i) throws Exception {
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
assertProperty(entry.getTitle(), "channel.item[" + i + "].title"); assertProperty(entry.getTitle(), "channel.item[" + i + "].title");
@ -71,7 +71,7 @@ public class TestSyndFeedRSS091N extends SyndFeedTest {
assertProperty(entry.getDescription().getValue(), "channel.item[" + i + "].description"); assertProperty(entry.getDescription().getValue(), "channel.item[" + i + "].description");
} }
protected void _testUri(final SyndEntry entry, final int i) throws Exception { protected void testUri(final SyndEntry entry, final int i) throws Exception {
assertProperty(entry.getUri(), "channel.item[" + i + "].link"); assertProperty(entry.getUri(), "channel.item[" + i + "].link");
} }

View file

@ -31,19 +31,19 @@ public class TestSyndFeedRSS092 extends TestSyndFeedRSS091N {
} }
@Override @Override
protected void _testItem(final int i) throws Exception { protected void testItem(final int i) throws Exception {
super._testItem(i); super.testItem(i);
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
assertProperty(entry.getTitle(), "channel.item[" + i + "].title"); assertProperty(entry.getTitle(), "channel.item[" + i + "].title");
assertProperty(entry.getLink(), "channel.item[" + i + "].link"); assertProperty(entry.getLink(), "channel.item[" + i + "].link");
assertProperty(entry.getDescription().getValue(), "channel.item[" + i + "].description"); assertProperty(entry.getDescription().getValue(), "channel.item[" + i + "].description");
_testCategories(entry.getCategories(), "channel.item[" + i + "]"); testCategories(entry.getCategories(), "channel.item[" + i + "]");
_testEnclosures(entry.getEnclosures(), "channel.item[" + i + "]"); testEnclosures(entry.getEnclosures(), "channel.item[" + i + "]");
} }
protected void _testCategories(final List<SyndCategory> cats, final String prefix) throws Exception { protected void testCategories(final List<SyndCategory> cats, final String prefix) throws Exception {
final Set<String> s1 = new HashSet<String>(); final Set<String> s1 = new HashSet<String>();
final Set<String> s2 = new HashSet<String>(); final Set<String> s2 = new HashSet<String>();
for (int i = 0; i < cats.size(); i++) { for (int i = 0; i < cats.size(); i++) {
@ -54,7 +54,7 @@ public class TestSyndFeedRSS092 extends TestSyndFeedRSS091N {
assertTrue(s1.equals(s2)); assertTrue(s1.equals(s2));
} }
protected void _testEnclosures(final List<SyndEnclosure> encs, final String prefix) throws Exception { protected void testEnclosures(final List<SyndEnclosure> encs, final String prefix) throws Exception {
final Set<String> s1 = new HashSet<String>(); final Set<String> s1 = new HashSet<String>();
final Set<String> s2 = new HashSet<String>(); final Set<String> s2 = new HashSet<String>();
for (int i = 0; i < encs.size(); i++) { for (int i = 0; i < encs.size(); i++) {

View file

@ -17,7 +17,7 @@ public class TestSyndFeedRSS092Alt extends TestSyndFeedRSS092 {
} }
@Override @Override
protected void _testEnclosures(final List<SyndEnclosure> encs, final String prefix) throws Exception { protected void testEnclosures(final List<SyndEnclosure> encs, final String prefix) throws Exception {
final Set<String> s1 = new HashSet<String>(); final Set<String> s1 = new HashSet<String>();
final Set<String> s2 = new HashSet<String>(); final Set<String> s2 = new HashSet<String>();
for (int i = 0; i < encs.size(); i++) { for (int i = 0; i < encs.size(); i++) {

View file

@ -29,16 +29,16 @@ public class TestSyndFeedRSS093 extends TestSyndFeedRSS092 {
} }
@Override @Override
protected void _testItem(final int i) throws Exception { protected void testItem(final int i) throws Exception {
super._testItem(i); super.testItem(i);
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
final Date d = DateParser.parseRFC822("Mon, 0" + (i + 1) + " Jan 2001 00:00:00 GMT"); final Date d = DateParser.parseRFC822("Mon, 0" + (i + 1) + " Jan 2001 00:00:00 GMT");
assertEquals(entry.getPublishedDate(), d); assertEquals(entry.getPublishedDate(), d);
_testDescriptionType(entry, i); testDescriptionType(entry, i);
} }
protected void _testDescriptionType(final SyndEntry entry, final int i) throws Exception { protected void testDescriptionType(final SyndEntry entry, final int i) throws Exception {
assertProperty(entry.getDescription().getType(), "channel.item[" + i + "].description^type"); assertProperty(entry.getDescription().getType(), "channel.item[" + i + "].description^type");
} }

View file

@ -26,16 +26,16 @@ public class TestSyndFeedRSS094 extends TestSyndFeedRSS093 {
} }
public void testCategories() throws Exception { public void testCategories() throws Exception {
_testCategories(this.getCachedSyndFeed().getCategories(), "channel"); testCategories(this.getCachedSyndFeed().getCategories(), "channel");
} }
@Override @Override
protected void _testDescriptionType(final SyndEntry entry, final int i) throws Exception { protected void testDescriptionType(final SyndEntry entry, final int i) throws Exception {
} }
@Override @Override
protected void _testItem(final int i) throws Exception { protected void testItem(final int i) throws Exception {
super._testItem(i); super.testItem(i);
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
@ -45,7 +45,7 @@ public class TestSyndFeedRSS094 extends TestSyndFeedRSS093 {
} }
@Override @Override
protected void _testUri(final SyndEntry entry, final int i) throws Exception { protected void testUri(final SyndEntry entry, final int i) throws Exception {
assertProperty(entry.getUri(), "channel.item[" + i + "].guid"); assertProperty(entry.getUri(), "channel.item[" + i + "].guid");
} }
} }

View file

@ -31,8 +31,8 @@ public class TestSyndFeedRSS10 extends TestSyndFeedRSS090 {
} }
@Override @Override
protected void _testItem(final int i) throws Exception { protected void testItem(final int i) throws Exception {
super._testItem(i); super.testItem(i);
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
assertProperty(entry.getDescription().getValue(), "item[" + i + "].description"); assertProperty(entry.getDescription().getValue(), "item[" + i + "].description");
@ -40,7 +40,7 @@ public class TestSyndFeedRSS10 extends TestSyndFeedRSS090 {
} }
@Override @Override
protected void _testUri(final SyndEntry entry, final int i) throws Exception { protected void testUri(final SyndEntry entry, final int i) throws Exception {
assertProperty(entry.getUri(), "channel.items[" + i + "]^rdf:resource"); assertProperty(entry.getUri(), "channel.items[" + i + "]^rdf:resource");
} }
} }

View file

@ -29,10 +29,10 @@ public class TestSyndFeedRSS10DCMulti extends TestSyndFeedRSS10 {
public void testChannelDCModule() throws Exception { public void testChannelDCModule() throws Exception {
final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI); final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI);
_testDCModule(dc, "channel."); testDCModule(dc, "channel.");
} }
protected void _testDCModule(final DCModule dc, final String prefix) throws Exception { protected void testDCModule(final DCModule dc, final String prefix) throws Exception {
assertNotNull(dc); assertNotNull(dc);
assertProperty(dc.getTitles().get(0), prefix + "dc:title[0]"); assertProperty(dc.getTitles().get(0), prefix + "dc:title[0]");
@ -90,14 +90,14 @@ public class TestSyndFeedRSS10DCMulti extends TestSyndFeedRSS10 {
} }
public void testItemsDCModule() throws Exception { public void testItemsDCModule() throws Exception {
_testItemDCModule(0); testItemDCModule(0);
_testItemDCModule(1); testItemDCModule(1);
} }
protected void _testItemDCModule(final int i) throws Exception { protected void testItemDCModule(final int i) throws Exception {
final List<SyndEntry> entries = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> entries = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = entries.get(i); final SyndEntry entry = entries.get(i);
final DCModule dc = (DCModule) entry.getModule(DCModule.URI); final DCModule dc = (DCModule) entry.getModule(DCModule.URI);
_testDCModule(dc, "item[" + i + "]."); testDCModule(dc, "item[" + i + "].");
} }
} }

View file

@ -36,10 +36,10 @@ public class TestSyndFeedRSS10DCSyModules extends TestSyndFeedRSS10 {
public void testChannelDCModule() throws Exception { public void testChannelDCModule() throws Exception {
final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI); final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI);
_testDCModule(dc, "channel."); testDCModule(dc, "channel.");
} }
protected void _testDCModule(final DCModule dc, final String prefix) throws Exception { protected void testDCModule(final DCModule dc, final String prefix) throws Exception {
assertNotNull(dc); assertNotNull(dc);
assertProperty(dc.getTitle(), prefix + "dc:title"); assertProperty(dc.getTitle(), prefix + "dc:title");
assertProperty(dc.getCreator(), prefix + "dc:creator"); assertProperty(dc.getCreator(), prefix + "dc:creator");
@ -79,15 +79,15 @@ public class TestSyndFeedRSS10DCSyModules extends TestSyndFeedRSS10 {
} }
public void testItemsDCModule() throws Exception { public void testItemsDCModule() throws Exception {
_testItemDCModule(0); testItemDCModule(0);
_testItemDCModule(1); testItemDCModule(1);
} }
protected void _testItemDCModule(final int i) throws Exception { protected void testItemDCModule(final int i) throws Exception {
final List<SyndEntry> entries = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> entries = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = entries.get(i); final SyndEntry entry = entries.get(i);
final DCModule dc = (DCModule) entry.getModule(DCModule.URI); final DCModule dc = (DCModule) entry.getModule(DCModule.URI);
_testDCModule(dc, "item[" + i + "]."); testDCModule(dc, "item[" + i + "].");
} }

View file

@ -30,8 +30,8 @@ public class TestSyndFeedRSS20 extends TestSyndFeedRSS094 {
} }
@Override @Override
protected void _testItem(final int i) throws Exception { protected void testItem(final int i) throws Exception {
super._testItem(i); super.testItem(i);
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
assertProperty(entry.getContents().get(0).getValue(), "channel.item[" + i + "].content"); assertProperty(entry.getContents().get(0).getValue(), "channel.item[" + i + "].content");

View file

@ -41,39 +41,39 @@ public class TestXmlFixerReader extends TestCase {
private static final String XML_PROLOG = "<?xml version=\"1.0\" ?>"; private static final String XML_PROLOG = "<?xml version=\"1.0\" ?>";
public void testTrim() throws Exception { public void testTrim() throws Exception {
_testValidTrim("", "<hello></hello>"); testValidTrim("", "<hello></hello>");
_testValidTrim("", XML_PROLOG + "<hello></hello>"); testValidTrim("", XML_PROLOG + "<hello></hello>");
_testValidTrim(" ", "<hello></hello>"); testValidTrim(" ", "<hello></hello>");
_testValidTrim(" ", XML_PROLOG + "<hello></hello>"); testValidTrim(" ", XML_PROLOG + "<hello></hello>");
_testValidTrim(" \n", "<hello></hello>"); testValidTrim(" \n", "<hello></hello>");
_testValidTrim(" \n", XML_PROLOG + "<hello></hello>"); testValidTrim(" \n", XML_PROLOG + "<hello></hello>");
_testValidTrim("<!-- - -- -->", "<hello></hello>"); testValidTrim("<!-- - -- -->", "<hello></hello>");
_testValidTrim("<!-- - -- -->", XML_PROLOG + "<hello></hello>"); testValidTrim("<!-- - -- -->", XML_PROLOG + "<hello></hello>");
_testValidTrim(" <!-- - -- -->", "<hello></hello>"); testValidTrim(" <!-- - -- -->", "<hello></hello>");
_testValidTrim(" <!-- - -- -->", XML_PROLOG + "<hello></hello>"); testValidTrim(" <!-- - -- -->", XML_PROLOG + "<hello></hello>");
_testValidTrim(" <!-- - -- --> ", "<hello></hello>"); testValidTrim(" <!-- - -- --> ", "<hello></hello>");
_testValidTrim(" <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testValidTrim(" <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
_testValidTrim(" <!-- - -- --> <!-- - -- --> ", "<hello></hello>"); testValidTrim(" <!-- - -- --> <!-- - -- --> ", "<hello></hello>");
_testValidTrim(" <!-- - -- --> <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testValidTrim(" <!-- - -- --> <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
_testValidTrim(" <!-- - -- --> \n <!-- - -- --> ", "<hello></hello>"); testValidTrim(" <!-- - -- --> \n <!-- - -- --> ", "<hello></hello>");
_testValidTrim(" <!-- - -- --> \n <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testValidTrim(" <!-- - -- --> \n <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
_testInvalidTrim("x", "<hello></hello>"); testInvalidTrim("x", "<hello></hello>");
_testInvalidTrim("x", XML_PROLOG + "<hello></hello>"); testInvalidTrim("x", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" x", "<hello></hello>"); testInvalidTrim(" x", "<hello></hello>");
_testInvalidTrim(" x", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" x", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" x\n", "<hello></hello>"); testInvalidTrim(" x\n", "<hello></hello>");
_testInvalidTrim(" x\n", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" x\n", XML_PROLOG + "<hello></hello>");
_testInvalidTrim("<!-- - -- - ->", "<hello></hello>"); testInvalidTrim("<!-- - -- - ->", "<hello></hello>");
_testInvalidTrim("<!-- - -- - ->", XML_PROLOG + "<hello></hello>"); testInvalidTrim("<!-- - -- - ->", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" <!-- - -- -- >", "<hello></hello>"); testInvalidTrim(" <!-- - -- -- >", "<hello></hello>");
_testInvalidTrim(" <!-- - -- -- >", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" <!-- - -- -- >", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" <!-- - -- -->x ", "<hello></hello>"); testInvalidTrim(" <!-- - -- -->x ", "<hello></hello>");
_testInvalidTrim(" <!-- - -- -->x ", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" <!-- - -- -->x ", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" <!-- - -- --> x <!-- - -- --> ", "<hello></hello>"); testInvalidTrim(" <!-- - -- --> x <!-- - -- --> ", "<hello></hello>");
_testInvalidTrim(" <!-- - -- --> x <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" <!-- - -- --> x <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", "<hello></hello>"); testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", "<hello></hello>");
_testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
} }
public void testAmpHandling() throws Exception { public void testAmpHandling() throws Exception {
@ -85,40 +85,40 @@ public class TestXmlFixerReader extends TestCase {
} }
public void testHtmlEntities() throws Exception { public void testHtmlEntities() throws Exception {
_testValidEntities("<hello></hello>"); testValidEntities("<hello></hello>");
_testValidEntities(XML_PROLOG + "<hello></hello>"); testValidEntities(XML_PROLOG + "<hello></hello>");
_testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello></hello>"); testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello></hello>");
_testValidEntities("<hello>&apos;&yen;&#250;&yen;</hello>"); testValidEntities("<hello>&apos;&yen;&#250;&yen;</hello>");
_testValidEntities(XML_PROLOG + "<hello>&apos;&yen;&#250;&yen;</hello>"); testValidEntities(XML_PROLOG + "<hello>&apos;&yen;&#250;&yen;</hello>");
_testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yen;&#250;&yen;</hello>"); testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yen;&#250;&yen;</hello>");
_testValidEntities("<hello>&Pi;&Rho;#913;&Rho;</hello>"); testValidEntities("<hello>&Pi;&Rho;#913;&Rho;</hello>");
_testValidEntities(XML_PROLOG + "<hello>&Pi;&Rho;&#913;&Rho;</hello>"); testValidEntities(XML_PROLOG + "<hello>&Pi;&Rho;&#913;&Rho;</hello>");
_testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rho;&#913;&Rho;</hello>"); testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rho;&#913;&Rho;</hello>");
_testValidEntities("<hello>&OElig;&mdash;&#8211;&mdash;</hello>"); testValidEntities("<hello>&OElig;&mdash;&#8211;&mdash;</hello>");
_testValidEntities(XML_PROLOG + "<hello>&OElig;&mdash;&#8211;&mdash;</hello>"); testValidEntities(XML_PROLOG + "<hello>&OElig;&mdash;&#8211;&mdash;</hello>");
_testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&OElig;&mdash;&#8211;&mdash;</hello>"); testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&OElig;&mdash;&#8211;&mdash;</hello>");
_testInvalidEntities("<hello>&apos;&yexn;&#250;&yen;</hello>"); testInvalidEntities("<hello>&apos;&yexn;&#250;&yen;</hello>");
_testInvalidEntities(XML_PROLOG + "<hello>&apos;&yexn;&#250;&yen;</hello>"); testInvalidEntities(XML_PROLOG + "<hello>&apos;&yexn;&#250;&yen;</hello>");
_testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yexn;&#250;&yen;</hello>"); testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yexn;&#250;&yen;</hello>");
_testInvalidEntities("<hello>&Pi;&Rhox;#913;&Rho;</hello>"); testInvalidEntities("<hello>&Pi;&Rhox;#913;&Rho;</hello>");
_testInvalidEntities(XML_PROLOG + "<hello>&Pi;&Rhox;&#913;&Rho;</hello>"); testInvalidEntities(XML_PROLOG + "<hello>&Pi;&Rhox;&#913;&Rho;</hello>");
_testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rhox;&#913;&Rho;</hello>"); testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rhox;&#913;&Rho;</hello>");
_testInvalidEntities("<hello>&apos;&yen;&#2x50;&yen;</hello>"); testInvalidEntities("<hello>&apos;&yen;&#2x50;&yen;</hello>");
_testInvalidEntities(XML_PROLOG + "<hello>&apos;&yen;&#2x50;&yen;</hello>"); testInvalidEntities(XML_PROLOG + "<hello>&apos;&yen;&#2x50;&yen;</hello>");
_testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yen;&#2x50;&yen;</hello>"); testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yen;&#2x50;&yen;</hello>");
_testInvalidEntities("<hello>&Pi;&Rho;&#9x13;&Rho;</hello>"); testInvalidEntities("<hello>&Pi;&Rho;&#9x13;&Rho;</hello>");
_testInvalidEntities(XML_PROLOG + "<hello>&Pi;&Rho;&#9x13;&Rho;</hello>"); testInvalidEntities(XML_PROLOG + "<hello>&Pi;&Rho;&#9x13;&Rho;</hello>");
_testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rho;&#9x13;&Rho;</hello>"); testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rho;&#9x13;&Rho;</hello>");
} }
protected void _testXmlParse(final String garbish, final String xmlDoc) throws Exception { protected void testXmlParse(final String garbish, final String xmlDoc) throws Exception {
final InputStream is = getStream(garbish, xmlDoc); final InputStream is = getStream(garbish, xmlDoc);
Reader reader = new XmlReader(is); Reader reader = new XmlReader(is);
reader = new XmlFixerReader(reader); reader = new XmlFixerReader(reader);
@ -126,25 +126,25 @@ public class TestXmlFixerReader extends TestCase {
saxBuilder.build(reader); saxBuilder.build(reader);
} }
protected void _testValidTrim(final String garbish, final String xmlDoc) throws Exception { protected void testValidTrim(final String garbish, final String xmlDoc) throws Exception {
_testXmlParse(garbish, xmlDoc); testXmlParse(garbish, xmlDoc);
} }
protected void _testInvalidTrim(final String garbish, final String xmlDoc) throws Exception { protected void testInvalidTrim(final String garbish, final String xmlDoc) throws Exception {
try { try {
_testXmlParse(garbish, xmlDoc); testXmlParse(garbish, xmlDoc);
assertTrue(false); assertTrue(false);
} catch (final Exception ex) { } catch (final Exception ex) {
} }
} }
protected void _testValidEntities(final String xmlDoc) throws Exception { protected void testValidEntities(final String xmlDoc) throws Exception {
_testXmlParse("", xmlDoc); testXmlParse("", xmlDoc);
} }
protected void _testInvalidEntities(final String xmlDoc) throws Exception { protected void testInvalidEntities(final String xmlDoc) throws Exception {
try { try {
_testXmlParse("", xmlDoc); testXmlParse("", xmlDoc);
assertTrue(false); assertTrue(false);
} catch (final Exception ex) { } catch (final Exception ex) {
} }

View file

@ -48,7 +48,7 @@ public class TestXmlReader extends TestCase {
test.testHttp(); test.testHttp();
} }
protected void _testRawNoBomValid(final String encoding) throws Exception { protected void testRawNoBomValid(final String encoding) throws Exception {
InputStream is = getXmlStream("no-bom", XML1, encoding, encoding); InputStream is = getXmlStream("no-bom", XML1, encoding, encoding);
XmlReader xmlReader = new XmlReader(is, false); XmlReader xmlReader = new XmlReader(is, false);
assertEquals(xmlReader.getEncoding(), "UTF-8"); assertEquals(xmlReader.getEncoding(), "UTF-8");
@ -70,7 +70,7 @@ public class TestXmlReader extends TestCase {
assertEquals(xmlReader.getEncoding(), encoding); assertEquals(xmlReader.getEncoding(), encoding);
} }
protected void _testRawNoBomInvalid(final String encoding) throws Exception { protected void testRawNoBomInvalid(final String encoding) throws Exception {
final InputStream is = getXmlStream("no-bom", XML3, encoding, encoding); final InputStream is = getXmlStream("no-bom", XML3, encoding, encoding);
try { try {
final XmlReader xmlReader = new XmlReader(is, false); final XmlReader xmlReader = new XmlReader(is, false);
@ -81,12 +81,12 @@ public class TestXmlReader extends TestCase {
} }
public void testRawNoBom() throws Exception { public void testRawNoBom() throws Exception {
_testRawNoBomValid("US-ASCII"); testRawNoBomValid("US-ASCII");
_testRawNoBomValid("UTF-8"); testRawNoBomValid("UTF-8");
_testRawNoBomValid("ISO-8859-1"); testRawNoBomValid("ISO-8859-1");
} }
protected void _testRawBomValid(final String encoding) throws Exception { protected void testRawBomValid(final String encoding) throws Exception {
final InputStream is = getXmlStream(encoding + "-bom", XML3, encoding, encoding); final InputStream is = getXmlStream(encoding + "-bom", XML3, encoding, encoding);
final XmlReader xmlReader = new XmlReader(is, false); final XmlReader xmlReader = new XmlReader(is, false);
if (!encoding.equals("UTF-16")) { if (!encoding.equals("UTF-16")) {
@ -96,7 +96,7 @@ public class TestXmlReader extends TestCase {
} }
} }
protected void _testRawBomInvalid(final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { protected void testRawBomInvalid(final String bomEnc, final String streamEnc, final String prologEnc) throws Exception {
final InputStream is = getXmlStream(bomEnc, XML3, streamEnc, prologEnc); final InputStream is = getXmlStream(bomEnc, XML3, streamEnc, prologEnc);
try { try {
final XmlReader xmlReader = new XmlReader(is, false); final XmlReader xmlReader = new XmlReader(is, false);
@ -107,83 +107,83 @@ public class TestXmlReader extends TestCase {
} }
public void testRawBom() throws Exception { public void testRawBom() throws Exception {
_testRawBomValid("UTF-8"); testRawBomValid("UTF-8");
_testRawBomValid("UTF-16BE"); testRawBomValid("UTF-16BE");
_testRawBomValid("UTF-16LE"); testRawBomValid("UTF-16LE");
_testRawBomValid("UTF-16"); testRawBomValid("UTF-16");
_testRawBomInvalid("UTF-8-bom", "US-ASCII", "US-ASCII"); testRawBomInvalid("UTF-8-bom", "US-ASCII", "US-ASCII");
_testRawBomInvalid("UTF-8-bom", "ISO-8859-1", "ISO-8859-1"); testRawBomInvalid("UTF-8-bom", "ISO-8859-1", "ISO-8859-1");
_testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16"); testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16");
_testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16BE"); testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16BE");
_testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16LE"); testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16LE");
_testRawBomInvalid("UTF-16BE-bom", "UTF-16BE", "UTF-16LE"); testRawBomInvalid("UTF-16BE-bom", "UTF-16BE", "UTF-16LE");
_testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-16BE"); testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-16BE");
_testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-8"); testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-8");
} }
public void testHttp() throws Exception { public void testHttp() throws Exception {
_testHttpValid("application/xml", "no-bom", "US-ASCII", null); testHttpValid("application/xml", "no-bom", "US-ASCII", null);
_testHttpValid("application/xml", "UTF-8-bom", "US-ASCII", null); testHttpValid("application/xml", "UTF-8-bom", "US-ASCII", null);
_testHttpValid("application/xml", "UTF-8-bom", "UTF-8", null); testHttpValid("application/xml", "UTF-8-bom", "UTF-8", null);
_testHttpValid("application/xml", "UTF-8-bom", "UTF-8", "UTF-8"); testHttpValid("application/xml", "UTF-8-bom", "UTF-8", "UTF-8");
_testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null); testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null);
_testHttpValid("application/xml;charset=\"UTF-8\"", "UTF-8-bom", "UTF-8", null); testHttpValid("application/xml;charset=\"UTF-8\"", "UTF-8-bom", "UTF-8", null);
_testHttpValid("application/xml;charset='UTF-8'", "UTF-8-bom", "UTF-8", null); testHttpValid("application/xml;charset='UTF-8'", "UTF-8-bom", "UTF-8", null);
_testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8"); testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8");
_testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null); testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null);
_testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16");
_testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE");
_testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null); testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null);
_testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16");
_testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE");
_testHttpInvalid("application/xml", "UTF-8-bom", "US-ASCII", "US-ASCII"); testHttpInvalid("application/xml", "UTF-8-bom", "US-ASCII", "US-ASCII");
_testHttpInvalid("application/xml;charset=UTF-16", "UTF-16LE", "UTF-8", "UTF-8"); testHttpInvalid("application/xml;charset=UTF-16", "UTF-16LE", "UTF-8", "UTF-8");
_testHttpInvalid("application/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE"); testHttpInvalid("application/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE");
_testHttpValid("text/xml", "no-bom", "US-ASCII", null); testHttpValid("text/xml", "no-bom", "US-ASCII", null);
_testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8"); testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8");
_testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null); testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null);
_testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null); testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null);
_testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16");
_testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE");
_testHttpValid("text/xml", "UTF-8-bom", "US-ASCII", null); testHttpValid("text/xml", "UTF-8-bom", "US-ASCII", null);
_testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, null); testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, null);
_testAlternateDefaultEncoding("application/xml", "no-bom", "US-ASCII", null, "US-ASCII"); testAlternateDefaultEncoding("application/xml", "no-bom", "US-ASCII", null, "US-ASCII");
_testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, "UTF-8"); testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, "UTF-8");
_testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, null); testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, null);
_testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "US-ASCII"); testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "US-ASCII");
_testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "UTF-8"); testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "UTF-8");
_testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null); testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null);
_testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16");
_testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE");
_testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE"); testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE");
_testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null); testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null);
_testHttpLenient("text/xml", "no-bom", "US-ASCII", null, "US-ASCII"); testHttpLenient("text/xml", "no-bom", "US-ASCII", null, "US-ASCII");
_testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8", "UTF-8"); testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8", "UTF-8");
_testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null, "UTF-8"); testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null, "UTF-8");
_testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE"); testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE");
_testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16"); testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16");
_testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE");
_testHttpLenient("text/xml", "UTF-8-bom", "US-ASCII", null, "US-ASCII"); testHttpLenient("text/xml", "UTF-8-bom", "US-ASCII", null, "US-ASCII");
_testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE"); testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE");
_testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16"); testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16");
_testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE");
_testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE");
_testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null, "UTF-16"); testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null, "UTF-16");
_testHttpLenient("text/html", "no-bom", "US-ASCII", "US-ASCII", "US-ASCII"); testHttpLenient("text/html", "no-bom", "US-ASCII", "US-ASCII", "US-ASCII");
_testHttpLenient("text/html", "no-bom", "US-ASCII", null, "US-ASCII"); testHttpLenient("text/html", "no-bom", "US-ASCII", null, "US-ASCII");
_testHttpLenient("text/html;charset=UTF-8", "no-bom", "US-ASCII", "UTF-8", "UTF-8"); testHttpLenient("text/html;charset=UTF-8", "no-bom", "US-ASCII", "UTF-8", "UTF-8");
_testHttpLenient("text/html;charset=UTF-16BE", "no-bom", "US-ASCII", "UTF-8", "UTF-8"); testHttpLenient("text/html;charset=UTF-16BE", "no-bom", "US-ASCII", "UTF-8", "UTF-8");
} }
public void _testAlternateDefaultEncoding(final String cT, final String bomEnc, final String streamEnc, final String prologEnc, final String alternateEnc) public void testAlternateDefaultEncoding(final String cT, final String bomEnc, final String streamEnc, final String prologEnc, final String alternateEnc)
throws Exception { throws Exception {
try { try {
final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML1 : XML3, streamEnc, prologEnc); final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML1 : XML3, streamEnc, prologEnc);
@ -201,7 +201,7 @@ public class TestXmlReader extends TestCase {
} }
} }
public void _testHttpValid(final String cT, final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { public void testHttpValid(final String cT, final String bomEnc, final String streamEnc, final String prologEnc) throws Exception {
final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML1 : XML3, streamEnc, prologEnc); final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML1 : XML3, streamEnc, prologEnc);
final XmlReader xmlReader = new XmlReader(is, cT, false); final XmlReader xmlReader = new XmlReader(is, cT, false);
if (!streamEnc.equals("UTF-16")) { if (!streamEnc.equals("UTF-16")) {
@ -212,7 +212,7 @@ public class TestXmlReader extends TestCase {
} }
} }
protected void _testHttpInvalid(final String cT, final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { protected void testHttpInvalid(final String cT, final String bomEnc, final String streamEnc, final String prologEnc) throws Exception {
final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML2 : XML3, streamEnc, prologEnc); final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML2 : XML3, streamEnc, prologEnc);
try { try {
new XmlReader(is, cT, false); new XmlReader(is, cT, false);
@ -222,7 +222,7 @@ public class TestXmlReader extends TestCase {
} }
} }
protected void _testHttpLenient(final String cT, final String bomEnc, final String streamEnc, final String prologEnc, final String shouldbe) protected void testHttpLenient(final String cT, final String bomEnc, final String streamEnc, final String prologEnc, final String shouldbe)
throws Exception { throws Exception {
final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML2 : XML3, streamEnc, prologEnc); final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML2 : XML3, streamEnc, prologEnc);
final XmlReader xmlReader = new XmlReader(is, cT, true); final XmlReader xmlReader = new XmlReader(is, cT, true);

View file

@ -52,77 +52,77 @@ public class Issue1Test extends SyndFeedTest {
} }
public void testHtmlEntities() throws Exception { public void testHtmlEntities() throws Exception {
_testValidEntities("<hello></hello>"); testValidEntities("<hello></hello>");
_testValidEntities(XML_PROLOG + "<hello></hello>"); testValidEntities(XML_PROLOG + "<hello></hello>");
_testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello></hello>"); testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello></hello>");
_testValidEntities("<hello>&apos;&yen;&#250;&yen;</hello>"); testValidEntities("<hello>&apos;&yen;&#250;&yen;</hello>");
_testValidEntities(XML_PROLOG + "<hello>&apos;&yen;&#250;&yen;</hello>"); testValidEntities(XML_PROLOG + "<hello>&apos;&yen;&#250;&yen;</hello>");
_testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yen;&#250;&yen;</hello>"); testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yen;&#250;&yen;</hello>");
_testValidEntities("<hello>&Pi;&Rho;#913;&Rho;</hello>"); testValidEntities("<hello>&Pi;&Rho;#913;&Rho;</hello>");
_testValidEntities(XML_PROLOG + "<hello>&Pi;&Rho;&#913;&Rho;</hello>"); testValidEntities(XML_PROLOG + "<hello>&Pi;&Rho;&#913;&Rho;</hello>");
_testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rho;&#913;&Rho;</hello>"); testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rho;&#913;&Rho;</hello>");
_testValidEntities("<hello>&OElig;&mdash;&#8211;&mdash;</hello>"); testValidEntities("<hello>&OElig;&mdash;&#8211;&mdash;</hello>");
_testValidEntities(XML_PROLOG + "<hello>&OElig;&mdash;&#8211;&mdash;</hello>"); testValidEntities(XML_PROLOG + "<hello>&OElig;&mdash;&#8211;&mdash;</hello>");
_testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&OElig;&mdash;&#8211;&mdash;</hello>"); testValidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&OElig;&mdash;&#8211;&mdash;</hello>");
_testInvalidEntities("<hello>&apos;&yexn;&#250;&yen;</hello>"); testInvalidEntities("<hello>&apos;&yexn;&#250;&yen;</hello>");
_testInvalidEntities(XML_PROLOG + "<hello>&apos;&yexn;&#250;&yen;</hello>"); testInvalidEntities(XML_PROLOG + "<hello>&apos;&yexn;&#250;&yen;</hello>");
_testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yexn;&#250;&yen;</hello>"); testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yexn;&#250;&yen;</hello>");
_testInvalidEntities("<hello>&Pi;&Rhox;#913;&Rho;</hello>"); testInvalidEntities("<hello>&Pi;&Rhox;#913;&Rho;</hello>");
_testInvalidEntities(XML_PROLOG + "<hello>&Pi;&Rhox;&#913;&Rho;</hello>"); testInvalidEntities(XML_PROLOG + "<hello>&Pi;&Rhox;&#913;&Rho;</hello>");
_testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rhox;&#913;&Rho;</hello>"); testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rhox;&#913;&Rho;</hello>");
_testInvalidEntities("<hello>&apos;&yen;&#2x50;&yen;</hello>"); testInvalidEntities("<hello>&apos;&yen;&#2x50;&yen;</hello>");
_testInvalidEntities(XML_PROLOG + "<hello>&apos;&yen;&#2x50;&yen;</hello>"); testInvalidEntities(XML_PROLOG + "<hello>&apos;&yen;&#2x50;&yen;</hello>");
_testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yen;&#2x50;&yen;</hello>"); testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&apos;&yen;&#2x50;&yen;</hello>");
_testInvalidEntities("<hello>&Pi;&Rho;&#9x13;&Rho;</hello>"); testInvalidEntities("<hello>&Pi;&Rho;&#9x13;&Rho;</hello>");
_testInvalidEntities(XML_PROLOG + "<hello>&Pi;&Rho;&#9x13;&Rho;</hello>"); testInvalidEntities(XML_PROLOG + "<hello>&Pi;&Rho;&#9x13;&Rho;</hello>");
_testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rho;&#9x13;&Rho;</hello>"); testInvalidEntities(" <!-- just in case -->\n" + XML_PROLOG + "<hello>&Pi;&Rho;&#9x13;&Rho;</hello>");
} }
public void testTrim() throws Exception { public void testTrim() throws Exception {
_testValidTrim("", "<hello></hello>"); testValidTrim("", "<hello></hello>");
_testValidTrim("", XML_PROLOG + "<hello></hello>"); testValidTrim("", XML_PROLOG + "<hello></hello>");
_testValidTrim(" ", "<hello></hello>"); testValidTrim(" ", "<hello></hello>");
_testValidTrim(" ", XML_PROLOG + "<hello></hello>"); testValidTrim(" ", XML_PROLOG + "<hello></hello>");
_testValidTrim(" \n", "<hello></hello>"); testValidTrim(" \n", "<hello></hello>");
_testValidTrim(" \n", XML_PROLOG + "<hello></hello>"); testValidTrim(" \n", XML_PROLOG + "<hello></hello>");
_testValidTrim("<!-- - -- -->", "<hello></hello>"); testValidTrim("<!-- - -- -->", "<hello></hello>");
_testValidTrim("<!-- - -- -->", XML_PROLOG + "<hello></hello>"); testValidTrim("<!-- - -- -->", XML_PROLOG + "<hello></hello>");
_testValidTrim(" <!-- - -- -->", "<hello></hello>"); testValidTrim(" <!-- - -- -->", "<hello></hello>");
_testValidTrim(" <!-- - -- -->", XML_PROLOG + "<hello></hello>"); testValidTrim(" <!-- - -- -->", XML_PROLOG + "<hello></hello>");
_testValidTrim(" <!-- - -- --> ", "<hello></hello>"); testValidTrim(" <!-- - -- --> ", "<hello></hello>");
_testValidTrim(" <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testValidTrim(" <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
_testValidTrim(" <!-- - -- --> <!-- - -- --> ", "<hello></hello>"); testValidTrim(" <!-- - -- --> <!-- - -- --> ", "<hello></hello>");
_testValidTrim(" <!-- - -- --> <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testValidTrim(" <!-- - -- --> <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
_testValidTrim(" <!-- - -- --> \n <!-- - -- --> ", "<hello></hello>"); testValidTrim(" <!-- - -- --> \n <!-- - -- --> ", "<hello></hello>");
_testValidTrim(" <!-- - -- --> \n <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testValidTrim(" <!-- - -- --> \n <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
// TODO lorenzo.sm: This test was added to trim \r char (as with \n). // TODO lorenzo.sm: This test was added to trim \r char (as with \n).
// Source of "bad" RSS http://www.diariohorizonte.com/rss/71/deportes // Source of "bad" RSS http://www.diariohorizonte.com/rss/71/deportes
_testValidTrim("\r\n<!-- hackedString Clean-->", XML_PROLOG + "<hello></hello>"); testValidTrim("\r\n<!-- hackedString Clean-->", XML_PROLOG + "<hello></hello>");
_testInvalidTrim("x", "<hello></hello>"); testInvalidTrim("x", "<hello></hello>");
_testInvalidTrim("x", XML_PROLOG + "<hello></hello>"); testInvalidTrim("x", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" x", "<hello></hello>"); testInvalidTrim(" x", "<hello></hello>");
_testInvalidTrim(" x", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" x", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" x\n", "<hello></hello>"); testInvalidTrim(" x\n", "<hello></hello>");
_testInvalidTrim(" x\n", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" x\n", XML_PROLOG + "<hello></hello>");
_testInvalidTrim("<!-- - -- - ->", "<hello></hello>"); testInvalidTrim("<!-- - -- - ->", "<hello></hello>");
_testInvalidTrim("<!-- - -- - ->", XML_PROLOG + "<hello></hello>"); testInvalidTrim("<!-- - -- - ->", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" <!-- - -- -- >", "<hello></hello>"); testInvalidTrim(" <!-- - -- -- >", "<hello></hello>");
_testInvalidTrim(" <!-- - -- -- >", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" <!-- - -- -- >", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" <!-- - -- -->x ", "<hello></hello>"); testInvalidTrim(" <!-- - -- -->x ", "<hello></hello>");
_testInvalidTrim(" <!-- - -- -->x ", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" <!-- - -- -->x ", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" <!-- - -- --> x <!-- - -- --> ", "<hello></hello>"); testInvalidTrim(" <!-- - -- --> x <!-- - -- --> ", "<hello></hello>");
_testInvalidTrim(" <!-- - -- --> x <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" <!-- - -- --> x <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
_testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", "<hello></hello>"); testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", "<hello></hello>");
_testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", XML_PROLOG + "<hello></hello>"); testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
} }
// XML Stream generator // XML Stream generator
@ -136,31 +136,31 @@ public class Issue1Test extends SyndFeedTest {
return new ByteArrayInputStream(baos.toByteArray()); return new ByteArrayInputStream(baos.toByteArray());
} }
protected void _testInvalidEntities(final String xmlDoc) throws Exception { protected void testInvalidEntities(final String xmlDoc) throws Exception {
try { try {
_testXmlParse("", xmlDoc); testXmlParse("", xmlDoc);
assertTrue(false); assertTrue(false);
} catch (final Exception ex) { } catch (final Exception ex) {
} }
} }
protected void _testInvalidTrim(final String garbish, final String xmlDoc) throws Exception { protected void testInvalidTrim(final String garbish, final String xmlDoc) throws Exception {
try { try {
_testXmlParse(garbish, xmlDoc); testXmlParse(garbish, xmlDoc);
assertTrue(false); assertTrue(false);
} catch (final Exception ex) { } catch (final Exception ex) {
} }
} }
protected void _testValidEntities(final String xmlDoc) throws Exception { protected void testValidEntities(final String xmlDoc) throws Exception {
_testXmlParse("", xmlDoc); testXmlParse("", xmlDoc);
} }
protected void _testValidTrim(final String garbish, final String xmlDoc) throws Exception { protected void testValidTrim(final String garbish, final String xmlDoc) throws Exception {
_testXmlParse(garbish, xmlDoc); testXmlParse(garbish, xmlDoc);
} }
protected void _testXmlParse(final String garbish, final String xmlDoc) throws Exception { protected void testXmlParse(final String garbish, final String xmlDoc) throws Exception {
final InputStream is = getStream(garbish, xmlDoc); final InputStream is = getStream(garbish, xmlDoc);
Reader reader = new XmlReader(is); Reader reader = new XmlReader(is);
reader = new XmlFixerReader(reader); reader = new XmlFixerReader(reader);

View file

@ -29,14 +29,14 @@ import com.sun.syndication.unittest.TestSyndFeedRSS094;
public class Issue2Test extends TestSyndFeedRSS094 { public class Issue2Test extends TestSyndFeedRSS094 {
@Override @Override
protected void _testItem(final int i) throws Exception { protected void testItem(final int i) throws Exception {
super._testItem(i); super.testItem(i);
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries(); final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i); final SyndEntry entry = items.get(i);
_testComments(entry, i); testComments(entry, i);
} }
protected void _testComments(final SyndEntry entry, final int i) throws Exception { protected void testComments(final SyndEntry entry, final int i) throws Exception {
assertProperty(entry.findRelatedLink("comments").getHref(), "rss_0.94.channel.item[" + i + "].comments"); assertProperty(entry.findRelatedLink("comments").getHref(), "rss_0.94.channel.item[" + i + "].comments");
} }