Updated classes to use JDOM 2

Fixed tests
Formatted code
This commit is contained in:
Patrick Gotthard 2013-10-07 21:11:47 +02:00
parent 1749a5447f
commit 7b8c9259d0
232 changed files with 18694 additions and 18428 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

@ -28,16 +28,19 @@ import org.rometools.feed.module.activitystreams.types.Verb;
public interface ActivityStreamModule { public interface ActivityStreamModule {
public Verb getVerb(); public Verb getVerb();
public void setVerb(Verb verb); public void setVerb(Verb verb);
public ActivityObject getObject(); public ActivityObject getObject();
public void setObject(ActivityObject object); public void setObject(ActivityObject object);
public ActivityObject getTarget(); public ActivityObject getTarget();
public void setTarget(ActivityObject object); public void setTarget(ActivityObject object);
public Mood getMood(); public Mood getMood();
public void setMood(Mood mood); public void setMood(Mood mood);
} }

View file

@ -20,7 +20,6 @@ import org.rometools.feed.module.activitystreams.types.ActivityObject;
import org.rometools.feed.module.activitystreams.types.Mood; import org.rometools.feed.module.activitystreams.types.Mood;
import org.rometools.feed.module.activitystreams.types.Verb; import org.rometools.feed.module.activitystreams.types.Verb;
/** /**
* *
* @author robert.cooper * @author robert.cooper
@ -34,8 +33,8 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
* *
* @param newobject new value of object * @param newobject new value of object
*/ */
public void setObject(ActivityObject newobject) { public void setObject(final ActivityObject newobject) {
this.object = newobject; object = newobject;
} }
/** /**
@ -44,7 +43,7 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
* @return the value of object * @return the value of object
*/ */
public ActivityObject getObject() { public ActivityObject getObject() {
return this.object; return object;
} }
/** /**
@ -52,8 +51,8 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
* *
* @param newverb new value of verb * @param newverb new value of verb
*/ */
public void setVerb(Verb newverb) { public void setVerb(final Verb newverb) {
this.verb = newverb; verb = newverb;
} }
/** /**
@ -62,14 +61,14 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
* @return the value of verb * @return the value of verb
*/ */
public Verb getVerb() { public Verb getVerb() {
return this.verb; return verb;
} }
public ActivityObject getTarget() { public ActivityObject getTarget() {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
public void setTarget(ActivityObject object) { public void setTarget(final ActivityObject object) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@ -77,7 +76,7 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
public void setMood(Mood mood) { public void setMood(final Mood mood) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
} }

View file

@ -17,23 +17,24 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
import com.sun.syndication.feed.atom.Entry;
import org.rometools.feed.module.georss.GeoRSSModule; import org.rometools.feed.module.georss.GeoRSSModule;
import org.rometools.feed.module.portablecontacts.ContactModule; import org.rometools.feed.module.portablecontacts.ContactModule;
import com.sun.syndication.feed.atom.Entry;
/** /**
* *
* @author robert.cooper * @author robert.cooper
*/ */
public abstract class ActivityObject extends Entry implements HasLocation { public abstract class ActivityObject extends Entry implements HasLocation {
public abstract String getTypeIRI(); public abstract String getTypeIRI();
public GeoRSSModule getLocation() { public GeoRSSModule getLocation() {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
public void setLocation(GeoRSSModule location) { public void setLocation(final GeoRSSModule location) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@ -41,7 +42,7 @@ public abstract class ActivityObject extends Entry implements HasLocation {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
public void setAddress(ContactModule address){ public void setAddress(final ContactModule address) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }

View file

@ -16,33 +16,31 @@
*/ */
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "article" Object type indicates that the Object is an * <p>
* article, such as a news article, a knowledge base entry, or other * The "article" Object type indicates that the Object is an article, such as a news article, a knowledge base entry, or other similar construct.
* similar construct.
* </p> * </p>
*<p>Articles generally consist of paragraphs of text, in some cases * <p>
* incorporating embedded media such as photos and inline hyperlinks to * Articles generally consist of paragraphs of text, in some cases incorporating embedded media such as photos and inline hyperlinks to other resources.
* other resources.
* </p> * </p>
*<p>The "Article" Object type is identified by the URL <tt>http://activitystrea.ms/schema/1.0/article</tt>. * <p>
* The "Article" Object type is identified by the URL <tt>http://activitystrea.ms/schema/1.0/article</tt>.
* </p> * </p>
*<p>An article has the following additional components: * <p>
* An article has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Name</dt> * <dt>Name</dt>
*<dd>The title of the article. Represented by the * <dd>The title of the article. Represented by the Name component of the base Object Construct.</dd>
* Name component of the base Object Construct.
*</dd>
* <dt>Content</dt> * <dt>Content</dt>
*<dd>The main body content of the article. * <dd>The main body content of the article. Represented in JSON as a property called <tt>content</tt> whose value is a JSON string containing a fragment of
* Represented in JSON as a property called <tt>content</tt> * HTML that represents the content.</dd>
* whose value is a JSON string containing a fragment of HTML that * </dl>
* represents the content. * </blockquote>
*</dd> *
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Article extends ActivityObject { public class Article extends ActivityObject {

View file

@ -16,30 +16,28 @@
*/ */
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "audio" Object type represents audio content. * <p>
* The "audio" Object type represents audio content.
* </p> * </p>
*<p>The "audio" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/audio</tt>. * <p>
* The "audio" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/audio</tt>.
* </p> * </p>
*<p>An audio has the following additional components: * <p>
* An audio has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Audio Stream Link</dt> * <dt>Audio Stream Link</dt>
*<dd>A Media Link Construct linking * <dd>A Media Link Construct linking to the audio content itself. Represented in JSON as a property called <tt>stream</tt> whose value is a JSON object with
* to the audio content itself. Represented in JSON as a property * properties as defined in [TODO: xref the JSON serialization of a Media Link Construct]</dd>
* called <tt>stream</tt> whose value is a JSON
* object with properties as defined in [TODO: xref the JSON
* serialization of a Media Link Construct]
*</dd>
* <dt>Embed Code</dt> * <dt>Embed Code</dt>
*<dd>An HTML fragment that, when embedded in * <dd>An HTML fragment that, when embedded in an HTML page, will provide an interactive player UI for the audio stream. Represented in JSON as a property
* an HTML page, will provide an interactive player UI for the * called <tt>embedCode</tt> whose value is a JSON string containing the fragment of HTML.</dd>
* audio stream. Represented in JSON as a property called <tt>embedCode</tt> whose value is a JSON string
* containing the fragment of HTML.
*</dd>
* </dl> * </dl>
*
* @author robert.cooper * @author robert.cooper
*/ */
public class Audio extends ActivityObject { public class Audio extends ActivityObject {
@ -51,8 +49,8 @@ public class Audio extends ActivityObject {
* *
* @param newembedCode new value of embedCode * @param newembedCode new value of embedCode
*/ */
public void setEmbedCode(String newembedCode) { public void setEmbedCode(final String newembedCode) {
this.embedCode = newembedCode; embedCode = newembedCode;
} }
/** /**
@ -61,7 +59,7 @@ public class Audio extends ActivityObject {
* @return the value of embedCode * @return the value of embedCode
*/ */
public String getEmbedCode() { public String getEmbedCode() {
return this.embedCode; return embedCode;
} }
/** /**
@ -69,8 +67,8 @@ public class Audio extends ActivityObject {
* *
* @param newstreamLink new value of streamLink * @param newstreamLink new value of streamLink
*/ */
public void setStreamLink(String newstreamLink) { public void setStreamLink(final String newstreamLink) {
this.streamLink = newstreamLink; streamLink = newstreamLink;
} }
/** /**
@ -79,7 +77,7 @@ public class Audio extends ActivityObject {
* @return the value of streamLink * @return the value of streamLink
*/ */
public String getStreamLink() { public String getStreamLink() {
return this.streamLink; return streamLink;
} }
@Override @Override

View file

@ -19,62 +19,49 @@ package org.rometools.feed.module.activitystreams.types;
import com.sun.syndication.feed.atom.Link; import com.sun.syndication.feed.atom.Link;
/** /**
* <p>The "bookmark" Object type represents a pointer to some URL -- * <p>
* typically a web page. In most cases, a bookmark is specific to a * The "bookmark" Object type represents a pointer to some URL -- typically a web page. In most cases, a bookmark is specific to a given user and contains
* given user and contains metadata chosen by that user. Bookmark * metadata chosen by that user. Bookmark Objects are similar in principle to the concept of bookmarks or favorites in a web browser. A bookmark represents a
* Objects are similar in principle to the concept of bookmarks or * pointer to the URL, not the URL or the associated resource itself.
* favorites in a web browser. A bookmark represents a pointer to the
* URL, not the URL or the associated resource itself.
* </p> * </p>
*<p>When dealing with bookmarks it is important to note the * <p>
* distinction between the title, description, and URL of the bookmark * When dealing with bookmarks it is important to note the distinction between the title, description, and URL of the bookmark itself and the title, content,
* itself and the title, content, and URL of the resource that is the * and URL of the resource that is the target of the bookmark. In some implementations these MAY be the same, but bookmark managers often allow a user to edit
* target of the bookmark. In some implementations these MAY be the * the title and description of his or her own bookmarks to differ from the metadata on the target itself.
* same, but bookmark managers often allow a user to edit the title and
* description of his or her own bookmarks to differ from the metadata
* on the target itself.
* </p> * </p>
*<p>Some implementations refer to this Object type as a "link". This * <p>
* specification uses the term "bookmark" to avoid confusion with the * Some implementations refer to this Object type as a "link". This specification uses the term "bookmark" to avoid confusion with the general concept of
* general concept of hyperlinks which apply to all Object types. * hyperlinks which apply to all Object types.
* </p> * </p>
*<p>Since bookmarks are often specific to a particular user, even * <p>
* though multiple users might have bookmarks pointing at the same * Since bookmarks are often specific to a particular user, even though multiple users might have bookmarks pointing at the same resource, it is appropriate to
* resource, it is appropriate to use the "post" Verb to describe the * use the "post" Verb to describe the publication of such a bookmark. The "mark as favorite" Verb SHOULD be used when a user flags another user's bookmark as
* publication of such a bookmark. The "mark as favorite" Verb SHOULD * being a favorite without creating his own bookmark, or when a user flags his own bookmark as being a favorite as a special classification within his own
* be used when a user flags another user's bookmark as being a * bookmark collection.
* favorite without creating his own bookmark, or when a user flags his
* own bookmark as being a favorite as a special classification within
* his own bookmark collection.
* </p> * </p>
*<p>The "bookmark" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/bookmark</tt>. * <p>
* The "bookmark" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/bookmark</tt>.
* </p> * </p>
*<p>A bookmark has the following additional components: * <p>
* A bookmark has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Title</dt> * <dt>Title</dt>
*<dd>The title of the bookmark, as entered by the * <dd>The title of the bookmark, as entered by the user who created the bookmark. Represented by the Name component of the base Object Construct. Publishers
* user who created the bookmark. Represented by the Name component * MAY use the title of the target resource as a default for this property where a user hasn't entered a customized value.</dd>
* of the base Object Construct. Publishers MAY use the title of
* the target resource as a default for this property where a user
* hasn't entered a customized value.
*</dd>
* <dt>Target URL</dt> * <dt>Target URL</dt>
*<dd>The URL of the item that is the target * <dd>The URL of the item that is the target of the bookmark. Represented in JSON by a property called <tt>targetUrl</tt> whose value is a JSON string
* of the bookmark. Represented in JSON by a property called <tt>targetUrl</tt> whose value is a JSON string * containing the target URL.</dd>
* containing the target URL.
*</dd>
* <dt>Thumbnail</dt> * <dt>Thumbnail</dt>
*<dd>The URL and metadata for a thumbnail * <dd>The URL and metadata for a thumbnail version of the page. Represented by the Representative Image component of the base Object Construct. Processors MAY
* version of the page. Represented by the Representative Image * ignore thumbnails that are of an inappropriate size for their user interface.</dd>
* component of the base Object Construct. Processors MAY ignore * </dl>
* thumbnails that are of an inappropriate size for their user * </blockquote>
* interface. *
*</dd>
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Bookmark extends ActivityObject { public class Bookmark extends ActivityObject {
@ -84,16 +71,13 @@ public class Bookmark extends ActivityObject {
return "http://activitystrea.ms/schema/1.0/bookmark"; return "http://activitystrea.ms/schema/1.0/bookmark";
} }
/** /**
* Get the value of thumbnail * Get the value of thumbnail
* *
* @return the value of thumbnail * @return the value of thumbnail
*/ */
public Link getThumbnail() { public Link getThumbnail() {
return this.findRelatedLink("thumbnail"); return findRelatedLink("thumbnail");
} }
/** /**
@ -101,19 +85,19 @@ public class Bookmark extends ActivityObject {
* *
* @param newthumbnail new value of thumbnail * @param newthumbnail new value of thumbnail
*/ */
public void setThumbnail(Link newthumbnail) { public void setThumbnail(final Link newthumbnail) {
Link old = null; Link old = null;
for(Link l : this.getOtherLinks()){ for (final Link l : getOtherLinks()) {
if ("thumbnail".equals(l.getRel())) { if ("thumbnail".equals(l.getRel())) {
old = l; old = l;
break; break;
} }
} }
if (old != null) { if (old != null) {
this.getOtherLinks().remove(old); getOtherLinks().remove(old);
newthumbnail.setRel("thumbnail"); newthumbnail.setRel("thumbnail");
} }
this.getOtherLinks().add(newthumbnail); getOtherLinks().add(newthumbnail);
} }
} }

View file

@ -18,37 +18,33 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "comment" object type represents a textual response to * <p>
* another object. * The "comment" object type represents a textual response to another object.
* </p> * </p>
*<p>The comment object type MUST NOT be used for other kinds of * <p>
* replies, such as video replies or reviews. * The comment object type MUST NOT be used for other kinds of replies, such as video replies or reviews.
* </p> * </p>
*<p>The "comment" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/comment</tt>. * <p>
* The "comment" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/comment</tt>.
* </p> * </p>
*<p>A comment has the following additional components: * <p>
* A comment has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Subject</dt> * <dt>Subject</dt>
*<dd>The subject of the comment. Represented by * <dd>The subject of the comment. Represented by the Name component of the base Object Construct. Many systems do not have the concept of a title or subject
* the Name component of the base Object Construct. Many systems do * for a comment; such systems MUST omit the Name component. Processors SHOULD refer to such comments as simply being "a comment", with appropriate
* not have the concept of a title or subject for a comment; such * localization, if they are to be described in a sentence.</dd>
* systems MUST omit the Name component. Processors SHOULD refer to
* such comments as simply being "a comment", with appropriate
* localization, if they are to be described in a sentence.
*</dd>
* <dt>Content</dt> * <dt>Content</dt>
*<dd>The content of the comment. Represented in * <dd>The content of the comment. Represented in JSON as a property called <tt>content</tt> whose value is a JSON string containing a fragment of HTML that
* JSON as a property called <tt>content</tt> * represents the content. Publishers SHOULD include any markup necessary to achieve a similar presentation to that on the publisher's own HTML pages, including
* whose value is a JSON string containing a fragment of HTML that * any links that the service automatically adds. Processors MAY remove all HTML markup and consider the comment to be plain text.</dd>
* represents the content. Publishers SHOULD include any markup * </dl>
* necessary to achieve a similar presentation to that on the * </blockquote>
* publisher's own HTML pages, including any links that the service *
* automatically adds. Processors MAY remove all HTML markup and
* consider the comment to be plain text.
*</dd>
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Comment extends ActivityObject { public class Comment extends ActivityObject {

View file

@ -18,30 +18,27 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "event" object type represents an event that occurs in a * <p>
* certain place during a particular interval of time. * The "event" object type represents an event that occurs in a certain place during a particular interval of time.
* </p> * </p>
*<p>The object type URL for the "event" object type is <tt>http://activitystrea.ms/schema/1.0/event</tt>. * <p>
* The object type URL for the "event" object type is <tt>http://activitystrea.ms/schema/1.0/event</tt>.
* </p> * </p>
*<p>An event has the following additional components: * <p>
* An event has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Start Date and Time</dt> * <dt>Start Date and Time</dt>
*<dd>The date and time that the * <dd>The date and time that the event begins. Represented in JSON as a property called <tt>startTime</tt> whose value is JSON string containing a W3CDTF
* event begins. Represented in JSON as a property called <tt>startTime</tt> whose value is JSON string * timestamp. [TODO: Reference W3CDTF spec.] [TODO: Include prose describing how to represent just a date vs. a date and time.]</dd>
* containing a W3CDTF timestamp. [TODO: Reference W3CDTF spec.]
* [TODO: Include prose describing how to represent just a date vs.
* a date and time.]
*</dd>
* <dt>End Date and Time</dt> * <dt>End Date and Time</dt>
*<dd>The date and time that the event * <dd>The date and time that the event ends. Represented in JSON as a property called <tt>endTime</tt> whose value is JSON string containing a W3CDTF
* ends. Represented in JSON as a property called <tt>endTime</tt> whose value is JSON string * timestamp. [TODO: Reference W3CDTF spec.] [TODO: Include prose describing how to represent just a date vs. a date and time.]</dd>
* containing a W3CDTF timestamp. [TODO: Reference W3CDTF spec.] * </dl>
* [TODO: Include prose describing how to represent just a date vs. * </blockquote>
* a date and time.]
*</dd>
*</dl></blockquote>
* *
* @author robert.cooper * @author robert.cooper
*/ */

View file

@ -18,33 +18,32 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "file" Object type represents some document or other file * <p>
* with no additional machine-readable semantics. * The "file" Object type represents some document or other file with no additional machine-readable semantics.
* </p> * </p>
*<p>It is intended that this type be used as a base type for other * <p>
* Objects that manifest as files, so that additional semantics can be * It is intended that this type be used as a base type for other Objects that manifest as files, so that additional semantics can be added while providing a
* added while providing a fallback ability for clients that do not * fallback ability for clients that do not support the more specific Object type.
* support the more specific Object type.
* </p> * </p>
*<p>The "file" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/file</tt>. * <p>
* The "file" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/file</tt>.
* </p> * </p>
*<p>A file has the following additional components: * <p>
* A file has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Associated File URL</dt> * <dt>Associated File URL</dt>
*<dd>The URL of the file described * <dd>The URL of the file described by this Object Construct. Represented in JSON by a property called <tt>fileUrl</tt> whose value is a JSON string containing
* by this Object Construct. Represented in JSON by a property * the URL.</dd>
* called <tt>fileUrl</tt> whose value is a JSON
* string containing the URL.
*</dd>
* <dt>File MIME Type</dt> * <dt>File MIME Type</dt>
*<dd>The MIME type of the file described * <dd>The MIME type of the file described by this Object Construct. Represented in JSON by a property called <tt>mimeType</tt> whose value is a JSON string
* by this Object Construct. Represented in JSON by a property * containing the MIME type.</dd>
* called <tt>mimeType</tt> whose value is a * </dl>
* JSON string containing the MIME type. * </blockquote>
*</dd> *
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class File extends ActivityObject { public class File extends ActivityObject {
@ -54,6 +53,4 @@ public class File extends ActivityObject {
return "http://activitystrea.ms/schema/1.0/file"; return "http://activitystrea.ms/schema/1.0/file";
} }
} }

View file

@ -18,24 +18,26 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "folder" object type represents a collection of files or * <p>
* media objects. This is similar to the "photo album" object type, but * The "folder" object type represents a collection of files or media objects. This is similar to the "photo album" object type, but not specifically
* not specifically representing a collection of "photos." * representing a collection of "photos."
* </p> * </p>
*<p>The "folder" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/folder</tt>. * <p>
* The "folder" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/folder</tt>.
* </p> * </p>
*<p>A folder has the following additional components: * <p>
* A folder has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Preview Image Link</dt> * <dt>Preview Image Link</dt>
*<dd>A Media Link Construct * <dd>A Media Link Construct describing an image file that can be used as a preview image for the folder. Represented by the Representative Image component of
* describing an image file that can be used as a preview image for * the base Object Construct. Processors MAY ignore thumbnails that are of an inappropriate size for their user interface.</dd>
* the folder. Represented by the Representative Image component of * </dl>
* the base Object Construct. Processors MAY ignore thumbnails that * </blockquote>
* are of an inappropriate size for their user interface. *
*</dd>
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Folder extends ActivityObject { public class Folder extends ActivityObject {
@ -45,5 +47,4 @@ public class Folder extends ActivityObject{
return "http://activitystrea.ms/schema/1.0/folder"; return "http://activitystrea.ms/schema/1.0/folder";
} }
} }

View file

@ -18,13 +18,15 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "group" Object type represents a social networking group. A * <p>
* group is a collection of people which people can join and leave. * The "group" Object type represents a social networking group. A group is a collection of people which people can join and leave.
* </p> * </p>
*<p>The "group" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/group</tt>. * <p>
* The "group" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/group</tt>.
* </p> * </p>
*<p>A group has no additional components. * <p>
* A group has no additional components.
*
* @author robert.cooper * @author robert.cooper
*/ */
public class Group { public class Group {

View file

@ -21,26 +21,26 @@ import org.rometools.feed.module.georss.GeoRSSModule;
import org.rometools.feed.module.portablecontacts.ContactModule; import org.rometools.feed.module.portablecontacts.ContactModule;
/** /**
* <p>Location is a concept which can be used inside the atom:entry * <p>
* level, atom:author and activity:object. Location can be specified * Location is a concept which can be used inside the atom:entry level, atom:author and activity:object. Location can be specified via geographic coordinates, a
* via geographic coordinates, a street address, a free-form location * street address, a free-form location name or a combination of these. Geographic coordinates should be included as a geo:point element as described by the
* name or a combination of these. Geographic coordinates should be * GeoRSS specification. Addresses should be included using a poco:address element defined at Portable Contacts specification. The entry level location
* included as a geo:point element as described by the GeoRSS * represents the location of the author at the time the activity was performed. The author level location represents the primary location of the author.
* specification. Addresses should be included using a poco:address * Finally, the location within other objects represents the physical location of those objects. All location fields are optional. For free form addresses use
* element defined at Portable Contacts specification. The entry level * the poco:formatted field.
* location represents the location of the author at the time the
* activity was performed. The author level location represents the
* primary location of the author. Finally, the location within other
* objects represents the physical location of those objects. All
* location fields are optional. For free form addresses use the
* poco:formatted field.
* </p> * </p>
*<p><a class='info' href='#location-poco'>Figure&nbsp;1<span> (</span><span class='info'>Location Example</span><span>)</span></a> * <p>
* <a class='info' href='#location-poco'>Figure&nbsp;1<span> (</span><span class='info'>Location Example</span><span>)</span></a>
* </p> * </p>
*<p><br /><hr class="insert" /> * <p>
* <br />
* <hr class="insert" />
* <a name="location-poco"></a> * <a name="location-poco"></a>
* </p> * </p>
*<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>&lt;entry&gt; * <div style='display: table; width: 0; margin-left: 3em; margin-right: auto'>
*
* <pre>
* &lt;entry&gt;
* &lt;id&gt;tag:world:activity:1212121212121&lt;/id&gt; * &lt;id&gt;tag:world:activity:1212121212121&lt;/id&gt;
* &lt;title&gt;Rob liked Goldeberg's Deli&lt;/title&gt; * &lt;title&gt;Rob liked Goldeberg's Deli&lt;/title&gt;
* &lt;author&gt; * &lt;author&gt;
@ -70,15 +70,25 @@ import org.rometools.feed.module.portablecontacts.ContactModule;
* &lt;/activity:object&gt; * &lt;/activity:object&gt;
* &lt;geo:point&gt;33.9777 -119.4351&lt;/geo:point&gt; * &lt;geo:point&gt;33.9777 -119.4351&lt;/geo:point&gt;
* &lt;activity:verb&gt;http://activitystrea.ms/schema/1.0/like&lt;/activity:verb&gt; * &lt;activity:verb&gt;http://activitystrea.ms/schema/1.0/like&lt;/activity:verb&gt;
*&lt;/entry&gt;</pre></div><p> * &lt;/entry&gt;
*<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b>&nbsp;Figure&nbsp;1: Location Example&nbsp;</b></font><br /></td></tr></table><hr class="insert" /> * </pre>
*
* </div>
* <p>
* <table border="0" cellpadding="0" cellspacing="2" align="center">
* <tr>
* <td align="center"><font face="monaco, MS Sans Serif" size="1"><b>&nbsp;Figure&nbsp;1: Location Example&nbsp;</b></font><br />
* </td>
* </tr>
* </table>
* <hr class="insert" />
* *
* </p> * </p>
*
* @author robert.cooper * @author robert.cooper
*/ */
public interface HasLocation { public interface HasLocation {
public GeoRSSModule getLocation(); public GeoRSSModule getLocation();
public void setLocation(GeoRSSModule location); public void setLocation(GeoRSSModule location);

View file

@ -18,18 +18,19 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
*<p>The "list" object type represents a collection of related * <p>
* objects. * The "list" object type represents a collection of related objects.
* </p> * </p>
*<p>The "list" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/list</tt>. * <p>
* The "list" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/list</tt>.
* </p> * </p>
*<p>A list has no additional components. * <p>
* A list has no additional components.
* </p> * </p>
*
* @author robert.cooper * @author robert.cooper
*/ */
public class List extends ActivityObject public class List extends ActivityObject {
{
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {

View file

@ -16,25 +16,23 @@
*/ */
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* *
*<p>Mood describes the mood of the user when the activity was * <p>
* performed. This is usually collected via an extra field in the user * Mood describes the mood of the user when the activity was performed. This is usually collected via an extra field in the user interface used to perform the
* interface used to perform the activity. For the purpose of this * activity. For the purpose of this schema, a mood is a freeform, short mood keyword or phrase along with an optional mood icon image.
* schema, a mood is a freeform, short mood keyword or phrase along
* with an optional mood icon image.
* </p> * </p>
*<p>Moods are included via a mood element in the namespace <tt>http://activitystrea.ms/context/</tt>. * <p>
* Moods are included via a mood element in the namespace <tt>http://activitystrea.ms/context/</tt>.
* </p> * </p>
*<p>The content of the mood element is the mood keyword or * <p>
* phrase. * The content of the mood element is the mood keyword or phrase.
* </p> * </p>
*<p>The mood element may have an optional <tt>icon</tt> * <p>
* attribute which contains the URL of a mood icon image. The mood icon * The mood element may have an optional <tt>icon</tt> attribute which contains the URL of a mood icon image. The mood icon image SHOULD be small and
* image SHOULD be small and appropriate to be displayed alongside the * appropriate to be displayed alongside the mood keyword at a normal text size.
* mood keyword at a normal text size.
* </p> * </p>
*
* @author robert.cooper * @author robert.cooper
*/ */
public class Mood { public class Mood {
@ -46,8 +44,8 @@ public class Mood {
* *
* @param newiconUrl new value of iconUrl * @param newiconUrl new value of iconUrl
*/ */
public void setIconUrl(String newiconUrl) { public void setIconUrl(final String newiconUrl) {
this.iconUrl = newiconUrl; iconUrl = newiconUrl;
} }
/** /**
@ -56,7 +54,7 @@ public class Mood {
* @return the value of iconUrl * @return the value of iconUrl
*/ */
public String getIconUrl() { public String getIconUrl() {
return this.iconUrl; return iconUrl;
} }
/** /**
@ -64,8 +62,8 @@ public class Mood {
* *
* @param newtext new value of text * @param newtext new value of text
*/ */
public void setText(String newtext) { public void setText(final String newtext) {
this.text = newtext; text = newtext;
} }
/** /**
@ -74,6 +72,6 @@ public class Mood {
* @return the value of text * @return the value of text
*/ */
public String getText() { public String getText() {
return this.text; return text;
} }
} }

View file

@ -18,35 +18,31 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
*<p>The "note" Object type represents short-form text messages. This * <p>
* Object type is intended for use in "micro-blogging" and in systems * The "note" Object type represents short-form text messages. This Object type is intended for use in "micro-blogging" and in systems where users are invited
* where users are invited to publish short, often plain-text messages * to publish short, often plain-text messages whose useful lifespan is generally shorter than that of an article or weblog entry.
* whose useful lifespan is generally shorter than that of an article
* or weblog entry.
* </p> * </p>
*<p>A note is similar in structure to an article, but it does not * <p>
* have a title and its body tends to be shorter. Applications will * A note is similar in structure to an article, but it does not have a title and its body tends to be shorter. Applications will often display the entire
* often display the entire content of a note in an activity stream UI, * content of a note in an activity stream UI, whereas they MAY display only the title or the title and summary for a weblog entry.
* whereas they MAY display only the title or the title and summary for
* a weblog entry.
* </p> * </p>
*<p>The "note" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/note</tt>. * <p>
* The "note" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/note</tt>.
* </p> * </p>
*<p>A note has the following additional components: * <p>
* A note has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Content</dt> * <dt>Content</dt>
*<dd>The content of the comment. Represented in * <dd>The content of the comment. Represented in JSON as a property called <tt>content</tt> whose value is a JSON string containing a fragment of HTML that
* JSON as a property called <tt>content</tt> * represents the content. Publishers SHOULD include any markup necessary to achieve a similar presentation to that on the publisher's own HTML pages, including
* whose value is a JSON string containing a fragment of HTML that * any links that the service automatically adds. Processors MAY remove all HTML markup and consider the comment to be plain text.</dd>
* represents the content. Publishers SHOULD include any markup * </dl>
* necessary to achieve a similar presentation to that on the * </blockquote>
* publisher's own HTML pages, including any links that the service *
* automatically adds. Processors MAY remove all HTML markup and
* consider the comment to be plain text.
*</dd>
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Note extends ActivityObject { public class Note extends ActivityObject {

View file

@ -20,30 +20,29 @@ package org.rometools.feed.module.activitystreams.types;
import com.sun.syndication.feed.atom.Link; import com.sun.syndication.feed.atom.Link;
/** /**
* <p>The "person" Object type represents a user account. This is often * <p>
represents a person, but might also be a company or fictitious * The "person" Object type represents a user account. This is often represents a person, but might also be a company or fictitious character that is being
* character that is being represented by a user account. * represented by a user account.
* </p> * </p>
*<p>The "person" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/person</tt>. * <p>
* The "person" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/person</tt>.
* </p> * </p>
*<p>A person has the following additional components: * <p>
* A person has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Display Name</dt> * <dt>Display Name</dt>
*<dd>A name that can be used for the * <dd>A name that can be used for the person in the user interface. This is often a name by which the individual is known in a given context; no restriction is
* person in the user interface. This is often a name by which the * placed on what kind of name may be used here. Represented by the Name component of the base Object Construct.</dd>
* individual is known in a given context; no restriction is placed
* on what kind of name may be used here. Represented by the Name
* component of the base Object Construct.
*</dd>
* <dt>Avatar</dt> * <dt>Avatar</dt>
*<dd>A link to an "avatar" or "userpic" image * <dd>A link to an "avatar" or "userpic" image for the user. Represented by the Representative Image component of the base Object Construct.</dd>
* for the user. Represented by the Representative Image component * </dl>
* of the base Object Construct. * </blockquote>
*</dd> *
*</dl></blockquote> * @author robert.cooper
@author robert.cooper
*/ */
public class Person extends ActivityObject { public class Person extends ActivityObject {
@ -52,19 +51,17 @@ public class Person extends ActivityObject {
return "http://activitystrea.ms/schema/1.0/person"; return "http://activitystrea.ms/schema/1.0/person";
} }
/** /**
* Get the value of avatar * Get the value of avatar
* *
* @return the value of avatar * @return the value of avatar
*/ */
public Link getAvatar() { public Link getAvatar() {
Link result = this.findRelatedLink("avatar"); final Link result = findRelatedLink("avatar");
if (result != null) { if (result != null) {
return result; return result;
} }
return this.findRelatedLink("userpic"); return findRelatedLink("userpic");
} }
/** /**
@ -72,13 +69,13 @@ public class Person extends ActivityObject {
* *
* @param newavatar new value of avatar * @param newavatar new value of avatar
*/ */
public void setAvatar(Link newavatar) { public void setAvatar(final Link newavatar) {
Link old = this.getAvatar(); final Link old = getAvatar();
if (old != null) { if (old != null) {
this.getOtherLinks().remove(old); getOtherLinks().remove(old);
} }
newavatar.setRel("avatar"); newavatar.setRel("avatar");
this.getOtherLinks().add(newavatar); getOtherLinks().add(newavatar);
} }
} }

View file

@ -18,29 +18,28 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "photo" object type represents a graphical still image. * <p>
* The "photo" object type represents a graphical still image.
* </p> * </p>
*<p>The "photo" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/photo</tt>. * <p>
* The "photo" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/photo</tt>.
* </p> * </p>
*<p>A photo has the following additional components: * <p>
* A photo has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Thumbnail</dt> * <dt>Thumbnail</dt>
*<dd>A link to a thumbnail version of the * <dd>A link to a thumbnail version of the image. Represented by the Representative Image component of the base Object Construct. Processors MAY ignore
* image. Represented by the Representative Image component of the * thumbnails that are of an inappropriate size for their user interface.</dd>
* base Object Construct. Processors MAY ignore thumbnails that are
* of an inappropriate size for their user interface.
*</dd>
* <dt>Larger Image</dt> * <dt>Larger Image</dt>
*<dd>A Media Link Construct linking to a * <dd>A Media Link Construct linking to a larger -- ideally, full-size -- version of the photo intended for standalone viewing. Represented in JSON as a
* larger -- ideally, full-size -- version of the photo intended * property named <tt>fullImage</tt> whose value is a JSON object with properties as defined in [TODO: xref the JSON serialization of a Media Link Construct].</dd>
* for standalone viewing. Represented in JSON as a property named * </dl>
* <tt>fullImage</tt> whose value is a JSON * </blockquote>
* object with properties as defined in [TODO: xref the JSON *
* serialization of a Media Link Construct].
*</dd>
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Photo extends ActivityObject { public class Photo extends ActivityObject {
@ -50,6 +49,4 @@ public class Photo extends ActivityObject {
return "http://activitystrea.ms/schema/1.0/photo"; return "http://activitystrea.ms/schema/1.0/photo";
} }
} }

View file

@ -18,23 +18,25 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "photo album" object type represents a collection of * <p>
* images. * The "photo album" object type represents a collection of images.
* </p> * </p>
*<p>The "photo album" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/photo-album</tt>. * <p>
* The "photo album" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/photo-album</tt>.
* </p> * </p>
*<p>The photo album has the following additional components: * <p>
* The photo album has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Preview Image Link</dt> * <dt>Preview Image Link</dt>
*<dd>A Media Link Construct * <dd>A Media Link Construct describing an image file that can be used as a preview image for the album. Represented by the Representative Image component of
* describing an image file that can be used as a preview image for * the base Object Construct. Processors MAY ignore thumbnails that are of an inappropriate size for their user interface.</dd>
* the album. Represented by the Representative Image component of * </dl>
* the base Object Construct. Processors MAY ignore thumbnails that * </blockquote>
* are of an inappropriate size for their user interface. *
*</dd>
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class PhotoAlbum extends ActivityObject { public class PhotoAlbum extends ActivityObject {

View file

@ -18,27 +18,28 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "place" object type represents a location on Earth. * <p>
* The "place" object type represents a location on Earth.
* </p> * </p>
*<p>The "place" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/place</tt>. * <p>
* The "place" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/place</tt>.
* </p> * </p>
*<p>A place has the following additional components: * <p>
* A place has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Latitude</dt> * <dt>Latitude</dt>
*<dd>The latitude of the place as a point on * <dd>The latitude of the place as a point on Earth. Represented in JSON as a property named <tt>latitude</tt> whose value is a JSON number containing a
* Earth. Represented in JSON as a property named <tt>latitude</tt> whose value is a JSON number * decimal representation of the latitude in degrees.</dd>
* containing a decimal representation of the latitude in
* degrees.
*</dd>
* <dt>Longitude</dt> * <dt>Longitude</dt>
*<dd>The longitude of the place as a point on * <dd>The longitude of the place as a point on Earth. Represented in JSON as a property named <tt>longitude</tt> whose value is a JSON number containing a
* Earth. Represented in JSON as a property named <tt>longitude</tt> whose value is a JSON number * decimal representation of the longitude in degrees.</dd>
* containing a decimal representation of the longitude in * </dl>
* degrees. * </blockquote>
*</dd> *
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Place extends ActivityObject { public class Place extends ActivityObject {

View file

@ -19,13 +19,16 @@ package org.rometools.feed.module.activitystreams.types;
/** /**
* *
*<p>The "playlist" object type represents an ordered list of * <p>
* time-based media items, such as video and audio objects. * The "playlist" object type represents an ordered list of time-based media items, such as video and audio objects.
* </p> * </p>
*<p>The "playlist" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/playlist</tt>. * <p>
* The "playlist" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/playlist</tt>.
* </p> * </p>
*<p>A playlist has no additional components. * <p>
* A playlist has no additional components.
* </p> * </p>
*
* @author robert.cooper * @author robert.cooper
*/ */
public class Playlist extends ActivityObject { public class Playlist extends ActivityObject {

View file

@ -18,30 +18,28 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "product" object type represents a commercial good or * <p>
* service. * The "product" object type represents a commercial good or service.
* </p> * </p>
*<p>The "product" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/product</tt>. * <p>
* The "product" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/product</tt>.
* </p> * </p>
*<p>A product has the following additional components: * <p>
* A product has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Thumbnail</dt> * <dt>Thumbnail</dt>
*<dd>A link to a thumbnail-sized image that * <dd>A link to a thumbnail-sized image that contains a photo of the product. Represented by the Representative Image component of the base Object Construct.
* contains a photo of the product. Represented by the * Processors MAY ignore thumbnails that are of an inappropriate size for their user interface.</dd>
* Representative Image component of the base Object Construct.
* Processors MAY ignore thumbnails that are of an inappropriate
* size for their user interface.
*</dd>
* <dt>Larger Image</dt> * <dt>Larger Image</dt>
*<dd>A Media Link Construct linking to a * <dd>A Media Link Construct linking to a larger -- ideally, full-size -- version of the photo of the product. Represented in JSON as a property named
* larger -- ideally, full-size -- version of the photo of the * <tt>fullImage</tt> whose value is a JSON object with properties as defined in [TODO: xref the JSON serialization of a Media Link Construct].</dd>
* product. Represented in JSON as a property named <tt>fullImage</tt> whose value is a JSON object with * </dl>
* properties as defined in [TODO: xref the JSON serialization of a * </blockquote>
* Media Link Construct]. *
*</dd>
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Product extends ActivityObject { public class Product extends ActivityObject {

View file

@ -18,45 +18,35 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "review" object type represents a primarily prose-based * <p>
* commentary on another object. * The "review" object type represents a primarily prose-based commentary on another object.
* </p> * </p>
*<p>The "review" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/review</tt>. * <p>
* The "review" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/review</tt>.
* </p> * </p>
*<p>A review has the following additional components: * <p>
* A review has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Title</dt> * <dt>Title</dt>
*<dd>The title of the review. Represented by the * <dd>The title of the review. Represented by the Name component of the base Object Construct. Many systems do not have the concept of a title for a review;
* Name component of the base Object Construct. Many systems do not * such systems MUST omit the Name component. Processors SHOULD refer to such reviews as simply being "a review", with appropriate localization, if they are to
* have the concept of a title for a review; such systems MUST omit * be described in a sentence.</dd>
* the Name component. Processors SHOULD refer to such reviews as
* simply being "a review", with appropriate localization, if they
* are to be described in a sentence.
*</dd>
* <dt>Content</dt> * <dt>Content</dt>
*<dd>The content of the comment. Represented in * <dd>The content of the comment. Represented in JSON as a property called <tt>content</tt> whose value is a JSON string containing a fragment of HTML that
* JSON as a property called <tt>content</tt> * represents the content. Publishers SHOULD include any markup necessary to achieve a similar presentation to that on the publisher's own HTML pages, including
* whose value is a JSON string containing a fragment of HTML that * any links that the service automatically adds. Processors MAY remove all HTML markup and consider the comment to be plain text.</dd>
* represents the content. Publishers SHOULD include any markup
* necessary to achieve a similar presentation to that on the
* publisher's own HTML pages, including any links that the service
* automatically adds. Processors MAY remove all HTML markup and
* consider the comment to be plain text.
*</dd>
* <dt>Reviewed Object</dt> * <dt>Reviewed Object</dt>
*<dd>The Object Construct representing * <dd>The Object Construct representing the item that this review applies to. Represented as the In Reply To Object component of the base Object Construct.</dd>
* the item that this review applies to. Represented as the In
* Reply To Object component of the base Object Construct.
*</dd>
* <dt>Rating</dt> * <dt>Rating</dt>
*<dd>A rating for the item, given as a number * <dd>A rating for the item, given as a number between 1.0 and 5.0 inclusive with one decimal place of precision. Represented in JSON as a property called
* between 1.0 and 5.0 inclusive with one decimal place of * <tt>rating</tt> whose value is a JSON number giving the rating.</dd>
* precision. Represented in JSON as a property called <tt>rating</tt> whose value is a JSON number giving * </dl>
* the rating. * </blockquote>
*</dd> *
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Review extends ActivityObject { public class Review extends ActivityObject {

View file

@ -18,27 +18,27 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "service" Object type represents a website, personal website * <p>
* or blog, business, brand, or other entity that performs some kind of * The "service" Object type represents a website, personal website or blog, business, brand, or other entity that performs some kind of work for other
* work for other entities, people, or services, or acts as kind of * entities, people, or services, or acts as kind of container for other objects.
* container for other objects.
* </p> * </p>
*<p>The "service" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/service</tt>. * <p>
* The "service" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/service</tt>.
* </p> * </p>
*<p>A service has the following additional components: * <p>
* A service has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>icon</dt> * <dt>icon</dt>
*<dd>A Media Link Construct representing a link to * <dd>A Media Link Construct representing a link to a small image representing the service. Represented in JSON as a property named <tt>icon</tt> whose value
* a small image representing the service. Represented in JSON as a * is a JSON object with properties as defined in [TODO: xref the JSON serialization of a Media Link Construct]. The linked image MUST have an aspect ratio of
* property named <tt>icon</tt> whose value is a * one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size.</dd>
* JSON object with properties as defined in [TODO: xref the JSON * </dl>
* serialization of a Media Link Construct]. The linked image MUST * </blockquote>
* have an aspect ratio of one (horizontal) to one (vertical) and *
* SHOULD be suitable for presentation at a small size.
*</dd>
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Service extends ActivityObject { public class Service extends ActivityObject {

View file

@ -16,22 +16,23 @@
*/ */
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "song" Object type represents a song or a recording of a * <p>
* song. * The "song" Object type represents a song or a recording of a song.
* </p> * </p>
*<p>Objects of type Song might contain information about the song or * <p>
* recording, or they might contain some representation of the * Objects of type Song might contain information about the song or recording, or they might contain some representation of the recording itself. In the latter
* recording itself. In the latter case, the song SHOULD also be * case, the song SHOULD also be annotated with the "audio" object type as described in <a class='info' href='#audio'>Section&nbsp;3.2.2<span> (</span><span
* annotated with the "audio" object type as described in <a class='info' href='#audio'>Section&nbsp;3.2.2<span> (</span><span class='info'>Audio</span><span>)</span></a> and use its properties. This type should only * class='info'>Audio</span><span>)</span></a> and use its properties. This type should only be used when the publisher can guarantee that the object is a song
* be used when the publisher can guarantee that the object is a song
* rather than merely a generic audio stream. * rather than merely a generic audio stream.
* </p> * </p>
*<p>The Object type URL for the "song" Object type is <tt>http://activitystrea.ms/schema/1.0/song</tt>. * <p>
* The Object type URL for the "song" Object type is <tt>http://activitystrea.ms/schema/1.0/song</tt>.
* </p> * </p>
*<p>A song has no additional components. * <p>
* A song has no additional components.
* </p> * </p>
*
* @author robert.cooper * @author robert.cooper
*/ */
public class Song extends ActivityObject { public class Song extends ActivityObject {
@ -42,8 +43,8 @@ public class Song extends ActivityObject {
* *
* @param newaudio new value of audio * @param newaudio new value of audio
*/ */
public void setAudio(Audio newaudio) { public void setAudio(final Audio newaudio) {
this.audio = newaudio; audio = newaudio;
} }
/** /**
@ -52,7 +53,7 @@ public class Song extends ActivityObject {
* @return the value of audio * @return the value of audio
*/ */
public Audio getAudio() { public Audio getAudio() {
return this.audio; return audio;
} }
@Override @Override

View file

@ -18,22 +18,24 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "status" Object type represents a human-readable update of * <p>
* the author's situation, mood, location or other status. * The "status" Object type represents a human-readable update of the author's situation, mood, location or other status.
* </p> * </p>
*<p>A status is similar in structure to a note, but carries the * <p>
* additional meaning that the content is primarily describing * A status is similar in structure to a note, but carries the additional meaning that the content is primarily describing something its author is doing,
* something its author is doing, feeling or experiencing. * feeling or experiencing.
* </p> * </p>
*<p>A consumers MAY consider the content of the most recent status * <p>
* object it encountered to be the user's current status, unless the * A consumers MAY consider the content of the most recent status object it encountered to be the user's current status, unless the most recent status update is
* most recent status update is old. When a status becomes too old is * old. When a status becomes too old is not defined by this specification.
* not defined by this specification.
* </p> * </p>
*<p>The "status" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/status</tt>. * <p>
* The "status" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/status</tt>.
* </p> * </p>
*<p>A status has the same components as a note. * <p>
* A status has the same components as a note.
* </p> * </p>
*
* @author robert.cooper * @author robert.cooper
*/ */
public class Status extends ActivityObject { public class Status extends ActivityObject {

View file

@ -16,31 +16,26 @@
*/ */
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* *
* @author robert.cooper * @author robert.cooper
*/ */
public enum Verb { public enum Verb {
/** /**
* The "mark as favorite" Verb indicates that the Subject marked the Object as an item of * The "mark as favorite" Verb indicates that the Subject marked the Object as an item of special interest. Objects so marked often appear in a collection
* special interest. Objects so marked often appear in a collection of such Objects which * of such Objects which MAY be published as a feed of entries annotated with this Verb. If a particular service uses favorites as a mechanism by which a
* MAY be published as a feed of entries annotated with this Verb. * user can recall items that were earlier marked, it MAY be appropriate to also mark activities of this type with the "save" Verb as described in Section
* If a particular service uses favorites as a mechanism by which a user can recall * 3.1.8. The verb URI for the "mark as favorite" Verb is http://activitystrea.ms/schema/1.0/favorite.
* items that were earlier marked, it MAY be appropriate to also mark activities of
* this type with the "save" Verb as described in Section 3.1.8.
* The verb URI for the "mark as favorite" Verb is http://activitystrea.ms/schema/1.0/favorite.
*/ */
MARK_AS_FAVORITE("http://activitystrea.ms/schema/1.0/favorite"), MARK_AS_FAVORITE("http://activitystrea.ms/schema/1.0/favorite"),
/** /**
* The "start following" Verb indicates that the Subject began following the activity * The "start following" Verb indicates that the Subject began following the activity of the Object. In most cases, the Object of this Verb will be a user,
* of the Object. In most cases, the Object of this Verb will be a user, but it can * but it can potentially be of any type that can sensibly generate activity.
* potentially be of any type that can sensibly generate activity.
* *
* The verb URI for the "start following" Verb is http://activitystrea.ms/schema/1.0/follow. * The verb URI for the "start following" Verb is http://activitystrea.ms/schema/1.0/follow.
* *
* Processors MAY ignore (silently drop) successive identical "start following" activities * Processors MAY ignore (silently drop) successive identical "start following" activities regardless of whether they maintain state sufficient to determine
* regardless of whether they maintain state sufficient to determine (A), (B), or (C) above. * (A), (B), or (C) above.
*/ */
START_FOLLOWING("http://activitystrea.ms/schema/1.0/follow"), START_FOLLOWING("http://activitystrea.ms/schema/1.0/follow"),
/** /**
@ -52,127 +47,113 @@ public enum Verb {
/** /**
* The "make friend" Verb indicates the creation of a friendship that is reciprocated by the object. * The "make friend" Verb indicates the creation of a friendship that is reciprocated by the object.
* *
* Since this verb implies an activity on the part of its object, processors MUST NOT accept * Since this verb implies an activity on the part of its object, processors MUST NOT accept activities with this Verb unless they are able to verify
* activities with this Verb unless they are able to verify through some external means that * through some external means that there is in fact a reciprocated connection. For example, a processor MAY have received a guarantee from a particular
* there is in fact a reciprocated connection. For example, a processor MAY have received a * publisher that the publisher will only use this Verb in cases where a reciprocal relationship exists.
* guarantee from a particular publisher that the publisher will only use this Verb in cases
* where a reciprocal relationship exists.
* *
* The verb URI for the "make friend" Verb is http://activitystrea.ms/schema/1.0/make-friend. * The verb URI for the "make friend" Verb is http://activitystrea.ms/schema/1.0/make-friend.
*/ */
MAKE_FRIEND("http://activitystrea.ms/schema/1.0/make-friend"), MAKE_FRIEND("http://activitystrea.ms/schema/1.0/make-friend"),
/** /**
* The "join" Verb indicates that the actor has become a member of the Object. * The "join" Verb indicates that the actor has become a member of the Object. This specification only defines the meaning of this Verb when its Object is a
* This specification only defines the meaning of this Verb when its Object is a Group, * Group, though implementors SHOULD be prepared to handle other Object types as meaning MAY be provided by extension specifications.
* though implementors SHOULD be prepared to handle other Object types as meaning
* MAY be provided by extension specifications.
* *
* Processors MAY ignore (silently drop) successive identical "join" activities * Processors MAY ignore (silently drop) successive identical "join" activities regardless of whether they maintain state sufficient to determine (A) or (B)
* regardless of whether they maintain state sufficient to determine (A) or (B) above. * above.
* *
* The "join" Verb is identified by the URI http://activitystrea.ms/schema/1.0/join. * The "join" Verb is identified by the URI http://activitystrea.ms/schema/1.0/join.
*/ */
JOIN("http://activitystrea.ms/schema/1.0/join"), JOIN("http://activitystrea.ms/schema/1.0/join"),
/** /**
* The "play" verb indicates that the subject spent some time enjoying the object. * The "play" verb indicates that the subject spent some time enjoying the object. For example, if the object is a video this indicates that the subject
* For example, if the object is a video this indicates that the subject watched all or part of the video. * watched all or part of the video.
* *
* The "play" Verb is identified by the URI http://activitystrea.ms/schema/1.0/play. * The "play" Verb is identified by the URI http://activitystrea.ms/schema/1.0/play.
*/ */
PLAY("http://activitystrea.ms/schema/1.0/play"), PLAY("http://activitystrea.ms/schema/1.0/play"),
/** /**
* The "Post" Verb is described in section 8 of the AtomActivity specification. * The "Post" Verb is described in section 8 of the AtomActivity specification. It is only referenced here for completeness.
* It is only referenced here for completeness.
* *
* http://activitystrea.ms/schema/1.0/post * http://activitystrea.ms/schema/1.0/post
*/ */
POST("http://activitystrea.ms/schema/1.0/post"), POST("http://activitystrea.ms/schema/1.0/post"),
/** /**
* The "save" Verb indicates that the Subject has called out the Object as being of * The "save" Verb indicates that the Subject has called out the Object as being of interest primarily to him- or herself. Though this action MAY be shared
* interest primarily to him- or herself. Though this action MAY be shared publicly, * publicly, the implication is that the Object has been saved primarily for the actor's own benefit rather than to show it to others as would be indicated
* the implication is that the Object has been saved primarily for the actor's own * by the "share" Verb (Section 3.1.9).
* benefit rather than to show it to others as would be indicated by the "share"
* Verb (Section 3.1.9).
* *
* The "save" Verb is identified by the URI http://activitystrea.ms/schema/1.0/save. * The "save" Verb is identified by the URI http://activitystrea.ms/schema/1.0/save.
*/ */
SAVE("http://activitystrea.ms/schema/1.0/save"), SAVE("http://activitystrea.ms/schema/1.0/save"),
/** /**
* The "share" Verb indicates that the Subject has called out the Object to readers. * The "share" Verb indicates that the Subject has called out the Object to readers. In most cases, the actor did not create the Object being shared, but is
* In most cases, the actor did not create the Object being shared, but is instead * instead drawing attention to it.
* drawing attention to it.
* *
* The "share" Verb is identified by the URI http://activitystrea.ms/schema/1.0/share. * The "share" Verb is identified by the URI http://activitystrea.ms/schema/1.0/share.
*/ */
SHARE("http://activitystrea.ms/schema/1.0/share"), SHARE("http://activitystrea.ms/schema/1.0/share"),
/** /**
* The "tag" verb indicates that the actor has identified the presence of a target * The "tag" verb indicates that the actor has identified the presence of a target inside another object. For example, the actor may have specified that a
* inside another object. For example, the actor may have specified that a particular * particular user appears in a photo.
* user appears in a photo.
* *
* The "tag" verb is identified by the URI http://activitystrea.ms/schema/1.0/tag. * The "tag" verb is identified by the URI http://activitystrea.ms/schema/1.0/tag.
* *
* The target of the "tag" verb gives the object in which the tag has been added. * The target of the "tag" verb gives the object in which the tag has been added. For example, if a user appears in a photo, the activity:object is the user
* For example, if a user appears in a photo, the activity:object is the user and * and the activity:target is the photo.
* the activity:target is the photo.
*/ */
TAG("http://activitystrea.ms/schema/1.0/tag"), TAG("http://activitystrea.ms/schema/1.0/tag"),
/** /**
* The "update" Verb indicates that the Subject has modified the referenced Object. * The "update" Verb indicates that the Subject has modified the referenced Object.
* *
* Implementors SHOULD use verbs such as Section 3.1.7 where the Subject is adding * Implementors SHOULD use verbs such as Section 3.1.7 where the Subject is adding new items to a Section 3.2.8 or similar. Update is reserved for
* new items to a Section 3.2.8 or similar. Update is reserved for modifications * modifications to existing Objects or data such as changing a user's profile information.
* to existing Objects or data such as changing a user's profile information.
* *
* The "update" Verb is identified by the URI http://activitystrea.ms/schema/1.0/update. * The "update" Verb is identified by the URI http://activitystrea.ms/schema/1.0/update.
*/ */
UPDATE("http://activitystrea.ms/schema/1.0/update"), UPDATE("http://activitystrea.ms/schema/1.0/update"),
/** /**
* *
*<p>The "positive RSVP" verb indicates that the actor has made a * <p>
* positive RSVP for the object. This specification only defines the * The "positive RSVP" verb indicates that the actor has made a positive RSVP for the object. This specification only defines the meaning of this verb when
* meaning of this verb when its object is an event (see <a class='info' href='#event'>Section&nbsp;4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though implementors SHOULD be prepared to * its object is an event (see <a class='info' href='#event'>Section&nbsp;4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though
* handle other object types as meaning MAY be provided by extension * implementors SHOULD be prepared to handle other object types as meaning MAY be provided by extension specifications.
* specifications.
* </p> * </p>
*<p>The use of this Verb is only appropriate when the RSVP was * <p>
* created by an explicit action by the actor. It is not appropriate to * The use of this Verb is only appropriate when the RSVP was created by an explicit action by the actor. It is not appropriate to use this verb when a user
* use this verb when a user has been added as an attendee by an event * has been added as an attendee by an event organiser or administrator.
* organiser or administrator.
* </p> * </p>
*<p>The verb URI for the "positive RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-yes</tt>. * <p>
* The verb URI for the "positive RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-yes</tt>.
* </p> * </p>
*/ */
RSVP_YES("http://activitystrea.ms/schema/1.0/rsvp-yes"), RSVP_YES("http://activitystrea.ms/schema/1.0/rsvp-yes"),
/** /**
* <p>The "possible RSVP" verb indicates that the actor has made a * <p>
* possible RSVP for the object. This specification only defines the * The "possible RSVP" verb indicates that the actor has made a possible RSVP for the object. This specification only defines the meaning of this verb when
* meaning of this verb when its object is an event (see <a class='info' href='#event'>Section&nbsp;4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though implementors SHOULD be prepared to * its object is an event (see <a class='info' href='#event'>Section&nbsp;4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though
* handle other object types as meaning MAY be provided by extension * implementors SHOULD be prepared to handle other object types as meaning MAY be provided by extension specifications.
* specifications.
* </p> * </p>
*<p>The use of this Verb is only appropriate when the RSVP was * <p>
* created by an explicit action by the actor. It is not appropriate to * The use of this Verb is only appropriate when the RSVP was created by an explicit action by the actor. It is not appropriate to use this verb when a user
* use this verb when a user has been added as an attendee by an event * has been added as an attendee by an event organiser or administrator.
* organiser or administrator.
* </p> * </p>
*<p>The verb URI for the "possible RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-maybe</tt>. * <p>
* The verb URI for the "possible RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-maybe</tt>.
* </p> * </p>
*/ */
RSVP_MAYBE("http://activitystrea.ms/schema/1.0/rsvp-maybe"), RSVP_MAYBE("http://activitystrea.ms/schema/1.0/rsvp-maybe"),
/** /**
* <p>The "negative RSVP" verb indicates that the actor has made a * <p>
* negative RSVP for the object. This specification only defines the * The "negative RSVP" verb indicates that the actor has made a negative RSVP for the object. This specification only defines the meaning of this verb when
* meaning of this verb when its object is an event (see <a class='info' href='#event'>Section&nbsp;4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though implementors SHOULD be prepared to * its object is an event (see <a class='info' href='#event'>Section&nbsp;4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though
* handle other object types as meaning MAY be provided by extension * implementors SHOULD be prepared to handle other object types as meaning MAY be provided by extension specifications.
* specifications.
* </p> * </p>
*<p>The use of this Verb is only appropriate when the RSVP was * <p>
* created by an explicit action by the actor. It is not appropriate to * The use of this Verb is only appropriate when the RSVP was created by an explicit action by the actor. It is not appropriate to use this verb when a user
* use this verb when a user has been added as an attendee by an event * has been added as an attendee by an event organiser or administrator.
* organiser or administrator.
* </p> * </p>
*<p>The verb URI for the "negative RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-no</tt>. * <p>
* The verb URI for the "negative RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-no</tt>.
* </p> * </p>
*/ */
RSVP_NO("http://activitystrea.ms/schema/1.0/rsvp-no"); RSVP_NO("http://activitystrea.ms/schema/1.0/rsvp-no");
@ -189,13 +170,14 @@ public enum Verb {
public String toString() { public String toString() {
return iri; return iri;
} }
/** /**
* *
* @param iri * @param iri
* @return * @return
*/ */
public static Verb fromIRI(String iri){ public static Verb fromIRI(final String iri) {
for(Verb v: Verb.values()){ for (final Verb v : Verb.values()) {
if (v.toString().equals(iri)) { if (v.toString().equals(iri)) {
return v; return v;
} }

View file

@ -18,29 +18,28 @@
package org.rometools.feed.module.activitystreams.types; package org.rometools.feed.module.activitystreams.types;
/** /**
* <p>The "video" Object type represents video content, which usually * <p>
* consists of a motion picture track and an audio track. * The "video" Object type represents video content, which usually consists of a motion picture track and an audio track.
* </p> * </p>
*<p>The "video" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/video</tt>. * <p>
* The "video" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/video</tt>.
* </p> * </p>
*<p>A video has the following additional components: * <p>
* A video has the following additional components:
* </p> * </p>
*<p></p> * <p>
*<blockquote class="text"><dl> * </p>
* <blockquote class="text">
* <dl>
* <dt>Video Stream Link</dt> * <dt>Video Stream Link</dt>
*<dd>A Media Link Construct linking * <dd>A Media Link Construct linking to the video content itself. Represented in JSON as a property called <tt>stream</tt> whose value is a JSON object with
* to the video content itself. Represented in JSON as a property * properties as defined in [TODO: xref the JSON serialization of a Media Link Construct]</dd>
* called <tt>stream</tt> whose value is a JSON
* object with properties as defined in [TODO: xref the JSON
* serialization of a Media Link Construct]
*</dd>
* <dt>Embed Code</dt> * <dt>Embed Code</dt>
*<dd>An HTML fragment that, when embedded in * <dd>An HTML fragment that, when embedded in an HTML page, will provide an interactive player UI for the video stream. Represented in JSON as a property
* an HTML page, will provide an interactive player UI for the * called <tt>embedCode</tt> whose value is a JSON string containing the fragment of HTML.</dd>
* video stream. Represented in JSON as a property called <tt>embedCode</tt> whose value is a JSON string * </dl>
* containing the fragment of HTML. * </blockquote>
*</dd> *
*</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Video { public class Video {

View file

@ -41,10 +41,9 @@ package org.rometools.feed.module.base;
import java.util.Date; import java.util.Date;
/** /**
* This is an interface for the GoogleBase plug in that exposes methods used for * This is an interface for the GoogleBase plug in that exposes methods used for Article or News entry types.
* Article or News entry types. *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
*/ */
@ -53,38 +52,33 @@ public interface Article extends GlobalInterface {
* Array of Author Names. Limit 10. * Array of Author Names. Limit 10.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="author"></a>author</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="author"></a>author</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Author of the item.</font></td>
* Author of the item.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td> * <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param authors Array of Author Names. Limit 10. * @param authors Array of Author Names. Limit 10.
*/ */
public void setAuthors(String[] authors); public void setAuthors(String[] authors);
@ -93,38 +87,33 @@ public interface Article extends GlobalInterface {
* Array of Author Names. Limit 10. * Array of Author Names. Limit 10.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="author"></a>author</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="author"></a>author</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Author of the item.</font></td>
* Author of the item.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td> * <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Array of author names. * @return Array of author names.
*/ */
public String[] getAuthors(); public String[] getAuthors();
@ -134,41 +123,37 @@ public interface Article extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="news_source"></a>news_source</b></font></td>
* <b><a name="news_source"></a>news_source</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> The source of news content.</font></td>
* The source of news content.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:news_source&gt;Journal&lt;/g:news_source&gt;</font></td> * <td><font size="-1"> &lt;g:news_source&gt;Journal&lt;/g:news_source&gt;</font></td>
* *
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> News and Articles</font></td>
* <td><font size="-1">
* News and Articles</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param newsSource Source for this article * @param newsSource Source for this article
*/ */
public void setNewsSource(String newsSource); public void setNewsSource(String newsSource);
@ -177,41 +162,37 @@ public interface Article extends GlobalInterface {
* Source for this article. * Source for this article.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="news_source"></a>news_source</b></font></td>
* <b><a name="news_source"></a>news_source</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> The source of news content.</font></td>
* The source of news content.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:news_source&gt;Journal&lt;/g:news_source&gt;</font></td> * <td><font size="-1"> &lt;g:news_source&gt;Journal&lt;/g:news_source&gt;</font></td>
* *
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> News and Articles</font></td>
* <td><font size="-1">
* News and Articles</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return source for this article. * @return source for this article.
*/ */
public String getNewsSource(); public String getNewsSource();
@ -221,41 +202,38 @@ public interface Article extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="pages"></a>pages</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="pages"></a>pages</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* The number of pages in the publication.</font></td> * The number of pages in the publication.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:pages&gt;18&lt;/g:pages&gt;</font></td> * <td><font size="-1"> &lt;g:pages&gt;18&lt;/g:pages&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> integer</font></td>
* integer</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param pages Number of pages in the article * @param pages Number of pages in the article
*/ */
public void setPages(Integer pages); public void setPages(Integer pages);
@ -265,41 +243,38 @@ public interface Article extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="pages"></a>pages</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="pages"></a>pages</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* The number of pages in the publication.</font></td> * The number of pages in the publication.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:pages&gt;18&lt;/g:pages&gt;</font></td> * <td><font size="-1"> &lt;g:pages&gt;18&lt;/g:pages&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> integer</font></td>
* integer</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Number of pages in the article * @return Number of pages in the article
*/ */
public Integer getPages(); public Integer getPages();
@ -308,17 +283,16 @@ public interface Article extends GlobalInterface {
* Date article was published. * Date article was published.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="publish_date"></a>publish_date</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publish_date"></a>publish_date</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* YYYY-MM-DD</font></td> * YYYY-MM-DD</font></td>
* *
* </tr> * </tr>
@ -330,11 +304,9 @@ public interface Article extends GlobalInterface {
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reference Items</font></td>
* Reference Items</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -344,7 +316,9 @@ public interface Article extends GlobalInterface {
* *
* date</font></td> * date</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param publishDate Date article was published * @param publishDate Date article was published
*/ */
public void setPublishDate(Date publishDate); public void setPublishDate(Date publishDate);
@ -353,17 +327,16 @@ public interface Article extends GlobalInterface {
* Date article was published. * Date article was published.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="publish_date"></a>publish_date</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publish_date"></a>publish_date</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* YYYY-MM-DD</font></td> * YYYY-MM-DD</font></td>
* *
* </tr> * </tr>
@ -375,11 +348,9 @@ public interface Article extends GlobalInterface {
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reference Items</font></td>
* Reference Items</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -389,7 +360,9 @@ public interface Article extends GlobalInterface {
* *
* date</font></td> * date</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Date article was published * @return Date article was published
*/ */
public Date getPublishDate(); public Date getPublishDate();

View file

@ -40,10 +40,9 @@ package org.rometools.feed.module.base;
import org.rometools.feed.module.base.types.DateTimeRange; import org.rometools.feed.module.base.types.DateTimeRange;
/** /**
* This is an interface for the GoogleBase plug in that exposes methods used for * This is an interface for the GoogleBase plug in that exposes methods used for Class or Course information entry types.
* Class or Course information entry types. *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
*/ */
@ -54,29 +53,27 @@ public interface Course extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="course_date_range"></a>course_date_range</b></font></td>
* <b><a name="course_date_range"></a>course_date_range</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1">Date and time range a class is in session, in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO
* <td><font size="-1">Date and time range a class is in session, in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a>. Two sub-attributes * 8601</a>. Two sub-attributes are included in course_date_range attribute.
* are included in course_date_range attribute.<ul type="disc"> * <ul type="disc">
* *
* <li>start = Start date and time of a trip in * <li>start = Start date and time of a trip in format YYYY-MM-DDThh:mm:ss</li>
* format YYYY-MM-DDThh:mm:ss</li> * <li>end = End date and time of a trip in format YYYY-MM-DDThh:mm:ss</li>
* <li>end = End date and time of a trip in * </ul>
* format YYYY-MM-DDThh:mm:ss</li></ul></font></td> * </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:course_date_range&gt; <br> * <td><font size="-1"> &lt;g:course_date_range&gt; <br>
* *
* &lt;g:start&gt;2005-12-20T09:30:01&lt;/g:start&gt; * &lt;g:start&gt;2005-12-20T09:30:01&lt;/g:start&gt; <br>
* <br>
* &lt;g:end&gt;2005-12-29T10:30:59&lt;/g:end&gt;<br> * &lt;g:end&gt;2005-12-29T10:30:59&lt;/g:end&gt;<br>
* &lt;/g:course_date_range&gt;</font></td> * &lt;/g:course_date_range&gt;</font></td>
* </tr> * </tr>
@ -85,18 +82,18 @@ public interface Course extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Course schedules</font></td>
* Course schedules</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> dateTimeRange</font></td>
* dateTimeRange</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param courseDateRange The timeframe a course is running * @param courseDateRange The timeframe a course is running
*/ */
public void setCourseDateRange(DateTimeRange courseDateRange); public void setCourseDateRange(DateTimeRange courseDateRange);
@ -107,29 +104,27 @@ public interface Course extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="course_date_range"></a>course_date_range</b></font></td>
* <b><a name="course_date_range"></a>course_date_range</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1">Date and time range a class is in session, in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO
* <td><font size="-1">Date and time range a class is in session, in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a>. Two sub-attributes * 8601</a>. Two sub-attributes are included in course_date_range attribute.
* are included in course_date_range attribute.<ul type="disc"> * <ul type="disc">
* *
* <li>start = Start date and time of a trip in * <li>start = Start date and time of a trip in format YYYY-MM-DDThh:mm:ss</li>
* format YYYY-MM-DDThh:mm:ss</li> * <li>end = End date and time of a trip in format YYYY-MM-DDThh:mm:ss</li>
* <li>end = End date and time of a trip in * </ul>
* format YYYY-MM-DDThh:mm:ss</li></ul></font></td> * </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:course_date_range&gt; <br> * <td><font size="-1"> &lt;g:course_date_range&gt; <br>
* *
* &lt;g:start&gt;2005-12-20T09:30:01&lt;/g:start&gt; * &lt;g:start&gt;2005-12-20T09:30:01&lt;/g:start&gt; <br>
* <br>
* &lt;g:end&gt;2005-12-29T10:30:59&lt;/g:end&gt;<br> * &lt;g:end&gt;2005-12-29T10:30:59&lt;/g:end&gt;<br>
* &lt;/g:course_date_range&gt;</font></td> * &lt;/g:course_date_range&gt;</font></td>
* </tr> * </tr>
@ -138,18 +133,18 @@ public interface Course extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Course schedules</font></td>
* Course schedules</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> dateTimeRange</font></td>
* dateTimeRange</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return The timeframe a course is running * @return The timeframe a course is running
*/ */
public DateTimeRange getCourseDateRange(); public DateTimeRange getCourseDateRange();
@ -159,7 +154,8 @@ public interface Course extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="course_number"></a>course_number</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="course_number"></a>course_number</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -175,18 +171,18 @@ public interface Course extends GlobalInterface {
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* <td><font size="-1">Course schedules</font></td> * <td><font size="-1">Course schedules</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* *
* <td><font size="-1">string</font></td> * <td><font size="-1">string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param courseNumber ID code associated with a course * @param courseNumber ID code associated with a course
*/ */
public void setCourseNumber(String courseNumber); public void setCourseNumber(String courseNumber);
@ -197,7 +193,8 @@ public interface Course extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="course_number"></a>course_number</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="course_number"></a>course_number</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -213,18 +210,18 @@ public interface Course extends GlobalInterface {
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* <td><font size="-1">Course schedules</font></td> * <td><font size="-1">Course schedules</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* *
* <td><font size="-1">string</font></td> * <td><font size="-1">string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return ID code associated with a course * @return ID code associated with a course
*/ */
public String getCourseNumber(); public String getCourseNumber();
@ -234,7 +231,8 @@ public interface Course extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="course_times"></a>course_times</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="course_times"></a>course_times</b></font></td>
* *
* </tr> * </tr>
@ -250,18 +248,18 @@ public interface Course extends GlobalInterface {
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* <td><font size="-1">Course schedules</font></td> * <td><font size="-1">Course schedules</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* *
* <td><font size="-1">string</font></td> * <td><font size="-1">string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param courseTimes Time a class is in session * @param courseTimes Time a class is in session
*/ */
public void setCourseTimes(String courseTimes); public void setCourseTimes(String courseTimes);
@ -272,7 +270,8 @@ public interface Course extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="course_times"></a>course_times</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="course_times"></a>course_times</b></font></td>
* *
* </tr> * </tr>
@ -288,18 +287,18 @@ public interface Course extends GlobalInterface {
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* <td><font size="-1">Course schedules</font></td> * <td><font size="-1">Course schedules</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* *
* <td><font size="-1">string</font></td> * <td><font size="-1">string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Time a class is in session * @return Time a class is in session
*/ */
public String getCourseTimes(); public String getCourseTimes();
@ -310,43 +309,40 @@ public interface Course extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="salary"></a>salary</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="salary"></a>salary</b></font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Salary for this position. Non-numeric values such as "$" symbols are not acceptable. </font></td>
* <td><font size="-1">
* Salary for this position. Non-numeric values such as "$" symbols are not acceptable. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Example</b></font></td> * <b>Example</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> &lt;g:salary&gt;55000&lt;/g:salary&gt;</font></td>
* &lt;g:salary&gt;55000&lt;/g:salary&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Jobs</font></td>
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1">
* *
* float</font></td> * float</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param salary Salary for this position * @param salary Salary for this position
*/ */
public void setSalary(Float salary); public void setSalary(Float salary);
@ -356,43 +352,40 @@ public interface Course extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="salary"></a>salary</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="salary"></a>salary</b></font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Salary for this position. Non-numeric values such as "$" symbols are not acceptable. </font></td>
* <td><font size="-1">
* Salary for this position. Non-numeric values such as "$" symbols are not acceptable. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Example</b></font></td> * <b>Example</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> &lt;g:salary&gt;55000&lt;/g:salary&gt;</font></td>
* &lt;g:salary&gt;55000&lt;/g:salary&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Jobs</font></td>
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1">
* *
* float</font></td> * float</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Salary for this position * @return Salary for this position
*/ */
public Float getSalary(); public Float getSalary();
@ -402,39 +395,36 @@ public interface Course extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="subject"></a>subject</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="subject"></a>subject</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Topic of study for a course.</font></td>
* Topic of study for a course.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:subject&gt;Trigonometry&lt;/g:subject&gt;</font></td> * <td><font size="-1"> &lt;g:subject&gt;Trigonometry&lt;/g:subject&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Course schedules</font></td> * Course schedules</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param subject Topics of study for a course * @param subject Topics of study for a course
*/ */
public void setSubjects(String[] subject); public void setSubjects(String[] subject);
@ -444,39 +434,36 @@ public interface Course extends GlobalInterface {
* *
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="subject"></a>subject</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="subject"></a>subject</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Topic of study for a course.</font></td>
* Topic of study for a course.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:subject&gt;Trigonometry&lt;/g:subject&gt;</font></td> * <td><font size="-1"> &lt;g:subject&gt;Trigonometry&lt;/g:subject&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Course schedules</font></td> * Course schedules</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Topics of study for a course * @return Topics of study for a course
*/ */
public String[] getSubjects(); public String[] getSubjects();
@ -484,22 +471,19 @@ public interface Course extends GlobalInterface {
/** /**
* Name of the school at which a class is offered. * Name of the school at which a class is offered.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="university"></a>university</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="university"></a>university</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Name of the school a class is offered at. </font></td>
* <td><font size="-1">
* Name of the school a class is offered at. </font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:university&gt;Stanford&lt;/g:university&gt;</font></td> * <td><font size="-1"> &lt;g:university&gt;Stanford&lt;/g:university&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -507,18 +491,18 @@ public interface Course extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Course schedules</font></td>
* Course schedules</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1">
* *
* string</font></td> * string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param university Name of the school at which a class is offered. * @param university Name of the school at which a class is offered.
*/ */
public void setUniversity(String university); public void setUniversity(String university);
@ -526,22 +510,19 @@ public interface Course extends GlobalInterface {
/** /**
* Name of the school at which a class is offered. * Name of the school at which a class is offered.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="university"></a>university</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="university"></a>university</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Name of the school a class is offered at. </font></td>
* <td><font size="-1">
* Name of the school a class is offered at. </font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:university&gt;Stanford&lt;/g:university&gt;</font></td> * <td><font size="-1"> &lt;g:university&gt;Stanford&lt;/g:university&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -549,18 +530,18 @@ public interface Course extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Course schedules</font></td>
* Course schedules</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1">
* *
* string</font></td> * string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Name of the school at which a class is offered. * @return Name of the school at which a class is offered.
*/ */
public String getUniversity(); public String getUniversity();

View file

@ -20,9 +20,9 @@
package org.rometools.feed.module.base; package org.rometools.feed.module.base;
/** /**
* This class represents a custom tag name and value. * This class represents a custom tag name and value.
*
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
*/ */
@ -30,16 +30,17 @@ public interface CustomTag {
/** /**
* Returns the tag name used. * Returns the tag name used.
*
* @return Returns the tag name used. * @return Returns the tag name used.
*/ */
public String getName(); public String getName();
/** /**
* The value of the custom tag. * The value of the custom tag. <br>
* <br>
* <br> * <br>
* <table border="1" cellpadding="6" cellspacing="0"> * <table border="1" cellpadding="6" cellspacing="0">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td><strong><font size="-1">Type (JavaType)</font></strong></td> * <td><strong><font size="-1">Type (JavaType)</font></strong></td>
* *
* <td><strong><font size="-1">Description</font></strong></td> * <td><strong><font size="-1">Description</font></strong></td>
@ -91,9 +92,11 @@ public interface CustomTag {
* <tr valign="top"> * <tr valign="top">
* <td><font size="-1">dateTimeRange (DateTimeRange)</font></td> * <td><font size="-1">dateTimeRange (DateTimeRange)</font></td>
* *
* <td><font size="-1">Start and end dates for an event. An attribute of this type will contain two sub-attributes, &lt;start&gt; and &lt;end&gt; in format YYYY-MM-DD</font></td> * <td><font size="-1">Start and end dates for an event. An attribute of this type will contain two sub-attributes, &lt;start&gt; and &lt;end&gt; in format
* YYYY-MM-DD</font></td>
* *
* <td><font size="-1">&lt;start&gt;1975-09-25&lt;/start&gt;<br>&lt;end&gt;1975-09-25&lt;/end&gt; * <td><font size="-1">&lt;start&gt;1975-09-25&lt;/start&gt;<br>
* &lt;end&gt;1975-09-25&lt;/end&gt;
* *
* </font></td> * </font></td>
* </tr> * </tr>
@ -117,7 +120,9 @@ public interface CustomTag {
* <td><font size="-1">921 W. Dana Street, Mtn View, CA-94103 </font></td> * <td><font size="-1">921 W. Dana Street, Mtn View, CA-94103 </font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @return The value of the tag. The objects class is determined by the "type" attribute on the tag. * @return The value of the tag. The objects class is determined by the "type" attribute on the tag.
*/ */
public Object getValue(); public Object getValue();

View file

@ -19,179 +19,191 @@
*/ */
package org.rometools.feed.module.base; package org.rometools.feed.module.base;
import java.net.URL;
import java.util.Date;
import org.rometools.feed.module.base.types.DateTimeRange; import org.rometools.feed.module.base.types.DateTimeRange;
import org.rometools.feed.module.base.types.FloatUnit; import org.rometools.feed.module.base.types.FloatUnit;
import org.rometools.feed.module.base.types.IntUnit; import org.rometools.feed.module.base.types.IntUnit;
import org.rometools.feed.module.base.types.ShortDate; import org.rometools.feed.module.base.types.ShortDate;
import java.net.URL;
import java.util.Date;
/** /**
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class CustomTagImpl implements CustomTag { public class CustomTagImpl implements CustomTag {
private Object value; private Object value;
private String name; private final String name;
/** Creates a new instance of CustomTagImpl */ /** Creates a new instance of CustomTagImpl */
public CustomTagImpl(String name,String value) { public CustomTagImpl(final String name, final String value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,Integer value) { public CustomTagImpl(final String name, final Integer value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,Float value) { public CustomTagImpl(final String name, final Float value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,IntUnit value) { public CustomTagImpl(final String name, final IntUnit value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,FloatUnit value) { public CustomTagImpl(final String name, final FloatUnit value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,ShortDate value) { public CustomTagImpl(final String name, final ShortDate value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,Date value) { public CustomTagImpl(final String name, final Date value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,DateTimeRange value) { public CustomTagImpl(final String name, final DateTimeRange value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,URL value) { public CustomTagImpl(final String name, final URL value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,Boolean value) { public CustomTagImpl(final String name, final Boolean value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public CustomTagImpl(String name,Location value) { public CustomTagImpl(final String name, final Location value) {
if( name == null || value == null ){ throw new NullPointerException("Name and Value cannont be null."); } if (name == null || value == null) {
throw new NullPointerException("Name and Value cannont be null.");
}
this.name = name; this.name = name;
this.value = value; this.value = value;
} }
public String getName() { public String getName() {
return this.name; return name;
} }
public Object getValue() { public Object getValue() {
return this.value; return value;
} }
public boolean equals( Object o ){ @Override
public boolean equals(final Object o) {
if (o instanceof CustomTag) { if (o instanceof CustomTag) {
CustomTag tag = (CustomTag) o; final CustomTag tag = (CustomTag) o;
if( this.name.equals( tag.getName() ) && this.value.equals( tag.getValue() )) if (name.equals(tag.getName()) && value.equals(tag.getValue())) {
return true; return true;
} }
}
return false; return false;
} }
/** /**
* Creates and returns a copy of this object. The precise meaning * Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any
* of "copy" may depend on the class of the object. The general * object <tt>x</tt>, the expression: <blockquote>
* intent is that, for any object <tt>x</tt>, the expression: *
* <blockquote>
* <pre> * <pre>
* x.clone() != x</pre></blockquote> * x.clone() != x
* will be true, and that the expression: * </pre>
* <blockquote> *
* </blockquote> will be true, and that the expression: <blockquote>
*
* <pre> * <pre>
* x.clone().getClass() == x.getClass()</pre></blockquote> * x.clone().getClass() == x.getClass()
* will be <tt>true</tt>, but these are not absolute requirements. * </pre>
* While it is typically the case that: *
* <blockquote> * </blockquote> will be <tt>true</tt>, but these are not absolute requirements. While it is typically the case that: <blockquote>
*
* <pre> * <pre>
* x.clone().equals(x)</pre></blockquote> * x.clone().equals(x)
* will be <tt>true</tt>, this is not an absolute requirement. * </pre>
*
* </blockquote> will be <tt>true</tt>, this is not an absolute requirement.
* <p> * <p>
* By convention, the returned object should be obtained by calling * By convention, the returned object should be obtained by calling <tt>super.clone</tt>. If a class and all of its superclasses (except <tt>Object</tt>)
* <tt>super.clone</tt>. If a class and all of its superclasses (except * obey this convention, it will be the case that <tt>x.clone().getClass() == x.getClass()</tt>.
* <tt>Object</tt>) obey this convention, it will be the case that
* <tt>x.clone().getClass() == x.getClass()</tt>.
* <p> * <p>
* By convention, the object returned by this method should be independent * By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be
* of this object (which is being cloned). To achieve this independence, * necessary to modify one or more fields of the object returned by <tt>super.clone</tt> before returning it. Typically, this means copying any mutable
* it may be necessary to modify one or more fields of the object returned * objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the
* by <tt>super.clone</tt> before returning it. Typically, this means * copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned
* copying any mutable objects that comprise the internal "deep structure" * by <tt>super.clone</tt> need to be modified.
* of the object being cloned and replacing the references to these
* objects with references to the copies. If a class contains only
* primitive fields or references to immutable objects, then it is usually
* the case that no fields in the object returned by <tt>super.clone</tt>
* need to be modified.
* <p> * <p>
* The method <tt>clone</tt> for class <tt>Object</tt> performs a * The method <tt>clone</tt> for class <tt>Object</tt> performs a specific cloning operation. First, if the class of this object does not implement the
* specific cloning operation. First, if the class of this object does * interface <tt>Cloneable</tt>, then a <tt>CloneNotSupportedException</tt> is thrown. Note that all arrays are considered to implement the interface
* not implement the interface <tt>Cloneable</tt>, then a * <tt>Cloneable</tt>. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of
* <tt>CloneNotSupportedException</tt> is thrown. Note that all arrays * the corresponding fields of this object, as if by assignment; the contents of the fields are not themselves cloned. Thus, this method performs a
* are considered to implement the interface <tt>Cloneable</tt>. * "shallow copy" of this object, not a "deep copy" operation.
* Otherwise, this method creates a new instance of the class of this
* object and initializes all its fields with exactly the contents of
* the corresponding fields of this object, as if by assignment; the
* contents of the fields are not themselves cloned. Thus, this method
* performs a "shallow copy" of this object, not a "deep copy" operation.
* <p> * <p>
* The class <tt>Object</tt> does not itself implement the interface * The class <tt>Object</tt> does not itself implement the interface <tt>Cloneable</tt>, so calling the <tt>clone</tt> method on an object whose class is
* <tt>Cloneable</tt>, so calling the <tt>clone</tt> method on an object * <tt>Object</tt> will result in throwing an exception at run time.
* whose class is <tt>Object</tt> will result in throwing an
* exception at run time.
* *
* @return a clone of this instance. * @return a clone of this instance.
* @exception CloneNotSupportedException if the object's class does not * @exception CloneNotSupportedException if the object's class does not support the <code>Cloneable</code> interface. Subclasses that override the
* support the <code>Cloneable</code> interface. Subclasses * <code>clone</code> method can also throw this exception to indicate that an instance cannot be cloned.
* that override the <code>clone</code> method can also
* throw this exception to indicate that an instance cannot
* be cloned.
* @see java.lang.Cloneable * @see java.lang.Cloneable
*/ */
@Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
CustomTagImpl cti = new CustomTagImpl( this.name, "" ); final CustomTagImpl cti = new CustomTagImpl(name, "");
cti.value = this.value; cti.value = value;
return cti; return cti;
} }
@Override
public String toString() { public String toString() {
return "[custom name=\""+this.name+"\" value=\""+this.value.toString()+"\"]"; return "[custom name=\"" + name + "\" value=\"" + value.toString() + "\"]";
} }
public static class Location {
private String value;
public Location(String value) { public static class Location {
private final String value;
public Location(final String value) {
this.value = value; this.value = value;
} }
@ -199,17 +211,23 @@ public class CustomTagImpl implements CustomTag {
return value; return value;
} }
@Override
public Object clone() { public Object clone() {
return new Location(this.value); return new Location(value);
} }
@Override
public String toString() { public String toString() {
return value; return value;
} }
public boolean equals( Object o ){ @Override
if( o instanceof Location && ((Location) o).value.equals(this.value) ) return true; public boolean equals(final Object o) {
else return false; if (o instanceof Location && ((Location) o).value.equals(value)) {
return true;
} else {
return false;
}
} }
} }
} }

View file

@ -20,9 +20,10 @@
package org.rometools.feed.module.base; package org.rometools.feed.module.base;
import com.sun.syndication.feed.module.Module;
import java.util.List; import java.util.List;
import com.sun.syndication.feed.module.Module;
/** /**
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>

View file

@ -20,10 +20,11 @@
package org.rometools.feed.module.base; package org.rometools.feed.module.base;
import com.sun.syndication.feed.CopyFrom;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.sun.syndication.feed.CopyFrom;
/** /**
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
@ -31,28 +32,29 @@ import java.util.List;
public class CustomTagsImpl implements CustomTags { public class CustomTagsImpl implements CustomTags {
private List values; private List values;
/** Creates a new instance of CustomTagsImpl */ /** Creates a new instance of CustomTagsImpl */
public CustomTagsImpl() { public CustomTagsImpl() {
} }
public List getValues() { public List getValues() {
values = (values == null )? new ArrayList() : values; values = values == null ? new ArrayList() : values;
return values; return values;
} }
public void setValues(List values){ public void setValues(final List values) {
this.values = values; this.values = values;
} }
public void copyFrom(CopyFrom object) { public void copyFrom(final CopyFrom object) {
CustomTags ct = (CustomTags) object; final CustomTags ct = (CustomTags) object;
this.values = new ArrayList( ct.getValues() ); values = new ArrayList(ct.getValues());
} }
@Override @Override
public Object clone() { public Object clone() {
CustomTagsImpl cti = new CustomTagsImpl(); final CustomTagsImpl cti = new CustomTagsImpl();
cti.values = new ArrayList( this.values ); cti.values = new ArrayList(values);
return cti; return cti;
} }
@ -64,5 +66,4 @@ public class CustomTagsImpl implements CustomTags {
return CustomTags.URI; return CustomTags.URI;
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -43,18 +43,19 @@ import java.io.Serializable;
import java.net.URL; import java.net.URL;
import java.util.Date; import java.util.Date;
/** /**
* This is an interface representing the universals. * This is an interface representing the universals.
*
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
*/ */
public interface GlobalInterface extends Serializable { public interface GlobalInterface extends Serializable {
/**Expiration Date for this item. /**
* <br> * Expiration Date for this item. <br>
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="expiration_date"></a>expiration_date</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="expiration_date"></a>expiration_date</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -65,31 +66,32 @@ public interface GlobalInterface extends Serializable {
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> &lt;g:expiration_date&gt;2005-20-12&lt;/g:expiration_date&gt;
* &lt;g:expiration_date&gt;2005-20-12&lt;/g:expiration_date&gt;
* *
* </font></td> * </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* <td><font size="-1"> Reference Items, Events, Housing, * <td><font size="-1"> Reference Items, Events, Housing, Jobs, People profiles, Products, Services, Travel, Vehicles, Wanted Ads.</font></td>
* Jobs, People profiles, Products, Services, Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* *
* <td><font size="-1"> date</font></td> * <td><font size="-1"> date</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param expirationDate the date this entry will expire * @param expirationDate the date this entry will expire
*/ */
public void setExpirationDate(Date expirationDate); public void setExpirationDate(Date expirationDate);
/** Expiration Date for this item. /**
* <br> * Expiration Date for this item. <br>
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="expiration_date"></a>expiration_date</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="expiration_date"></a>expiration_date</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -100,22 +102,22 @@ public interface GlobalInterface extends Serializable {
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> &lt;g:expiration_date&gt;2005-20-12&lt;/g:expiration_date&gt;
* &lt;g:expiration_date&gt;2005-20-12&lt;/g:expiration_date&gt;
* *
* </font></td> * </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* <td><font size="-1"> Reference Items, Events, Housing, * <td><font size="-1"> Reference Items, Events, Housing, Jobs, People profiles, Products, Services, Travel, Vehicles, Wanted Ads.</font></td>
* Jobs, People profiles, Products, Services, Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* *
* <td><font size="-1"> date</font></td> * <td><font size="-1"> date</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return the date this entry will expire * @return the date this entry will expire
*/ */
public Date getExpirationDate(); public Date getExpirationDate();
@ -124,28 +126,26 @@ public interface GlobalInterface extends Serializable {
* Date and time that the item expires. * Date and time that the item expires.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="expiration_date_time"></a>expiration_date_time</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="expiration_date_time"></a>expiration_date_time</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* <td><font size="-1"> Date and time that the item expires in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format: * <td><font size="-1"> Date and time that the item expires in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a>
* YYYY-MM-DDThh:mm:ss</font></td> * format: YYYY-MM-DDThh:mm:ss</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;g:expiration_date_time&gt;12-20-05T11:59:59&lt;/g:expiration_date_time&gt; </font></td>
* &lt;g:expiration_date_time&gt;12-20-05T11:59:59&lt;/g:expiration_date_time&gt;
* </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* *
* <td><font size="-1"> Reference Items, Events, Housing, * <td><font size="-1"> Reference Items, Events, Housing, Jobs, People profiles, Products, Services, Travel, Vehicles, Wanted Ads.</font></td>
* Jobs, People profiles, Products, Services, Travel, Vehicles, Wanted Ads.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -153,7 +153,9 @@ public interface GlobalInterface extends Serializable {
* <td><font size="-1"> dateTime</font></td> * <td><font size="-1"> dateTime</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @param expirationDateTime Date and time that the item expires. * @param expirationDateTime Date and time that the item expires.
*/ */
public void setExpirationDateTime(Date expirationDateTime); public void setExpirationDateTime(Date expirationDateTime);
@ -162,28 +164,26 @@ public interface GlobalInterface extends Serializable {
* Date and time that the item expires. * Date and time that the item expires.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="expiration_date_time"></a>expiration_date_time</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="expiration_date_time"></a>expiration_date_time</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* <td><font size="-1"> Date and time that the item expires in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format: * <td><font size="-1"> Date and time that the item expires in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a>
* YYYY-MM-DDThh:mm:ss</font></td> * format: YYYY-MM-DDThh:mm:ss</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;g:expiration_date_time&gt;12-20-05T11:59:59&lt;/g:expiration_date_time&gt; </font></td>
* &lt;g:expiration_date_time&gt;12-20-05T11:59:59&lt;/g:expiration_date_time&gt;
* </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* *
* <td><font size="-1"> Reference Items, Events, Housing, * <td><font size="-1"> Reference Items, Events, Housing, Jobs, People profiles, Products, Services, Travel, Vehicles, Wanted Ads.</font></td>
* Jobs, People profiles, Products, Services, Travel, Vehicles, Wanted Ads.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -191,24 +191,26 @@ public interface GlobalInterface extends Serializable {
* <td><font size="-1"> dateTime</font></td> * <td><font size="-1"> dateTime</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @return Date and time that the item expires. * @return Date and time that the item expires.
*/ */
public Date getExpirationDateTime(); public Date getExpirationDateTime();
/** Unique id for this item. /**
* Unique id for this item.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="id"></a>id</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="id"></a>id</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Unique alphanumeric identifier for each item * <td><font size="-1"> Unique alphanumeric identifier for each item - e.g., your internal ID code.<br>
* - e.g., your internal ID code.<br> * IMPORTANT: Once you submit an item with a unique id, this identifier must not change when you send in a new bulk upload. Each item must retain the same
* IMPORTANT: Once you submit an item with a unique id, this identifier * id in subsequent bulk uploads.</font></td>
* must not change when you send in a new bulk upload. Each item must
* retain the same id in subsequent bulk uploads.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
@ -218,9 +220,8 @@ public interface GlobalInterface extends Serializable {
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* <td><font size="-1"> Reference Items, Events, Housing, * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* Jobs, News and Articles, People profiles, Products, Reviews, Services, * Ads.</font></td>
* Travel, Vehicles, Wanted Ads.</font></td>
* *
* </tr> * </tr>
* *
@ -228,24 +229,26 @@ public interface GlobalInterface extends Serializable {
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param id unique identifier for this entry * @param id unique identifier for this entry
*/ */
public void setId(String id); public void setId(String id);
/** Unique id for this item. /**
* Unique id for this item.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="id"></a>id</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="id"></a>id</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Unique alphanumeric identifier for each item * <td><font size="-1"> Unique alphanumeric identifier for each item - e.g., your internal ID code.<br>
* - e.g., your internal ID code.<br> * IMPORTANT: Once you submit an item with a unique id, this identifier must not change when you send in a new bulk upload. Each item must retain the same
* IMPORTANT: Once you submit an item with a unique id, this identifier * id in subsequent bulk uploads.</font></td>
* must not change when you send in a new bulk upload. Each item must
* retain the same id in subsequent bulk uploads.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
@ -255,9 +258,8 @@ public interface GlobalInterface extends Serializable {
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* <td><font size="-1"> Reference Items, Events, Housing, * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* Jobs, News and Articles, People profiles, Products, Reviews, Services, * Ads.</font></td>
* Travel, Vehicles, Wanted Ads.</font></td>
* *
* </tr> * </tr>
* *
@ -265,28 +267,27 @@ public interface GlobalInterface extends Serializable {
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return unique identifier for this entry * @return unique identifier for this entry
*/ */
public String getId(); public String getId();
/**Images for this item. /**
* <br> * Images for this item. <br>
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="image_link"></a>image_link</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="image_link"></a>image_link</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* <td><font size="-1"> URL of an associated image if available online. * <td><font size="-1"> URL of an associated image if available online. Use your full-sized images; do not use thumbnail images. Up to ten image_links, all
* Use your full-sized images; do not use thumbnail images. Up to ten * placed in between their own &lt;image_link&gt; and &lt;/image_link&gt; attributes, can be included with each item. If you do not have an image available,
* image_links, all placed in between their own &lt;image_link&gt; * do not include this attribute. Please do not include an image that says "Image not available." Relative URLs and logo images are not acceptable.</font></td>
* and &lt;/image_link&gt; attributes, can be included with each item.
* If you do not have an image available, do not include this attribute.
* Please do not include an image that says "Image not available."
* Relative URLs and logo images are not acceptable.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -304,9 +305,8 @@ public interface GlobalInterface extends Serializable {
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* *
* <td><font size="-1"> Reference Items, Events, Housing, * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* Jobs, News and Articles, People profiles, Products, Reviews, Services, * Ads.</font></td>
* Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
@ -314,28 +314,27 @@ public interface GlobalInterface extends Serializable {
* <td><font size="-1"> url</font></td> * <td><font size="-1"> url</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @param imageLinks URLs to images. Limit 10. * @param imageLinks URLs to images. Limit 10.
*/ */
public void setImageLinks(URL[] imageLinks); public void setImageLinks(URL[] imageLinks);
/**Images for this item. /**
* <br> * Images for this item. <br>
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="image_link"></a>image_link</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="image_link"></a>image_link</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* <td><font size="-1"> URL of an associated image if available online. * <td><font size="-1"> URL of an associated image if available online. Use your full-sized images; do not use thumbnail images. Up to ten image_links, all
* Use your full-sized images; do not use thumbnail images. Up to ten * placed in between their own &lt;image_link&gt; and &lt;/image_link&gt; attributes, can be included with each item. If you do not have an image available,
* image_links, all placed in between their own &lt;image_link&gt; * do not include this attribute. Please do not include an image that says "Image not available." Relative URLs and logo images are not acceptable.</font></td>
* and &lt;/image_link&gt; attributes, can be included with each item.
* If you do not have an image available, do not include this attribute.
* Please do not include an image that says "Image not available."
* Relative URLs and logo images are not acceptable.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -353,9 +352,8 @@ public interface GlobalInterface extends Serializable {
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* *
* <td><font size="-1"> Reference Items, Events, Housing, * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* Jobs, News and Articles, People profiles, Products, Reviews, Services, * Ads.</font></td>
* Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
@ -363,16 +361,19 @@ public interface GlobalInterface extends Serializable {
* <td><font size="-1"> url</font></td> * <td><font size="-1"> url</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @return URLs to images * @return URLs to images
*/ */
public URL[] getImageLinks(); public URL[] getImageLinks();
/**Labels for this item. /**
* <br> * Labels for this item. <br>
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"> * <td colspan="2" bgcolor="#dddddd" valign="top">
* <font size="-1"><b><a name="label"></a>label</b></font></td> * <font size="-1"><b><a name="label"></a>label</b></font></td>
@ -382,11 +383,10 @@ public interface GlobalInterface extends Serializable {
* *
* <font size="-1"><b>Details</b></font></td> * <font size="-1"><b>Details</b></font></td>
* <td> * <td>
* <font size="-1">A * <font size="-1">A list of classifications the item may fall under. Up to ten user-selected label, each placed in between their own &lt;label&gt;
* list of classifications the item may fall under. Up to ten user-selected
* label, each placed in between their own &lt;label&gt;
* *
* and &lt;/label&gt; tags, can be included with each item. These attributes will be used to match your items to search queries. Each attribute value will be checked for policy compliance.</font></td> * and &lt;/label&gt; tags, can be included with each item. These attributes will be used to match your items to search queries. Each attribute value will
* be checked for policy compliance.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
@ -399,42 +399,35 @@ public interface GlobalInterface extends Serializable {
* </font> * </font>
* *
* <font size="-1">&lt;g:label&gt;Leather&lt;/g:label&gt;<br> * <font size="-1">&lt;g:label&gt;Leather&lt;/g:label&gt;<br>
* </font> * </font> <font size="-1">&lt;g:label&gt;Power locks&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;Power locks&lt;/g:label&gt;<br>
* *
* </font> * </font> <font size="-1">&lt;g:label&gt;sunroof&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;sunroof&lt;/g:label&gt;<br>
* *
* </font> * </font> <font size="-1">&lt;g:label&gt;ABS&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;ABS&lt;/g:label&gt;<br><br> * <br>
* </font> * </font> <font size="-1"><em>For a concert in an Events information type:</em></font><br>
* <font size="-1"><em>For a concert in an Events information type:</em></font><br>
* *
* <font size="-1">&lt;g:label&gt;VIP&lt;/g:label&gt;<br> * <font size="-1">&lt;g:label&gt;VIP&lt;/g:label&gt;<br>
* *
* </font> * </font> <font size="-1">&lt;g:label&gt;front row&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;front row&lt;/g:label&gt;<br> * </font> <font size="-1">&lt;g:label&gt;backstage&lt;/g:label&gt;<br>
* </font>
* <font size="-1">&lt;g:label&gt;backstage&lt;/g:label&gt;<br>
* *
* </font> * </font>
* *
* <font size="-1">&lt;g:label&gt;KROCK 101.5&lt;/g:label&gt;<br> * <font size="-1">&lt;g:label&gt;KROCK 101.5&lt;/g:label&gt;<br>
* </font> * </font> <font size="-1">&lt;g:label&gt;parking passes&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;parking passes&lt;/g:label&gt;<br><br> * <br>
* </font> * </font> <font size="-1"><em>Not acceptable:</em><br>
* <font size="-1"><em>Not acceptable:</em><br>
* *
* </font> * </font> <font size="-1">&lt;g:label&gt; leater, power locks, sunroof, ABS &lt;/g:label&gt;</font></td>
* <font size="-1">&lt;g:label&gt; leater, power locks, sunroof, ABS &lt;/g:label&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> * <td width="120">
* <font size="-1"><b>Attribute of</b></font></td> * <font size="-1"><b>Attribute of</b></font></td>
* *
* <td> * <td>
* <font size="-1">Reference Items, Events, Housing, Jobs, News and Articles, * <font size="-1">Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted Ads.</font></td> * Ads.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> * <td width="120">
@ -444,16 +437,19 @@ public interface GlobalInterface extends Serializable {
* <font size="-1">string</font></td> * <font size="-1">string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param labels labels for this entry. Limit 10. * @param labels labels for this entry. Limit 10.
*/ */
public void setLabels(String[] labels); public void setLabels(String[] labels);
/**Labels for this item. /**
* <br> * Labels for this item. <br>
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"> * <td colspan="2" bgcolor="#dddddd" valign="top">
* <font size="-1"><b><a name="label"></a>label</b></font></td> * <font size="-1"><b><a name="label"></a>label</b></font></td>
@ -463,11 +459,10 @@ public interface GlobalInterface extends Serializable {
* *
* <font size="-1"><b>Details</b></font></td> * <font size="-1"><b>Details</b></font></td>
* <td> * <td>
* <font size="-1">A * <font size="-1">A list of classifications the item may fall under. Up to ten user-selected label, each placed in between their own &lt;label&gt;
* list of classifications the item may fall under. Up to ten user-selected
* label, each placed in between their own &lt;label&gt;
* *
* and &lt;/label&gt; tags, can be included with each item. These attributes will be used to match your items to search queries. Each attribute value will be checked for policy compliance.</font></td> * and &lt;/label&gt; tags, can be included with each item. These attributes will be used to match your items to search queries. Each attribute value will
* be checked for policy compliance.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
@ -480,42 +475,35 @@ public interface GlobalInterface extends Serializable {
* </font> * </font>
* *
* <font size="-1">&lt;g:label&gt;Leather&lt;/g:label&gt;<br> * <font size="-1">&lt;g:label&gt;Leather&lt;/g:label&gt;<br>
* </font> * </font> <font size="-1">&lt;g:label&gt;Power locks&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;Power locks&lt;/g:label&gt;<br>
* *
* </font> * </font> <font size="-1">&lt;g:label&gt;sunroof&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;sunroof&lt;/g:label&gt;<br>
* *
* </font> * </font> <font size="-1">&lt;g:label&gt;ABS&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;ABS&lt;/g:label&gt;<br><br> * <br>
* </font> * </font> <font size="-1"><em>For a concert in an Events information type:</em></font><br>
* <font size="-1"><em>For a concert in an Events information type:</em></font><br>
* *
* <font size="-1">&lt;g:label&gt;VIP&lt;/g:label&gt;<br> * <font size="-1">&lt;g:label&gt;VIP&lt;/g:label&gt;<br>
* *
* </font> * </font> <font size="-1">&lt;g:label&gt;front row&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;front row&lt;/g:label&gt;<br> * </font> <font size="-1">&lt;g:label&gt;backstage&lt;/g:label&gt;<br>
* </font>
* <font size="-1">&lt;g:label&gt;backstage&lt;/g:label&gt;<br>
* *
* </font> * </font>
* *
* <font size="-1">&lt;g:label&gt;KROCK 101.5&lt;/g:label&gt;<br> * <font size="-1">&lt;g:label&gt;KROCK 101.5&lt;/g:label&gt;<br>
* </font> * </font> <font size="-1">&lt;g:label&gt;parking passes&lt;/g:label&gt;<br>
* <font size="-1">&lt;g:label&gt;parking passes&lt;/g:label&gt;<br><br> * <br>
* </font> * </font> <font size="-1"><em>Not acceptable:</em><br>
* <font size="-1"><em>Not acceptable:</em><br>
* *
* </font> * </font> <font size="-1">&lt;g:label&gt; leater, power locks, sunroof, ABS &lt;/g:label&gt;</font></td>
* <font size="-1">&lt;g:label&gt; leater, power locks, sunroof, ABS &lt;/g:label&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> * <td width="120">
* <font size="-1"><b>Attribute of</b></font></td> * <font size="-1"><b>Attribute of</b></font></td>
* *
* <td> * <td>
* <font size="-1">Reference Items, Events, Housing, Jobs, News and Articles, * <font size="-1">Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted Ads.</font></td> * Ads.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> * <td width="120">
@ -525,7 +513,9 @@ public interface GlobalInterface extends Serializable {
* <font size="-1">string</font></td> * <font size="-1">string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return labels for this entry * @return labels for this entry
*/ */
public String[] getLabels(); public String[] getLabels();

View file

@ -41,22 +41,19 @@ package org.rometools.feed.module.base;
import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.module.Module;
/** /**
* This is the root interface for the Google Base module. * This is the root interface for the Google Base module.
* *
* <p> * <p>
* It supports all the individual data "types". If you want to work with, for * It supports all the individual data "types". If you want to work with, for instance, just the Article or Job datatype, you can cast it to the respective
* instance, just the Article or Job datatype, you can cast it to the * interface and see only methods related to a particular entry type.
* respective interface and see only methods related to a particular entry
* type.
* </p> * </p>
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
*/ */
public interface GoogleBase extends Module,Article,Course,Event,Job,Person,Product,Review,ScholarlyArticle,Service,Travel,Unknown,Vehicle,Wanted,Housing { public interface GoogleBase extends Module, Article, Course, Event, Job, Person, Product, Review, ScholarlyArticle, Service, Travel, Unknown, Vehicle, Wanted,
Housing {
/** This is the URI for the Google Base Schema. */ /** This is the URI for the Google Base Schema. */
public static final String URI = "http://base.google.com/ns/1.0"; public static final String URI = "http://base.google.com/ns/1.0";
} }

File diff suppressed because it is too large Load diff

View file

@ -42,9 +42,8 @@ package org.rometools.feed.module.base;
import org.rometools.feed.module.base.types.CurrencyEnumeration; import org.rometools.feed.module.base.types.CurrencyEnumeration;
import org.rometools.feed.module.base.types.PriceTypeEnumeration; import org.rometools.feed.module.base.types.PriceTypeEnumeration;
/**
/** This is an interface for the GoogleBase plug in that exposes methods used for * This is an interface for the GoogleBase plug in that exposes methods used for Job listing entry types.
* Job listing entry types.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
@ -53,14 +52,14 @@ public interface Job extends GlobalInterface {
/** /**
* Level of education required for an employment position. * Level of education required for an employment position.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="education"></a>education</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="education"></a>education</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Level of education required for an employment * <td><font size="-1"> Level of education required for an employment position.</font></td>
* position.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
@ -76,7 +75,9 @@ public interface Job extends GlobalInterface {
* *
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param education Level of education required for an employment position. * @param education Level of education required for an employment position.
*/ */
public void setEducation(String education); public void setEducation(String education);
@ -84,14 +85,14 @@ public interface Job extends GlobalInterface {
/** /**
* Level of education required for an employment position. * Level of education required for an employment position.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="education"></a>education</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="education"></a>education</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Level of education required for an employment * <td><font size="-1"> Level of education required for an employment position.</font></td>
* position.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
@ -107,7 +108,9 @@ public interface Job extends GlobalInterface {
* *
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Level of education required for an employment position. * @return Level of education required for an employment position.
*/ */
public String getEducation(); public String getEducation();
@ -115,7 +118,8 @@ public interface Job extends GlobalInterface {
/** /**
* Company providing employment. * Company providing employment.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="employer"></a>employer</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="employer"></a>employer</b></font></td>
* *
* </tr> * </tr>
@ -137,7 +141,9 @@ public interface Job extends GlobalInterface {
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param employer Company providing employment. * @param employer Company providing employment.
*/ */
public void setEmployer(String employer); public void setEmployer(String employer);
@ -145,7 +151,8 @@ public interface Job extends GlobalInterface {
/** /**
* Company providing employment. * Company providing employment.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="employer"></a>employer</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="employer"></a>employer</b></font></td>
* *
* </tr> * </tr>
@ -167,7 +174,9 @@ public interface Job extends GlobalInterface {
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Company providing employment. * @return Company providing employment.
*/ */
public String getEmployer(); public String getEmployer();
@ -176,15 +185,15 @@ public interface Job extends GlobalInterface {
* Legal residency requirements for an employment position. * Legal residency requirements for an employment position.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="immigration_status"></a>immigration_status</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="immigration_status"></a>immigration_status</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Legal residency requirements for an employment * <td><font size="-1"> Legal residency requirements for an employment position.</font></td>
* position.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
@ -202,7 +211,9 @@ public interface Job extends GlobalInterface {
* *
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param immigrationStatus Legal residency requirements for an employment position. * @param immigrationStatus Legal residency requirements for an employment position.
*/ */
public void setImmigrationStatus(String immigrationStatus); public void setImmigrationStatus(String immigrationStatus);
@ -211,15 +222,15 @@ public interface Job extends GlobalInterface {
* Legal residency requirements for an employment position. * Legal residency requirements for an employment position.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="immigration_status"></a>immigration_status</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="immigration_status"></a>immigration_status</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Legal residency requirements for an employment * <td><font size="-1"> Legal residency requirements for an employment position.</font></td>
* position.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
@ -237,7 +248,9 @@ public interface Job extends GlobalInterface {
* *
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Legal residency requirements for an employment position. * @return Legal residency requirements for an employment position.
*/ */
public String getImmigrationStatus(); public String getImmigrationStatus();
@ -246,43 +259,39 @@ public interface Job extends GlobalInterface {
* The functions of an employment position. * The functions of an employment position.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="job_function"></a>job_function</b></font></td>
* <b><a name="job_function"></a>job_function</b></font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> The function of an employment position.</font></td>
* <td><font size="-1">
* The function of an employment position.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td> * <td><font size="-1"> &lt;g:job_function&gt;Product Manager&lt;/g:job_function&gt;</font></td>
* <td><font size="-1"> &lt;g:job_function&gt;Product
* Manager&lt;/g:job_function&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Jobs</font></td>
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param function The functions of an employment position. * @param function The functions of an employment position.
*/ */
public void setJobFunctions(String[] function); public void setJobFunctions(String[] function);
@ -291,43 +300,39 @@ public interface Job extends GlobalInterface {
* The functions of an employment position. * The functions of an employment position.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="job_function"></a>job_function</b></font></td>
* <b><a name="job_function"></a>job_function</b></font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> The function of an employment position.</font></td>
* <td><font size="-1">
* The function of an employment position.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td> * <td><font size="-1"> &lt;g:job_function&gt;Product Manager&lt;/g:job_function&gt;</font></td>
* <td><font size="-1"> &lt;g:job_function&gt;Product
* Manager&lt;/g:job_function&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Jobs</font></td>
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return The functions of an employment position. * @return The functions of an employment position.
*/ */
public String[] getJobFunctions(); public String[] getJobFunctions();
@ -335,40 +340,37 @@ public interface Job extends GlobalInterface {
/** /**
* The industry of an employment position. * The industry of an employment position.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1">
* *
* <b><a name="job_industry"></a>job_industry</b></font></td> * <b><a name="job_industry"></a>job_industry</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> The industry of an employment position.</font></td>
* <td><font size="-1">
* The industry of an employment position.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:job_industry&gt;Government&lt;/g:job_industry&gt;</font></td> * <td><font size="-1"> &lt;g:job_industry&gt;Government&lt;/g:job_industry&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Jobs</font></td>
* <td><font size="-1">
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param jobIndustries The industry of an employment position. * @param jobIndustries The industry of an employment position.
*/ */
public void setJobIndustries(String[] jobIndustries); public void setJobIndustries(String[] jobIndustries);
@ -376,40 +378,37 @@ public interface Job extends GlobalInterface {
/** /**
* The industry of an employment position. * The industry of an employment position.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1">
* *
* <b><a name="job_industry"></a>job_industry</b></font></td> * <b><a name="job_industry"></a>job_industry</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> The industry of an employment position.</font></td>
* <td><font size="-1">
* The industry of an employment position.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:job_industry&gt;Government&lt;/g:job_industry&gt;</font></td> * <td><font size="-1"> &lt;g:job_industry&gt;Government&lt;/g:job_industry&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Jobs</font></td>
* <td><font size="-1">
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return The industry of an employment position. * @return The industry of an employment position.
*/ */
public String[] getJobIndustries(); public String[] getJobIndustries();
@ -417,41 +416,37 @@ public interface Job extends GlobalInterface {
/** /**
* Type of employment position. Example: Full-time, part-time, contractor, etc. * Type of employment position. Example: Full-time, part-time, contractor, etc.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="job_type"></a>job_type</b></font></td>
* <b><a name="job_type"></a>job_type</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Type of employment position. Example: Full-time, part-time, contractor, etc.</font></td>
* Type of employment position. Example: Full-time, part-time, contractor, etc.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:job_type&gt;contractor&lt;/g:job_type&gt;</font></td> * <td><font size="-1"> &lt;g:job_type&gt;contractor&lt;/g:job_type&gt;</font></td>
* *
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Jobs</font></td>
* <td><font size="-1">
* Jobs</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param jobTypes Type of employment position. Example: Full-time, part-time, contractor, etc. * @param jobTypes Type of employment position. Example: Full-time, part-time, contractor, etc.
*/ */
public void setJobTypes(String[] jobTypes); public void setJobTypes(String[] jobTypes);
@ -459,41 +454,37 @@ public interface Job extends GlobalInterface {
/** /**
* Type of employment position. Example: Full-time, part-time, contractor, etc. * Type of employment position. Example: Full-time, part-time, contractor, etc.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="job_type"></a>job_type</b></font></td>
* <b><a name="job_type"></a>job_type</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Type of employment position. Example: Full-time, part-time, contractor, etc.</font></td>
* Type of employment position. Example: Full-time, part-time, contractor, etc.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:job_type&gt;contractor&lt;/g:job_type&gt;</font></td> * <td><font size="-1"> &lt;g:job_type&gt;contractor&lt;/g:job_type&gt;</font></td>
* *
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Jobs</font></td>
* <td><font size="-1">
* Jobs</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Type of employment position. Example: Full-time, part-time, contractor, etc. * @return Type of employment position. Example: Full-time, part-time, contractor, etc.
*/ */
public String[] getJobTypes(); public String[] getJobTypes();
@ -501,49 +492,45 @@ public interface Job extends GlobalInterface {
/** /**
* Location of the position. * Location of the position.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="location"></a>location</b></font></td>
* <b><a name="location"></a>location</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Location of a property. Should include street, city, state, postal code, and country, in that order. </font></td>
* <td><font size="-1"> Location of a property. Should
* include street, city, state, postal code, and country, in that order. </font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> <em>Acceptable:</em><br>
* <em>Acceptable:</em><br> * &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* *
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
* &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt; * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td> * &lt;g:location&gt; <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* <td><font size="-1"> * Ads.</font></td>
* Reference Items, Events, Housing, Jobs, News and Articles,
* People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> locationType</font></td>
* <td><font size="-1">
* locationType</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param location Location of the position. * @param location Location of the position.
*/ */
public void setLocation(String location); public void setLocation(String location);
@ -551,49 +538,45 @@ public interface Job extends GlobalInterface {
/** /**
* Location of the position. * Location of the position.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="location"></a>location</b></font></td>
* <b><a name="location"></a>location</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Location of a property. Should include street, city, state, postal code, and country, in that order. </font></td>
* <td><font size="-1"> Location of a property. Should
* include street, city, state, postal code, and country, in that order. </font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> <em>Acceptable:</em><br>
* <em>Acceptable:</em><br> * &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* *
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
* &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt; * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td> * &lt;g:location&gt; <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* <td><font size="-1"> * Ads.</font></td>
* Reference Items, Events, Housing, Jobs, News and Articles,
* People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> locationType</font></td>
* <td><font size="-1">
* locationType</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Location of the position. * @return Location of the position.
*/ */
public String getLocation(); public String getLocation();
@ -601,43 +584,40 @@ public interface Job extends GlobalInterface {
/** /**
* Salary for this position. Non-numeric values such as "$" symbols are not acceptable. * Salary for this position. Non-numeric values such as "$" symbols are not acceptable.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="salary"></a>salary</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="salary"></a>salary</b></font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Salary for this position. Non-numeric values such as "$" symbols are not acceptable. </font></td>
* <td><font size="-1">
* Salary for this position. Non-numeric values such as "$" symbols are not acceptable. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Example</b></font></td> * <b>Example</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> &lt;g:salary&gt;55000&lt;/g:salary&gt;</font></td>
* &lt;g:salary&gt;55000&lt;/g:salary&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Jobs</font></td>
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1">
* *
* float</font></td> * float</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param salary Salary for this position. Non-numeric values such as "$" symbols are not acceptable. * @param salary Salary for this position. Non-numeric values such as "$" symbols are not acceptable.
*/ */
public void setSalary(Float salary); public void setSalary(Float salary);
@ -645,43 +625,40 @@ public interface Job extends GlobalInterface {
/** /**
* Salary for this position. Non-numeric values such as "$" symbols are not acceptable. * Salary for this position. Non-numeric values such as "$" symbols are not acceptable.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="salary"></a>salary</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="salary"></a>salary</b></font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Salary for this position. Non-numeric values such as "$" symbols are not acceptable. </font></td>
* <td><font size="-1">
* Salary for this position. Non-numeric values such as "$" symbols are not acceptable. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Example</b></font></td> * <b>Example</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> &lt;g:salary&gt;55000&lt;/g:salary&gt;</font></td>
* &lt;g:salary&gt;55000&lt;/g:salary&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Attribute of</b></font></td> * <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Jobs</font></td>
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1">
* *
* float</font></td> * float</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Salary for this position. Non-numeric values such as "$" symbols are not acceptable. * @return Salary for this position. Non-numeric values such as "$" symbols are not acceptable.
*/ */
public Float getSalary(); public Float getSalary();
@ -689,18 +666,15 @@ public interface Job extends GlobalInterface {
/** /**
* The type of salary included. * The type of salary included.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="salary_type"></a>salary_type</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="salary_type"></a>salary_type</b></font></td>
* *
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> The type of salary included. Accepted values are <EFBFBD>starting<EFBFBD> or <EFBFBD>negotiable;<EFBFBD> The default is <EFBFBD>starting at.<EFBFBD></font></td>
* <td><font size="-1"> The type of salary included.
* Accepted values are <EFBFBD>starting<EFBFBD> or <EFBFBD>negotiable;<EFBFBD> The default is <EFBFBD>starting
* at.<EFBFBD></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -711,11 +685,9 @@ public interface Job extends GlobalInterface {
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Jobs</font></td>
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -725,7 +697,9 @@ public interface Job extends GlobalInterface {
* *
* "starting" or "negotiable"</font></td> * "starting" or "negotiable"</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param salaryType The type of salary included. * @param salaryType The type of salary included.
*/ */
public void setSalaryType(PriceTypeEnumeration salaryType); public void setSalaryType(PriceTypeEnumeration salaryType);
@ -733,18 +707,15 @@ public interface Job extends GlobalInterface {
/** /**
* The type of salary included. * The type of salary included.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="salary_type"></a>salary_type</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="salary_type"></a>salary_type</b></font></td>
* *
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> The type of salary included. Accepted values are <EFBFBD>starting<EFBFBD> or <EFBFBD>negotiable;<EFBFBD> The default is <EFBFBD>starting at.<EFBFBD></font></td>
* <td><font size="-1"> The type of salary included.
* Accepted values are <EFBFBD>starting<EFBFBD> or <EFBFBD>negotiable;<EFBFBD> The default is <EFBFBD>starting
* at.<EFBFBD></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -755,11 +726,9 @@ public interface Job extends GlobalInterface {
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Jobs</font></td>
* Jobs</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -769,49 +738,51 @@ public interface Job extends GlobalInterface {
* *
* "starting" or "negotiable"</font></td> * "starting" or "negotiable"</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return The type of salary included. * @return The type of salary included.
*/ */
public PriceTypeEnumeration getSalaryType(); public PriceTypeEnumeration getSalaryType();
/** /**
* Currency of the price amount for an item. * Currency of the price amount for an item.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="currency"></a>currency</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="currency"></a>currency</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td> <font size="-1">Currency * <td><font size="-1">Currency of the price amount for an item. Values must be in <a
* of the price amount for an item. Values must be in <a href="http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html">ISO * href="http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html">ISO 4217</a> currency code format.</font></td>
* 4217</a> currency code format.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td> <font size="-1"><em>Acceptable:</em><br>&lt;g:currency&gt;USD&lt;/g:currency&gt;<br> * <td><font size="-1"><em>Acceptable:</em><br>
* &lt;g:currency&gt;USD&lt;/g:currency&gt;<br>
* *
* <em>Not acceptable:</em><br>&lt;g:currency&gt;US Dollars&lt;/g:currency&gt;</font></td> * <em>Not acceptable:</em><br>
* &lt;g:currency&gt;US Dollars&lt;/g:currency&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td> * <td><font size="-1">Events, Housing, Products, Services, Travel, Vehicles</font></td>
* <td> <font size="-1">Events,
* Housing, Products, Services, Travel, Vehicles</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* <td><font size="-1">currencyEnumeration</font></td> * <td><font size="-1">currencyEnumeration</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param value Currency of the price amount for an item. * @param value Currency of the price amount for an item.
*/ */
public void setCurrency(CurrencyEnumeration value); public void setCurrency(CurrencyEnumeration value);
@ -820,39 +791,40 @@ public interface Job extends GlobalInterface {
* Currency of the price amount for an item. * Currency of the price amount for an item.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="currency"></a>currency</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="currency"></a>currency</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td> <font size="-1">Currency * <td><font size="-1">Currency of the price amount for an item. Values must be in <a
* of the price amount for an item. Values must be in <a href="http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html">ISO * href="http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html">ISO 4217</a> currency code format.</font></td>
* 4217</a> currency code format.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td> <font size="-1"><em>Acceptable:</em><br>&lt;g:currency&gt;USD&lt;/g:currency&gt;<br> * <td><font size="-1"><em>Acceptable:</em><br>
* &lt;g:currency&gt;USD&lt;/g:currency&gt;<br>
* *
* <em>Not acceptable:</em><br>&lt;g:currency&gt;US Dollars&lt;/g:currency&gt;</font></td> * <em>Not acceptable:</em><br>
* &lt;g:currency&gt;US Dollars&lt;/g:currency&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td> * <td><font size="-1">Events, Housing, Products, Services, Travel, Vehicles</font></td>
* <td> <font size="-1">Events,
* Housing, Products, Services, Travel, Vehicles</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* <td><font size="-1">currencyEnumeration</font></td> * <td><font size="-1">currencyEnumeration</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Currency of the price amount for an item. * @return Currency of the price amount for an item.
*/ */
public CurrencyEnumeration getCurrency(); public CurrencyEnumeration getCurrency();

View file

@ -41,9 +41,9 @@ package org.rometools.feed.module.base;
import org.rometools.feed.module.base.types.GenderEnumeration; import org.rometools.feed.module.base.types.GenderEnumeration;
/**
/** This is an interface for the GoogleBase plug in that exposes methods used for * This is an interface for the GoogleBase plug in that exposes methods used for Person (personal ad, resume, profile) entry types.
* Person (personal ad, resume, profile) entry types. *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
*/ */
@ -51,24 +51,22 @@ public interface Person extends GlobalInterface {
/** /**
* Age of the individual. * Age of the individual.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr bgcolor="#dddddd" valign="top"> * <tbody>
* <tr bgcolor="#dddddd" valign="top">
* <td colspan="2" nowrap="nowrap"><font size="-1"><strong><a name="age"></a>age</strong></font></td> * <td colspan="2" nowrap="nowrap"><font size="-1"><strong><a name="age"></a>age</strong></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><strong><font size="-1">Details</font></strong></td> * <td width="120"><strong><font size="-1">Details</font></strong></td>
* <td><font size="-1">Minimum age requirement for the event or the age of the individual in a People profiles * <td><font size="-1">Minimum age requirement for the event or the age of the individual in a People profiles bulk upload entry.</font></td>
* bulk upload entry.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td><strong><font size="-1">Example</font></strong></td> * <td><strong><font size="-1">Example</font></strong></td>
* <td><font size="-1"><em>Acceptable:</em><br> * <td><font size="-1"><em>Acceptable:</em><br>
* &lt; * &lt; g:age&gt;18&lt;/g:age&gt;<br>
* g:age&gt;18&lt;/g:age&gt;<br>
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
* *
* &lt; * &lt; g:age&gt;18 and over&lt;/g:age&gt;</font></td>
* g:age&gt;18 and over&lt;/g:age&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td><strong><font size="-1">Attribute of</font></strong></td> * <td><strong><font size="-1">Attribute of</font></strong></td>
@ -80,7 +78,9 @@ public interface Person extends GlobalInterface {
* <td><strong><font size="-1">Content type</font></strong></td> * <td><strong><font size="-1">Content type</font></strong></td>
* <td><font size="-1">integer</font></td> * <td><font size="-1">integer</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param age Age of the individual. * @param age Age of the individual.
*/ */
public void setAge(Integer age); public void setAge(Integer age);
@ -88,24 +88,22 @@ public interface Person extends GlobalInterface {
/** /**
* Age of the individual. * Age of the individual.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr bgcolor="#dddddd" valign="top"> * <tbody>
* <tr bgcolor="#dddddd" valign="top">
* <td colspan="2" nowrap="nowrap"><font size="-1"><strong><a name="age"></a>age</strong></font></td> * <td colspan="2" nowrap="nowrap"><font size="-1"><strong><a name="age"></a>age</strong></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><strong><font size="-1">Details</font></strong></td> * <td width="120"><strong><font size="-1">Details</font></strong></td>
* <td><font size="-1">Minimum age requirement for the event or the age of the individual in a People profiles * <td><font size="-1">Minimum age requirement for the event or the age of the individual in a People profiles bulk upload entry.</font></td>
* bulk upload entry.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td><strong><font size="-1">Example</font></strong></td> * <td><strong><font size="-1">Example</font></strong></td>
* <td><font size="-1"><em>Acceptable:</em><br> * <td><font size="-1"><em>Acceptable:</em><br>
* &lt; * &lt; g:age&gt;18&lt;/g:age&gt;<br>
* g:age&gt;18&lt;/g:age&gt;<br>
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
* *
* &lt; * &lt; g:age&gt;18 and over&lt;/g:age&gt;</font></td>
* g:age&gt;18 and over&lt;/g:age&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td><strong><font size="-1">Attribute of</font></strong></td> * <td><strong><font size="-1">Attribute of</font></strong></td>
@ -117,7 +115,9 @@ public interface Person extends GlobalInterface {
* <td><strong><font size="-1">Content type</font></strong></td> * <td><strong><font size="-1">Content type</font></strong></td>
* <td><font size="-1">integer</font></td> * <td><font size="-1">integer</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Age of the individual. * @return Age of the individual.
*/ */
public Integer getAge(); public Integer getAge();
@ -125,14 +125,14 @@ public interface Person extends GlobalInterface {
/** /**
* Education of the individual. * Education of the individual.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="education"></a>education</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="education"></a>education</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Level of education required for an employment * <td><font size="-1"> Level of education required for an employment position.</font></td>
* position.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
@ -148,7 +148,9 @@ public interface Person extends GlobalInterface {
* *
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param education Education of the individual. * @param education Education of the individual.
*/ */
public void setEducation(String education); public void setEducation(String education);
@ -156,14 +158,14 @@ public interface Person extends GlobalInterface {
/** /**
* Education of the individual. * Education of the individual.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="education"></a>education</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="education"></a>education</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Level of education required for an employment * <td><font size="-1"> Level of education required for an employment position.</font></td>
* position.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
@ -179,7 +181,9 @@ public interface Person extends GlobalInterface {
* *
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Education of the individual. * @return Education of the individual.
*/ */
public String getEducation(); public String getEducation();
@ -188,7 +192,8 @@ public interface Person extends GlobalInterface {
* Individuals employer. * Individuals employer.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="employer"></a>employer</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="employer"></a>employer</b></font></td>
* *
* </tr> * </tr>
@ -210,7 +215,9 @@ public interface Person extends GlobalInterface {
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param employer Individuals employer. * @param employer Individuals employer.
*/ */
public void setEmployer(String employer); public void setEmployer(String employer);
@ -219,7 +226,8 @@ public interface Person extends GlobalInterface {
* Individuals employer. * Individuals employer.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="employer"></a>employer</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="employer"></a>employer</b></font></td>
* *
* </tr> * </tr>
@ -241,7 +249,9 @@ public interface Person extends GlobalInterface {
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Individuals employer. * @return Individuals employer.
*/ */
public String getEmployer(); public String getEmployer();
@ -250,14 +260,14 @@ public interface Person extends GlobalInterface {
* Ethnicity of the individual in the People profiles bulk upload entry. * Ethnicity of the individual in the People profiles bulk upload entry.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="ethnicity"></a>ethnicity</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="ethnicity"></a>ethnicity</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Ethnicity of the individual in the People profiles * <td><font size="-1"> Ethnicity of the individual in the People profiles bulk upload entry.</font></td>
* bulk upload entry.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -276,7 +286,9 @@ public interface Person extends GlobalInterface {
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @param ethnicities Ethnicity of the individual in the People profiles bulk upload entry. * @param ethnicities Ethnicity of the individual in the People profiles bulk upload entry.
*/ */
public void setEthnicities(String[] ethnicities); public void setEthnicities(String[] ethnicities);
@ -285,14 +297,14 @@ public interface Person extends GlobalInterface {
* Ethnicity of the individual in the People profiles bulk upload entry. * Ethnicity of the individual in the People profiles bulk upload entry.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="ethnicity"></a>ethnicity</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="ethnicity"></a>ethnicity</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Ethnicity of the individual in the People profiles * <td><font size="-1"> Ethnicity of the individual in the People profiles bulk upload entry.</font></td>
* bulk upload entry.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -311,7 +323,9 @@ public interface Person extends GlobalInterface {
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @return Ethnicity of the individual in the People profiles bulk upload entry. * @return Ethnicity of the individual in the People profiles bulk upload entry.
*/ */
public String[] getEthnicities(); public String[] getEthnicities();
@ -320,22 +334,20 @@ public interface Person extends GlobalInterface {
* Gender of an individual in a People profiles bulk upload. * Gender of an individual in a People profiles bulk upload.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="gender"></a>gender</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="gender"></a>gender</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Gender of an individual in a People profiles bulk upload * <td><font size="-1"> Gender of an individual in a People profiles bulk upload item. Acceptable values are <EFBFBD>Male<EFBFBD>, <EFBFBD>M<EFBFBD>, <EFBFBD>Female<EFBFBD>, or <EFBFBD>F<EFBFBD>.</font></td>
* item. Acceptable values are <EFBFBD>Male<EFBFBD>, <EFBFBD>M<EFBFBD>,
* <EFBFBD>Female<EFBFBD>, or <EFBFBD>F<EFBFBD>.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;gender&gt;Female&lt;/gender&gt;</font></td>
* &lt;gender&gt;Female&lt;/gender&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
@ -346,7 +358,9 @@ public interface Person extends GlobalInterface {
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* <td><font size="-1"> genderEnumeration</font></td> * <td><font size="-1"> genderEnumeration</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param gender Gender of an individual in a People profiles bulk upload. * @param gender Gender of an individual in a People profiles bulk upload.
*/ */
public void setGender(GenderEnumeration gender); public void setGender(GenderEnumeration gender);
@ -355,22 +369,20 @@ public interface Person extends GlobalInterface {
* Gender of an individual in a People profiles bulk upload. * Gender of an individual in a People profiles bulk upload.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="gender"></a>gender</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="gender"></a>gender</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* *
* <td><font size="-1"> Gender of an individual in a People profiles bulk upload * <td><font size="-1"> Gender of an individual in a People profiles bulk upload item. Acceptable values are <EFBFBD>Male<EFBFBD>, <EFBFBD>M<EFBFBD>, <EFBFBD>Female<EFBFBD>, or <EFBFBD>F<EFBFBD>.</font></td>
* item. Acceptable values are <EFBFBD>Male<EFBFBD>, <EFBFBD>M<EFBFBD>,
* <EFBFBD>Female<EFBFBD>, or <EFBFBD>F<EFBFBD>.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;gender&gt;Female&lt;/gender&gt;</font></td>
* &lt;gender&gt;Female&lt;/gender&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
@ -381,7 +393,9 @@ public interface Person extends GlobalInterface {
* <td width="120"><font size="-1"><b>Content type</b></font></td> * <td width="120"><font size="-1"><b>Content type</b></font></td>
* <td><font size="-1"> genderEnumeration</font></td> * <td><font size="-1"> genderEnumeration</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Gender of an individual in a People profiles bulk upload. * @return Gender of an individual in a People profiles bulk upload.
*/ */
public GenderEnumeration getGender(); public GenderEnumeration getGender();
@ -390,7 +404,8 @@ public interface Person extends GlobalInterface {
* Interest of a person being profiled. * Interest of a person being profiled.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="interested_in"></a>interested_in</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="interested_in"></a>interested_in</b></font></td>
* *
* </tr> * </tr>
@ -402,8 +417,7 @@ public interface Person extends GlobalInterface {
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;g:interested_in&gt;Long walks on the beach.&lt;/g:interested_in&gt;</font></td>
* &lt;g:interested_in&gt;Long walks on the beach.&lt;/g:interested_in&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
@ -416,7 +430,9 @@ public interface Person extends GlobalInterface {
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @param interestedIn Interest of a person being profiled. * @param interestedIn Interest of a person being profiled.
*/ */
public void setInterestedIn(String[] interestedIn); public void setInterestedIn(String[] interestedIn);
@ -425,7 +441,8 @@ public interface Person extends GlobalInterface {
* Interest of a person being profiled. * Interest of a person being profiled.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="interested_in"></a>interested_in</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="interested_in"></a>interested_in</b></font></td>
* *
* </tr> * </tr>
@ -437,8 +454,7 @@ public interface Person extends GlobalInterface {
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;g:interested_in&gt;Long walks on the beach.&lt;/g:interested_in&gt;</font></td>
* &lt;g:interested_in&gt;Long walks on the beach.&lt;/g:interested_in&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Attribute of</b></font></td> * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
@ -451,7 +467,9 @@ public interface Person extends GlobalInterface {
* <td><font size="-1"> string</font></td> * <td><font size="-1"> string</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @return Interest of a person being profiled. * @return Interest of a person being profiled.
*/ */
public String[] getInterestedIn(); public String[] getInterestedIn();
@ -459,49 +477,45 @@ public interface Person extends GlobalInterface {
/** /**
* Location of a person. * Location of a person.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="location"></a>location</b></font></td>
* <b><a name="location"></a>location</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Location of a property. Should include street, city, state, postal code, and country, in that order. </font></td>
* <td><font size="-1"> Location of a property. Should
* include street, city, state, postal code, and country, in that order. </font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> <em>Acceptable:</em><br>
* <em>Acceptable:</em><br> * &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* *
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
* &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt; * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td> * &lt;g:location&gt; <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* <td><font size="-1"> * Ads.</font></td>
* Reference Items, Events, Housing, Jobs, News and Articles,
* People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> locationType</font></td>
* <td><font size="-1">
* locationType</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param location Location of a person. * @param location Location of a person.
*/ */
public void setLocation(String location); public void setLocation(String location);
@ -509,49 +523,45 @@ public interface Person extends GlobalInterface {
/** /**
* Location of a person. * Location of a person.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="location"></a>location</b></font></td>
* <b><a name="location"></a>location</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Location of a property. Should include street, city, state, postal code, and country, in that order. </font></td>
* <td><font size="-1"> Location of a property. Should
* include street, city, state, postal code, and country, in that order. </font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> <em>Acceptable:</em><br>
* <em>Acceptable:</em><br> * &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* *
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
* &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt; * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td> * &lt;g:location&gt; <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* <td><font size="-1"> * Ads.</font></td>
* Reference Items, Events, Housing, Jobs, News and Articles,
* People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> locationType</font></td>
* <td><font size="-1">
* locationType</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Location of a person. * @return Location of a person.
*/ */
public String getLocation(); public String getLocation();
@ -561,35 +571,30 @@ public interface Person extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="marital_status"></a>marital_status</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="marital_status"></a>marital_status</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> Marital status of an individual * <td><font size="-1"> Marital status of an individual in a People profiles bulk upload entry. For example -single, divorced, separated, widowed, married,
* in a People profiles bulk upload entry. * and <EFBFBD>in relationship.<EFBFBD></font></td>
* For example -single, divorced, separated, widowed, married, and <EFBFBD>in
* relationship.<EFBFBD></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;g:marital_status&gt;single&lt;/g:marital_status&gt;<br>
* &lt;g:marital_status&gt;single&lt;/g:marital_status&gt;<br>
* *
* </font></td></tr> * </font></td>
* </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> People profiles</font></td>
* People profiles</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -599,7 +604,9 @@ public interface Person extends GlobalInterface {
* *
* string</font></td> * string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param maritalStatus Marital status of an individual. * @param maritalStatus Marital status of an individual.
*/ */
public void setMaritalStatus(String maritalStatus); public void setMaritalStatus(String maritalStatus);
@ -609,35 +616,30 @@ public interface Person extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="marital_status"></a>marital_status</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="marital_status"></a>marital_status</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> Marital status of an individual * <td><font size="-1"> Marital status of an individual in a People profiles bulk upload entry. For example -single, divorced, separated, widowed, married,
* in a People profiles bulk upload entry. * and <EFBFBD>in relationship.<EFBFBD></font></td>
* For example -single, divorced, separated, widowed, married, and <EFBFBD>in
* relationship.<EFBFBD></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;g:marital_status&gt;single&lt;/g:marital_status&gt;<br>
* &lt;g:marital_status&gt;single&lt;/g:marital_status&gt;<br>
* *
* </font></td></tr> * </font></td>
* </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> People profiles</font></td>
* People profiles</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -647,7 +649,9 @@ public interface Person extends GlobalInterface {
* *
* string</font></td> * string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Marital status of an individual. * @return Marital status of an individual.
*/ */
public String getMaritalStatus(); public String getMaritalStatus();
@ -656,30 +660,26 @@ public interface Person extends GlobalInterface {
* Occupation of an individual. * Occupation of an individual.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="occupation"></a>occupation</b></font></td>
* <b><a name="occupation"></a>occupation</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Industry the individual in a People profiles bulk upload is employed in.</font></td>
* Industry the individual in a People profiles bulk upload
* is employed in.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:occupation&gt;Sales&lt;/g:occupation&gt;</font></td> * <td><font size="-1"> &lt;g:occupation&gt;Sales&lt;/g:occupation&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* People profiles</font></td> * People profiles</font></td>
@ -688,11 +688,12 @@ public interface Person extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param occupation Occupation of an individual. * @param occupation Occupation of an individual.
*/ */
public void setOccupation(String occupation); public void setOccupation(String occupation);
@ -701,30 +702,26 @@ public interface Person extends GlobalInterface {
* Occupation of an individual. * Occupation of an individual.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="occupation"></a>occupation</b></font></td>
* <b><a name="occupation"></a>occupation</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Industry the individual in a People profiles bulk upload is employed in.</font></td>
* Industry the individual in a People profiles bulk upload
* is employed in.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:occupation&gt;Sales&lt;/g:occupation&gt;</font></td> * <td><font size="-1"> &lt;g:occupation&gt;Sales&lt;/g:occupation&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* People profiles</font></td> * People profiles</font></td>
@ -733,11 +730,12 @@ public interface Person extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Occupation of an individual. * @return Occupation of an individual.
*/ */
public String getOccupation(); public String getOccupation();
@ -746,41 +744,38 @@ public interface Person extends GlobalInterface {
* Individual's sexual orientation. * Individual's sexual orientation.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="sexual_orientation"></a>sexual_orientation</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="sexual_orientation"></a>sexual_orientation</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Sexual orientation of an individual in a People profiles information type..</font></td>
* Sexual orientation of an individual in a People profiles information type..</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:sexual_orientation&gt;straight&lt;/g:sexual_orientation&gt;</font></td> * <td><font size="-1"> &lt;g:sexual_orientation&gt;straight&lt;/g:sexual_orientation&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Personal</font></td> * Personal</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param sexualOrientation Individual's sexual orientation. * @param sexualOrientation Individual's sexual orientation.
*/ */
public void setSexualOrientation(String sexualOrientation); public void setSexualOrientation(String sexualOrientation);
@ -789,41 +784,38 @@ public interface Person extends GlobalInterface {
* Individual's sexual orientation. * Individual's sexual orientation.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="sexual_orientation"></a>sexual_orientation</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="sexual_orientation"></a>sexual_orientation</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Sexual orientation of an individual in a People profiles information type..</font></td>
* Sexual orientation of an individual in a People profiles information type..</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:sexual_orientation&gt;straight&lt;/g:sexual_orientation&gt;</font></td> * <td><font size="-1"> &lt;g:sexual_orientation&gt;straight&lt;/g:sexual_orientation&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Personal</font></td> * Personal</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Individual's sexual orientation. * @return Individual's sexual orientation.
*/ */
public String getSexualOrientation(); public String getSexualOrientation();

File diff suppressed because it is too large Load diff

View file

@ -39,15 +39,14 @@
*/ */
package org.rometools.feed.module.base; package org.rometools.feed.module.base;
import org.rometools.feed.module.base.types.FloatUnit;
import java.net.URL; import java.net.URL;
import java.util.Date; import java.util.Date;
import org.rometools.feed.module.base.types.FloatUnit;
/** /**
* This is an interface for the GoogleBase plug in that exposes methods used for * This is an interface for the GoogleBase plug in that exposes methods used for critical reviews of other things.
* critical reviews of other things. *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
*/ */
@ -58,38 +57,33 @@ public interface Review extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="author"></a>author</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="author"></a>author</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Author of the item.</font></td>
* Author of the item.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td> * <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param authors Author of the item. * @param authors Author of the item.
*/ */
public void setAuthors(String[] authors); public void setAuthors(String[] authors);
@ -100,38 +94,33 @@ public interface Review extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="author"></a>author</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="author"></a>author</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Author of the item.</font></td>
* Author of the item.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td> * <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Author of the item. * @return Author of the item.
*/ */
public String[] getAuthors(); public String[] getAuthors();
@ -140,7 +129,8 @@ public interface Review extends GlobalInterface {
* Additional instructions to explain the items delivery process. * Additional instructions to explain the items delivery process.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_notes"></a>delivery_notes</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_notes"></a>delivery_notes</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -157,19 +147,18 @@ public interface Review extends GlobalInterface {
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* <td> * <td>
* <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted * <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted Ads. </font></td>
* Ads. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* *
* <td><font size="-1">string</font></td> * <td><font size="-1">string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param deliveryNotes Additional instructions to explain the items delivery process. * @param deliveryNotes Additional instructions to explain the items delivery process.
*/ */
public void setDeliveryNotes(String deliveryNotes); public void setDeliveryNotes(String deliveryNotes);
@ -178,7 +167,8 @@ public interface Review extends GlobalInterface {
* Additional instructions to explain the items delivery process. * Additional instructions to explain the items delivery process.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_notes"></a>delivery_notes</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_notes"></a>delivery_notes</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -195,19 +185,18 @@ public interface Review extends GlobalInterface {
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* <td> * <td>
* <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted * <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted Ads. </font></td>
* Ads. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* *
* <td><font size="-1">string</font></td> * <td><font size="-1">string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Additional instructions to explain the items delivery process. * @return Additional instructions to explain the items delivery process.
*/ */
public String getDeliveryNotes(); public String getDeliveryNotes();
@ -215,38 +204,36 @@ public interface Review extends GlobalInterface {
/** /**
* The maximum distance you will deliver an item in any direction. * The maximum distance you will deliver an item in any direction.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_radius"></a>delivery_radius</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_radius"></a>delivery_radius</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* <td> <font size="-1">The maximum * <td><font size="-1">The maximum distance you will deliver an item in any direction. </font></td>
* distance you will deliver an item in any direction. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td> * <td>
* <font size="-1">&lt;g:delivery_radius&gt;10&lt;g:/delivery_radius&gt; * <font size="-1">&lt;g:delivery_radius&gt;10&lt;g:/delivery_radius&gt; </font> <br>
* </font> * <font size="-1">&lt;g:delivery_radius&gt;10km&lt;/g:delivery_radius&gt;</font></td>
* <br><font size="-1">&lt;g:delivery_radius&gt;10km&lt;/g:delivery_radius&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* *
* <td> * <td>
* <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted * <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted Ads. </font></td>
* Ads. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* <td><font size="-1">floatUnit</font></td> * <td><font size="-1">floatUnit</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @param deliveryRadius The maximum distance you will deliver an item in any direction. * @param deliveryRadius The maximum distance you will deliver an item in any direction.
*/ */
public void setDeliveryRadius(FloatUnit deliveryRadius); public void setDeliveryRadius(FloatUnit deliveryRadius);
@ -254,38 +241,36 @@ public interface Review extends GlobalInterface {
/** /**
* The maximum distance you will deliver an item in any direction. * The maximum distance you will deliver an item in any direction.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_radius"></a>delivery_radius</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_radius"></a>delivery_radius</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* <td> <font size="-1">The maximum * <td><font size="-1">The maximum distance you will deliver an item in any direction. </font></td>
* distance you will deliver an item in any direction. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td> * <td>
* <font size="-1">&lt;g:delivery_radius&gt;10&lt;g:/delivery_radius&gt; * <font size="-1">&lt;g:delivery_radius&gt;10&lt;g:/delivery_radius&gt; </font> <br>
* </font> * <font size="-1">&lt;g:delivery_radius&gt;10km&lt;/g:delivery_radius&gt;</font></td>
* <br><font size="-1">&lt;g:delivery_radius&gt;10km&lt;/g:delivery_radius&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* *
* <td> * <td>
* <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted * <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted Ads. </font></td>
* Ads. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* <td><font size="-1">floatUnit</font></td> * <td><font size="-1">floatUnit</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @return The maximum distance you will deliver an item in any direction. * @return The maximum distance you will deliver an item in any direction.
*/ */
public FloatUnit getDeliveryRadius(); public FloatUnit getDeliveryRadius();
@ -295,38 +280,34 @@ public interface Review extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="name_of_item_being_reviewed"></a>name_of_item_being_reviewed</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="name_of_item_being_reviewed"></a>name_of_item_being_reviewed</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1">
* *
* The name of an item being reviewed.</font></td> * The name of an item being reviewed.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:name_of_item_being__reviewed&gt;Fleur de lys Restaurant&lt;/g:name_of_item_being_reviewed&gt;</font></td> * <td><font size="-1"> &lt;g:name_of_item_being__reviewed&gt;Fleur de lys Restaurant&lt;/g:name_of_item_being_reviewed&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reviews</font></td>
* <td><font size="-1">
* Reviews</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param nameOfItemBeingReviewed The name of an item being reviewed. * @param nameOfItemBeingReviewed The name of an item being reviewed.
*/ */
public void setNameOfItemBeingReviewed(String nameOfItemBeingReviewed); public void setNameOfItemBeingReviewed(String nameOfItemBeingReviewed);
@ -336,38 +317,34 @@ public interface Review extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="name_of_item_being_reviewed"></a>name_of_item_being_reviewed</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="name_of_item_being_reviewed"></a>name_of_item_being_reviewed</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1">
* *
* The name of an item being reviewed.</font></td> * The name of an item being reviewed.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:name_of_item_being__reviewed&gt;Fleur de lys Restaurant&lt;/g:name_of_item_being_reviewed&gt;</font></td> * <td><font size="-1"> &lt;g:name_of_item_being__reviewed&gt;Fleur de lys Restaurant&lt;/g:name_of_item_being_reviewed&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reviews</font></td>
* <td><font size="-1">
* Reviews</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return The name of an item being reviewed. * @return The name of an item being reviewed.
*/ */
public String getNameOfItemBeingReviewed(); public String getNameOfItemBeingReviewed();
@ -376,30 +353,26 @@ public interface Review extends GlobalInterface {
* Date the item was published. * Date the item was published.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="publish_date"></a>publish_date</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publish_date"></a>publish_date</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* YYYY-MM-DD</font></td> * YYYY-MM-DD</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:publish_date&gt;2005-12-20&lt;/g:publish_date&gt;</font></td> * <td><font size="-1"> &lt;g:publish_date&gt;2005-12-20&lt;/g:publish_date&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Reference Items</font></td> * Reference Items</font></td>
@ -408,11 +381,12 @@ public interface Review extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> date</font></td>
* date</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param publishDate Date the item was published. * @param publishDate Date the item was published.
*/ */
public void setPublishDate(Date publishDate); public void setPublishDate(Date publishDate);
@ -421,30 +395,26 @@ public interface Review extends GlobalInterface {
* Date the item was published. * Date the item was published.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="publish_date"></a>publish_date</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publish_date"></a>publish_date</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* YYYY-MM-DD</font></td> * YYYY-MM-DD</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:publish_date&gt;2005-12-20&lt;/g:publish_date&gt;</font></td> * <td><font size="-1"> &lt;g:publish_date&gt;2005-12-20&lt;/g:publish_date&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Reference Items</font></td> * Reference Items</font></td>
@ -453,11 +423,12 @@ public interface Review extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> date</font></td>
* date</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Date the item was published. * @return Date the item was published.
*/ */
public Date getPublishDate(); public Date getPublishDate();
@ -465,25 +436,20 @@ public interface Review extends GlobalInterface {
/** /**
* Rating of the product or service on a scale of 1-5, with 5 as the best. * Rating of the product or service on a scale of 1-5, with 5 as the best.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="rating"></a>rating</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="rating"></a>rating</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Rating of the product or service on a scale of 1-5, with 5 as the best. Numeric values only.</font></td>
* <td><font size="-1">
* Rating of the product or service
* on a scale of 1-5, with 5 as the best. Numeric values only.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td> * <td><font size="-1"> <em>Acceptable:</em><br>
* <td><font size="-1">
* <em>Acceptable:</em><br>
* &lt;g:rating&gt;4&lt;/g:rating&gt;<br> * &lt;g:rating&gt;4&lt;/g:rating&gt;<br>
* *
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
@ -491,21 +457,20 @@ public interface Review extends GlobalInterface {
* &lt;g:rating&gt;good&lt;/g:rating&gt;</font></td> * &lt;g:rating&gt;good&lt;/g:rating&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reviews</font></td>
* Reviews</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* string</font></td> * string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param rating Rating of the product or service on a scale of 1-5, with 5 as the best. * @param rating Rating of the product or service on a scale of 1-5, with 5 as the best.
*/ */
public void setRating(Float rating); public void setRating(Float rating);
@ -513,25 +478,20 @@ public interface Review extends GlobalInterface {
/** /**
* Rating of the product or service on a scale of 1-5, with 5 as the best. * Rating of the product or service on a scale of 1-5, with 5 as the best.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="rating"></a>rating</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="rating"></a>rating</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Rating of the product or service on a scale of 1-5, with 5 as the best. Numeric values only.</font></td>
* <td><font size="-1">
* Rating of the product or service
* on a scale of 1-5, with 5 as the best. Numeric values only.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td> * <td><font size="-1"> <em>Acceptable:</em><br>
* <td><font size="-1">
* <em>Acceptable:</em><br>
* &lt;g:rating&gt;4&lt;/g:rating&gt;<br> * &lt;g:rating&gt;4&lt;/g:rating&gt;<br>
* *
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
@ -539,21 +499,20 @@ public interface Review extends GlobalInterface {
* &lt;g:rating&gt;good&lt;/g:rating&gt;</font></td> * &lt;g:rating&gt;good&lt;/g:rating&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reviews</font></td>
* Reviews</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* string</font></td> * string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Rating of the product or service on a scale of 1-5, with 5 as the best. * @return Rating of the product or service on a scale of 1-5, with 5 as the best.
*/ */
public Float getRating(); public Float getRating();
@ -562,9 +521,9 @@ public interface Review extends GlobalInterface {
* The category of the item being reviewed. * The category of the item being reviewed.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="review_type"></a>review_type</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="review_type"></a>review_type</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -574,32 +533,28 @@ public interface Review extends GlobalInterface {
* <td><font size="-1"> The category of the item being reviewed.</font></td> * <td><font size="-1"> The category of the item being reviewed.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;g:review_type&gt;toy&lt;/g:review_type&gt;<br>
* &lt;g:review_type&gt;toy&lt;/g:review_type&gt;<br>
* *
* &lt;g:review_type&gt;music&lt;/g:review_type&gt;<br> * &lt;g:review_type&gt;music&lt;/g:review_type&gt;<br>
* &lt;g:review_type&gt;restaraunt&lt;/g:review_type&gt;</font></td> * &lt;g:review_type&gt;restaraunt&lt;/g:review_type&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reviews</font></td>
* Reviews</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param reviewType The category of the item being reviewed. * @param reviewType The category of the item being reviewed.
*/ */
public void setReviewType(String reviewType); public void setReviewType(String reviewType);
@ -608,9 +563,9 @@ public interface Review extends GlobalInterface {
* The category of the item being reviewed. * The category of the item being reviewed.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="review_type"></a>review_type</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="review_type"></a>review_type</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -620,129 +575,108 @@ public interface Review extends GlobalInterface {
* <td><font size="-1"> The category of the item being reviewed.</font></td> * <td><font size="-1"> The category of the item being reviewed.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> &lt;g:review_type&gt;toy&lt;/g:review_type&gt;<br>
* &lt;g:review_type&gt;toy&lt;/g:review_type&gt;<br>
* *
* &lt;g:review_type&gt;music&lt;/g:review_type&gt;<br> * &lt;g:review_type&gt;music&lt;/g:review_type&gt;<br>
* &lt;g:review_type&gt;restaraunt&lt;/g:review_type&gt;</font></td> * &lt;g:review_type&gt;restaraunt&lt;/g:review_type&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reviews</font></td>
* Reviews</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return The category of the item being reviewed. * @return The category of the item being reviewed.
*/ */
public String getReviewType(); public String getReviewType();
/** /**
* The type of rating being provided: editorial (a * The type of rating being provided: editorial (a review written by a member of your staff) or user ( a review written by a user of your site).
* review written by a member of your staff) or user ( a review written by a
* user of your site).
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="reviewer_type"></a>reviewer_type</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="reviewer_type"></a>reviewer_type</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> The type of rating being provided: editorial (a * <td><font size="-1"> The type of rating being provided: editorial (a review written by a member of your staff) or user ( a review written by a user of
* review written by a member of your staff) or user ( a review written by a * your site)</font></td>
* user of your site)</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Example</b></font></td> * <b>Example</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> &lt;g:reviewer_type&gt;editorial&lt;/g:reviewer_type&gt;</font></td>
* &lt;g:reviewer_type&gt;editorial&lt;/g:reviewer_type&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reviews</font></td>
* Reviews</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* @param reviewerType The type of rating being provided: editorial (a * </table>
* review written by a member of your staff) or user ( a review written by a *
* user of your site). * @param reviewerType The type of rating being provided: editorial (a review written by a member of your staff) or user ( a review written by a user of
* your site).
*/ */
public void setReviewerType(String reviewerType); public void setReviewerType(String reviewerType);
/** /**
* The type of rating being provided: editorial (a * The type of rating being provided: editorial (a review written by a member of your staff) or user ( a review written by a user of your site).
* review written by a member of your staff) or user ( a review written by a
* user of your site).
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="reviewer_type"></a>reviewer_type</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="reviewer_type"></a>reviewer_type</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> The type of rating being provided: editorial (a * <td><font size="-1"> The type of rating being provided: editorial (a review written by a member of your staff) or user ( a review written by a user of
* review written by a member of your staff) or user ( a review written by a * your site)</font></td>
* user of your site)</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Example</b></font></td> * <b>Example</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> &lt;g:reviewer_type&gt;editorial&lt;/g:reviewer_type&gt;</font></td>
* &lt;g:reviewer_type&gt;editorial&lt;/g:reviewer_type&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reviews</font></td>
* Reviews</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* *
* </tr> * </tr>
* </tbody></table> * </tbody>
* @return The type of rating being provided: editorial (a * </table>
* review written by a member of your staff) or user ( a review written by a *
* user of your site). * @return The type of rating being provided: editorial (a review written by a member of your staff) or user ( a review written by a user of your site).
*/ */
public String getReviewerType(); public String getReviewerType();
@ -750,29 +684,26 @@ public interface Review extends GlobalInterface {
* The web page of an item being reviewed. * The web page of an item being reviewed.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="url_of_item_being_reviewed"></a>url_of_item_being_reviewed</b></font></td>
* <b><a name="url_of_item_being_reviewed"></a>url_of_item_being_reviewed</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> The web page of an item being reviewed.</font></td>
* The web page of an item being reviewed.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:url_of_item_being_reviewed&gt;http://www.fleurdelyssf.com/&lt;/g:url_of_item_being_reviewed&gt;</font></td> * <td><font size="-1"> &lt;g:url_of_item_being_reviewed&gt;http://www.fleurdelyssf.com/&lt;/g:url_of_item_being_reviewed&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Reviews</font></td> * Reviews</font></td>
@ -781,11 +712,12 @@ public interface Review extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> uri</font></td>
* uri</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @param urlOfItemBeingReviewed The web page of an item being reviewed. * @param urlOfItemBeingReviewed The web page of an item being reviewed.
*/ */
public void setUrlOfItemBeingReviewed(URL urlOfItemBeingReviewed); public void setUrlOfItemBeingReviewed(URL urlOfItemBeingReviewed);
@ -794,29 +726,26 @@ public interface Review extends GlobalInterface {
* The web page of an item being reviewed. * The web page of an item being reviewed.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="url_of_item_being_reviewed"></a>url_of_item_being_reviewed</b></font></td>
* <b><a name="url_of_item_being_reviewed"></a>url_of_item_being_reviewed</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> The web page of an item being reviewed.</font></td>
* The web page of an item being reviewed.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> &lt;g:url_of_item_being_reviewed&gt;http://www.fleurdelyssf.com/&lt;/g:url_of_item_being_reviewed&gt;</font></td> * <td><font size="-1"> &lt;g:url_of_item_being_reviewed&gt;http://www.fleurdelyssf.com/&lt;/g:url_of_item_being_reviewed&gt;</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Reviews</font></td> * Reviews</font></td>
@ -825,11 +754,12 @@ public interface Review extends GlobalInterface {
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> uri</font></td>
* uri</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @return The web page of an item being reviewed. * @return The web page of an item being reviewed.
*/ */
public URL getUrlOfItemBeingReviewed(); public URL getUrlOfItemBeingReviewed();

View file

@ -41,10 +41,8 @@ package org.rometools.feed.module.base;
import java.util.Date; import java.util.Date;
/** /**
* This is an interface for the GoogleBase plug in that exposes methods used for * This is an interface for the GoogleBase plug in that exposes methods used for Scholarly publication, research studies and reference materials.
* Scholarly publication, research studies and reference materials.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
@ -54,38 +52,33 @@ public interface ScholarlyArticle extends GlobalInterface {
* Array of Author Names. Limit 10. * Array of Author Names. Limit 10.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="author"></a>author</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="author"></a>author</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Author of the item.</font></td>
* Author of the item.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td> * <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param authors Array of Author Names. Limit 10. * @param authors Array of Author Names. Limit 10.
*/ */
public void setAuthors(String[] authors); public void setAuthors(String[] authors);
@ -94,38 +87,33 @@ public interface ScholarlyArticle extends GlobalInterface {
* Array of Author Names. Limit 10. * Array of Author Names. Limit 10.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="author"></a>author</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="author"></a>author</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Author of the item.</font></td>
* Author of the item.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td> * <td><font size="-1"> &lt;g:author&gt;John Steinbeck&lt;/g:author&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> string</font></td>
* <td><font size="-1">
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Array of author names. * @return Array of author names.
*/ */
public String[] getAuthors(); public String[] getAuthors();
@ -135,41 +123,38 @@ public interface ScholarlyArticle extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="pages"></a>pages</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="pages"></a>pages</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* The number of pages in the publication.</font></td> * The number of pages in the publication.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:pages&gt;18&lt;/g:pages&gt;</font></td> * <td><font size="-1"> &lt;g:pages&gt;18&lt;/g:pages&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> integer</font></td>
* integer</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param pages Number of pages in the article * @param pages Number of pages in the article
*/ */
public void setPages(Integer pages); public void setPages(Integer pages);
@ -179,41 +164,38 @@ public interface ScholarlyArticle extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <tr valign="top">
* <b><a name="pages"></a>pages</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="pages"></a>pages</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* The number of pages in the publication.</font></td> * The number of pages in the publication.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:pages&gt;18&lt;/g:pages&gt;</font></td> * <td><font size="-1"> &lt;g:pages&gt;18&lt;/g:pages&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, News and Articles</font></td>
* <td><font size="-1">
* Reference Items, News and Articles</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> integer</font></td>
* integer</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Number of pages in the article * @return Number of pages in the article
*/ */
public Integer getPages(); public Integer getPages();
@ -223,41 +205,38 @@ public interface ScholarlyArticle extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="publication_name"></a>publication_name</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publication_name"></a>publication_name</b></font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Name of the publication.</font></td> * Name of the publication.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:publication_name&gt; Journal of Appropriate Technology&lt;/g:publication_name&gt;</font></td> * <td><font size="-1"> &lt;g:publication_name&gt; Journal of Appropriate Technology&lt;/g:publication_name&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Research studies and publications</font></td>
* <td><font size="-1">
* Research studies and publications</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param publicationName Name of the publication. * @param publicationName Name of the publication.
*/ */
public void setPublicationName(String publicationName); public void setPublicationName(String publicationName);
@ -267,41 +246,38 @@ public interface ScholarlyArticle extends GlobalInterface {
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* *
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="publication_name"></a>publication_name</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publication_name"></a>publication_name</b></font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Name of the publication.</font></td> * Name of the publication.</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1"> &lt;g:publication_name&gt; Journal of Appropriate Technology&lt;/g:publication_name&gt;</font></td> * <td><font size="-1"> &lt;g:publication_name&gt; Journal of Appropriate Technology&lt;/g:publication_name&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Research studies and publications</font></td>
* <td><font size="-1">
* Research studies and publications</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Content type</b></font></td> * <b>Content type</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Name of the publication. * @return Name of the publication.
*/ */
public String getPublicationName(); public String getPublicationName();
@ -309,41 +285,37 @@ public interface ScholarlyArticle extends GlobalInterface {
/** /**
* Volume of the publication. * Volume of the publication.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publication_volume"></a>publication_volume</b></font></td>
* <b><a name="publication_volume"></a>publication_volume</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Volume of the publication.</font></td> * Volume of the publication.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1">&lt;g:publication_volume&gt;VI&lt;/g:publication_volume&gt;</font></td> * <td><font size="-1">&lt;g:publication_volume&gt;VI&lt;/g:publication_volume&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items</font></td>
* <td><font size="-1">
* Reference Items</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param publicationVolume Volume of the publication. * @param publicationVolume Volume of the publication.
*/ */
public void setPublicationVolume(String publicationVolume); public void setPublicationVolume(String publicationVolume);
@ -351,41 +323,37 @@ public interface ScholarlyArticle extends GlobalInterface {
/** /**
* Volume of the publication. * Volume of the publication.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publication_volume"></a>publication_volume</b></font></td>
* <b><a name="publication_volume"></a>publication_volume</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1">
* *
* Volume of the publication.</font></td> * Volume of the publication.</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* <td><font size="-1">&lt;g:publication_volume&gt;VI&lt;/g:publication_volume&gt;</font></td> * <td><font size="-1">&lt;g:publication_volume&gt;VI&lt;/g:publication_volume&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items</font></td>
* <td><font size="-1">
* Reference Items</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> string</font></td>
* string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Volume of the publication. * @return Volume of the publication.
*/ */
public String getPublicationVolume(); public String getPublicationVolume();
@ -394,17 +362,16 @@ public interface ScholarlyArticle extends GlobalInterface {
* Date article was published. * Date article was published.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="publish_date"></a>publish_date</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publish_date"></a>publish_date</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* YYYY-MM-DD</font></td> * YYYY-MM-DD</font></td>
* *
* </tr> * </tr>
@ -416,11 +383,9 @@ public interface ScholarlyArticle extends GlobalInterface {
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reference Items</font></td>
* Reference Items</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -430,7 +395,9 @@ public interface ScholarlyArticle extends GlobalInterface {
* *
* date</font></td> * date</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param publishDate Date article was published * @param publishDate Date article was published
*/ */
public void setPublishDate(Date publishDate); public void setPublishDate(Date publishDate);
@ -439,17 +406,16 @@ public interface ScholarlyArticle extends GlobalInterface {
* Date article was published. * Date article was published.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <td colspan="2" bgcolor="#dddddd"><font size="-1"> * <tr valign="top">
* <b><a name="publish_date"></a>publish_date</b></font></td> * <td colspan="2" bgcolor="#dddddd"><font size="-1"> <b><a name="publish_date"></a>publish_date</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
* *
* <b>Details</b></font></td> * <b>Details</b></font></td>
* <td><font size="-1"> * <td><font size="-1"> Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* Date the item was published in <a href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html">ISO 8601</a> format:
* YYYY-MM-DD</font></td> * YYYY-MM-DD</font></td>
* *
* </tr> * </tr>
@ -461,11 +427,9 @@ public interface ScholarlyArticle extends GlobalInterface {
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> Reference Items</font></td>
* Reference Items</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1">
@ -475,7 +439,9 @@ public interface ScholarlyArticle extends GlobalInterface {
* *
* date</font></td> * date</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Date article was published * @return Date article was published
*/ */
public Date getPublishDate(); public Date getPublishDate();

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -43,13 +43,10 @@ import java.net.URL;
import org.rometools.feed.module.base.types.IntUnit; import org.rometools.feed.module.base.types.IntUnit;
/** /**
* This interface contains all the other schema elements that the document * This interface contains all the other schema elements that the document doesn't associate with a particular type.
* doesn't associate with a particular type.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* Cooper</a>
*/ */
public interface Unknown extends GlobalInterface { public interface Unknown extends GlobalInterface {
public void setLicenses(String[] licenses); public void setLicenses(String[] licenses);

View file

@ -20,15 +20,16 @@
package org.rometools.feed.module.base; package org.rometools.feed.module.base;
/** This is an unchecked exception that is thrown when a data value violates /**
* the Google Schema limits. * This is an unchecked exception that is thrown when a data value violates the Google Schema limits.
*
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class ValidationException extends RuntimeException { public class ValidationException extends RuntimeException {
/** Creates a new instance of ValidationException */ /** Creates a new instance of ValidationException */
public ValidationException(String message) { public ValidationException(final String message) {
super(message); super(message);
} }

File diff suppressed because it is too large Load diff

View file

@ -41,9 +41,8 @@ package org.rometools.feed.module.base;
import org.rometools.feed.module.base.types.FloatUnit; import org.rometools.feed.module.base.types.FloatUnit;
/**
/**This is an interface for the GoogleBase plug in that exposes methods used for * This is an interface for the GoogleBase plug in that exposes methods used for wanted ads.
* wanted ads.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
@ -53,7 +52,8 @@ public interface Wanted extends GlobalInterface {
* Additional instructions to explain the items delivery process. * Additional instructions to explain the items delivery process.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_notes"></a>delivery_notes</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_notes"></a>delivery_notes</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -70,19 +70,18 @@ public interface Wanted extends GlobalInterface {
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* <td> * <td>
* <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted * <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted Ads. </font></td>
* Ads. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* *
* <td><font size="-1">string</font></td> * <td><font size="-1">string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param deliveryNotes Additional instructions to explain the items delivery process. * @param deliveryNotes Additional instructions to explain the items delivery process.
*/ */
public void setDeliveryNotes(String deliveryNotes); public void setDeliveryNotes(String deliveryNotes);
@ -91,7 +90,8 @@ public interface Wanted extends GlobalInterface {
* Additional instructions to explain the items delivery process. * Additional instructions to explain the items delivery process.
* *
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_notes"></a>delivery_notes</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_notes"></a>delivery_notes</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
@ -108,19 +108,18 @@ public interface Wanted extends GlobalInterface {
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* <td> * <td>
* <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted * <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted Ads. </font></td>
* Ads. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* *
* <td><font size="-1">string</font></td> * <td><font size="-1">string</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Additional instructions to explain the items delivery process. * @return Additional instructions to explain the items delivery process.
*/ */
public String getDeliveryNotes(); public String getDeliveryNotes();
@ -128,38 +127,36 @@ public interface Wanted extends GlobalInterface {
/** /**
* The maximum distance you will deliver an item in any direction. * The maximum distance you will deliver an item in any direction.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_radius"></a>delivery_radius</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_radius"></a>delivery_radius</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* <td> <font size="-1">The maximum * <td><font size="-1">The maximum distance you will deliver an item in any direction. </font></td>
* distance you will deliver an item in any direction. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td> * <td>
* <font size="-1">&lt;g:delivery_radius&gt;10&lt;g:/delivery_radius&gt; * <font size="-1">&lt;g:delivery_radius&gt;10&lt;g:/delivery_radius&gt; </font> <br>
* </font> * <font size="-1">&lt;g:delivery_radius&gt;10km&lt;/g:delivery_radius&gt;</font></td>
* <br><font size="-1">&lt;g:delivery_radius&gt;10km&lt;/g:delivery_radius&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* *
* <td> * <td>
* <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted * <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted Ads. </font></td>
* Ads. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* <td><font size="-1">floatUnit</font></td> * <td><font size="-1">floatUnit</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @param deliveryRadius The maximum distance you will deliver an item in any direction. * @param deliveryRadius The maximum distance you will deliver an item in any direction.
*/ */
public void setDeliveryRadius(FloatUnit deliveryRadius); public void setDeliveryRadius(FloatUnit deliveryRadius);
@ -167,38 +164,36 @@ public interface Wanted extends GlobalInterface {
/** /**
* The maximum distance you will deliver an item in any direction. * The maximum distance you will deliver an item in any direction.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_radius"></a>delivery_radius</b></font></td> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"><b><a name="delivery_radius"></a>delivery_radius</b></font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Details</b></font></td> * <td width="120"><font size="-1"><b>Details</b></font></td>
* <td> <font size="-1">The maximum * <td><font size="-1">The maximum distance you will deliver an item in any direction. </font></td>
* distance you will deliver an item in any direction. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"><b>Example</b></font></td> * <td width="120"><font size="-1"><b>Example</b></font></td>
* *
* <td> * <td>
* <font size="-1">&lt;g:delivery_radius&gt;10&lt;g:/delivery_radius&gt; * <font size="-1">&lt;g:delivery_radius&gt;10&lt;g:/delivery_radius&gt; </font> <br>
* </font> * <font size="-1">&lt;g:delivery_radius&gt;10km&lt;/g:delivery_radius&gt;</font></td>
* <br><font size="-1">&lt;g:delivery_radius&gt;10km&lt;/g:delivery_radius&gt;</font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Attribute * <td width="120"><font size="-1"><b>Attribute of</b></font></td>
* of</b></font></td>
* *
* <td> * <td>
* <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted * <font size="-1">Events, Products, Reviews, Services, Travel, Vehicles, Wanted Ads. </font></td>
* Ads. </font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"> <font size="-1"><b>Content * <td width="120"><font size="-1"><b>Content type</b></font></td>
* type</b></font></td>
* <td><font size="-1">floatUnit</font></td> * <td><font size="-1">floatUnit</font></td>
* </tr> * </tr>
* *
* </tbody></table> * </tbody>
* </table>
*
* @return The maximum distance you will deliver an item in any direction. * @return The maximum distance you will deliver an item in any direction.
*/ */
public FloatUnit getDeliveryRadius(); public FloatUnit getDeliveryRadius();
@ -206,49 +201,45 @@ public interface Wanted extends GlobalInterface {
/** /**
* Location of the property. * Location of the property.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="location"></a>location</b></font></td>
* <b><a name="location"></a>location</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Location of a property. Should include street, city, state, postal code, and country, in that order. </font></td>
* <td><font size="-1"> Location of a property. Should
* include street, city, state, postal code, and country, in that order. </font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> <em>Acceptable:</em><br>
* <em>Acceptable:</em><br> * &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* *
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
* &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt; * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td> * &lt;g:location&gt; <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* <td><font size="-1"> * Ads.</font></td>
* Reference Items, Events, Housing, Jobs, News and Articles,
* People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> locationType</font></td>
* <td><font size="-1">
* locationType</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @param location Location of the property. * @param location Location of the property.
*/ */
public void setLocation(String location); public void setLocation(String location);
@ -256,49 +247,45 @@ public interface Wanted extends GlobalInterface {
/** /**
* Location of the property. * Location of the property.
* <table border="1" cellpadding="5" cellspacing="0" width="640"> * <table border="1" cellpadding="5" cellspacing="0" width="640">
* <tbody><tr valign="top"> * <tbody>
* <tr valign="top">
* *
* <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> * <td colspan="2" bgcolor="#dddddd" valign="top"><font size="-1"> <b><a name="location"></a>location</b></font></td>
* <b><a name="location"></a>location</b></font></td>
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Details</b></font></td>
* <b>Details</b></font></td> * <td><font size="-1"> Location of a property. Should include street, city, state, postal code, and country, in that order. </font></td>
* <td><font size="-1"> Location of a property. Should
* include street, city, state, postal code, and country, in that order. </font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Example</b></font></td>
* <b>Example</b></font></td>
* *
* <td><font size="-1"> * <td><font size="-1"> <em>Acceptable:</em><br>
* <em>Acceptable:</em><br> * &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt;<st1:place>123 Main St, <st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* *
* <em>Not acceptable:</em><br> * <em>Not acceptable:</em><br>
* &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br> * &lt;g:location&gt;<st1:place><st1:city>123</st1:city> Main St,, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* &lt;g:location&gt; * <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;<br>
* <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>, <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td> * &lt;g:location&gt; <st1:place><st1:city>Anytown</st1:city>, <st1:state>CA</st1:state>, <st1:postalcode>12345</st1:postalcode>,
* <st1:country-region>USA</st1:country-region></st1:place>&lt;/g:location&gt;</font></td>
* *
* </tr> * </tr>
* <tr valign="top"> * <tr valign="top">
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Attribute of</b></font></td>
* <b>Attribute of</b></font></td> * <td><font size="-1"> Reference Items, Events, Housing, Jobs, News and Articles, People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted
* <td><font size="-1"> * Ads.</font></td>
* Reference Items, Events, Housing, Jobs, News and Articles,
* People profiles, Products, Reviews, Services, Travel, Vehicles, Wanted Ads.</font></td>
* </tr> * </tr>
* *
* <tr valign="top"> * <tr valign="top">
* *
* <td width="120"><font size="-1"> * <td width="120"><font size="-1"> <b>Content type</b></font></td>
* <b>Content type</b></font></td> * <td><font size="-1"> locationType</font></td>
* <td><font size="-1">
* locationType</font></td>
* </tr> * </tr>
* </tbody></table> * </tbody>
* </table>
*
* @return Location of the property. * @return Location of the property.
*/ */
public String getLocation(); public String getLocation();

View file

@ -19,7 +19,13 @@
*/ */
package org.rometools.feed.module.base.io; package org.rometools.feed.module.base.io;
import com.sun.syndication.feed.module.Module; import java.net.URL;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import org.jdom2.Element;
import org.rometools.feed.module.base.CustomTag; import org.rometools.feed.module.base.CustomTag;
import org.rometools.feed.module.base.CustomTagImpl; import org.rometools.feed.module.base.CustomTagImpl;
import org.rometools.feed.module.base.CustomTags; import org.rometools.feed.module.base.CustomTags;
@ -27,18 +33,10 @@ import org.rometools.feed.module.base.types.DateTimeRange;
import org.rometools.feed.module.base.types.FloatUnit; import org.rometools.feed.module.base.types.FloatUnit;
import org.rometools.feed.module.base.types.IntUnit; import org.rometools.feed.module.base.types.IntUnit;
import org.rometools.feed.module.base.types.ShortDate; import org.rometools.feed.module.base.types.ShortDate;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleGenerator; import com.sun.syndication.io.ModuleGenerator;
import org.jdom.Element;
import java.net.URL;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
/** /**
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
@ -62,72 +60,72 @@ public class CustomTagGenerator implements ModuleGenerator {
return NAMESPACES; return NAMESPACES;
} }
public void generate(Module module,Element element) { public void generate(final Module module, final Element element) {
if (!(module instanceof CustomTags)) { if (!(module instanceof CustomTags)) {
return; return;
} }
List tags = ((CustomTags)module).getValues(); final List tags = ((CustomTags) module).getValues();
Iterator it = tags.iterator(); final Iterator it = tags.iterator();
while (it.hasNext()) { while (it.hasNext()) {
CustomTag tag = (CustomTag)it.next(); final CustomTag tag = (CustomTag) it.next();
if (tag.getValue() instanceof DateTimeRange) { if (tag.getValue() instanceof DateTimeRange) {
DateTimeRange dtr = (DateTimeRange)tag.getValue(); final DateTimeRange dtr = (DateTimeRange) tag.getValue();
Element newTag = new Element(tag.getName(),CustomTagParser.NS); final Element newTag = new Element(tag.getName(), CustomTagParser.NS);
newTag.setAttribute("type", "dateTimeRange"); newTag.setAttribute("type", "dateTimeRange");
newTag.addContent(this.generateSimpleElement("start",GoogleBaseParser.LONG_DT_FMT.format(dtr.getStart()))); newTag.addContent(generateSimpleElement("start", GoogleBaseParser.LONG_DT_FMT.format(dtr.getStart())));
newTag.addContent(this.generateSimpleElement("end",GoogleBaseParser.LONG_DT_FMT.format(dtr.getEnd()))); newTag.addContent(generateSimpleElement("end", GoogleBaseParser.LONG_DT_FMT.format(dtr.getEnd())));
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof ShortDate) { } else if (tag.getValue() instanceof ShortDate) {
ShortDate sd = (ShortDate)tag.getValue(); final ShortDate sd = (ShortDate) tag.getValue();
Element newTag = this.generateSimpleElement(tag.getName(),GoogleBaseParser.SHORT_DT_FMT.format(sd)); final Element newTag = generateSimpleElement(tag.getName(), GoogleBaseParser.SHORT_DT_FMT.format(sd));
newTag.setAttribute("type", "date"); newTag.setAttribute("type", "date");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof Date) { } else if (tag.getValue() instanceof Date) {
Date d = (Date)tag.getValue(); final Date d = (Date) tag.getValue();
Element newTag = this.generateSimpleElement(tag.getName(),GoogleBaseParser.SHORT_DT_FMT.format(d)); final Element newTag = generateSimpleElement(tag.getName(), GoogleBaseParser.SHORT_DT_FMT.format(d));
newTag.setAttribute("type", "dateTime"); newTag.setAttribute("type", "dateTime");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof Integer) { } else if (tag.getValue() instanceof Integer) {
Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString()); final Element newTag = generateSimpleElement(tag.getName(), tag.getValue().toString());
newTag.setAttribute("type", "int"); newTag.setAttribute("type", "int");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof IntUnit) { } else if (tag.getValue() instanceof IntUnit) {
Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString()); final Element newTag = generateSimpleElement(tag.getName(), tag.getValue().toString());
newTag.setAttribute("type", "intUnit"); newTag.setAttribute("type", "intUnit");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof Float) { } else if (tag.getValue() instanceof Float) {
Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString()); final Element newTag = generateSimpleElement(tag.getName(), tag.getValue().toString());
newTag.setAttribute("type", "float"); newTag.setAttribute("type", "float");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof FloatUnit) { } else if (tag.getValue() instanceof FloatUnit) {
Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString()); final Element newTag = generateSimpleElement(tag.getName(), tag.getValue().toString());
newTag.setAttribute("type", "floatUnit"); newTag.setAttribute("type", "floatUnit");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof String) { } else if (tag.getValue() instanceof String) {
Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString()); final Element newTag = generateSimpleElement(tag.getName(), tag.getValue().toString());
newTag.setAttribute("type", "string"); newTag.setAttribute("type", "string");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof URL) { } else if (tag.getValue() instanceof URL) {
Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString()); final Element newTag = generateSimpleElement(tag.getName(), tag.getValue().toString());
newTag.setAttribute("type", "url"); newTag.setAttribute("type", "url");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof Boolean) { } else if (tag.getValue() instanceof Boolean) {
Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString()); final Element newTag = generateSimpleElement(tag.getName(), tag.getValue().toString());
newTag.setAttribute("type", "boolean"); newTag.setAttribute("type", "boolean");
element.addContent(newTag); element.addContent(newTag);
} else if (tag.getValue() instanceof CustomTagImpl.Location) { } else if (tag.getValue() instanceof CustomTagImpl.Location) {
Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString()); final Element newTag = generateSimpleElement(tag.getName(), tag.getValue().toString());
newTag.setAttribute("type", "location"); newTag.setAttribute("type", "location");
element.addContent(newTag); element.addContent(newTag);
} }
} }
} }
protected Element generateSimpleElement(String name,String value) { protected Element generateSimpleElement(final String name, final String value) {
Element element = new Element(name,CustomTagParser.NS); final Element element = new Element(name, CustomTagParser.NS);
element.addContent(value); element.addContent(value);
return element; return element;

View file

@ -20,16 +20,6 @@
package org.rometools.feed.module.base.io; package org.rometools.feed.module.base.io;
import com.sun.syndication.feed.module.Module;
import org.rometools.feed.module.base.CustomTagImpl;
import org.rometools.feed.module.base.CustomTags;
import org.rometools.feed.module.base.CustomTagsImpl;
import org.rometools.feed.module.base.types.DateTimeRange;
import org.rometools.feed.module.base.types.FloatUnit;
import org.rometools.feed.module.base.types.IntUnit;
import org.rometools.feed.module.base.types.ShortDate;
import com.sun.syndication.io.ModuleParser;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.text.ParseException; import java.text.ParseException;
@ -38,8 +28,19 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.jdom.Element;
import org.jdom.Namespace; import org.jdom2.Element;
import org.jdom2.Namespace;
import org.rometools.feed.module.base.CustomTagImpl;
import org.rometools.feed.module.base.CustomTags;
import org.rometools.feed.module.base.CustomTagsImpl;
import org.rometools.feed.module.base.types.DateTimeRange;
import org.rometools.feed.module.base.types.FloatUnit;
import org.rometools.feed.module.base.types.IntUnit;
import org.rometools.feed.module.base.types.ShortDate;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;
/** /**
* @version $Revision: 1.4 $ * @version $Revision: 1.4 $
@ -54,15 +55,15 @@ public class CustomTagParser implements ModuleParser {
public CustomTagParser() { public CustomTagParser() {
} }
public Module parse(Element element) { public Module parse(final Element element) {
CustomTags module = new CustomTagsImpl(); final CustomTags module = new CustomTagsImpl();
ArrayList tags = new ArrayList(); final ArrayList tags = new ArrayList();
List elements = element.getChildren(); final List elements = element.getChildren();
Iterator it = elements.iterator(); final Iterator it = elements.iterator();
while (it.hasNext()) { while (it.hasNext()) {
Element child = (Element) it.next(); final Element child = (Element) it.next();
if (child.getNamespace().equals(NS)) { if (child.getNamespace().equals(NS)) {
String type = child.getAttributeValue( "type" ); final String type = child.getAttributeValue("type");
try { try {
if (type == null) { if (type == null) {
continue; continue;
@ -79,25 +80,27 @@ public class CustomTagParser implements ModuleParser {
} else if (type.equals("date")) { } else if (type.equals("date")) {
try { try {
tags.add(new CustomTagImpl(child.getName(), new ShortDate(GoogleBaseParser.SHORT_DT_FMT.parse(child.getTextTrim())))); tags.add(new CustomTagImpl(child.getName(), new ShortDate(GoogleBaseParser.SHORT_DT_FMT.parse(child.getTextTrim()))));
} catch( ParseException e ){ } catch (final ParseException e) {
log.log(Level.WARNING, "Unable to parse date type on " + child.getName(), e); log.log(Level.WARNING, "Unable to parse date type on " + child.getName(), e);
} }
} else if (type.equals("dateTime")) { } else if (type.equals("dateTime")) {
try { try {
tags.add(new CustomTagImpl(child.getName(), GoogleBaseParser.LONG_DT_FMT.parse(child.getTextTrim()))); tags.add(new CustomTagImpl(child.getName(), GoogleBaseParser.LONG_DT_FMT.parse(child.getTextTrim())));
} catch(ParseException e){ } catch (final ParseException e) {
log.log(Level.WARNING, "Unable to parse date type on " + child.getName(), e); log.log(Level.WARNING, "Unable to parse date type on " + child.getName(), e);
} }
} else if (type.equals("dateTimeRange")) { } else if (type.equals("dateTimeRange")) {
try { try {
tags.add( new CustomTagImpl( child.getName(), new DateTimeRange(GoogleBaseParser.LONG_DT_FMT.parse(child.getChild("start",CustomTagParser.NS).getText().trim()),GoogleBaseParser.LONG_DT_FMT.parse(child.getChild("end",CustomTagParser.NS).getText().trim())))); tags.add(new CustomTagImpl(child.getName(), new DateTimeRange(GoogleBaseParser.LONG_DT_FMT.parse(child
} catch(Exception e){ .getChild("start", CustomTagParser.NS).getText().trim()), GoogleBaseParser.LONG_DT_FMT.parse(child
.getChild("end", CustomTagParser.NS).getText().trim()))));
} catch (final Exception e) {
log.log(Level.WARNING, "Unable to parse date type on " + child.getName(), e); log.log(Level.WARNING, "Unable to parse date type on " + child.getName(), e);
} }
} else if (type.equals("url")) { } else if (type.equals("url")) {
try { try {
tags.add(new CustomTagImpl(child.getName(), new URL(child.getTextTrim()))); tags.add(new CustomTagImpl(child.getName(), new URL(child.getTextTrim())));
} catch( MalformedURLException e){ } catch (final MalformedURLException e) {
log.log(Level.WARNING, "Unable to parse URL type on " + child.getName(), e); log.log(Level.WARNING, "Unable to parse URL type on " + child.getName(), e);
} }
} else if (type.equals("boolean")) { } else if (type.equals("boolean")) {
@ -107,7 +110,7 @@ public class CustomTagParser implements ModuleParser {
} else { } else {
throw new Exception("Unknown type: " + type); throw new Exception("Unknown type: " + type);
} }
} catch(Exception e){ } catch (final Exception e) {
log.log(Level.WARNING, "Unable to parse type on " + child.getName(), e); log.log(Level.WARNING, "Unable to parse type on " + child.getName(), e);
} }
} }

View file

@ -39,9 +39,15 @@
*/ */
package org.rometools.feed.module.base.io; package org.rometools.feed.module.base.io;
import com.sun.syndication.feed.module.Module; import java.beans.PropertyDescriptor;
import com.sun.syndication.io.ModuleGenerator; import java.net.URL;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.rometools.feed.module.base.GoogleBase; import org.rometools.feed.module.base.GoogleBase;
import org.rometools.feed.module.base.GoogleBaseImpl; import org.rometools.feed.module.base.GoogleBaseImpl;
import org.rometools.feed.module.base.types.CurrencyEnumeration; import org.rometools.feed.module.base.types.CurrencyEnumeration;
@ -56,18 +62,8 @@ import org.rometools.feed.module.base.types.ShortDate;
import org.rometools.feed.module.base.types.Size; import org.rometools.feed.module.base.types.Size;
import org.rometools.feed.module.base.types.YearType; import org.rometools.feed.module.base.types.YearType;
import org.jdom.Element; import com.sun.syndication.feed.module.Module;
import org.jdom.Namespace; import com.sun.syndication.io.ModuleGenerator;
import java.beans.PropertyDescriptor;
import java.net.URL;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
/** /**
* *
@ -87,19 +83,19 @@ public class GoogleBaseGenerator implements ModuleGenerator {
} }
public Set getNamespaces() { public Set getNamespaces() {
HashSet set = new HashSet(); final HashSet set = new HashSet();
set.add(GoogleBaseGenerator.NS); set.add(GoogleBaseGenerator.NS);
return set; return set;
} }
public void generate(Module module,Element element) { public void generate(final Module module, final Element element) {
GoogleBaseImpl mod = (GoogleBaseImpl)module; final GoogleBaseImpl mod = (GoogleBaseImpl) module;
HashMap props2tags = new HashMap(GoogleBaseParser.PROPS2TAGS); final HashMap props2tags = new HashMap(GoogleBaseParser.PROPS2TAGS);
PropertyDescriptor[] pds = GoogleBaseParser.pds; final PropertyDescriptor[] pds = GoogleBaseParser.pds;
for(int i = 0; i < pds.length; i++) { for (final PropertyDescriptor pd : pds) {
String tagName = (String)props2tags.get(pds[i].getName()); final String tagName = (String) props2tags.get(pd.getName());
if (tagName == null) { if (tagName == null) {
continue; continue;
@ -108,48 +104,48 @@ public class GoogleBaseGenerator implements ModuleGenerator {
Object[] values = null; Object[] values = null;
try { try {
if(pds[i].getPropertyType().isArray()) { if (pd.getPropertyType().isArray()) {
values = (Object[])pds[i].getReadMethod().invoke(mod,(Object[])null); values = (Object[]) pd.getReadMethod().invoke(mod, (Object[]) null);
} else { } else {
values = new Object[] { values = new Object[] { pd.getReadMethod().invoke(mod, (Object[]) null) };
pds[i].getReadMethod().invoke(mod,(Object[])null)
};
} }
for(int j = 0; (values != null)&&(j < values.length); j++) { for (int j = 0; values != null && j < values.length; j++) {
if (values[j] != null) { if (values[j] != null) {
element.addContent(this.generateTag(values[j],tagName)); element.addContent(generateTag(values[j], tagName));
} }
} }
} catch(Exception e) { } catch (final Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
public Element generateTag(Object o,String tagName) { public Element generateTag(final Object o, final String tagName) {
if(o instanceof URL||o instanceof Float||o instanceof Boolean||o instanceof Integer||o instanceof String||o instanceof FloatUnit||o instanceof IntUnit||o instanceof GenderEnumeration||o instanceof PaymentTypeEnumeration||o instanceof PriceTypeEnumeration||o instanceof CurrencyEnumeration||o instanceof Size||o instanceof YearType) { if (o instanceof URL || o instanceof Float || o instanceof Boolean || o instanceof Integer || o instanceof String || o instanceof FloatUnit
return this.generateSimpleElement(tagName,o.toString()); || o instanceof IntUnit || o instanceof GenderEnumeration || o instanceof PaymentTypeEnumeration || o instanceof PriceTypeEnumeration
|| o instanceof CurrencyEnumeration || o instanceof Size || o instanceof YearType) {
return generateSimpleElement(tagName, o.toString());
} else if (o instanceof ShortDate) { } else if (o instanceof ShortDate) {
return this.generateSimpleElement(tagName,GoogleBaseParser.SHORT_DT_FMT.format(o)); return generateSimpleElement(tagName, GoogleBaseParser.SHORT_DT_FMT.format(o));
} else if (o instanceof Date) { } else if (o instanceof Date) {
return this.generateSimpleElement(tagName,GoogleBaseParser.LONG_DT_FMT.format(o)); return generateSimpleElement(tagName, GoogleBaseParser.LONG_DT_FMT.format(o));
} else if (o instanceof ShippingType) { } else if (o instanceof ShippingType) {
ShippingType st = (ShippingType)o; final ShippingType st = (ShippingType) o;
Element element = new Element(tagName,GoogleBaseGenerator.NS); final Element element = new Element(tagName, GoogleBaseGenerator.NS);
element.addContent(this.generateSimpleElement("country",st.getCountry())); element.addContent(generateSimpleElement("country", st.getCountry()));
element.addContent(this.generateSimpleElement("service", st.getService().toString() )); element.addContent(generateSimpleElement("service", st.getService().toString()));
element.addContent(this.generateSimpleElement("price",st.getPrice().toString())); element.addContent(generateSimpleElement("price", st.getPrice().toString()));
return element; return element;
} else if (o instanceof DateTimeRange) { } else if (o instanceof DateTimeRange) {
DateTimeRange dtr = (DateTimeRange)o; final DateTimeRange dtr = (DateTimeRange) o;
Element element = new Element(tagName,GoogleBaseGenerator.NS); final Element element = new Element(tagName, GoogleBaseGenerator.NS);
element.addContent(this.generateSimpleElement("start",GoogleBaseParser.LONG_DT_FMT.format(dtr.getStart()))); element.addContent(generateSimpleElement("start", GoogleBaseParser.LONG_DT_FMT.format(dtr.getStart())));
element.addContent(this.generateSimpleElement("end",GoogleBaseParser.LONG_DT_FMT.format(dtr.getEnd()))); element.addContent(generateSimpleElement("end", GoogleBaseParser.LONG_DT_FMT.format(dtr.getEnd())));
return element; return element;
} }
@ -157,8 +153,8 @@ public class GoogleBaseGenerator implements ModuleGenerator {
throw new RuntimeException("Unknown class type to handle: " + o.getClass().getName()); throw new RuntimeException("Unknown class type to handle: " + o.getClass().getName());
} }
protected Element generateSimpleElement(String name,String value) { protected Element generateSimpleElement(final String name, final String value) {
Element element = new Element(name,GoogleBaseGenerator.NS); final Element element = new Element(name, GoogleBaseGenerator.NS);
element.addContent(value); element.addContent(value);
return element; return element;

View file

@ -39,10 +39,25 @@
*/ */
package org.rometools.feed.module.base.io; package org.rometools.feed.module.base.io;
import com.sun.syndication.feed.module.Module; import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.lang.reflect.Array;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.rometools.feed.module.base.GoogleBase; import org.rometools.feed.module.base.GoogleBase;
import org.rometools.feed.module.base.GoogleBaseImpl; import org.rometools.feed.module.base.GoogleBaseImpl;
import com.sun.syndication.io.ModuleParser;
import org.rometools.feed.module.base.types.CurrencyEnumeration; import org.rometools.feed.module.base.types.CurrencyEnumeration;
import org.rometools.feed.module.base.types.DateTimeRange; import org.rometools.feed.module.base.types.DateTimeRange;
import org.rometools.feed.module.base.types.FloatUnit; import org.rometools.feed.module.base.types.FloatUnit;
@ -54,34 +69,13 @@ import org.rometools.feed.module.base.types.ShippingType;
import org.rometools.feed.module.base.types.Size; import org.rometools.feed.module.base.types.Size;
import org.rometools.feed.module.base.types.YearType; import org.rometools.feed.module.base.types.YearType;
import org.jdom.Element; import com.sun.syndication.feed.module.Module;
import org.jdom.Namespace; import com.sun.syndication.io.ModuleParser;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.lang.reflect.Array;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
/** /**
* DOCUMENT ME! * DOCUMENT ME!
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* Cooper</a>
* @version $Revision: 1.3 $ * @version $Revision: 1.3 $
*/ */
public class GoogleBaseParser implements ModuleParser { public class GoogleBaseParser implements ModuleParser {
@ -98,10 +92,10 @@ public class GoogleBaseParser implements ModuleParser {
try { try {
pds = Introspector.getBeanInfo(GoogleBaseImpl.class).getPropertyDescriptors(); pds = Introspector.getBeanInfo(GoogleBaseImpl.class).getPropertyDescriptors();
PROPS2TAGS.load(GoogleBaseParser.class.getResourceAsStream("/org/rometools/feed/module/base/io/tags.properties")); PROPS2TAGS.load(GoogleBaseParser.class.getResourceAsStream("/org/rometools/feed/module/base/io/tags.properties"));
} catch(IOException e) { } catch (final IOException e) {
e.printStackTrace(); e.printStackTrace();
log.log(Level.SEVERE, "Unable to read properties file for Google Base tags!", e); log.log(Level.SEVERE, "Unable to read properties file for Google Base tags!", e);
} catch(IntrospectionException e) { } catch (final IntrospectionException e) {
e.printStackTrace(); e.printStackTrace();
log.log(Level.SEVERE, "Unable to get property descriptors for GoogleBaseImpl!", e); log.log(Level.SEVERE, "Unable to get property descriptors for GoogleBaseImpl!", e);
} }
@ -114,14 +108,13 @@ public class GoogleBaseParser implements ModuleParser {
super(); super();
} }
public Module parse(Element element) { public Module parse(final Element element) {
HashMap tag2pd = new HashMap(); final HashMap tag2pd = new HashMap();
GoogleBaseImpl module = new GoogleBaseImpl(); final GoogleBaseImpl module = new GoogleBaseImpl();
try { try {
for(int i = 0; i < pds.length; i++) { for (final PropertyDescriptor pd : pds) {
PropertyDescriptor pd = pds[i]; final String tagName = GoogleBaseParser.PROPS2TAGS.getProperty(pd.getName());
String tagName = GoogleBaseParser.PROPS2TAGS.getProperty(pd.getName());
if (tagName == null) { if (tagName == null) {
log.log(Level.FINE, "Property: " + pd.getName() + " doesn't have a tag mapping. "); log.log(Level.FINE, "Property: " + pd.getName() + " doesn't have a tag mapping. ");
@ -129,23 +122,23 @@ public class GoogleBaseParser implements ModuleParser {
tag2pd.put(tagName, pd); tag2pd.put(tagName, pd);
} }
} }
} catch(Exception e) { } catch (final Exception e) {
throw new RuntimeException("Exception building tag to property mapping. ", e); throw new RuntimeException("Exception building tag to property mapping. ", e);
} }
List children = element.getChildren(); final List children = element.getChildren();
Iterator it = children.iterator(); final Iterator it = children.iterator();
while (it.hasNext()) { while (it.hasNext()) {
Element child = (Element)it.next(); final Element child = (Element) it.next();
if (child.getNamespace().equals(GoogleBaseParser.NS)) { if (child.getNamespace().equals(GoogleBaseParser.NS)) {
PropertyDescriptor pd = (PropertyDescriptor)tag2pd.get(child.getName()); final PropertyDescriptor pd = (PropertyDescriptor) tag2pd.get(child.getName());
if (pd != null) { if (pd != null) {
try { try {
this.handleTag(child,pd,module); handleTag(child, pd, module);
} catch(Exception e) { } catch (final Exception e) {
log.log(Level.WARNING, "Unable to handle tag: " + child.getName(), e); log.log(Level.WARNING, "Unable to handle tag: " + child.getName(), e);
e.printStackTrace(); e.printStackTrace();
} }
@ -156,13 +149,13 @@ public class GoogleBaseParser implements ModuleParser {
return module; return module;
} }
public static String stripNonValidCharacters(char[] validCharacters,String input) { public static String stripNonValidCharacters(final char[] validCharacters, final String input) {
StringBuffer newString = new StringBuffer(); final StringBuffer newString = new StringBuffer();
for (int i = 0; i < input.length(); i++) { for (int i = 0; i < input.length(); i++) {
for(int j = 0; j < validCharacters.length; j++) { for (final char validCharacter : validCharacters) {
if(input.charAt(i) == validCharacters[j]) { if (input.charAt(i) == validCharacter) {
newString.append(validCharacters[j]); newString.append(validCharacter);
} }
} }
} }
@ -174,67 +167,69 @@ public class GoogleBaseParser implements ModuleParser {
return GoogleBase.URI; return GoogleBase.URI;
} }
private void handleTag(Element tag,PropertyDescriptor pd,GoogleBase module) throws Exception { private void handleTag(final Element tag, final PropertyDescriptor pd, final GoogleBase module) throws Exception {
Object tagValue = null; Object tagValue = null;
if((pd.getPropertyType() == Integer.class)||(pd.getPropertyType().getComponentType() == Integer.class)) { if (pd.getPropertyType() == Integer.class || pd.getPropertyType().getComponentType() == Integer.class) {
tagValue = new Integer(GoogleBaseParser.stripNonValidCharacters(GoogleBaseParser.INTEGER_CHARS, tag.getText())); tagValue = new Integer(GoogleBaseParser.stripNonValidCharacters(GoogleBaseParser.INTEGER_CHARS, tag.getText()));
} else if((pd.getPropertyType() == Float.class)||(pd.getPropertyType().getComponentType() == Float.class)) { } else if (pd.getPropertyType() == Float.class || pd.getPropertyType().getComponentType() == Float.class) {
tagValue = new Float(GoogleBaseParser.stripNonValidCharacters(GoogleBaseParser.FLOAT_CHARS, tag.getText())); tagValue = new Float(GoogleBaseParser.stripNonValidCharacters(GoogleBaseParser.FLOAT_CHARS, tag.getText()));
} else if((pd.getPropertyType() == String.class)||(pd.getPropertyType().getComponentType() == String.class)) { } else if (pd.getPropertyType() == String.class || pd.getPropertyType().getComponentType() == String.class) {
tagValue = tag.getText(); tagValue = tag.getText();
} else if((pd.getPropertyType() == URL.class)||(pd.getPropertyType().getComponentType() == URL.class)) { } else if (pd.getPropertyType() == URL.class || pd.getPropertyType().getComponentType() == URL.class) {
tagValue = new URL(tag.getText().trim()); tagValue = new URL(tag.getText().trim());
} else if((pd.getPropertyType() == Boolean.class)||(pd.getPropertyType().getComponentType() == Boolean.class)) { } else if (pd.getPropertyType() == Boolean.class || pd.getPropertyType().getComponentType() == Boolean.class) {
tagValue = new Boolean(tag.getText().trim()); tagValue = new Boolean(tag.getText().trim());
} else if((pd.getPropertyType() == Date.class)||(pd.getPropertyType().getComponentType() == Date.class)) { } else if (pd.getPropertyType() == Date.class || pd.getPropertyType().getComponentType() == Date.class) {
String text = tag.getText().trim(); final String text = tag.getText().trim();
if (text.length() > 10) { if (text.length() > 10) {
tagValue = GoogleBaseParser.LONG_DT_FMT.parse(text); tagValue = GoogleBaseParser.LONG_DT_FMT.parse(text);
} else { } else {
tagValue = GoogleBaseParser.SHORT_DT_FMT.parse(text); tagValue = GoogleBaseParser.SHORT_DT_FMT.parse(text);
} }
} else if((pd.getPropertyType() == IntUnit.class)||(pd.getPropertyType().getComponentType() == IntUnit.class)) { } else if (pd.getPropertyType() == IntUnit.class || pd.getPropertyType().getComponentType() == IntUnit.class) {
tagValue = new IntUnit(tag.getText()); tagValue = new IntUnit(tag.getText());
} else if((pd.getPropertyType() == FloatUnit.class)||(pd.getPropertyType().getComponentType() == FloatUnit.class)) { } else if (pd.getPropertyType() == FloatUnit.class || pd.getPropertyType().getComponentType() == FloatUnit.class) {
tagValue = new FloatUnit(tag.getText()); tagValue = new FloatUnit(tag.getText());
} else if((pd.getPropertyType() == DateTimeRange.class)||(pd.getPropertyType().getComponentType() == DateTimeRange.class)) { } else if (pd.getPropertyType() == DateTimeRange.class || pd.getPropertyType().getComponentType() == DateTimeRange.class) {
tagValue = new DateTimeRange(LONG_DT_FMT.parse(tag.getChild("start",GoogleBaseParser.NS).getText().trim()),LONG_DT_FMT.parse(tag.getChild("end",GoogleBaseParser.NS).getText().trim())); tagValue = new DateTimeRange(LONG_DT_FMT.parse(tag.getChild("start", GoogleBaseParser.NS).getText().trim()), LONG_DT_FMT.parse(tag
} else if((pd.getPropertyType() == ShippingType.class)||(pd.getPropertyType().getComponentType() == ShippingType.class)) { .getChild("end", GoogleBaseParser.NS).getText().trim()));
FloatUnit price = new FloatUnit(tag.getChild("price",GoogleBaseParser.NS).getText().trim()); } else if (pd.getPropertyType() == ShippingType.class || pd.getPropertyType().getComponentType() == ShippingType.class) {
ShippingType.ServiceEnumeration service = ShippingType.ServiceEnumeration.findByValue(tag.getChild("service",GoogleBaseParser.NS).getText().trim()); final FloatUnit price = new FloatUnit(tag.getChild("price", GoogleBaseParser.NS).getText().trim());
ShippingType.ServiceEnumeration service = ShippingType.ServiceEnumeration
.findByValue(tag.getChild("service", GoogleBaseParser.NS).getText().trim());
if (service == null) { if (service == null) {
service = ShippingType.ServiceEnumeration.STANDARD; service = ShippingType.ServiceEnumeration.STANDARD;
} }
String country = tag.getChild("country",GoogleBaseParser.NS).getText().trim(); final String country = tag.getChild("country", GoogleBaseParser.NS).getText().trim();
tagValue = new ShippingType(price, service, country); tagValue = new ShippingType(price, service, country);
} else if((pd.getPropertyType() == PaymentTypeEnumeration.class)||(pd.getPropertyType().getComponentType() == PaymentTypeEnumeration.class)) { } else if (pd.getPropertyType() == PaymentTypeEnumeration.class || pd.getPropertyType().getComponentType() == PaymentTypeEnumeration.class) {
tagValue = PaymentTypeEnumeration.findByValue(tag.getText().trim()); tagValue = PaymentTypeEnumeration.findByValue(tag.getText().trim());
} else if((pd.getPropertyType() == PriceTypeEnumeration.class)||(pd.getPropertyType().getComponentType() == PriceTypeEnumeration.class)) { } else if (pd.getPropertyType() == PriceTypeEnumeration.class || pd.getPropertyType().getComponentType() == PriceTypeEnumeration.class) {
tagValue = PriceTypeEnumeration.findByValue(tag.getText().trim()); tagValue = PriceTypeEnumeration.findByValue(tag.getText().trim());
} else if((pd.getPropertyType() == CurrencyEnumeration.class)||(pd.getPropertyType().getComponentType() == CurrencyEnumeration.class)) { } else if (pd.getPropertyType() == CurrencyEnumeration.class || pd.getPropertyType().getComponentType() == CurrencyEnumeration.class) {
tagValue = CurrencyEnumeration.findByValue(tag.getText().trim()); tagValue = CurrencyEnumeration.findByValue(tag.getText().trim());
} else if((pd.getPropertyType() == GenderEnumeration.class)||(pd.getPropertyType().getComponentType() == GenderEnumeration.class)) { } else if (pd.getPropertyType() == GenderEnumeration.class || pd.getPropertyType().getComponentType() == GenderEnumeration.class) {
tagValue = GenderEnumeration.findByValue(tag.getText().trim()); tagValue = GenderEnumeration.findByValue(tag.getText().trim());
} else if((pd.getPropertyType() == YearType.class)||(pd.getPropertyType().getComponentType() == YearType.class)) { } else if (pd.getPropertyType() == YearType.class || pd.getPropertyType().getComponentType() == YearType.class) {
tagValue = new YearType(tag.getText().trim()); tagValue = new YearType(tag.getText().trim());
} else if((pd.getPropertyType() == Size.class)||(pd.getPropertyType().getComponentType() == Size.class)) { } else if (pd.getPropertyType() == Size.class || pd.getPropertyType().getComponentType() == Size.class) {
tagValue = new Size(tag.getText().trim()); tagValue = new Size(tag.getText().trim());
} }
if (!pd.getPropertyType().isArray()) { if (!pd.getPropertyType().isArray()) {
pd.getWriteMethod().invoke(module, new Object[] { tagValue }); pd.getWriteMethod().invoke(module, new Object[] { tagValue });
} else { } else {
Object[] current = (Object[])pd.getReadMethod().invoke(module,(Object[])null); final Object[] current = (Object[]) pd.getReadMethod().invoke(module, (Object[]) null);
int newSize = (current == null) ? 1 : (current.length + 1); final int newSize = current == null ? 1 : current.length + 1;
Object setValue = Array.newInstance(pd.getPropertyType().getComponentType(),newSize); final Object setValue = Array.newInstance(pd.getPropertyType().getComponentType(), newSize);
int i = 0; int i = 0;
for(; (current != null)&&(i < current.length); i++) { for (; current != null && i < current.length; i++) {
Array.set(setValue, i, current[i]); Array.set(setValue, i, current[i]);
} }

View file

@ -39,9 +39,9 @@
*/ */
package org.rometools.feed.module.base.types; package org.rometools.feed.module.base.types;
/** /**
* This is just a holder interface for cloneable elements. * This is just a holder interface for cloneable elements.
*
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
*/ */

View file

@ -41,7 +41,6 @@ package org.rometools.feed.module.base.types;
import java.util.HashMap; import java.util.HashMap;
/** /**
* An Enumeration of valid currency types. * An Enumeration of valid currency types.
* *
@ -569,30 +568,32 @@ public class CurrencyEnumeration {
public static final CurrencyEnumeration ZWD = new CurrencyEnumeration("ZWD"); public static final CurrencyEnumeration ZWD = new CurrencyEnumeration("ZWD");
// </xs:restriction> // </xs:restriction>
private String value; private final String value;
/** /**
* Creates a new instance of CurrencyEnumeration * Creates a new instance of CurrencyEnumeration
* *
* @param value DOCUMENT ME! * @param value DOCUMENT ME!
*/ */
private CurrencyEnumeration(String value) { private CurrencyEnumeration(final String value) {
this.value = value; this.value = value;
lookup.put(value, this); lookup.put(value, this);
} }
public String getValue() { public String getValue() {
return this.value; return value;
} }
@Override
public Object clone() { public Object clone() {
return this; return this;
} }
public static CurrencyEnumeration findByValue(String value) { public static CurrencyEnumeration findByValue(final String value) {
return (CurrencyEnumeration) lookup.get(value.trim().toUpperCase()); return (CurrencyEnumeration) lookup.get(value.trim().toUpperCase());
} }
@Override
public String toString() { public String toString() {
return value; return value;
} }

View file

@ -41,8 +41,8 @@ package org.rometools.feed.module.base.types;
import java.util.Date; import java.util.Date;
/**
/** Represents a time range. * Represents a time range.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
@ -59,26 +59,27 @@ public class DateTimeRange implements CloneableType {
/** /**
* Creates a new instance of DateTimeRange * Creates a new instance of DateTimeRange
*
* @param start Beginning of the timeframe. * @param start Beginning of the timeframe.
* @param end End of the Timeframe. * @param end End of the Timeframe.
*/ */
public DateTimeRange(Date start, Date end) { public DateTimeRange(final Date start, final Date end) {
this.start = start; this.start = start;
this.end = end; this.end = end;
} }
/** /**
* The end of the timeframe. * The end of the timeframe.
*
* @return The end of the timeframe. * @return The end of the timeframe.
*/ */
public Date getEnd() { public Date getEnd() {
return end; return end;
} }
/** /**
* The beginning of the timeframe. * The beginning of the timeframe.
*
* @return The beginning of the timeframe. * @return The beginning of the timeframe.
*/ */
public Date getStart() { public Date getStart() {
@ -87,17 +88,19 @@ public class DateTimeRange implements CloneableType {
/** /**
* Clones the object * Clones the object
*
* @return Duplicate of this object. * @return Duplicate of this object.
*/ */
@Override
public Object clone() { public Object clone() {
DateTimeRange retValue = new DateTimeRange(null, null); final DateTimeRange retValue = new DateTimeRange(null, null);
if (this.getStart() != null) { if (getStart() != null) {
retValue.start = ((Date) this.getStart().clone()); retValue.start = (Date) getStart().clone();
} }
if (this.getEnd() != null) { if (getEnd() != null) {
retValue.end = ((Date) this.getEnd().clone()); retValue.end = (Date) getEnd().clone();
} }
return retValue; return retValue;
@ -105,23 +108,29 @@ public class DateTimeRange implements CloneableType {
/** /**
* String representation of the object. * String representation of the object.
*
* @return String representation of the object. * @return String representation of the object.
*/ */
@Override
public String toString() { public String toString() {
return "Start: " + this.start + " End: " + this.end; return "Start: " + start + " End: " + end;
} }
public boolean equals( Object o ){ @Override
if( !(o instanceof DateTimeRange ) || o == null ) public boolean equals(final Object o) {
if (!(o instanceof DateTimeRange) || o == null) {
return false; return false;
DateTimeRange d = (DateTimeRange) o; }
if( this.start == d.getStart() && this.end == d.getEnd() ){ final DateTimeRange d = (DateTimeRange) o;
if (start == d.getStart() && end == d.getEnd()) {
return true; return true;
} }
if( this.start != null && !this.start.equals( d.getStart()) ) if (start != null && !start.equals(d.getStart())) {
return false; return false;
if( this.end != null && !this.end.equals( d.getEnd()) ) }
if (end != null && !end.equals(d.getEnd())) {
return false; return false;
}
return true; return true;
} }
} }

View file

@ -41,9 +41,8 @@ package org.rometools.feed.module.base.types;
import org.rometools.feed.module.base.io.GoogleBaseParser; import org.rometools.feed.module.base.io.GoogleBaseParser;
/**
/** This class represents a quantity consisting of a float value and an optional * This class represents a quantity consisting of a float value and an optional units specification.
* units specification.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
@ -56,28 +55,31 @@ public class FloatUnit implements CloneableType {
/** /**
* Float value * Float value
*/ */
private float value; private final float value;
/** /**
* Looks for a char in an array * Looks for a char in an array
*
* @param find char to search for * @param find char to search for
* @param array array to search * @param array array to search
* @return boolean indicating presence. * @return boolean indicating presence.
*/ */
private boolean inCharArray( char find, char[] array ){ private boolean inCharArray(final char find, final char[] array) {
for( int i=0; i < array.length; i++ ){ for (final char element : array) {
if( find == array[i]) if (find == element) {
return true; return true;
} }
}
return false; return false;
} }
/** /**
* Creates a new float unit by parsing a String value * Creates a new float unit by parsing a String value
*
* @param source String value to parse * @param source String value to parse
*/ */
public FloatUnit(String source) { public FloatUnit(final String source) {
String parse = source.trim(); final String parse = source.trim();
int space = -1; int space = -1;
for (int i = 0; i < parse.length(); i++) { for (int i = 0; i < parse.length(); i++) {
if (!inCharArray(parse.charAt(i), GoogleBaseParser.FLOAT_CHARS)) { if (!inCharArray(parse.charAt(i), GoogleBaseParser.FLOAT_CHARS)) {
@ -90,26 +92,27 @@ public class FloatUnit implements CloneableType {
space = parse.length(); space = parse.length();
} }
this.value = Float.parseFloat( value = Float.parseFloat(GoogleBaseParser.stripNonValidCharacters(GoogleBaseParser.FLOAT_CHARS, parse.substring(0, space)));
GoogleBaseParser.stripNonValidCharacters(GoogleBaseParser.FLOAT_CHARS, parse.substring(0, space)));
if (space != parse.length()) { if (space != parse.length()) {
this.units = parse.substring(space, parse.length()).trim(); units = parse.substring(space, parse.length()).trim();
} }
} }
/** /**
* Creates a new instance of FloatUnit * Creates a new instance of FloatUnit
*
* @param value float value * @param value float value
* @param units Units represented, or null. * @param units Units represented, or null.
*/ */
public FloatUnit(float value, String units) { public FloatUnit(final float value, final String units) {
this.value = value; this.value = value;
this.units = units; this.units = units;
} }
/** /**
* Returns the units. * Returns the units.
*
* @return Returns the units. * @return Returns the units.
*/ */
public String getUnits() { public String getUnits() {
@ -118,6 +121,7 @@ public class FloatUnit implements CloneableType {
/** /**
* Returns the float value. * Returns the float value.
*
* @return Returns the float value. * @return Returns the float value.
*/ */
public float getValue() { public float getValue() {
@ -126,32 +130,38 @@ public class FloatUnit implements CloneableType {
/** /**
* Duplicates the object. * Duplicates the object.
*
* @return Duplicate FloatUnit * @return Duplicate FloatUnit
*/ */
@Override
public Object clone() { public Object clone() {
return new FloatUnit(0 + this.value, this.units); return new FloatUnit(0 + value, units);
} }
/** /**
* Returns a String representation of the object. * Returns a String representation of the object.
*
* @return Returns a String representation of the object. * @return Returns a String representation of the object.
*/ */
@Override
public String toString() { public String toString() {
if ((this.units != null) && (this.units.trim().length() > 0)) { if (units != null && units.trim().length() > 0) {
return this.value + " " + this.units; return value + " " + units;
} else { } else {
return Float.toString(value); return Float.toString(value);
} }
} }
public boolean equals( Object o ){ @Override
if(!(o instanceof FloatUnit) ) public boolean equals(final Object o) {
return false; if (!(o instanceof FloatUnit)) {
FloatUnit f = (FloatUnit) o;
if( f.getValue() != this.value ){
return false; return false;
} }
if( this.units == f.getUnits() || ( this.units != null && this.units.equals( f.getUnits() )) ){ final FloatUnit f = (FloatUnit) o;
if (f.getValue() != value) {
return false;
}
if (units == f.getUnits() || units != null && units.equals(f.getUnits())) {
return true; return true;
} }
return false; return false;

View file

@ -39,7 +39,8 @@
*/ */
package org.rometools.feed.module.base.types; package org.rometools.feed.module.base.types;
/** Simple enumeration for Genders. /**
* Simple enumeration for Genders.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
@ -49,19 +50,19 @@ public class GenderEnumeration implements CloneableType {
public static final GenderEnumeration MALE = new GenderEnumeration("Male"); public static final GenderEnumeration MALE = new GenderEnumeration("Male");
/** Women */ /** Women */
public static final GenderEnumeration FEMALE = new GenderEnumeration("Female"); public static final GenderEnumeration FEMALE = new GenderEnumeration("Female");
private String value; private final String value;
private GenderEnumeration(String value) { private GenderEnumeration(final String value) {
this.value = value; this.value = value;
} }
/** Returns the proper instance based on the string value */ /** Returns the proper instance based on the string value */
public static GenderEnumeration findByValue(String value) { public static GenderEnumeration findByValue(final String value) {
if (value == null) { if (value == null) {
return null; return null;
} }
String gender = value.toUpperCase(); final String gender = value.toUpperCase();
if (gender.charAt(0) == 'M') { if (gender.charAt(0) == 'M') {
return GenderEnumeration.MALE; return GenderEnumeration.MALE;
@ -74,14 +75,16 @@ public class GenderEnumeration implements CloneableType {
/** Returns the value of the instance */ /** Returns the value of the instance */
public String getValue() { public String getValue() {
return this.value; return value;
} }
/** Returns a reference to the same object. :P */ /** Returns a reference to the same object. :P */
@Override
public Object clone() { public Object clone() {
return this; return this;
} }
@Override
public String toString() { public String toString() {
return value; return value;
} }

View file

@ -41,7 +41,6 @@ package org.rometools.feed.module.base.types;
import org.rometools.feed.module.base.io.GoogleBaseParser; import org.rometools.feed.module.base.io.GoogleBaseParser;
/** /**
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
@ -49,16 +48,19 @@ import org.rometools.feed.module.base.io.GoogleBaseParser;
*/ */
public class IntUnit implements CloneableType { public class IntUnit implements CloneableType {
private String units; private String units;
private int value; private final int value;
private boolean inCharArray( char find, char[] array ){
for( int i=0; i < array.length; i++ ){ private boolean inCharArray(final char find, final char[] array) {
if( find == array[i]) for (final char element : array) {
if (find == element) {
return true; return true;
} }
}
return false; return false;
} }
public IntUnit(String source) {
String parse = source.trim(); public IntUnit(final String source) {
final String parse = source.trim();
int space = -1; int space = -1;
for (int i = 0; i < parse.length(); i++) { for (int i = 0; i < parse.length(); i++) {
if (!inCharArray(parse.charAt(i), GoogleBaseParser.INTEGER_CHARS)) { if (!inCharArray(parse.charAt(i), GoogleBaseParser.INTEGER_CHARS)) {
@ -70,16 +72,15 @@ public class IntUnit implements CloneableType {
space = parse.length(); space = parse.length();
} }
this.value = Integer.parseInt( value = Integer.parseInt(GoogleBaseParser.stripNonValidCharacters(GoogleBaseParser.INTEGER_CHARS, parse.substring(0, space)));
GoogleBaseParser.stripNonValidCharacters(GoogleBaseParser.INTEGER_CHARS, parse.substring(0, space)));
if (space != parse.length()) { if (space != parse.length()) {
this.units = parse.substring(space, parse.length()).trim(); units = parse.substring(space, parse.length()).trim();
} }
} }
/** Creates a new instance of IntUnit */ /** Creates a new instance of IntUnit */
public IntUnit(int value, String units) { public IntUnit(final int value, final String units) {
this.value = value; this.value = value;
this.units = units; this.units = units;
} }
@ -92,26 +93,30 @@ public class IntUnit implements CloneableType {
return value; return value;
} }
@Override
public Object clone() { public Object clone() {
return new IntUnit(this.value, this.units); return new IntUnit(value, units);
} }
@Override
public String toString() { public String toString() {
if ((this.units != null) && (this.units.trim().length() > 0)) { if (units != null && units.trim().length() > 0) {
return this.value + " " + this.units; return value + " " + units;
} else { } else {
return Integer.toString(value); return Integer.toString(value);
} }
} }
public boolean equals( Object o ){ @Override
if(!(o instanceof IntUnit) ) public boolean equals(final Object o) {
return false; if (!(o instanceof IntUnit)) {
IntUnit f = (IntUnit) o;
if( f.getValue() != this.value ){
return false; return false;
} }
if( this.units == f.getUnits() || ( this.units != null && this.units.equals( f.getUnits() )) ){ final IntUnit f = (IntUnit) o;
if (f.getValue() != value) {
return false;
}
if (units == f.getUnits() || units != null && units.equals(f.getUnits())) {
return true; return true;
} }
return false; return false;

View file

@ -57,10 +57,10 @@ public class PaymentTypeEnumeration {
public static final PaymentTypeEnumeration DISCOVER = new PaymentTypeEnumeration("Discover"); public static final PaymentTypeEnumeration DISCOVER = new PaymentTypeEnumeration("Discover");
public static final PaymentTypeEnumeration WIRE_TRANSFER = new PaymentTypeEnumeration("Wire transfer"); public static final PaymentTypeEnumeration WIRE_TRANSFER = new PaymentTypeEnumeration("Wire transfer");
public static final PaymentTypeEnumeration PAYPAL = new PaymentTypeEnumeration("Paypal"); public static final PaymentTypeEnumeration PAYPAL = new PaymentTypeEnumeration("Paypal");
private String value; private final String value;
/** Creates a new instance of PaymentTypeEnumeration */ /** Creates a new instance of PaymentTypeEnumeration */
private PaymentTypeEnumeration(String value) { private PaymentTypeEnumeration(final String value) {
this.value = value; this.value = value;
lookup.put(this.value.toUpperCase(), this); lookup.put(this.value.toUpperCase(), this);
} }
@ -69,14 +69,16 @@ public class PaymentTypeEnumeration {
return value; return value;
} }
public static PaymentTypeEnumeration findByValue(String value) { public static PaymentTypeEnumeration findByValue(final String value) {
return (PaymentTypeEnumeration) lookup.get(value.toUpperCase()); return (PaymentTypeEnumeration) lookup.get(value.toUpperCase());
} }
@Override
public Object clone() { public Object clone() {
return this; return this;
} }
@Override
public String toString() { public String toString() {
return value; return value;
} }

View file

@ -39,10 +39,9 @@
*/ */
package org.rometools.feed.module.base.types; package org.rometools.feed.module.base.types;
/** /**
* Enumeration of values suitable for "price_type" or "salary_type". * Enumeration of values suitable for "price_type" or "salary_type".
*
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
*/ */
@ -58,18 +57,20 @@ public class PriceTypeEnumeration implements CloneableType {
/** /**
* String value encapsulated * String value encapsulated
*/ */
private String value; private final String value;
/** /**
* Creates a new instance of PriceTypeEnumeration * Creates a new instance of PriceTypeEnumeration
*
* @param value Value to encapsulate * @param value Value to encapsulate
*/ */
private PriceTypeEnumeration(String value) { private PriceTypeEnumeration(final String value) {
this.value = value; this.value = value;
} }
/** /**
* Returns the string value of this instance. * Returns the string value of this instance.
*
* @return Returns the string value of this instance. * @return Returns the string value of this instance.
*/ */
public String getValue() { public String getValue() {
@ -78,10 +79,11 @@ public class PriceTypeEnumeration implements CloneableType {
/** /**
* Returns a PriceTypeEnumeration based on the String value or null. * Returns a PriceTypeEnumeration based on the String value or null.
*
* @param value Value to search for. * @param value Value to search for.
* @return PriceTypeEnumeration or null. * @return PriceTypeEnumeration or null.
*/ */
public static PriceTypeEnumeration findByValue(String value) { public static PriceTypeEnumeration findByValue(final String value) {
if (value.equalsIgnoreCase("negotiable")) { if (value.equalsIgnoreCase("negotiable")) {
return PriceTypeEnumeration.NEGOTIABLE; return PriceTypeEnumeration.NEGOTIABLE;
} else { } else {
@ -91,16 +93,20 @@ public class PriceTypeEnumeration implements CloneableType {
/** /**
* Returns a duplicate of this instance * Returns a duplicate of this instance
*
* @return The same instance. * @return The same instance.
*/ */
@Override
public Object clone() { public Object clone() {
return this; return this;
} }
/** /**
* Returns the string value of this instance. * Returns the string value of this instance.
*
* @return Returns the string value of this instance. * @return Returns the string value of this instance.
*/ */
@Override
public String toString() { public String toString() {
return value; return value;
} }

View file

@ -43,6 +43,7 @@ import java.util.HashMap;
/** /**
* This class represents a specific shipping option for an item. * This class represents a specific shipping option for an item.
*
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
*/ */
@ -50,23 +51,24 @@ public class ShippingType implements CloneableType {
/** /**
* price of the shipping. * price of the shipping.
*/ */
private FloatUnit price; private final FloatUnit price;
/** /**
* Service used. * Service used.
*/ */
private ServiceEnumeration service; private final ServiceEnumeration service;
/** /**
* Country to ship to * Country to ship to
*/ */
private String country; private final String country;
/** /**
* Creates a new instance of ShippingType * Creates a new instance of ShippingType
*
* @param price The price of the shipping option * @param price The price of the shipping option
* @param service Shipping service used. * @param service Shipping service used.
* @param country Country shipped to. * @param country Country shipped to.
*/ */
public ShippingType(FloatUnit price, ServiceEnumeration service, String country) { public ShippingType(final FloatUnit price, final ServiceEnumeration service, final String country) {
this.price = price; this.price = price;
this.service = service; this.service = service;
this.country = country; this.country = country;
@ -74,6 +76,7 @@ public class ShippingType implements CloneableType {
/** /**
* Returns the destination country. * Returns the destination country.
*
* @return Returns the destination country. * @return Returns the destination country.
*/ */
public String getCountry() { public String getCountry() {
@ -82,6 +85,7 @@ public class ShippingType implements CloneableType {
/** /**
* Returns the price of this shipping option. * Returns the price of this shipping option.
*
* @return Returns the price of this shipping option. * @return Returns the price of this shipping option.
*/ */
public FloatUnit getPrice() { public FloatUnit getPrice() {
@ -90,6 +94,7 @@ public class ShippingType implements CloneableType {
/** /**
* Returns the ServiceEnumeration instance for the shipping service used. * Returns the ServiceEnumeration instance for the shipping service used.
*
* @return Returns the ServiceEnumeration instance for the shipping service used. * @return Returns the ServiceEnumeration instance for the shipping service used.
*/ */
public ServiceEnumeration getService() { public ServiceEnumeration getService() {
@ -98,27 +103,35 @@ public class ShippingType implements CloneableType {
/** /**
* Clones this object. * Clones this object.
*
* @return Duplicate ShippingType object. * @return Duplicate ShippingType object.
*/ */
@Override
public Object clone() { public Object clone() {
return new ShippingType(this.price, this.service, this.country); return new ShippingType(price, service, country);
} }
/** /**
* Returns a String representation of this object. * Returns a String representation of this object.
*
* @return String representation of this object. * @return String representation of this object.
*/ */
@Override
public String toString() { public String toString() {
return this.country + " " + this.price + " " + this.service; return country + " " + price + " " + service;
} }
public boolean equals( Object o ){ @Override
if( !(o instanceof ShippingType)) public boolean equals(final Object o) {
return false; if (!(o instanceof ShippingType)) {
if( this.toString().equals( o.toString() ) )
return true;
return false; return false;
} }
if (toString().equals(o.toString())) {
return true;
}
return false;
}
/** /**
* Enumeration class of valid options for ServiceType. * Enumeration class of valid options for ServiceType.
*/ */
@ -143,40 +156,45 @@ public class ShippingType implements CloneableType {
/** /**
* String value * String value
*/ */
private String value; private final String value;
/** /**
* Creates a new instance of ServiceEnumeration. * Creates a new instance of ServiceEnumeration.
*
* @param value String value to encapsulate. * @param value String value to encapsulate.
*/ */
private ServiceEnumeration(String value) { private ServiceEnumeration(final String value) {
this.value = value; this.value = value;
lookup.put(this.value.toUpperCase(), this); lookup.put(this.value.toUpperCase(), this);
} }
/** /**
* String value of this Service. * String value of this Service.
*
* @return String value of this Service. * @return String value of this Service.
*/ */
public String getValue() { public String getValue() {
return this.value; return value;
} }
/** /**
* Looks up a ServiceEnumeration based on the string value. * Looks up a ServiceEnumeration based on the string value.
*
* @param value String value to search for. * @param value String value to search for.
* @return ServiceEnumeration or null. * @return ServiceEnumeration or null.
*/ */
public static ServiceEnumeration findByValue(String value) { public static ServiceEnumeration findByValue(final String value) {
return (ServiceEnumeration) lookup.get(value.toUpperCase()); return (ServiceEnumeration) lookup.get(value.toUpperCase());
} }
/** /**
* String value of this Service. * String value of this Service.
*
* @return String value of this Service. * @return String value of this Service.
*/ */
@Override
public String toString() { public String toString() {
return this.value; return value;
} }
} }
} }

View file

@ -41,13 +41,12 @@ package org.rometools.feed.module.base.types;
import java.util.Date; import java.util.Date;
/** /**
* This is a simple wrapper for java.util.Date that indicates it should be * This is a simple wrapper for java.util.Date that indicates it should be formatted without time of day for Google Base. It should be transparent to module
* formatted without time of day for Google Base. It should be transparent to * developers.
* module developers.
* *
* Move along. Nothing to see here. * Move along. Nothing to see here.
*
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
*/ */
@ -59,25 +58,29 @@ public class ShortDate extends Date implements CloneableType {
/** /**
* Creates a new Short Date based on a Date value. * Creates a new Short Date based on a Date value.
*
* @param date Date value to read from. * @param date Date value to read from.
*/ */
public ShortDate(Date date) { public ShortDate(final Date date) {
super(date.getTime()); super(date.getTime());
} }
/** /**
* Creates a new ShortDate based on a millisecond time. * Creates a new ShortDate based on a millisecond time.
*
* @param time Millisecond time to start with. * @param time Millisecond time to start with.
*/ */
public ShortDate(long time) { public ShortDate(final long time) {
super(time); super(time);
} }
/** /**
* Returns a duplicate of this object. * Returns a duplicate of this object.
*
* @return Duplicate of the object. * @return Duplicate of the object.
*/ */
@Override
public Object clone() { public Object clone() {
return new ShortDate(this.getTime()); return new ShortDate(getTime());
} }
} }

View file

@ -41,8 +41,8 @@ package org.rometools.feed.module.base.types;
import java.util.StringTokenizer; import java.util.StringTokenizer;
/**
/** Represents the size on an item in 2 or 3 dimensions. * Represents the size on an item in 2 or 3 dimensions.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
@ -55,43 +55,46 @@ public class Size implements CloneableType {
/** /**
* length * length
*/ */
private FloatUnit length; private final FloatUnit length;
/** /**
* width * width
*/ */
private FloatUnit width; private final FloatUnit width;
/** /**
* Creates a new Size object parsing a string value. * Creates a new Size object parsing a string value.
*
* @param source String value to parse * @param source String value to parse
*/ */
public Size(String source) { public Size(final String source) {
StringTokenizer tok = new StringTokenizer(source, "Xx"); final StringTokenizer tok = new StringTokenizer(source, "Xx");
this.length = new FloatUnit( tok.nextToken()); length = new FloatUnit(tok.nextToken());
this.width = new FloatUnit( tok.nextToken()); width = new FloatUnit(tok.nextToken());
if (tok.hasMoreTokens()) { if (tok.hasMoreTokens()) {
this.height = new FloatUnit( tok.nextToken()); height = new FloatUnit(tok.nextToken());
} }
} }
/** /**
* Creates a new instance of Size * Creates a new instance of Size
*
* @param length lenght value * @param length lenght value
* @param width width value * @param width width value
*/ */
public Size(FloatUnit length, FloatUnit width) { public Size(final FloatUnit length, final FloatUnit width) {
this.length = length; this.length = length;
this.width = width; this.width = width;
} }
/** /**
* Creates a new instance of Size. * Creates a new instance of Size.
*
* @param length Length value. * @param length Length value.
* @param width Width value. * @param width Width value.
* @param height Height value. * @param height Height value.
*/ */
public Size(FloatUnit length, FloatUnit width, FloatUnit height) { public Size(final FloatUnit length, final FloatUnit width, final FloatUnit height) {
this.length = length; this.length = length;
this.width = width; this.width = width;
this.height = height; this.height = height;
@ -99,6 +102,7 @@ public class Size implements CloneableType {
/** /**
* Height value. * Height value.
*
* @return Height value. * @return Height value.
*/ */
public FloatUnit getHeight() { public FloatUnit getHeight() {
@ -107,6 +111,7 @@ public class Size implements CloneableType {
/** /**
* Length value. * Length value.
*
* @return Length value. * @return Length value.
*/ */
public FloatUnit getLength() { public FloatUnit getLength() {
@ -115,6 +120,7 @@ public class Size implements CloneableType {
/** /**
* Width value. * Width value.
*
* @return Width value. * @return Width value.
*/ */
public FloatUnit getWidth() { public FloatUnit getWidth() {
@ -123,20 +129,24 @@ public class Size implements CloneableType {
/** /**
* Duplicates this object. * Duplicates this object.
*
* @return A duplicate Size object. * @return A duplicate Size object.
*/ */
@Override
public Object clone() { public Object clone() {
if (this.height != null) { if (height != null) {
return new Size(this.length, this.width, this.height); return new Size(length, width, height);
} else { } else {
return new Size(this.length, this.width); return new Size(length, width);
} }
} }
/** /**
* Returns a string representation of this object. * Returns a string representation of this object.
*
* @return A string representation of this object. * @return A string representation of this object.
*/ */
@Override
public String toString() { public String toString() {
if (height != null) { if (height != null) {
return length + "x" + width + "x" + height; return length + "x" + width + "x" + height;
@ -144,11 +154,15 @@ public class Size implements CloneableType {
return length + "x" + width; return length + "x" + width;
} }
} }
public boolean equals( Object o ){
if( !(o instanceof Size)) @Override
public boolean equals(final Object o) {
if (!(o instanceof Size)) {
return false; return false;
if( this.toString().equals( o.toString() ) ) }
if (toString().equals(o.toString())) {
return true; return true;
}
return false; return false;
} }
} }

View file

@ -42,8 +42,8 @@ package org.rometools.feed.module.base.types;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
/**
/** This class represents a simple 4 digit year. * This class represents a simple 4 digit year.
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
@ -56,43 +56,52 @@ public class YearType implements CloneableType {
/** /**
* Creates a new year from a string value. * Creates a new year from a string value.
*
* @param year String to parse. * @param year String to parse.
*/ */
public YearType(String year) { public YearType(final String year) {
this.year = Integer.parseInt(year.trim()); this.year = Integer.parseInt(year.trim());
} }
/** /**
* Creates a new instance of YearType * Creates a new instance of YearType
*
* @param date Date to get the year from. * @param date Date to get the year from.
*/ */
public YearType(Date date) { public YearType(final Date date) {
Calendar cal = Calendar.getInstance(); final Calendar cal = Calendar.getInstance();
cal.setTime(date); cal.setTime(date);
this.year = cal.get( Calendar.YEAR ); year = cal.get(Calendar.YEAR);
} }
/** /**
* Duplicates this object. * Duplicates this object.
*
* @return Cloned Year. * @return Cloned Year.
*/ */
@Override
public Object clone() { public Object clone() {
return new YearType(Integer.toString(this.year)); return new YearType(Integer.toString(year));
} }
/** /**
* Returns a String representation of this object. * Returns a String representation of this object.
*
* @return Returns a String representation of this object. * @return Returns a String representation of this object.
*/ */
@Override
public String toString() { public String toString() {
return Integer.toString(year); return Integer.toString(year);
} }
public boolean equals( Object o ){ @Override
if( !(o instanceof YearType)) public boolean equals(final Object o) {
if (!(o instanceof YearType)) {
return false; return false;
if( this.toString().equals( o.toString() ) ) }
if (toString().equals(o.toString())) {
return true; return true;
}
return false; return false;
} }
} }

View file

@ -40,9 +40,10 @@
package org.rometools.feed.module.cc; package org.rometools.feed.module.cc;
import com.sun.syndication.feed.module.Module;
import org.rometools.feed.module.cc.types.License; import org.rometools.feed.module.cc.types.License;
import com.sun.syndication.feed.module.Module;
/** /**
* *
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
@ -52,8 +53,10 @@ public interface CreativeCommons extends Module {
public static final String URI = "rome:CreativeCommons"; public static final String URI = "rome:CreativeCommons";
public License[] getAllLicenses(); public License[] getAllLicenses();
public void setAllLicenses(License[] licenses); public void setAllLicenses(License[] licenses);
public License[] getLicenses(); public License[] getLicenses();
public void setLicenses(License[] license); public void setLicenses(License[] license);
} }

View file

@ -40,11 +40,13 @@
package org.rometools.feed.module.cc; package org.rometools.feed.module.cc;
import java.lang.reflect.Array;
import org.rometools.feed.module.cc.types.License;
import com.sun.syndication.feed.CopyFrom; import com.sun.syndication.feed.CopyFrom;
import com.sun.syndication.feed.impl.EqualsBean; import com.sun.syndication.feed.impl.EqualsBean;
import com.sun.syndication.feed.impl.ToStringBean; import com.sun.syndication.feed.impl.ToStringBean;
import org.rometools.feed.module.cc.types.License;
import java.lang.reflect.Array;
/** /**
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
@ -59,12 +61,12 @@ public class CreativeCommonsImpl implements CreativeCommons {
private License[] allLicenses; private License[] allLicenses;
private License[] licenses; private License[] licenses;
protected Object arrayCopy(Object[] source) { protected Object arrayCopy(final Object[] source) {
if (source == null) { if (source == null) {
return null; return null;
} }
Object[] array = (Object[])Array.newInstance(source.getClass().getComponentType(),source.length); final Object[] array = (Object[]) Array.newInstance(source.getClass().getComponentType(), source.length);
for (int i = 0; i < source.length; i++) { for (int i = 0; i < source.length; i++) {
array[i] = source[i]; array[i] = source[i];
@ -77,7 +79,7 @@ public class CreativeCommonsImpl implements CreativeCommons {
return allLicenses; return allLicenses;
} }
public void setAllLicenses(License[] allLicenses) { public void setAllLicenses(final License[] allLicenses) {
this.allLicenses = allLicenses; this.allLicenses = allLicenses;
} }
@ -85,41 +87,42 @@ public class CreativeCommonsImpl implements CreativeCommons {
return CreativeCommons.class; return CreativeCommons.class;
} }
public String getUri() { public String getUri() {
return CreativeCommons.URI; return CreativeCommons.URI;
} }
@Override
public Object clone() { public Object clone() {
CreativeCommonsImpl clone = new CreativeCommonsImpl(); final CreativeCommonsImpl clone = new CreativeCommonsImpl();
clone.copyFrom(this); clone.copyFrom(this);
return clone; return clone;
} }
public void copyFrom(CopyFrom object) { public void copyFrom(final CopyFrom object) {
CreativeCommons source = (CreativeCommons) object; final CreativeCommons source = (CreativeCommons) object;
this.setAllLicenses( (License[]) arrayCopy( source.getAllLicenses() )); setAllLicenses((License[]) arrayCopy(source.getAllLicenses()));
this.setLicenses( source.getLicenses() ); setLicenses(source.getLicenses());
} }
public boolean equals(Object obj) { @Override
EqualsBean eBean = new EqualsBean(this.getClass(),this); public boolean equals(final Object obj) {
final EqualsBean eBean = new EqualsBean(this.getClass(), this);
return eBean.beanEquals(obj); return eBean.beanEquals(obj);
} }
public License[] getLicenses() { public License[] getLicenses() {
return licenses; return licenses;
} }
public void setLicenses(License[] licenses) { public void setLicenses(final License[] licenses) {
this.licenses = licenses; this.licenses = licenses;
} }
@Override
public String toString() { public String toString() {
ToStringBean tsb = new ToStringBean( CreativeCommonsImpl.class, this ); final ToStringBean tsb = new ToStringBean(CreativeCommonsImpl.class, this);
return tsb.toString(); return tsb.toString();
} }
} }

View file

@ -40,15 +40,17 @@
package org.rometools.feed.module.cc.io; package org.rometools.feed.module.cc.io;
import com.sun.syndication.feed.module.Module; import java.util.HashSet;
import com.sun.syndication.io.ModuleGenerator; import java.util.Set;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.rometools.feed.module.cc.CreativeCommons; import org.rometools.feed.module.cc.CreativeCommons;
import org.rometools.feed.module.cc.CreativeCommonsImpl; import org.rometools.feed.module.cc.CreativeCommonsImpl;
import org.rometools.feed.module.cc.types.License; import org.rometools.feed.module.cc.types.License;
import java.util.HashSet;
import java.util.Set; import com.sun.syndication.feed.module.Module;
import org.jdom.Element; import com.sun.syndication.io.ModuleGenerator;
import org.jdom.Namespace;
/** /**
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
@ -74,7 +76,7 @@ public class CCModuleGenerator implements ModuleGenerator{
super(); super();
} }
public void generate(Module module, Element element) { public void generate(final Module module, final Element element) {
Element root = element; Element root = element;
while (root.getParentElement() != null) { while (root.getParentElement() != null) {
root = root.getParentElement(); root = root.getParentElement();
@ -94,25 +96,25 @@ public class CCModuleGenerator implements ModuleGenerator{
return CreativeCommons.URI; return CreativeCommons.URI;
} }
private void generateRSS1( CreativeCommons module, Element element ){ private void generateRSS1(final CreativeCommons module, final Element element) {
// throw new RuntimeException( "Generating RSS1 Feeds not currently Supported."); // throw new RuntimeException( "Generating RSS1 Feeds not currently Supported.");
System.out.println(element.getName()); System.out.println(element.getName());
if (element.getName().equals("channel")) { if (element.getName().equals("channel")) {
// Do all licenses list. // Do all licenses list.
License[] all = module.getAllLicenses(); final License[] all = module.getAllLicenses();
for( int i=0; i < all.length ; i++){ for (final License element2 : all) {
Element license = new Element( "License", RSS1 ); final Element license = new Element("License", RSS1);
license.setAttribute( "about", all[i].getValue(), RDF ); license.setAttribute("about", element2.getValue(), RDF);
License.Behaviour[] permits = all[i].getPermits(); final License.Behaviour[] permits = element2.getPermits();
for (int j = 0; permits != null && j < permits.length; j++) { for (int j = 0; permits != null && j < permits.length; j++) {
Element permit = new Element( "permits", RSS1 ); final Element permit = new Element("permits", RSS1);
permit.setAttribute("resource", permits[j].toString(), RDF); permit.setAttribute("resource", permits[j].toString(), RDF);
license.addContent(permit); license.addContent(permit);
} }
License.Behaviour[] requires = all[i].getPermits(); final License.Behaviour[] requires = element2.getPermits();
for (int j = 0; requires != null && j < requires.length; j++) { for (int j = 0; requires != null && j < requires.length; j++) {
Element permit = new Element( "requires", RSS1 ); final Element permit = new Element("requires", RSS1);
permit.setAttribute("resource", permits[j].toString(), RDF); permit.setAttribute("resource", permits[j].toString(), RDF);
license.addContent(permit); license.addContent(permit);
} }
@ -122,19 +124,19 @@ public class CCModuleGenerator implements ModuleGenerator{
} }
// Do local licenses // Do local licenses
License[] licenses = module.getLicenses(); final License[] licenses = module.getLicenses();
for( int i=0; i < licenses.length; i++ ){ for (final License license2 : licenses) {
Element license = new Element( "license", RSS1 ); final Element license = new Element("license", RSS1);
license.setAttribute( "resource", licenses[i].getValue(), RDF); license.setAttribute("resource", license2.getValue(), RDF);
element.addContent(license); element.addContent(license);
} }
} }
private void generateRSS2( CreativeCommons module, Element element ){ private void generateRSS2(final CreativeCommons module, final Element element) {
License[] licenses = module.getLicenses(); final License[] licenses = module.getLicenses();
for (int i = 0; licenses != null && i < licenses.length; i++) { for (int i = 0; licenses != null && i < licenses.length; i++) {
Element license = new Element( "license", RSS2 ); final Element license = new Element("license", RSS2);
license.setText(licenses[i].getValue()); license.setText(licenses[i].getValue());
element.addContent(license); element.addContent(license);
} }

View file

@ -40,17 +40,17 @@
package org.rometools.feed.module.cc.io; package org.rometools.feed.module.cc.io;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;
import org.rometools.feed.module.cc.CreativeCommonsImpl;
import org.rometools.feed.module.cc.types.License;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.jdom.Element;
import org.jdom.Namespace;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.rometools.feed.module.cc.CreativeCommonsImpl;
import org.rometools.feed.module.cc.types.License;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;
/** /**
* @version $Revision: 1.3 $ * @version $Revision: 1.3 $
@ -60,45 +60,47 @@ public class ModuleParserRSS1 implements ModuleParser {
private static final Namespace NS = Namespace.getNamespace(CreativeCommonsImpl.RSS1_URI); private static final Namespace NS = Namespace.getNamespace(CreativeCommonsImpl.RSS1_URI);
static final Namespace RDF = Namespace.getNamespace(CreativeCommonsImpl.RDF_URI); static final Namespace RDF = Namespace.getNamespace(CreativeCommonsImpl.RDF_URI);
/** /**
* Creates a new instance of ModuleParserRSS1 * Creates a new instance of ModuleParserRSS1
*/ */
public ModuleParserRSS1() { public ModuleParserRSS1() {
} }
public Module parse(Element element) { public Module parse(final Element element) {
CreativeCommonsImpl module = new CreativeCommonsImpl(); final CreativeCommonsImpl module = new CreativeCommonsImpl();
{ {
// Parsing Channel level. // Parsing Channel level.
Element root = element; Element root = element;
while(root.getParentElement() != null ) while (root.getParentElement() != null) {
root = root.getParentElement(); root = root.getParentElement();
List licenseList = root.getChildren( "License", NS ); }
ArrayList licenses = new ArrayList(); final List licenseList = root.getChildren("License", NS);
Iterator it = licenseList.iterator(); final ArrayList licenses = new ArrayList();
final Iterator it = licenseList.iterator();
while (it.hasNext()) { while (it.hasNext()) {
Element licenseTag = (Element) it.next(); final Element licenseTag = (Element) it.next();
String licenseURI = licenseTag.getAttributeValue("about", RDF); final String licenseURI = licenseTag.getAttributeValue("about", RDF);
if( licenseURI == null ) if (licenseURI == null) {
continue; continue;
}
License license = License.findByValue(licenseURI); License license = License.findByValue(licenseURI);
{ {
ArrayList permitsValues = new ArrayList(); final ArrayList permitsValues = new ArrayList();
ArrayList requiresValues = new ArrayList(); final ArrayList requiresValues = new ArrayList();
List permitsTags = licenseTag.getChildren("permits", NS ); final List permitsTags = licenseTag.getChildren("permits", NS);
Iterator sit = permitsTags.iterator(); Iterator sit = permitsTags.iterator();
while (sit.hasNext()) { while (sit.hasNext()) {
Element permitTag = (Element) sit.next(); final Element permitTag = (Element) sit.next();
permitsValues.add(License.Behaviour.findByValue(permitTag.getAttributeValue("resource", RDF))); permitsValues.add(License.Behaviour.findByValue(permitTag.getAttributeValue("resource", RDF)));
} }
List requiresTags = licenseTag.getChildren( "requires", NS); final List requiresTags = licenseTag.getChildren("requires", NS);
sit = requiresTags.iterator(); sit = requiresTags.iterator();
while (sit.hasNext()) { while (sit.hasNext()) {
Element requireTag = (Element) sit.next(); final Element requireTag = (Element) sit.next();
requiresValues.add(License.Behaviour.findByValue(requireTag.getAttributeValue("resource", RDF))); requiresValues.add(License.Behaviour.findByValue(requireTag.getAttributeValue("resource", RDF)));
} }
license = new License( licenseURI, license = new License(licenseURI, (License.Behaviour[]) requiresValues.toArray(new License.Behaviour[requiresValues.size()]),
(License.Behaviour[]) requiresValues.toArray( new License.Behaviour[requiresValues.size()]),
(License.Behaviour[]) permitsValues.toArray(new License.Behaviour[permitsValues.size()])); (License.Behaviour[]) permitsValues.toArray(new License.Behaviour[permitsValues.size()]));
} }
@ -107,11 +109,11 @@ public class ModuleParserRSS1 implements ModuleParser {
} }
module.setAllLicenses((License[]) licenses.toArray(new License[0])); module.setAllLicenses((License[]) licenses.toArray(new License[0]));
} }
ArrayList licenses = new ArrayList(); final ArrayList licenses = new ArrayList();
List licenseTags = element.getChildren( "license", NS ); final List licenseTags = element.getChildren("license", NS);
Iterator lit = licenseTags.iterator(); final Iterator lit = licenseTags.iterator();
while (lit.hasNext()) { while (lit.hasNext()) {
Element licenseTag = (Element) lit.next(); final Element licenseTag = (Element) lit.next();
licenses.add(License.findByValue(licenseTag.getAttributeValue("resource", RDF))); licenses.add(License.findByValue(licenseTag.getAttributeValue("resource", RDF)));
} }

View file

@ -40,16 +40,17 @@
package org.rometools.feed.module.cc.io; package org.rometools.feed.module.cc.io;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;
import org.rometools.feed.module.cc.CreativeCommonsImpl;
import org.rometools.feed.module.cc.types.License;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.jdom.Element;
import org.jdom.Namespace; import org.jdom2.Element;
import org.jdom2.Namespace;
import org.rometools.feed.module.cc.CreativeCommonsImpl;
import org.rometools.feed.module.cc.types.License;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;
/** /**
* *
@ -64,29 +65,33 @@ public class ModuleParserRSS2 implements ModuleParser {
public ModuleParserRSS2() { public ModuleParserRSS2() {
} }
public Module parse(Element element) { public Module parse(final Element element) {
CreativeCommonsImpl module = new CreativeCommonsImpl(); final CreativeCommonsImpl module = new CreativeCommonsImpl();
// Do channel global // Do channel global
{ {
Element root = element; Element root = element;
while( !root.getName().equals("channel") && !root.getName().equals("feed") ) while (!root.getName().equals("channel") && !root.getName().equals("feed")) {
root = root.getParentElement(); root = root.getParentElement();
ArrayList licenses = new ArrayList(); }
final ArrayList licenses = new ArrayList();
List items = null; List items = null;
if( root.getName().equals("channel")) if (root.getName().equals("channel")) {
items = root.getChildren("item"); items = root.getChildren("item");
else } else {
items = root.getChildren("entry"); items = root.getChildren("entry");
}
Iterator iit = items.iterator(); final Iterator iit = items.iterator();
while (iit.hasNext()) { while (iit.hasNext()) {
Element item = (Element) iit.next(); final Element item = (Element) iit.next();
List licenseTags = item.getChildren( "license", NS ); final List licenseTags = item.getChildren("license", NS);
Iterator lit = licenseTags.iterator(); final Iterator lit = licenseTags.iterator();
while (lit.hasNext()) { while (lit.hasNext()) {
Element licenseTag = (Element) lit.next(); final Element licenseTag = (Element) lit.next();
License license = License.findByValue( licenseTag.getTextTrim() ); final License license = License.findByValue(licenseTag.getTextTrim());
if( !licenses.contains( license )); if (!licenses.contains(license)) {
;
}
licenses.add(license); licenses.add(license);
} }
} }
@ -95,11 +100,11 @@ public class ModuleParserRSS2 implements ModuleParser {
} }
} }
// do element local // do element local
ArrayList licenses = new ArrayList(); final ArrayList licenses = new ArrayList();
List licenseTags = element.getChildren( "license", NS ); final List licenseTags = element.getChildren("license", NS);
Iterator it = licenseTags.iterator(); final Iterator it = licenseTags.iterator();
while (it.hasNext()) { while (it.hasNext()) {
Element licenseTag = (Element) it.next(); final Element licenseTag = (Element) it.next();
licenses.add(License.findByValue(licenseTag.getTextTrim())); licenses.add(License.findByValue(licenseTag.getTextTrim()));
} }
if (licenses.size() > 0) { if (licenses.size() > 0) {

View file

@ -39,12 +39,13 @@
*/ */
package org.rometools.feed.module.cc.types; package org.rometools.feed.module.cc.types;
import com.sun.syndication.feed.impl.EqualsBean;
import com.sun.syndication.feed.impl.ToStringBean;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import com.sun.syndication.feed.impl.EqualsBean;
import com.sun.syndication.feed.impl.ToStringBean;
/** /**
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
@ -53,60 +54,36 @@ public class License {
private static final String CC_START = "http://creativecommons.org/licenses/"; private static final String CC_START = "http://creativecommons.org/licenses/";
private static final HashMap lookupLicense = new HashMap(); private static final HashMap lookupLicense = new HashMap();
public static final License NO_DERIVS = new License("http://creativecommons.org/licenses/nd/1.0/", new Behaviour[0], new Behaviour[] { public static final License NO_DERIVS = new License("http://creativecommons.org/licenses/nd/1.0/", new Behaviour[0], new Behaviour[] {
Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
}); public static final License NO_DERIVS_NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nd-nc/1.0/",
public static final License NO_DERIVS_NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nd-nc/1.0/",new Behaviour[] { new Behaviour[] { Behaviour.NONCOMMERCIAL }, new Behaviour[] { Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
Behaviour.NONCOMMERCIAL public static final License NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nc/1.0/", new Behaviour[] { Behaviour.NONCOMMERCIAL },
},new Behaviour[] {Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION}); new Behaviour[] { Behaviour.DERIVATIVE, Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
public static final License NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nc/1.0/",new Behaviour[] { public static final License SHARE_ALIKE = new License("http://creativecommons.org/licenses/sa/1.0/", new Behaviour[] { Behaviour.COPYLEFT },
Behaviour.NONCOMMERCIAL new Behaviour[] { Behaviour.DERIVATIVE, Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
},new Behaviour[] { public static final License SHARE_ALIKE_NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nc-sa/1.0/", new Behaviour[] { Behaviour.COPYLEFT,
Behaviour.DERIVATIVE,Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION Behaviour.NONCOMMERCIAL }, new Behaviour[] { Behaviour.DERIVATIVE, Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
}); public static final License SHARE_ALIKE_ATTRIBUTION = new License("http://creativecommons.org/licenses/by-sa/2.5/", new Behaviour[] { Behaviour.COPYLEFT,
public static final License SHARE_ALIKE = new License("http://creativecommons.org/licenses/sa/1.0/",new Behaviour[] { Behaviour.ATTRIBUTION }, new Behaviour[] { Behaviour.DERIVATIVE, Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
Behaviour.COPYLEFT
},new Behaviour[] {
Behaviour.DERIVATIVE,Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION
});
public static final License SHARE_ALIKE_NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nc-sa/1.0/",new Behaviour[] {
Behaviour.COPYLEFT,Behaviour.NONCOMMERCIAL
},new Behaviour[] {
Behaviour.DERIVATIVE,Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION
});
public static final License SHARE_ALIKE_ATTRIBUTION = new License("http://creativecommons.org/licenses/by-sa/2.5/",new Behaviour[] {
Behaviour.COPYLEFT,Behaviour.ATTRIBUTION
},new Behaviour[] {
Behaviour.DERIVATIVE,Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION
});
public static final License SHARE_ALIKE_NONCOMMERCIAL_ATTRIBUTION = new License("http://creativecommons.org/licenses/by-nc-sa/2.5/", new Behaviour[] { public static final License SHARE_ALIKE_NONCOMMERCIAL_ATTRIBUTION = new License("http://creativecommons.org/licenses/by-nc-sa/2.5/", new Behaviour[] {
Behaviour.COPYLEFT,Behaviour.ATTRIBUTION,Behaviour.NONCOMMERCIAL Behaviour.COPYLEFT, Behaviour.ATTRIBUTION, Behaviour.NONCOMMERCIAL }, new Behaviour[] { Behaviour.DERIVATIVE, Behaviour.DISTRIBUTION,
},new Behaviour[] { Behaviour.REPRODUCTION });
Behaviour.DERIVATIVE,Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION
});
public static final License NONCOMMERCIAL_ATTRIBUTION = new License("http://creativecommons.org/licenses/by-nc/2.5/", new Behaviour[] { public static final License NONCOMMERCIAL_ATTRIBUTION = new License("http://creativecommons.org/licenses/by-nc/2.5/", new Behaviour[] {
Behaviour.ATTRIBUTION,Behaviour.NONCOMMERCIAL Behaviour.ATTRIBUTION, Behaviour.NONCOMMERCIAL }, new Behaviour[] { Behaviour.DERIVATIVE, Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
},new Behaviour[] {
Behaviour.DERIVATIVE,Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION
});
public static final License NONCOMMERCIAL_ATTRIBUTION_NO_DERIVS = new License("http://creativecommons.org/licenses/by-nc-nd/2.5/", new Behaviour[] { public static final License NONCOMMERCIAL_ATTRIBUTION_NO_DERIVS = new License("http://creativecommons.org/licenses/by-nc-nd/2.5/", new Behaviour[] {
Behaviour.ATTRIBUTION,Behaviour.NONCOMMERCIAL Behaviour.ATTRIBUTION, Behaviour.NONCOMMERCIAL }, new Behaviour[] { Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
},new Behaviour[] {Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION}); public static final License ATTRIBUTION_NO_DERIVS = new License("http://creativecommons.org/licenses/by-nd/2.5/",
public static final License ATTRIBUTION_NO_DERIVS = new License("http://creativecommons.org/licenses/by-nd/2.5/",new Behaviour[] { new Behaviour[] { Behaviour.ATTRIBUTION }, new Behaviour[] { Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
Behaviour.ATTRIBUTION public static final License ATTRIBUTION = new License("http://creativecommons.org/licenses/by/2.5/", new Behaviour[] { Behaviour.ATTRIBUTION },
},new Behaviour[] {Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION}); new Behaviour[] { Behaviour.DERIVATIVE, Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
public static final License ATTRIBUTION = new License("http://creativecommons.org/licenses/by/2.5/",new Behaviour[] { private final String uri;
Behaviour.ATTRIBUTION private final Behaviour[] permits;
},new Behaviour[] { private final Behaviour[] requires;
Behaviour.DERIVATIVE,Behaviour.DISTRIBUTION,Behaviour.REPRODUCTION
});
private String uri;
private Behaviour[] permits;
private Behaviour[] requires;
/** /**
* Creates a new instance of License * Creates a new instance of License
*/ */
public License(String uri,Behaviour[] requires,Behaviour[] permits) { public License(final String uri, final Behaviour[] requires, final Behaviour[] permits) {
this.requires = requires; this.requires = requires;
this.permits = permits; this.permits = permits;
this.uri = uri; this.uri = uri;
@ -118,28 +95,28 @@ public class License {
} }
} }
public static License findByValue(String uri) { public static License findByValue(final String uri) {
License found = (License) License.lookupLicense.get(uri); License found = (License) License.lookupLicense.get(uri);
// No I am going to try an guess about unknown licenses // No I am going to try an guess about unknown licenses
// This is try and match known CC licenses of other versions or various URLs to // This is try and match known CC licenses of other versions or various URLs to
// current licenses, then make a new one with the same permissions. // current licenses, then make a new one with the same permissions.
if (found == null && uri.startsWith("http://") && uri.toLowerCase().indexOf("creativecommons.org") != -1) { if (found == null && uri.startsWith("http://") && uri.toLowerCase().indexOf("creativecommons.org") != -1) {
Iterator it = License.lookupLicense.keySet().iterator(); final Iterator it = License.lookupLicense.keySet().iterator();
while(it.hasNext()&&(found == null)) { while (it.hasNext() && found == null) {
try { try {
String key = (String)it.next(); final String key = (String) it.next();
if (key.startsWith(CC_START)) { if (key.startsWith(CC_START)) {
String licensePath = key.substring( CC_START.length(), key.length() ); final String licensePath = key.substring(CC_START.length(), key.length());
StringTokenizer tok = new StringTokenizer( licensePath, "/"); final StringTokenizer tok = new StringTokenizer(licensePath, "/");
String license = tok.nextToken(); final String license = tok.nextToken();
String version = tok.nextToken(); final String version = tok.nextToken();
if (uri.toLowerCase().indexOf("creativecommons.org/licenses/" + license) != -1) { if (uri.toLowerCase().indexOf("creativecommons.org/licenses/" + license) != -1) {
License current = (License) lookupLicense.get( key ); final License current = (License) lookupLicense.get(key);
found = new License(uri, current.getRequires(), current.getPermits()); found = new License(uri, current.getRequires(), current.getPermits());
} }
} }
} catch(Exception e){ } catch (final Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
@ -152,29 +129,36 @@ public class License {
} }
public Behaviour[] getPermits() { public Behaviour[] getPermits() {
return this.permits; return permits;
} }
public Behaviour[] getRequires() { public Behaviour[] getRequires() {
return this.requires; return requires;
} }
@Override
public String toString() { public String toString() {
ToStringBean tsb = new ToStringBean( License.class, this ); final ToStringBean tsb = new ToStringBean(License.class, this);
return tsb.toString(); return tsb.toString();
} }
public String getValue() { public String getValue() {
return this.uri; return uri;
} }
public boolean equals(Object obj) {
EqualsBean eBean = new EqualsBean(License.class,this); @Override
public boolean equals(final Object obj) {
final EqualsBean eBean = new EqualsBean(License.class, this);
return eBean.beanEquals(obj); return eBean.beanEquals(obj);
} }
@Override
public int hashCode() { public int hashCode() {
EqualsBean equals = new EqualsBean(License.class,this); final EqualsBean equals = new EqualsBean(License.class, this);
return equals.beanHashCode(); return equals.beanHashCode();
} }
public static class Behaviour { public static class Behaviour {
private static final HashMap lookup = new HashMap(); private static final HashMap lookup = new HashMap();
public static final Behaviour REPRODUCTION = new Behaviour("http://web.resource.org/cc/Reproduction"); public static final Behaviour REPRODUCTION = new Behaviour("http://web.resource.org/cc/Reproduction");
@ -184,19 +168,20 @@ public class License {
public static final Behaviour ATTRIBUTION = new Behaviour("http://web.resource.org/cc/Attribution"); public static final Behaviour ATTRIBUTION = new Behaviour("http://web.resource.org/cc/Attribution");
public static final Behaviour COPYLEFT = new Behaviour("http://web.resource.org/cc/Copyleft"); public static final Behaviour COPYLEFT = new Behaviour("http://web.resource.org/cc/Copyleft");
public static final Behaviour NONCOMMERCIAL = new Behaviour("http://web.resource.org/cc/Noncommercial"); public static final Behaviour NONCOMMERCIAL = new Behaviour("http://web.resource.org/cc/Noncommercial");
private String uri; private final String uri;
private Behaviour(String uri) { private Behaviour(final String uri) {
this.uri = uri; this.uri = uri;
Behaviour.lookup.put(uri, this); Behaviour.lookup.put(uri, this);
} }
public static Behaviour findByValue(String uri) { public static Behaviour findByValue(final String uri) {
return (Behaviour) Behaviour.lookup.get(uri); return (Behaviour) Behaviour.lookup.get(uri);
} }
@Override
public String toString() { public String toString() {
return this.uri; return uri;
} }
} }
} }

View file

@ -43,9 +43,9 @@ package org.rometools.feed.module.content;
import java.util.List; import java.util.List;
/**
/** This class represents a content item per the "Original Syntax". * This class represents a content item per the "Original Syntax". http://purl.org/rss/1.0/modules/content/
* http://purl.org/rss/1.0/modules/content/ *
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
@ -64,70 +64,71 @@ public class ContentItem implements Cloneable {
} }
public String getContentFormat() { public String getContentFormat() {
return this.contentFormat; return contentFormat;
} }
public void setContentFormat(String contentFormat) { public void setContentFormat(final String contentFormat) {
this.contentFormat = contentFormat; this.contentFormat = contentFormat;
} }
public String getContentEncoding() { public String getContentEncoding() {
return this.contentEncoding; return contentEncoding;
} }
public void setContentEncoding(String contentEncoding) { public void setContentEncoding(final String contentEncoding) {
this.contentEncoding = contentEncoding; this.contentEncoding = contentEncoding;
} }
public String getContentValue() { public String getContentValue() {
return this.contentValue; return contentValue;
} }
public void setContentValue(String contentValue) { public void setContentValue(final String contentValue) {
this.contentValue = contentValue; this.contentValue = contentValue;
} }
public List getContentValueDOM() { public List getContentValueDOM() {
return this.contentValueDOM; return contentValueDOM;
} }
public void setContentValueDOM(List contentValueDOM) { public void setContentValueDOM(final List contentValueDOM) {
this.contentValueDOM = contentValueDOM; this.contentValueDOM = contentValueDOM;
} }
public String getContentAbout() { public String getContentAbout() {
return this.contentAbout; return contentAbout;
} }
public void setContentAbout(String contentAbout) { public void setContentAbout(final String contentAbout) {
this.contentAbout = contentAbout; this.contentAbout = contentAbout;
} }
public String getContentValueParseType() { public String getContentValueParseType() {
return this.contentValueParseType; return contentValueParseType;
} }
public void setContentValueParseType(String contentValueParseType) { public void setContentValueParseType(final String contentValueParseType) {
this.contentValueParseType = contentValueParseType; this.contentValueParseType = contentValueParseType;
} }
public List getContentValueNamespaces() { public List getContentValueNamespaces() {
return this.contentValueNamespace; return contentValueNamespace;
} }
public void setContentValueNamespaces(List contentValueNamespace) { public void setContentValueNamespaces(final List contentValueNamespace) {
this.contentValueNamespace = contentValueNamespace; this.contentValueNamespace = contentValueNamespace;
} }
public String getContentResource() { public String getContentResource() {
return this.contentResource; return contentResource;
} }
public void setContentResource(String contentResource) { public void setContentResource(final String contentResource) {
this.contentResource = contentResource; this.contentResource = contentResource;
} }
public boolean equals(Object obj) { @Override
public boolean equals(final Object obj) {
if (obj == null) { if (obj == null) {
return false; return false;
} }
@ -135,68 +136,70 @@ public class ContentItem implements Cloneable {
return false; return false;
} }
final ContentItem other = (ContentItem) obj; final ContentItem other = (ContentItem) obj;
if ((this.contentFormat == null) ? (other.contentFormat != null) : !this.contentFormat.equals(other.contentFormat)) { if (contentFormat == null ? other.contentFormat != null : !contentFormat.equals(other.contentFormat)) {
// System.out.println("format"); // System.out.println("format");
return false; return false;
} }
if ((this.contentEncoding == null) ? (other.contentEncoding != null) : !this.contentEncoding.equals(other.contentEncoding)) { if (contentEncoding == null ? other.contentEncoding != null : !contentEncoding.equals(other.contentEncoding)) {
// System.out.println("enc"); // System.out.println("enc");
return false; return false;
} }
String thisCV = this.contentValue.replaceAll(" xmlns=\"http://www.w3.org/1999/xhtml\"", "").trim();; final String thisCV = contentValue.replaceAll(" xmlns=\"http://www.w3.org/1999/xhtml\"", "").trim();
String thatCV = other.contentValue.replaceAll(" xmlns=\"http://www.w3.org/1999/xhtml\"", "").trim(); ;
if ((this.contentValue == null) ? (other.contentValue != null) : !thisCV.equals(thatCV)) { final String thatCV = other.contentValue.replaceAll(" xmlns=\"http://www.w3.org/1999/xhtml\"", "").trim();
if (contentValue == null ? other.contentValue != null : !thisCV.equals(thatCV)) {
return false; return false;
} }
if (this.contentValueDOM != other.contentValueDOM && (this.contentValueDOM == null || !this.contentValueDOM.equals(other.contentValueDOM))) { if (contentValueDOM != other.contentValueDOM && (contentValueDOM == null || !contentValueDOM.equals(other.contentValueDOM))) {
// System.out.println("vd"); // System.out.println("vd");
return false; return false;
} }
if ((this.contentAbout == null) ? (other.contentAbout != null) : !this.contentAbout.equals(other.contentAbout)) { if (contentAbout == null ? other.contentAbout != null : !contentAbout.equals(other.contentAbout)) {
// System.out.println("abt"); // System.out.println("abt");
return false; return false;
} }
if ((this.contentValueParseType == null) ? (other.contentValueParseType != null) : !this.contentValueParseType.equals(other.contentValueParseType)) { if (contentValueParseType == null ? other.contentValueParseType != null : !contentValueParseType.equals(other.contentValueParseType)) {
// System.out.println("pt"); // System.out.println("pt");
return false; return false;
} }
if (this.contentValueNamespace != other.contentValueNamespace && (this.contentValueNamespace == null || !this.contentValueNamespace.equals(other.contentValueNamespace))) { if (contentValueNamespace != other.contentValueNamespace
&& (contentValueNamespace == null || !contentValueNamespace.equals(other.contentValueNamespace))) {
// System.out.println("ns"); // System.out.println("ns");
return false; return false;
} }
if ((this.contentResource == null) ? (other.contentResource != null) : !this.contentResource.equals(other.contentResource)) { if (contentResource == null ? other.contentResource != null : !contentResource.equals(other.contentResource)) {
// System.out.println("res"); // System.out.println("res");
return false; return false;
} }
return true; return true;
} }
@Override
public int hashCode() { public int hashCode() {
int hash = 7; int hash = 7;
hash = 97 * hash + (this.contentFormat != null ? this.contentFormat.hashCode() : 0); hash = 97 * hash + (contentFormat != null ? contentFormat.hashCode() : 0);
hash = 97 * hash + (this.contentEncoding != null ? this.contentEncoding.hashCode() : 0); hash = 97 * hash + (contentEncoding != null ? contentEncoding.hashCode() : 0);
hash = 97 * hash + (this.contentValue != null ? this.contentValue.hashCode() : 0); hash = 97 * hash + (contentValue != null ? contentValue.hashCode() : 0);
hash = 97 * hash + (this.contentValueDOM != null ? this.contentValueDOM.hashCode() : 0); hash = 97 * hash + (contentValueDOM != null ? contentValueDOM.hashCode() : 0);
hash = 97 * hash + (this.contentAbout != null ? this.contentAbout.hashCode() : 0); hash = 97 * hash + (contentAbout != null ? contentAbout.hashCode() : 0);
hash = 97 * hash + (this.contentValueParseType != null ? this.contentValueParseType.hashCode() : 0); hash = 97 * hash + (contentValueParseType != null ? contentValueParseType.hashCode() : 0);
hash = 97 * hash + (this.contentValueNamespace != null ? this.contentValueNamespace.hashCode() : 0); hash = 97 * hash + (contentValueNamespace != null ? contentValueNamespace.hashCode() : 0);
hash = 97 * hash + (this.contentResource != null ? this.contentResource.hashCode() : 0); hash = 97 * hash + (contentResource != null ? contentResource.hashCode() : 0);
return hash; return hash;
} }
@Override
public Object clone() { public Object clone() {
ContentItem o = new ContentItem(); final ContentItem o = new ContentItem();
o.contentAbout = this.contentAbout; o.contentAbout = contentAbout;
o.contentEncoding = this.contentEncoding; o.contentEncoding = contentEncoding;
o.contentFormat = this.contentFormat; o.contentFormat = contentFormat;
o.contentResource = this.contentResource; o.contentResource = contentResource;
o.contentValue = this.contentValue; o.contentValue = contentValue;
o.contentValueDOM = this.contentValueDOM; o.contentValueDOM = contentValueDOM;
o.contentValueNamespace = this.contentValueNamespace; o.contentValueNamespace = contentValueNamespace;
o.contentValueParseType = this.contentValueParseType; o.contentValueParseType = contentValueParseType;
return o; return o;
} }

View file

@ -40,9 +40,9 @@
*/ */
package org.rometools.feed.module.content; package org.rometools.feed.module.content;
import com.sun.syndication.feed.module.Module;
import java.util.List; import java.util.List;
import com.sun.syndication.feed.module.Module;
/** /**
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
@ -52,14 +52,16 @@ public interface ContentModule extends Module {
public static final String URI = "http://purl.org/rss/1.0/modules/content/"; public static final String URI = "http://purl.org/rss/1.0/modules/content/";
public static final String RDF_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; public static final String RDF_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
/** Returns a List of Strings containing the New Syntax Encoded values /**
* are in the element. * Returns a List of Strings containing the New Syntax Encoded values are in the element.
*
* @return List of content Strings * @return List of content Strings
*/ */
public List getEncodeds(); public List getEncodeds();
/** Sets a List of Strings containing the New Syntax Encoded values /**
* are in the element. * Sets a List of Strings containing the New Syntax Encoded values are in the element.
*
* @return List of content Strings * @return List of content Strings
*/ */
public void setEncodeds(List encodeds); public void setEncodeds(List encodeds);
@ -68,26 +70,32 @@ public interface ContentModule extends Module {
public String toString(String str); public String toString(String str);
/** Contains a list of ContentItems that represent the "Original Syntax" set. /**
* Contains a list of ContentItems that represent the "Original Syntax" set.
*
* @see com.totsp.xml.syndication.content.ContentItem * @see com.totsp.xml.syndication.content.ContentItem
* @return List of ContentItems. * @return List of ContentItems.
*/ */
public List getContentItems(); public List getContentItems();
/** Contains a list of ContentItems that represent the "Original Syntax" set. /**
* Contains a list of ContentItems that represent the "Original Syntax" set.
*
* @see com.totsp.xml.syndication.content.ContentItem * @see com.totsp.xml.syndication.content.ContentItem
* @param List of ContentItems. * @param List of ContentItems.
*/ */
public void setContentItems(List list); public void setContentItems(List list);
/** Returns a List of Strings containing whatever new or original syntax items /**
* are in the element. * Returns a List of Strings containing whatever new or original syntax items are in the element.
*
* @return List of content Strings * @return List of content Strings
*/ */
public List getContents(); public List getContents();
/** Sets a List of Strings containing whatever new or original syntax items /**
* are in the element. * Sets a List of Strings containing whatever new or original syntax items are in the element.
*
* @return List of content Strings * @return List of content Strings
*/ */
public void setContents(List contents); public void setContents(List contents);

View file

@ -43,10 +43,10 @@
*/ */
package org.rometools.feed.module.content; package org.rometools.feed.module.content;
import com.sun.syndication.feed.CopyFrom;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.sun.syndication.feed.CopyFrom;
/** /**
* @version $Revision: 1.4 $ * @version $Revision: 1.4 $
@ -61,24 +61,24 @@ public class ContentModuleImpl extends com.sun.syndication.feed.module.ModuleImp
super(ContentModuleImpl.class, URI); super(ContentModuleImpl.class, URI);
} }
protected ContentModuleImpl(java.lang.Class beanClass, java.lang.String uri) { protected ContentModuleImpl(final java.lang.Class beanClass, final java.lang.String uri) {
super(beanClass, uri); super(beanClass, uri);
} }
public List getEncodeds() { public List getEncodeds() {
this.encodeds = this.encodeds == null ? new ArrayList() : this.encodeds; encodeds = encodeds == null ? new ArrayList() : encodeds;
return this.encodeds; return encodeds;
} }
public void setEncodeds(List encodeds) { public void setEncodeds(final List encodeds) {
this.encodeds = encodeds; this.encodeds = encodeds;
} }
public void copyFrom(CopyFrom obj) { public void copyFrom(final CopyFrom obj) {
ContentModule cm = (ContentModule) obj; final ContentModule cm = (ContentModule) obj;
this.setEncodeds(cm.getEncodeds()); setEncodeds(cm.getEncodeds());
this.setContentItems(cm.getContentItems()); setContentItems(cm.getContentItems());
this.setContents(cm.getContents()); setContents(cm.getContents());
} }
public Class getInterface() { public Class getInterface() {
@ -86,24 +86,24 @@ public class ContentModuleImpl extends com.sun.syndication.feed.module.ModuleImp
} }
public List getContentItems() { public List getContentItems() {
this.contentItems = this.contentItems == null ? new ArrayList() : this.contentItems; contentItems = contentItems == null ? new ArrayList() : contentItems;
return this.contentItems; return contentItems;
} }
public void setContentItems(List list) { public void setContentItems(final List list) {
this.contentItems = list; contentItems = list;
} }
public List getContents() { public List getContents() {
this.contents = this.contents == null ? new ArrayList() : this.contents; contents = contents == null ? new ArrayList() : contents;
return this.contents; return contents;
} }
public void setContents(List contents) { public void setContents(final List contents) {
this.contents = contents; this.contents = contents;
} }
public String toString(String str) { public String toString(final String str) {
return contentItems.toString(); return contentItems.toString();
} }
} }

View file

@ -41,20 +41,20 @@
*/ */
package org.rometools.feed.module.content.io; package org.rometools.feed.module.content.io;
import org.rometools.feed.module.content.ContentItem;
import org.rometools.feed.module.content.ContentModule;
import org.jdom.Attribute;
import org.jdom.CDATA;
import org.jdom.Content;
import org.jdom.Element;
import org.jdom.Namespace;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import org.jdom2.Attribute;
import org.jdom2.CDATA;
import org.jdom2.Content;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.rometools.feed.module.content.ContentItem;
import org.rometools.feed.module.content.ContentModule;
/** /**
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
@ -65,7 +65,7 @@ public class ContentModuleGenerator implements com.sun.syndication.io.ModuleGene
private static final Set NAMESPACES; private static final Set NAMESPACES;
static { static {
Set nss = new HashSet(); final Set nss = new HashSet();
nss.add(CONTENT_NS); nss.add(CONTENT_NS);
NAMESPACES = Collections.unmodifiableSet(nss); NAMESPACES = Collections.unmodifiableSet(nss);
} }
@ -74,11 +74,11 @@ public class ContentModuleGenerator implements com.sun.syndication.io.ModuleGene
public ContentModuleGenerator() { public ContentModuleGenerator() {
} }
public void generate(com.sun.syndication.feed.module.Module module, org.jdom.Element element) { public void generate(final com.sun.syndication.feed.module.Module module, final org.jdom2.Element element) {
// this is not necessary, it is done to avoid the namespace definition in every item. // this is not necessary, it is done to avoid the namespace definition in every item.
Element root = element; Element root = element;
while ((root.getParent() != null) && root.getParent() instanceof Element) { while (root.getParent() != null && root.getParent() instanceof Element) {
root = (Element) root.getParent(); root = (Element) root.getParent();
} }
@ -88,9 +88,9 @@ public class ContentModuleGenerator implements com.sun.syndication.io.ModuleGene
return; return;
} }
ContentModule cm = (ContentModule) module; final ContentModule cm = (ContentModule) module;
List encodeds = cm.getEncodeds(); final List encodeds = cm.getEncodeds();
// //
if (encodeds != null) { if (encodeds != null) {
@ -100,27 +100,27 @@ public class ContentModuleGenerator implements com.sun.syndication.io.ModuleGene
} }
} }
List contentItems = cm.getContentItems(); final List contentItems = cm.getContentItems();
if ((contentItems != null) && (contentItems.size() > 0)) { if (contentItems != null && contentItems.size() > 0) {
Element items = new Element("items", CONTENT_NS); final Element items = new Element("items", CONTENT_NS);
Element bag = new Element("Bag", RDF_NS); final Element bag = new Element("Bag", RDF_NS);
items.addContent(bag); items.addContent(bag);
for (int i = 0; i < contentItems.size(); i++) { for (int i = 0; i < contentItems.size(); i++) {
ContentItem contentItem = (ContentItem) contentItems.get(i); final ContentItem contentItem = (ContentItem) contentItems.get(i);
Element li = new Element("li", RDF_NS); final Element li = new Element("li", RDF_NS);
Element item = new Element("item", CONTENT_NS); final Element item = new Element("item", CONTENT_NS);
if (contentItem.getContentAbout() != null) { if (contentItem.getContentAbout() != null) {
Attribute about = new Attribute("about", contentItem.getContentAbout(), RDF_NS); final Attribute about = new Attribute("about", contentItem.getContentAbout(), RDF_NS);
item.setAttribute(about); item.setAttribute(about);
} }
if (contentItem.getContentFormat() != null) { if (contentItem.getContentFormat() != null) {
// System.out.println( "Format"); // System.out.println( "Format");
Element format = new Element("format", CONTENT_NS); final Element format = new Element("format", CONTENT_NS);
Attribute formatResource = new Attribute("resource", contentItem.getContentFormat(), RDF_NS); final Attribute formatResource = new Attribute("resource", contentItem.getContentFormat(), RDF_NS);
format.setAttribute(formatResource); format.setAttribute(formatResource);
item.addContent(format); item.addContent(format);
@ -128,33 +128,32 @@ public class ContentModuleGenerator implements com.sun.syndication.io.ModuleGene
if (contentItem.getContentEncoding() != null) { if (contentItem.getContentEncoding() != null) {
// System.out.println( "Encoding"); // System.out.println( "Encoding");
Element encoding = new Element("encoding", CONTENT_NS); final Element encoding = new Element("encoding", CONTENT_NS);
Attribute encodingResource = new Attribute("resource", contentItem.getContentEncoding(), RDF_NS); final Attribute encodingResource = new Attribute("resource", contentItem.getContentEncoding(), RDF_NS);
encoding.setAttribute(encodingResource); encoding.setAttribute(encodingResource);
item.addContent(encoding); item.addContent(encoding);
} }
if (contentItem.getContentValue() != null) { if (contentItem.getContentValue() != null) {
Element value = new Element("value", RDF_NS); final Element value = new Element("value", RDF_NS);
if (contentItem.getContentValueParseType() != null) { if (contentItem.getContentValueParseType() != null) {
Attribute parseType = new Attribute("parseType", contentItem.getContentValueParseType(), RDF_NS); final Attribute parseType = new Attribute("parseType", contentItem.getContentValueParseType(), RDF_NS);
value.setAttribute(parseType); value.setAttribute(parseType);
} }
if (contentItem.getContentValueNamespaces() != null) { if (contentItem.getContentValueNamespaces() != null) {
List namespaces = contentItem.getContentValueNamespaces(); final List namespaces = contentItem.getContentValueNamespaces();
for (int ni = 0; ni < namespaces.size(); ni++) { for (int ni = 0; ni < namespaces.size(); ni++) {
value.addNamespaceDeclaration((Namespace) namespaces.get(ni)); value.addNamespaceDeclaration((Namespace) namespaces.get(ni));
} }
} }
List detached = new ArrayList(); final List detached = new ArrayList();
for (int c = 0; for (int c = 0; c < contentItem.getContentValueDOM().size(); c++) {
c < contentItem.getContentValueDOM().size(); c++) { detached.add(((Content) contentItem.getContentValueDOM().get(c)).clone().detach());
detached.add(((Content) ((Content) contentItem.getContentValueDOM().get(c)).clone()).detach());
} }
value.setContent(detached); value.setContent(detached);
@ -169,16 +168,16 @@ public class ContentModuleGenerator implements com.sun.syndication.io.ModuleGene
} }
} }
protected Element generateSimpleElement(String name, String value) { protected Element generateSimpleElement(final String name, final String value) {
Element element = new Element(name, CONTENT_NS); final Element element = new Element(name, CONTENT_NS);
element.addContent(value); element.addContent(value);
return element; return element;
} }
protected Element generateCDATAElement(String name, String value) { protected Element generateCDATAElement(final String name, final String value) {
Element element = new Element(name, CONTENT_NS); final Element element = new Element(name, CONTENT_NS);
CDATA cdata = new CDATA(value); final CDATA cdata = new CDATA(value);
element.addContent(cdata); element.addContent(cdata);
return element; return element;

View file

@ -43,17 +43,17 @@
*/ */
package org.rometools.feed.module.content.io; package org.rometools.feed.module.content.io;
import java.util.ArrayList;
import java.util.List;
import org.jdom2.Attribute;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.jdom2.output.XMLOutputter;
import org.rometools.feed.module.content.ContentItem; import org.rometools.feed.module.content.ContentItem;
import org.rometools.feed.module.content.ContentModule; import org.rometools.feed.module.content.ContentModule;
import org.rometools.feed.module.content.ContentModuleImpl; import org.rometools.feed.module.content.ContentModuleImpl;
import org.jdom.Attribute;
import org.jdom.Element;
import org.jdom.Namespace;
import org.jdom.output.XMLOutputter;
import java.util.ArrayList;
import java.util.List;
/** /**
* @version $Revision: 1.3 $ * @version $Revision: 1.3 $
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
@ -70,45 +70,45 @@ public class ContentModuleParser implements com.sun.syndication.io.ModuleParser
return ContentModule.URI; return ContentModule.URI;
} }
public com.sun.syndication.feed.module.Module parse(org.jdom.Element element) { public com.sun.syndication.feed.module.Module parse(final org.jdom2.Element element) {
boolean foundSomething = false; boolean foundSomething = false;
ContentModule cm = new ContentModuleImpl(); final ContentModule cm = new ContentModuleImpl();
List encodeds = element.getChildren("encoded", CONTENT_NS); final List encodeds = element.getChildren("encoded", CONTENT_NS);
ArrayList contentStrings = new ArrayList(); final ArrayList contentStrings = new ArrayList();
ArrayList encodedStrings = new ArrayList(); final ArrayList encodedStrings = new ArrayList();
if (encodeds.size() > 0) { if (encodeds.size() > 0) {
foundSomething = true; foundSomething = true;
for (int i = 0; i < encodeds.size(); i++) { for (int i = 0; i < encodeds.size(); i++) {
Element encodedElement = (Element) encodeds.get(i); final Element encodedElement = (Element) encodeds.get(i);
encodedStrings.add(encodedElement.getText()); encodedStrings.add(encodedElement.getText());
contentStrings.add(encodedElement.getText()); contentStrings.add(encodedElement.getText());
} }
} }
ArrayList contentItems = new ArrayList(); final ArrayList contentItems = new ArrayList();
List items = element.getChildren("items", CONTENT_NS); final List items = element.getChildren("items", CONTENT_NS);
for (int i = 0; i < items.size(); i++) { for (int i = 0; i < items.size(); i++) {
foundSomething = true; foundSomething = true;
List lis = ((Element) items.get(i)).getChild("Bag", RDF_NS).getChildren("li", RDF_NS); final List lis = ((Element) items.get(i)).getChild("Bag", RDF_NS).getChildren("li", RDF_NS);
for (int j = 0; j < lis.size(); j++) { for (int j = 0; j < lis.size(); j++) {
ContentItem ci = new ContentItem(); final ContentItem ci = new ContentItem();
Element li = (Element) lis.get(j); final Element li = (Element) lis.get(j);
Element item = li.getChild("item", CONTENT_NS); final Element item = li.getChild("item", CONTENT_NS);
Element format = item.getChild("format", CONTENT_NS); final Element format = item.getChild("format", CONTENT_NS);
Element encoding = item.getChild("encoding", CONTENT_NS); final Element encoding = item.getChild("encoding", CONTENT_NS);
Element value = item.getChild("value", RDF_NS); final Element value = item.getChild("value", RDF_NS);
if (value != null) { if (value != null) {
if (value.getAttributeValue("parseType", RDF_NS) != null) { if (value.getAttributeValue("parseType", RDF_NS) != null) {
ci.setContentValueParseType(value.getAttributeValue("parseType", RDF_NS)); ci.setContentValueParseType(value.getAttributeValue("parseType", RDF_NS));
} }
if ((ci.getContentValueParseType() != null) && ci.getContentValueParseType().equals("Literal")) { if (ci.getContentValueParseType() != null && ci.getContentValueParseType().equals("Literal")) {
ci.setContentValue(getXmlInnerText(value)); ci.setContentValue(getXmlInnerText(value));
contentStrings.add(getXmlInnerText(value)); contentStrings.add(getXmlInnerText(value));
ci.setContentValueNamespaces(value.getAdditionalNamespaces()); ci.setContentValueNamespaces(value.getAdditionalNamespaces());
@ -117,7 +117,7 @@ public class ContentModuleParser implements com.sun.syndication.io.ModuleParser
contentStrings.add(value.getText()); contentStrings.add(value.getText());
} }
ci.setContentValueDOM(((Element) value.clone()).getContent()); ci.setContentValueDOM(value.clone().getContent());
} }
if (format != null) { if (format != null) {
@ -129,7 +129,7 @@ public class ContentModuleParser implements com.sun.syndication.io.ModuleParser
} }
if (item != null) { if (item != null) {
Attribute about = item.getAttribute("about", RDF_NS); final Attribute about = item.getAttribute("about", RDF_NS);
if (about != null) { if (about != null) {
ci.setContentAbout(about.getValue()); ci.setContentAbout(about.getValue());
@ -144,13 +144,13 @@ public class ContentModuleParser implements com.sun.syndication.io.ModuleParser
cm.setContentItems(contentItems); cm.setContentItems(contentItems);
cm.setContents(contentStrings); cm.setContents(contentStrings);
return (foundSomething) ? cm : null; return foundSomething ? cm : null;
} }
protected String getXmlInnerText(Element e) { protected String getXmlInnerText(final Element e) {
StringBuffer sb = new StringBuffer(); final StringBuffer sb = new StringBuffer();
XMLOutputter xo = new XMLOutputter(); final XMLOutputter xo = new XMLOutputter();
List children = e.getContent(); final List children = e.getContent();
sb.append(xo.outputString(children)); sb.append(xo.outputString(children));
return sb.toString(); return sb.toString();

View file

@ -38,7 +38,7 @@ public class FeedBurnerImpl implements FeedBurner {
return awareness; return awareness;
} }
public void setAwareness(String awareness) { public void setAwareness(final String awareness) {
this.awareness = awareness; this.awareness = awareness;
} }
@ -46,7 +46,7 @@ public class FeedBurnerImpl implements FeedBurner {
return origLink; return origLink;
} }
public void setOrigLink(String origLink) { public void setOrigLink(final String origLink) {
this.origLink = origLink; this.origLink = origLink;
} }
@ -54,7 +54,7 @@ public class FeedBurnerImpl implements FeedBurner {
return origEnclosureLink; return origEnclosureLink;
} }
public void setOrigEnclosureLink(String origEnclosureLink) { public void setOrigEnclosureLink(final String origEnclosureLink) {
this.origEnclosureLink = origEnclosureLink; this.origEnclosureLink = origEnclosureLink;
} }
@ -62,19 +62,20 @@ public class FeedBurnerImpl implements FeedBurner {
return FeedBurner.URI; return FeedBurner.URI;
} }
public void copyFrom(CopyFrom object) { public void copyFrom(final CopyFrom object) {
FeedBurner source = (FeedBurner) object; final FeedBurner source = (FeedBurner) object;
this.setAwareness(source.getAwareness()); setAwareness(source.getAwareness());
this.setOrigLink(source.getOrigLink()); setOrigLink(source.getOrigLink());
this.setOrigEnclosureLink(source.getOrigEnclosureLink()); setOrigEnclosureLink(source.getOrigEnclosureLink());
} }
public Class getInterface() { public Class getInterface() {
return FeedBurner.class; return FeedBurner.class;
} }
@Override
public Object clone() { public Object clone() {
FeedBurnerImpl fbi = new FeedBurnerImpl(); final FeedBurnerImpl fbi = new FeedBurnerImpl();
fbi.copyFrom(this); fbi.copyFrom(this);
return fbi; return fbi;
} }

View file

@ -16,17 +16,15 @@
*/ */
package org.rometools.feed.module.feedburner.io; package org.rometools.feed.module.feedburner.io;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleGenerator;
import org.jdom.Element;
import org.jdom.Namespace;
import org.rometools.feed.module.feedburner.FeedBurner;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.rometools.feed.module.feedburner.FeedBurner;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleGenerator;
/** /**
* ModuleGenerator implementation for the FeedBurner RSS extension. * ModuleGenerator implementation for the FeedBurner RSS extension.
@ -43,34 +41,34 @@ public class FeedBurnerModuleGenerator implements ModuleGenerator {
} }
public Set getNamespaces() { public Set getNamespaces() {
HashSet set = new HashSet(); final HashSet set = new HashSet();
set.add(FeedBurnerModuleGenerator.NS); set.add(FeedBurnerModuleGenerator.NS);
return set; return set;
} }
public void generate(Module module, Element element) { public void generate(final Module module, final Element element) {
if (!(module instanceof FeedBurner)) { if (!(module instanceof FeedBurner)) {
return; return;
} }
FeedBurner feedBurner = (FeedBurner) module; final FeedBurner feedBurner = (FeedBurner) module;
if (feedBurner.getAwareness() != null) { if (feedBurner.getAwareness() != null) {
element.addContent(this.generateSimpleElement("awareness", feedBurner.getAwareness())); element.addContent(generateSimpleElement("awareness", feedBurner.getAwareness()));
} }
if (feedBurner.getOrigLink() != null) { if (feedBurner.getOrigLink() != null) {
element.addContent(this.generateSimpleElement("origLink", feedBurner.getOrigLink())); element.addContent(generateSimpleElement("origLink", feedBurner.getOrigLink()));
} }
if (feedBurner.getOrigEnclosureLink() != null) { if (feedBurner.getOrigEnclosureLink() != null) {
element.addContent(this.generateSimpleElement("origEnclosureLink", feedBurner.getOrigEnclosureLink())); element.addContent(generateSimpleElement("origEnclosureLink", feedBurner.getOrigEnclosureLink()));
} }
} }
protected Element generateSimpleElement(String name, String value) { protected Element generateSimpleElement(final String name, final String value) {
Element element = new Element(name, FeedBurnerModuleGenerator.NS); final Element element = new Element(name, FeedBurnerModuleGenerator.NS);
element.addContent(value); element.addContent(value);
return element; return element;

View file

@ -16,15 +16,13 @@
*/ */
package org.rometools.feed.module.feedburner.io; package org.rometools.feed.module.feedburner.io;
import com.sun.syndication.feed.module.Module; import org.jdom2.Element;
import com.sun.syndication.io.ModuleParser; import org.jdom2.Namespace;
import org.jdom.Element;
import org.jdom.Namespace;
import org.rometools.feed.module.feedburner.FeedBurner; import org.rometools.feed.module.feedburner.FeedBurner;
import org.rometools.feed.module.feedburner.FeedBurnerImpl; import org.rometools.feed.module.feedburner.FeedBurnerImpl;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;
/** /**
* ModuleParser implementation for the FeedBurner RSS extension. * ModuleParser implementation for the FeedBurner RSS extension.
@ -40,8 +38,8 @@ public class FeedBurnerModuleParser implements ModuleParser {
return FeedBurner.URI; return FeedBurner.URI;
} }
public Module parse(Element element) { public Module parse(final Element element) {
FeedBurnerImpl fbi = new FeedBurnerImpl(); final FeedBurnerImpl fbi = new FeedBurnerImpl();
boolean returnObj = false; boolean returnObj = false;
Element tag = element.getChild("awareness", FeedBurnerModuleParser.NS); Element tag = element.getChild("awareness", FeedBurnerModuleParser.NS);

View file

@ -16,15 +16,26 @@
*/ */
package org.rometools.feed.module.georss; package org.rometools.feed.module.georss;
import java.util.*; import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.jdom.Element; import org.jdom2.Element;
import org.rometools.feed.module.georss.geometries.AbstractGeometry;
import org.rometools.feed.module.georss.geometries.AbstractRing;
import org.rometools.feed.module.georss.geometries.Envelope;
import org.rometools.feed.module.georss.geometries.LineString;
import org.rometools.feed.module.georss.geometries.LinearRing;
import org.rometools.feed.module.georss.geometries.Point;
import org.rometools.feed.module.georss.geometries.Polygon;
import org.rometools.feed.module.georss.geometries.Position;
import org.rometools.feed.module.georss.geometries.PositionList;
import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleGenerator; import com.sun.syndication.io.ModuleGenerator;
import org.rometools.feed.module.georss.geometries.*;
/** /**
* GMLGenerator produces georss elements in georss GML format. * GMLGenerator produces georss elements in georss GML format.
* *
@ -37,16 +48,17 @@ public class GMLGenerator implements ModuleGenerator {
private static final Set NAMESPACES; private static final Set NAMESPACES;
static { static {
Set nss = new HashSet(); final Set nss = new HashSet();
nss.add(GeoRSSModule.GML_NS); nss.add(GeoRSSModule.GML_NS);
NAMESPACES = Collections.unmodifiableSet(nss); NAMESPACES = Collections.unmodifiableSet(nss);
} }
private Element createPosListElement(PositionList posList) { private Element createPosListElement(final PositionList posList) {
Element posElement = new Element("posList", GeoRSSModule.GML_NS); final Element posElement = new Element("posList", GeoRSSModule.GML_NS);
StringBuffer sb = new StringBuffer(); final StringBuffer sb = new StringBuffer();
for (int i=0; i<posList.size(); ++i) for (int i = 0; i < posList.size(); ++i) {
sb.append(posList.getLatitude(i)).append(" ").append(posList.getLongitude(i)).append(" "); sb.append(posList.getLatitude(i)).append(" ").append(posList.getLongitude(i)).append(" ");
}
posElement.addContent(sb.toString()); posElement.addContent(sb.toString());
return posElement; return posElement;
@ -73,10 +85,9 @@ public class GMLGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, * @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
* org.jdom.Element)
*/ */
public void generate(Module module, Element element) { public void generate(final Module module, final Element element) {
// this is not necessary, it is done to avoid the namespace definition // this is not necessary, it is done to avoid the namespace definition
// in every item. // in every item.
Element root = element; Element root = element;
@ -86,38 +97,37 @@ public class GMLGenerator implements ModuleGenerator {
root.addNamespaceDeclaration(GeoRSSModule.SIMPLE_NS); root.addNamespaceDeclaration(GeoRSSModule.SIMPLE_NS);
root.addNamespaceDeclaration(GeoRSSModule.GML_NS); root.addNamespaceDeclaration(GeoRSSModule.GML_NS);
Element whereElement= new Element("where", GeoRSSModule.SIMPLE_NS); final Element whereElement = new Element("where", GeoRSSModule.SIMPLE_NS);
element.addContent(whereElement); element.addContent(whereElement);
GeoRSSModule geoRSSModule = (GeoRSSModule) module; final GeoRSSModule geoRSSModule = (GeoRSSModule) module;
AbstractGeometry geometry = geoRSSModule.getGeometry(); final AbstractGeometry geometry = geoRSSModule.getGeometry();
if (geometry instanceof Point) { if (geometry instanceof Point) {
Position pos = ((Point)geometry).getPosition(); final Position pos = ((Point) geometry).getPosition();
Element pointElement = new Element("Point", GeoRSSModule.GML_NS); final Element pointElement = new Element("Point", GeoRSSModule.GML_NS);
whereElement.addContent(pointElement); whereElement.addContent(pointElement);
Element posElement = new Element("pos", GeoRSSModule.GML_NS); final Element posElement = new Element("pos", GeoRSSModule.GML_NS);
posElement.addContent(String.valueOf(pos.getLatitude()) + " " posElement.addContent(String.valueOf(pos.getLatitude()) + " " + String.valueOf(pos.getLongitude()));
+ String.valueOf(pos.getLongitude()));
pointElement.addContent(posElement); pointElement.addContent(posElement);
} }
else if (geometry instanceof LineString) { else if (geometry instanceof LineString) {
PositionList posList = ((LineString) geometry).getPositionList(); final PositionList posList = ((LineString) geometry).getPositionList();
Element lineElement = new Element("LineString", GeoRSSModule.GML_NS); final Element lineElement = new Element("LineString", GeoRSSModule.GML_NS);
lineElement.addContent(createPosListElement(posList)); lineElement.addContent(createPosListElement(posList));
whereElement.addContent(lineElement); whereElement.addContent(lineElement);
} else if (geometry instanceof Polygon) { } else if (geometry instanceof Polygon) {
Element polygonElement = new Element("Polygon", GeoRSSModule.GML_NS); final Element polygonElement = new Element("Polygon", GeoRSSModule.GML_NS);
{ {
AbstractRing ring = ((Polygon) geometry).getExterior(); final AbstractRing ring = ((Polygon) geometry).getExterior();
if (ring instanceof LinearRing) { if (ring instanceof LinearRing) {
Element exteriorElement = new Element("exterior", GeoRSSModule.GML_NS); final Element exteriorElement = new Element("exterior", GeoRSSModule.GML_NS);
polygonElement.addContent(exteriorElement); polygonElement.addContent(exteriorElement);
Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS); final Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS);
exteriorElement.addContent(ringElement); exteriorElement.addContent(ringElement);
ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList())); ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList()));
@ -125,14 +135,14 @@ public class GMLGenerator implements ModuleGenerator {
System.err.println("GeoRSS GML format can't handle rings of type: " + ring.getClass().getName()); System.err.println("GeoRSS GML format can't handle rings of type: " + ring.getClass().getName());
} }
} }
List interiorList = ((Polygon) geometry).getInterior(); final List interiorList = ((Polygon) geometry).getInterior();
Iterator it = interiorList.iterator(); final Iterator it = interiorList.iterator();
while (it.hasNext()) { while (it.hasNext()) {
AbstractRing ring = (AbstractRing)it.next(); final AbstractRing ring = (AbstractRing) it.next();
if (ring instanceof LinearRing) { if (ring instanceof LinearRing) {
Element interiorElement = new Element("interior", GeoRSSModule.GML_NS); final Element interiorElement = new Element("interior", GeoRSSModule.GML_NS);
polygonElement.addContent(interiorElement); polygonElement.addContent(interiorElement);
Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS); final Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS);
interiorElement.addContent(ringElement); interiorElement.addContent(ringElement);
ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList())); ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList()));
@ -142,18 +152,16 @@ public class GMLGenerator implements ModuleGenerator {
} }
whereElement.addContent(polygonElement); whereElement.addContent(polygonElement);
} else if (geometry instanceof Envelope) { } else if (geometry instanceof Envelope) {
Envelope envelope = (Envelope)geometry; final Envelope envelope = (Envelope) geometry;
Element envelopeElement = new Element("Envelope", GeoRSSModule.GML_NS); final Element envelopeElement = new Element("Envelope", GeoRSSModule.GML_NS);
whereElement.addContent(envelopeElement); whereElement.addContent(envelopeElement);
Element lowerElement = new Element("lowerCorner", GeoRSSModule.GML_NS); final Element lowerElement = new Element("lowerCorner", GeoRSSModule.GML_NS);
lowerElement.addContent(String.valueOf(envelope.getMinLatitude()) + " " lowerElement.addContent(String.valueOf(envelope.getMinLatitude()) + " " + String.valueOf(envelope.getMinLongitude()));
+ String.valueOf(envelope.getMinLongitude()));
envelopeElement.addContent(lowerElement); envelopeElement.addContent(lowerElement);
Element upperElement = new Element("upperCorner", GeoRSSModule.GML_NS); final Element upperElement = new Element("upperCorner", GeoRSSModule.GML_NS);
upperElement.addContent(String.valueOf(envelope.getMaxLatitude()) + " " upperElement.addContent(String.valueOf(envelope.getMaxLatitude()) + " " + String.valueOf(envelope.getMaxLongitude()));
+ String.valueOf(envelope.getMaxLongitude()));
envelopeElement.addContent(upperElement); envelopeElement.addContent(upperElement);
} else { } else {

View file

@ -17,8 +17,7 @@
package org.rometools.feed.module.georss; package org.rometools.feed.module.georss;
/** /**
* GMLModuleImpl is the implementation of the {@link GeoRSSModule} Interface * GMLModuleImpl is the implementation of the {@link GeoRSSModule} Interface for the gml GeoRSS format.
* for the gml GeoRSS format.
* *
* @author Marc Wick * @author Marc Wick
* @version $Id: GMLModuleImpl.java,v 1.1 2007/04/18 09:59:29 marcwick Exp $ * @version $Id: GMLModuleImpl.java,v 1.1 2007/04/18 09:59:29 marcwick Exp $
@ -30,7 +29,6 @@ public class GMLModuleImpl extends GeoRSSModule {
super(GeoRSSModule.class, GeoRSSModule.GEORSS_GML_URI); super(GeoRSSModule.class, GeoRSSModule.GEORSS_GML_URI);
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* *

View file

@ -16,19 +16,20 @@
*/ */
package org.rometools.feed.module.georss; package org.rometools.feed.module.georss;
import org.jdom.Element; import java.util.Iterator;
import java.util.List;
import com.sun.syndication.feed.module.Module; import org.jdom2.Element;
import org.rometools.feed.module.georss.geometries.Envelope;
import org.rometools.feed.module.georss.geometries.LineString; import org.rometools.feed.module.georss.geometries.LineString;
import org.rometools.feed.module.georss.geometries.LinearRing; import org.rometools.feed.module.georss.geometries.LinearRing;
import org.rometools.feed.module.georss.geometries.Point; import org.rometools.feed.module.georss.geometries.Point;
import org.rometools.feed.module.georss.geometries.Polygon; import org.rometools.feed.module.georss.geometries.Polygon;
import org.rometools.feed.module.georss.geometries.Envelope;
import org.rometools.feed.module.georss.geometries.Position; import org.rometools.feed.module.georss.geometries.Position;
import org.rometools.feed.module.georss.geometries.PositionList; import org.rometools.feed.module.georss.geometries.PositionList;
import com.sun.syndication.io.ModuleParser;
import java.util.*; import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;
/** /**
* GMLParser is a parser for the GML georss format. * GMLParser is a parser for the GML georss format.
@ -51,45 +52,41 @@ public class GMLParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom.Element) * @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/ */
public Module parse(Element element) { public Module parse(final Element element) {
Module geoRssModule = parseGML(element); final Module geoRssModule = parseGML(element);
return geoRssModule; return geoRssModule;
} }
private static PositionList parsePosList(Element element) { private static PositionList parsePosList(final Element element) {
String coordinates = element.getText(); final String coordinates = element.getText();
String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" "); final String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" ");
PositionList posList = new PositionList(); final PositionList posList = new PositionList();
for (int i = 0; i < coord.length; i += 2) { for (int i = 0; i < coord.length; i += 2) {
posList.add(Double.parseDouble(coord[i]), Double.parseDouble(coord[i + 1])); posList.add(Double.parseDouble(coord[i]), Double.parseDouble(coord[i + 1]));
} }
return posList; return posList;
} }
static Module parseGML(Element element) { static Module parseGML(final Element element) {
GeoRSSModule geoRSSModule = null; GeoRSSModule geoRSSModule = null;
Element pointElement = element.getChild("Point", final Element pointElement = element.getChild("Point", GeoRSSModule.GML_NS);
GeoRSSModule.GML_NS); final Element lineStringElement = element.getChild("LineString", GeoRSSModule.GML_NS);
Element lineStringElement = element.getChild("LineString", final Element polygonElement = element.getChild("Polygon", GeoRSSModule.GML_NS);
GeoRSSModule.GML_NS); final Element envelopeElement = element.getChild("Envelope", GeoRSSModule.GML_NS);
Element polygonElement = element.getChild("Polygon",
GeoRSSModule.GML_NS);
Element envelopeElement = element.getChild("Envelope",
GeoRSSModule.GML_NS);
if (pointElement != null) { if (pointElement != null) {
Element posElement = pointElement.getChild("pos", GeoRSSModule.GML_NS); final Element posElement = pointElement.getChild("pos", GeoRSSModule.GML_NS);
if (posElement != null) { if (posElement != null) {
geoRSSModule = new GMLModuleImpl(); geoRSSModule = new GMLModuleImpl();
String coordinates = posElement.getText(); final String coordinates = posElement.getText();
String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" "); final String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" ");
Position pos = new Position(Double.parseDouble(coord[0]), Double.parseDouble(coord[1])); final Position pos = new Position(Double.parseDouble(coord[0]), Double.parseDouble(coord[1]));
geoRSSModule.setGeometry(new Point(pos)); geoRSSModule.setGeometry(new Point(pos));
} }
} else if (lineStringElement != null) { } else if (lineStringElement != null) {
Element posListElement = lineStringElement.getChild("posList", GeoRSSModule.GML_NS); final Element posListElement = lineStringElement.getChild("posList", GeoRSSModule.GML_NS);
if (posListElement != null) { if (posListElement != null) {
geoRSSModule = new GMLModuleImpl(); geoRSSModule = new GMLModuleImpl();
geoRSSModule.setGeometry(new LineString(parsePosList(posListElement))); geoRSSModule.setGeometry(new LineString(parsePosList(posListElement)));
@ -98,31 +95,33 @@ public class GMLParser implements ModuleParser {
Polygon poly = null; Polygon poly = null;
// The external ring // The external ring
Element exteriorElement = polygonElement.getChild("exterior", GeoRSSModule.GML_NS); final Element exteriorElement = polygonElement.getChild("exterior", GeoRSSModule.GML_NS);
if (exteriorElement != null) { if (exteriorElement != null) {
Element linearRingElement = exteriorElement.getChild("LinearRing", GeoRSSModule.GML_NS); final Element linearRingElement = exteriorElement.getChild("LinearRing", GeoRSSModule.GML_NS);
if (linearRingElement != null) { if (linearRingElement != null) {
Element posListElement = linearRingElement.getChild("posList", GeoRSSModule.GML_NS); final Element posListElement = linearRingElement.getChild("posList", GeoRSSModule.GML_NS);
if (posListElement != null) { if (posListElement != null) {
if (poly == null) if (poly == null) {
poly = new Polygon(); poly = new Polygon();
}
poly.setExterior(new LinearRing(parsePosList(posListElement))); poly.setExterior(new LinearRing(parsePosList(posListElement)));
} }
} }
} }
// The internal rings (holes) // The internal rings (holes)
List interiorElementList = polygonElement.getChildren("interior", GeoRSSModule.GML_NS); final List interiorElementList = polygonElement.getChildren("interior", GeoRSSModule.GML_NS);
Iterator it = interiorElementList.iterator(); final Iterator it = interiorElementList.iterator();
while (it.hasNext()) { while (it.hasNext()) {
Element interiorElement = (Element)it.next(); final Element interiorElement = (Element) it.next();
if (interiorElement != null) { if (interiorElement != null) {
Element linearRingElement = interiorElement.getChild("LinearRing", GeoRSSModule.GML_NS); final Element linearRingElement = interiorElement.getChild("LinearRing", GeoRSSModule.GML_NS);
if (linearRingElement != null) { if (linearRingElement != null) {
Element posListElement = linearRingElement.getChild("posList", GeoRSSModule.GML_NS); final Element posListElement = linearRingElement.getChild("posList", GeoRSSModule.GML_NS);
if (posListElement != null) { if (posListElement != null) {
if (poly == null) if (poly == null) {
poly = new Polygon(); poly = new Polygon();
}
poly.getInterior().add(new LinearRing(parsePosList(posListElement))); poly.getInterior().add(new LinearRing(parsePosList(posListElement)));
} }
} }
@ -135,16 +134,16 @@ public class GMLParser implements ModuleParser {
geoRSSModule.setGeometry(poly); geoRSSModule.setGeometry(poly);
} }
} else if (envelopeElement != null) { } else if (envelopeElement != null) {
Element lowerElement = envelopeElement.getChild("lowerCorner", GeoRSSModule.GML_NS); final Element lowerElement = envelopeElement.getChild("lowerCorner", GeoRSSModule.GML_NS);
Element upperElement = envelopeElement.getChild("upperCorner", GeoRSSModule.GML_NS); final Element upperElement = envelopeElement.getChild("upperCorner", GeoRSSModule.GML_NS);
if (lowerElement != null && upperElement != null) { if (lowerElement != null && upperElement != null) {
geoRSSModule = new GMLModuleImpl(); geoRSSModule = new GMLModuleImpl();
String lowerCoordinates = lowerElement.getText(); final String lowerCoordinates = lowerElement.getText();
String[] lowerCoord = GeoRSSUtils.trimWhitespace(lowerCoordinates).split(" "); final String[] lowerCoord = GeoRSSUtils.trimWhitespace(lowerCoordinates).split(" ");
String upperCoordinates = upperElement.getText(); final String upperCoordinates = upperElement.getText();
String[] upperCoord = GeoRSSUtils.trimWhitespace(upperCoordinates).split(" "); final String[] upperCoord = GeoRSSUtils.trimWhitespace(upperCoordinates).split(" ");
Envelope envelope = new Envelope(Double.parseDouble(lowerCoord[0]), Double.parseDouble(lowerCoord[1]), final Envelope envelope = new Envelope(Double.parseDouble(lowerCoord[0]), Double.parseDouble(lowerCoord[1]), Double.parseDouble(upperCoord[0]),
Double.parseDouble(upperCoord[0]), Double.parseDouble(upperCoord[1])); Double.parseDouble(upperCoord[1]));
geoRSSModule.setGeometry(envelope); geoRSSModule.setGeometry(envelope);
} }
} }

View file

@ -16,17 +16,16 @@
*/ */
package org.rometools.feed.module.georss; package org.rometools.feed.module.georss;
import com.sun.syndication.feed.CopyFrom; import org.jdom2.Namespace;
import org.jdom.Namespace;
import com.sun.syndication.feed.module.ModuleImpl;
import org.rometools.feed.module.georss.geometries.AbstractGeometry; import org.rometools.feed.module.georss.geometries.AbstractGeometry;
import org.rometools.feed.module.georss.geometries.Position;
import org.rometools.feed.module.georss.geometries.Point; import org.rometools.feed.module.georss.geometries.Point;
import org.rometools.feed.module.georss.geometries.Position;
import com.sun.syndication.feed.CopyFrom;
import com.sun.syndication.feed.module.ModuleImpl;
/** /**
* GeoRSSModule is the main georss interface defining the methods to produce and * GeoRSSModule is the main georss interface defining the methods to produce and consume georss elements.
* consume georss elements.
* *
* @author Marc Wick * @author Marc Wick
* @version $Id: GeoRSSModule.java,v 1.8 2007/06/06 09:47:32 marcwick Exp $ * @version $Id: GeoRSSModule.java,v 1.8 2007/06/06 09:47:32 marcwick Exp $
@ -42,8 +41,7 @@ public abstract class GeoRSSModule extends ModuleImpl implements Cloneable {
public static final String GEORSS_GEORSS_URI = "http://www.georss.org/georss"; public static final String GEORSS_GEORSS_URI = "http://www.georss.org/georss";
/** /**
* namespace URI for w3c georss : * namespace URI for w3c georss : <i>"http://www.w3.org/2003/01/geo/wgs84_pos#"</i>
* <i>"http://www.w3.org/2003/01/geo/wgs84_pos#"</i>
*/ */
public static final String GEORSS_W3CGEO_URI = "http://www.w3.org/2003/01/geo/wgs84_pos#"; public static final String GEORSS_W3CGEO_URI = "http://www.w3.org/2003/01/geo/wgs84_pos#";
@ -53,42 +51,35 @@ public abstract class GeoRSSModule extends ModuleImpl implements Cloneable {
public static final String GEORSS_GML_URI = "http://www.opengis.net/gml"; public static final String GEORSS_GML_URI = "http://www.opengis.net/gml";
/** /**
* Namespace for georss simple : * Namespace for georss simple : <i>xmlns:georss="http://www.georss.org/georss"</i>
* <i>xmlns:georss="http://www.georss.org/georss"</i>
*/ */
public static final Namespace SIMPLE_NS = Namespace.getNamespace("georss", public static final Namespace SIMPLE_NS = Namespace.getNamespace("georss", GeoRSSModule.GEORSS_GEORSS_URI);
GeoRSSModule.GEORSS_GEORSS_URI);
/** /**
* *
* Namespace for w3c georss : * Namespace for w3c georss : <i>xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"</i>
* <i>xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"</i>
*/ */
public static final Namespace W3CGEO_NS = Namespace.getNamespace("geo", public static final Namespace W3CGEO_NS = Namespace.getNamespace("geo", GeoRSSModule.GEORSS_W3CGEO_URI);
GeoRSSModule.GEORSS_W3CGEO_URI);
/** /**
* *
* Namespace for gml georss : <i>xmlns:gml="http://www.opengis.net/gml"</i> * Namespace for gml georss : <i>xmlns:gml="http://www.opengis.net/gml"</i>
*/ */
public static final Namespace GML_NS = Namespace.getNamespace("gml", public static final Namespace GML_NS = Namespace.getNamespace("gml", GeoRSSModule.GEORSS_GML_URI);
GeoRSSModule.GEORSS_GML_URI);
protected GeoRSSModule(java.lang.Class beanClass, java.lang.String uri) { protected GeoRSSModule(final java.lang.Class beanClass, final java.lang.String uri) {
super(beanClass, uri); super(beanClass, uri);
} }
/** /**
* Set geometry of georss element * Set geometry of georss element
* *
* @param geometry * @param geometry geometry
* geometry
*/ */
public void setGeometry(AbstractGeometry geometry) { public void setGeometry(final AbstractGeometry geometry) {
this.geometry = geometry; this.geometry = geometry;
} }
/** /**
* returns the geometry * returns the geometry
* *
@ -99,14 +90,14 @@ public abstract class GeoRSSModule extends ModuleImpl implements Cloneable {
} }
/** /**
* Convenience method to return point geometry. * Convenience method to return point geometry. Returns null if the geometry is non-point.
* Returns null if the geometry is non-point.
* *
* @return geometry * @return geometry
*/ */
public Position getPosition() { public Position getPosition() {
if (geometry instanceof Point) if (geometry instanceof Point) {
return ((Point) geometry).getPosition(); return ((Point) geometry).getPosition();
}
return null; return null;
} }
@ -115,33 +106,38 @@ public abstract class GeoRSSModule extends ModuleImpl implements Cloneable {
* *
* @return geometry * @return geometry
*/ */
public void setPosition(Position pos) { public void setPosition(final Position pos) {
if (pos != null) if (pos != null) {
geometry = new Point(pos); geometry = new Point(pos);
} }
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object) * @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object)
*/ */
public void copyFrom(CopyFrom obj) { public void copyFrom(final CopyFrom obj) {
GeoRSSModule geoRSSModule = (GeoRSSModule) obj; final GeoRSSModule geoRSSModule = (GeoRSSModule) obj;
geometry = geoRSSModule.getGeometry(); geometry = geoRSSModule.getGeometry();
try { try {
geometry = (AbstractGeometry) geometry.clone(); geometry = (AbstractGeometry) geometry.clone();
} catch (CloneNotSupportedException ex) { } catch (final CloneNotSupportedException ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
} }
@Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
try { try {
GeoRSSModule retval = (GeoRSSModule)super.clone(); final GeoRSSModule retval = (GeoRSSModule) super.clone();
if (geometry != null) if (geometry != null) {
retval.geometry = (AbstractGeometry) geometry.clone(); retval.geometry = (AbstractGeometry) geometry.clone();
}
return retval; return retval;
} catch(Exception ex) {ex.printStackTrace();} } catch (final Exception ex) {
ex.printStackTrace();
}
throw new CloneNotSupportedException(); throw new CloneNotSupportedException();
} }
} }

View file

@ -33,10 +33,9 @@ public class GeoRSSPoint implements Cloneable {
} }
/** /**
* @param latitude * @param latitude the latitude to set
* the latitude to set
*/ */
public void setLatitude(double latitude) { public void setLatitude(final double latitude) {
this.latitude = latitude; this.latitude = latitude;
} }
@ -48,13 +47,13 @@ public class GeoRSSPoint implements Cloneable {
} }
/** /**
* @param longitude * @param longitude the longitude to set
* the longitude to set
*/ */
public void setLongitude(double longitude) { public void setLongitude(final double longitude) {
this.longitude = longitude; this.longitude = longitude;
} }
@Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return super.clone(); return super.clone();
} }

View file

@ -28,20 +28,22 @@ import com.sun.syndication.feed.synd.SyndFeed;
*/ */
public class GeoRSSUtils { public class GeoRSSUtils {
static String trimWhitespace(final String in) {
static String trimWhitespace(String in) { final StringBuffer strbuf = new StringBuffer();
StringBuffer strbuf = new StringBuffer();
int i = 0; int i = 0;
for (; i<in.length() && Character.isWhitespace(in.charAt(i)); ++i); for (; i < in.length() && Character.isWhitespace(in.charAt(i)); ++i) {
;
}
boolean wasWhite = false; boolean wasWhite = false;
for (; i < in.length(); ++i) { for (; i < in.length(); ++i) {
char ch=in.charAt(i); final char ch = in.charAt(i);
if (Character.isWhitespace(ch)) if (Character.isWhitespace(ch)) {
wasWhite = true; wasWhite = true;
else { } else {
if (wasWhite) if (wasWhite) {
strbuf.append(' '); strbuf.append(' ');
}
strbuf.append(ch); strbuf.append(ch);
wasWhite = false; wasWhite = false;
} }
@ -51,80 +53,63 @@ public class GeoRSSUtils {
} }
/** /**
* This convenience method checks whether there is any geoRss Element and * This convenience method checks whether there is any geoRss Element and will return it (georss simple or W3GGeo).
* will return it (georss simple or W3GGeo).
* *
* @param entry * @param entry the element in the feed which might have a georss element
* the element in the feed which might have a georss element
* @return a georssmodule or null if none is present * @return a georssmodule or null if none is present
*/ */
public static GeoRSSModule getGeoRSS(SyndEntry entry) { public static GeoRSSModule getGeoRSS(final SyndEntry entry) {
GeoRSSModule simple = (GeoRSSModule) entry final GeoRSSModule simple = (GeoRSSModule) entry.getModule(GeoRSSModule.GEORSS_GEORSS_URI);
.getModule(GeoRSSModule.GEORSS_GEORSS_URI); final GeoRSSModule w3cGeo = (GeoRSSModule) entry.getModule(GeoRSSModule.GEORSS_W3CGEO_URI);
GeoRSSModule w3cGeo = (GeoRSSModule) entry final GeoRSSModule gml = (GeoRSSModule) entry.getModule(GeoRSSModule.GEORSS_GML_URI);
.getModule(GeoRSSModule.GEORSS_W3CGEO_URI); if (gml != null) {
GeoRSSModule gml = (GeoRSSModule) entry
.getModule(GeoRSSModule.GEORSS_GML_URI);
if (gml != null)
return gml; return gml;
if (simple != null) }
if (simple != null) {
return simple; return simple;
if (w3cGeo != null) }
if (w3cGeo != null) {
return w3cGeo; return w3cGeo;
}
return null; return null;
/* /*
if (geoRSSModule == null && w3cGeo != null) { * if (geoRSSModule == null && w3cGeo != null) { geoRSSModule = w3cGeo; } else if (geoRSSModule == null && gml != null) { geoRSSModule = gml; } else if
geoRSSModule = w3cGeo; * (geoRSSModule != null && w3cGeo != null) { // sanity check if (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) { throw new
} else if (geoRSSModule == null && gml != null) { * Error("geometry of simple and w3c do not match"); } }
geoRSSModule = gml; *
} else if (geoRSSModule != null && w3cGeo != null) { * return geoRSSModule;
// sanity check
if (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) {
throw new Error("geometry of simple and w3c do not match");
}
}
return geoRSSModule;
*/ */
} }
/** /**
* This convenience method checks whether there is any geoRss Element and * This convenience method checks whether there is any geoRss Element and will return it (georss simple or W3GGeo).
* will return it (georss simple or W3GGeo).
* *
* @param feed * @param feed the element in the feed which might have a georss element
* the element in the feed which might have a georss element
* @return a georssmodule or null if none is present * @return a georssmodule or null if none is present
*/ */
public static GeoRSSModule getGeoRSS(SyndFeed feed) { public static GeoRSSModule getGeoRSS(final SyndFeed feed) {
GeoRSSModule simple = (GeoRSSModule) feed final GeoRSSModule simple = (GeoRSSModule) feed.getModule(GeoRSSModule.GEORSS_GEORSS_URI);
.getModule(GeoRSSModule.GEORSS_GEORSS_URI); final GeoRSSModule w3cGeo = (GeoRSSModule) feed.getModule(GeoRSSModule.GEORSS_W3CGEO_URI);
GeoRSSModule w3cGeo = (GeoRSSModule) feed final GeoRSSModule gml = (GeoRSSModule) feed.getModule(GeoRSSModule.GEORSS_GML_URI);
.getModule(GeoRSSModule.GEORSS_W3CGEO_URI);
GeoRSSModule gml = (GeoRSSModule) feed
.getModule(GeoRSSModule.GEORSS_GML_URI);
if (gml != null) if (gml != null) {
return gml; return gml;
if (simple != null) }
if (simple != null) {
return simple; return simple;
if (w3cGeo != null) }
if (w3cGeo != null) {
return w3cGeo; return w3cGeo;
}
return null; return null;
/* /*
if (geoRSSModule == null && w3cGeo != null) { * if (geoRSSModule == null && w3cGeo != null) { geoRSSModule = w3cGeo; } else if (geoRSSModule == null && gml != null) { geoRSSModule = gml; } else if
geoRSSModule = w3cGeo; * (geoRSSModule != null && w3cGeo != null) { // sanity check if (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) { throw new
} else if (geoRSSModule == null && gml != null) { * Error("geometry of simple and w3c do not match"); } }
geoRSSModule = gml; *
} else if (geoRSSModule != null && w3cGeo != null) { * return geoRSSModule;
// sanity check
if (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) {
throw new Error("geometry of simple and w3c do not match");
}
}
return geoRSSModule;
*/ */
} }
} }

View file

@ -20,11 +20,19 @@ import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.jdom.Element; import org.jdom2.Element;
import org.rometools.feed.module.georss.geometries.AbstractGeometry;
import org.rometools.feed.module.georss.geometries.AbstractRing;
import org.rometools.feed.module.georss.geometries.Envelope;
import org.rometools.feed.module.georss.geometries.LineString;
import org.rometools.feed.module.georss.geometries.LinearRing;
import org.rometools.feed.module.georss.geometries.Point;
import org.rometools.feed.module.georss.geometries.Polygon;
import org.rometools.feed.module.georss.geometries.Position;
import org.rometools.feed.module.georss.geometries.PositionList;
import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleGenerator; import com.sun.syndication.io.ModuleGenerator;
import org.rometools.feed.module.georss.geometries.*;
/** /**
* SimpleGenerator produces georss elements in georss simple format. * SimpleGenerator produces georss elements in georss simple format.
@ -37,19 +45,19 @@ public class SimpleGenerator implements ModuleGenerator {
private static final Set NAMESPACES; private static final Set NAMESPACES;
static { static {
Set nss = new HashSet(); final Set nss = new HashSet();
nss.add(GeoRSSModule.SIMPLE_NS); nss.add(GeoRSSModule.SIMPLE_NS);
NAMESPACES = Collections.unmodifiableSet(nss); NAMESPACES = Collections.unmodifiableSet(nss);
} }
private String posListToString(PositionList posList) { private String posListToString(final PositionList posList) {
StringBuffer sb = new StringBuffer(); final StringBuffer sb = new StringBuffer();
for (int i=0; i<posList.size(); ++i) for (int i = 0; i < posList.size(); ++i) {
sb.append(posList.getLatitude(i)).append(" ").append(posList.getLongitude(i)).append(" "); sb.append(posList.getLatitude(i)).append(" ").append(posList.getLongitude(i)).append(" ");
}
return sb.toString(); return sb.toString();
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
@ -71,10 +79,9 @@ public class SimpleGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, * @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
* org.jdom.Element)
*/ */
public void generate(Module module, Element element) { public void generate(final Module module, final Element element) {
// this is not necessary, it is done to avoid the namespace definition // this is not necessary, it is done to avoid the namespace definition
// in every item. // in every item.
Element root = element; Element root = element;
@ -83,49 +90,43 @@ public class SimpleGenerator implements ModuleGenerator {
} }
root.addNamespaceDeclaration(GeoRSSModule.SIMPLE_NS); root.addNamespaceDeclaration(GeoRSSModule.SIMPLE_NS);
GeoRSSModule geoRSSModule = (GeoRSSModule) module; final GeoRSSModule geoRSSModule = (GeoRSSModule) module;
AbstractGeometry geometry = geoRSSModule.getGeometry(); final AbstractGeometry geometry = geoRSSModule.getGeometry();
if (geometry instanceof Point) { if (geometry instanceof Point) {
Position pos = ((Point) geometry).getPosition(); final Position pos = ((Point) geometry).getPosition();
Element pointElement = new Element("point", GeoRSSModule.SIMPLE_NS); final Element pointElement = new Element("point", GeoRSSModule.SIMPLE_NS);
pointElement.addContent(pos.getLatitude() + " " pointElement.addContent(pos.getLatitude() + " " + pos.getLongitude());
+ pos.getLongitude());
element.addContent(pointElement); element.addContent(pointElement);
} } else if (geometry instanceof LineString) {
else if (geometry instanceof LineString) { final PositionList posList = ((LineString) geometry).getPositionList();
PositionList posList = ((LineString) geometry).getPositionList();
Element lineElement = new Element("line", GeoRSSModule.SIMPLE_NS); final Element lineElement = new Element("line", GeoRSSModule.SIMPLE_NS);
lineElement.addContent(posListToString(posList)); lineElement.addContent(posListToString(posList));
element.addContent(lineElement); element.addContent(lineElement);
} } else if (geometry instanceof Polygon) {
else if (geometry instanceof Polygon) { final AbstractRing ring = ((Polygon) geometry).getExterior();
AbstractRing ring = ((Polygon) geometry).getExterior();
if (ring instanceof LinearRing) { if (ring instanceof LinearRing) {
PositionList posList = ((LinearRing) ring).getPositionList(); final PositionList posList = ((LinearRing) ring).getPositionList();
Element polygonElement = new Element("polygon", GeoRSSModule.SIMPLE_NS); final Element polygonElement = new Element("polygon", GeoRSSModule.SIMPLE_NS);
polygonElement.addContent(posListToString(posList)); polygonElement.addContent(posListToString(posList));
element.addContent(polygonElement); element.addContent(polygonElement);
} } else {
else {
System.err.println("GeoRSS simple format can't handle rings of type: " + ring.getClass().getName()); System.err.println("GeoRSS simple format can't handle rings of type: " + ring.getClass().getName());
} }
if (((Polygon) geometry).getInterior() != null || !((Polygon) geometry).getInterior().isEmpty()) { if (((Polygon) geometry).getInterior() != null || !((Polygon) geometry).getInterior().isEmpty()) {
System.err.println("GeoRSS simple format can't handle interior rings (ignored)"); System.err.println("GeoRSS simple format can't handle interior rings (ignored)");
} }
} } else if (geometry instanceof Envelope) {
else if (geometry instanceof Envelope) { final Envelope envelope = (Envelope) geometry;
Envelope envelope = (Envelope)geometry; final Element boxElement = new Element("box", GeoRSSModule.SIMPLE_NS);
Element boxElement = new Element("box", GeoRSSModule.SIMPLE_NS); boxElement.addContent(envelope.getMinLatitude() + " " + envelope.getMinLongitude() + " " + envelope.getMaxLatitude() + " "
boxElement.addContent(envelope.getMinLatitude() + " " + envelope.getMinLongitude() + " " + + envelope.getMaxLongitude());
envelope.getMaxLatitude() + " " + envelope.getMaxLongitude());
element.addContent(boxElement); element.addContent(boxElement);
} } else {
else {
System.err.println("GeoRSS simple format can't handle geometries of type: " + geometry.getClass().getName()); System.err.println("GeoRSS simple format can't handle geometries of type: " + geometry.getClass().getName());
} }
} }

View file

@ -16,10 +16,8 @@
*/ */
package org.rometools.feed.module.georss; package org.rometools.feed.module.georss;
/** /**
* SimpleModuleImpl is the implementation of the {@link GeoRSSModule} Interface * SimpleModuleImpl is the implementation of the {@link GeoRSSModule} Interface for the GeoRSS Simple format.
* for the GeoRSS Simple format.
* *
* @author Marc Wick * @author Marc Wick
* @version $Id: SimpleModuleImpl.java,v 1.4 2007/04/18 09:59:29 marcwick Exp $ * @version $Id: SimpleModuleImpl.java,v 1.4 2007/04/18 09:59:29 marcwick Exp $
@ -30,7 +28,6 @@ public class SimpleModuleImpl extends GeoRSSModule {
super(GeoRSSModule.class, GeoRSSModule.GEORSS_GEORSS_URI); super(GeoRSSModule.class, GeoRSSModule.GEORSS_GEORSS_URI);
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* *

View file

@ -16,12 +16,17 @@
*/ */
package org.rometools.feed.module.georss; package org.rometools.feed.module.georss;
import org.jdom.Element; import org.jdom2.Element;
import org.rometools.feed.module.georss.geometries.Envelope;
import org.rometools.feed.module.georss.geometries.LineString;
import org.rometools.feed.module.georss.geometries.LinearRing;
import org.rometools.feed.module.georss.geometries.Point;
import org.rometools.feed.module.georss.geometries.Polygon;
import org.rometools.feed.module.georss.geometries.Position;
import org.rometools.feed.module.georss.geometries.PositionList;
import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.module.Module;
import org.rometools.feed.module.georss.GMLParser;
import com.sun.syndication.io.ModuleParser; import com.sun.syndication.io.ModuleParser;
import org.rometools.feed.module.georss.geometries.*;
/** /**
* SimpleParser is a parser for the GeoRSS Simple format. * SimpleParser is a parser for the GeoRSS Simple format.
@ -41,60 +46,56 @@ public class SimpleParser implements ModuleParser {
return GeoRSSModule.GEORSS_GEORSS_URI; return GeoRSSModule.GEORSS_GEORSS_URI;
} }
private static PositionList parsePosList(Element element) { private static PositionList parsePosList(final Element element) {
String coordinates = element.getText(); final String coordinates = element.getText();
String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" "); final String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" ");
PositionList posList = new PositionList(); final PositionList posList = new PositionList();
for (int i = 0; i < coord.length; i += 2) { for (int i = 0; i < coord.length; i += 2) {
posList.add(Double.parseDouble(coord[i]), Double.parseDouble(coord[i + 1])); posList.add(Double.parseDouble(coord[i]), Double.parseDouble(coord[i + 1]));
} }
return posList; return posList;
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom.Element) * @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/ */
public Module parse(Element element) { public Module parse(final Element element) {
Module geoRssModule = parseSimple(element); final Module geoRssModule = parseSimple(element);
return geoRssModule; return geoRssModule;
} }
static Module parseSimple(Element element) { static Module parseSimple(final Element element) {
GeoRSSModule geoRSSModule = null; GeoRSSModule geoRSSModule = null;
Element pointElement = element.getChild("point", final Element pointElement = element.getChild("point", GeoRSSModule.SIMPLE_NS);
GeoRSSModule.SIMPLE_NS); final Element lineElement = element.getChild("line", GeoRSSModule.SIMPLE_NS);
Element lineElement = element.getChild("line", final Element polygonElement = element.getChild("polygon", GeoRSSModule.SIMPLE_NS);
GeoRSSModule.SIMPLE_NS); final Element boxElement = element.getChild("box", GeoRSSModule.SIMPLE_NS);
Element polygonElement = element.getChild("polygon", final Element whereElement = element.getChild("where", GeoRSSModule.SIMPLE_NS);
GeoRSSModule.SIMPLE_NS);
Element boxElement = element.getChild("box",
GeoRSSModule.SIMPLE_NS);
Element whereElement = element
.getChild("where", GeoRSSModule.SIMPLE_NS);
if (pointElement != null) { if (pointElement != null) {
geoRSSModule = new SimpleModuleImpl(); geoRSSModule = new SimpleModuleImpl();
String coordinates = pointElement.getText(); final String coordinates = pointElement.getText();
String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" "); final String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" ");
Position pos = new Position(Double.parseDouble(coord[0]), Double.parseDouble(coord[1])); final Position pos = new Position(Double.parseDouble(coord[0]), Double.parseDouble(coord[1]));
geoRSSModule.setGeometry(new Point(pos)); geoRSSModule.setGeometry(new Point(pos));
} else if (lineElement != null) { } else if (lineElement != null) {
geoRSSModule = new SimpleModuleImpl(); geoRSSModule = new SimpleModuleImpl();
PositionList posList = parsePosList(lineElement); final PositionList posList = parsePosList(lineElement);
geoRSSModule.setGeometry(new LineString(posList)); geoRSSModule.setGeometry(new LineString(posList));
} else if (polygonElement != null) { } else if (polygonElement != null) {
geoRSSModule = new SimpleModuleImpl(); geoRSSModule = new SimpleModuleImpl();
PositionList posList = parsePosList(polygonElement); final PositionList posList = parsePosList(polygonElement);
Polygon poly = new Polygon(); final Polygon poly = new Polygon();
poly.setExterior(new LinearRing(posList)); poly.setExterior(new LinearRing(posList));
geoRSSModule.setGeometry(poly); geoRSSModule.setGeometry(poly);
} else if (boxElement != null) { } else if (boxElement != null) {
geoRSSModule = new SimpleModuleImpl(); geoRSSModule = new SimpleModuleImpl();
String coordinates = boxElement.getText(); final String coordinates = boxElement.getText();
String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" "); final String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" ");
Envelope envelope = new Envelope(Double.parseDouble(coord[0]), Double.parseDouble(coord[1]), final Envelope envelope = new Envelope(Double.parseDouble(coord[0]), Double.parseDouble(coord[1]), Double.parseDouble(coord[2]),
Double.parseDouble(coord[2]), Double.parseDouble(coord[3])); Double.parseDouble(coord[3]));
geoRSSModule.setGeometry(envelope); geoRSSModule.setGeometry(envelope);
} else if (whereElement != null) { } else if (whereElement != null) {
geoRSSModule = (GeoRSSModule) GMLParser.parseGML(whereElement); geoRSSModule = (GeoRSSModule) GMLParser.parseGML(whereElement);

View file

@ -20,11 +20,13 @@ import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.jdom.Element; import org.jdom2.Element;
import org.rometools.feed.module.georss.geometries.AbstractGeometry;
import org.rometools.feed.module.georss.geometries.Point;
import org.rometools.feed.module.georss.geometries.Position;
import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleGenerator; import com.sun.syndication.io.ModuleGenerator;
import org.rometools.feed.module.georss.geometries.*;
/** /**
* W3CGeoGenerator produces georss elements in georss W3C geo format. * W3CGeoGenerator produces georss elements in georss W3C geo format.
@ -40,7 +42,7 @@ public class W3CGeoGenerator implements ModuleGenerator {
private static final Set NAMESPACES; private static final Set NAMESPACES;
static { static {
Set nss = new HashSet(); final Set nss = new HashSet();
nss.add(GeoRSSModule.W3CGEO_NS); nss.add(GeoRSSModule.W3CGEO_NS);
NAMESPACES = Collections.unmodifiableSet(nss); NAMESPACES = Collections.unmodifiableSet(nss);
} }
@ -70,10 +72,9 @@ public class W3CGeoGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, * @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
* org.jdom.Element)
*/ */
public void generate(Module module, Element element) { public void generate(final Module module, final Element element) {
// this is not necessary, it is done to avoid the namespace definition // this is not necessary, it is done to avoid the namespace definition
// in every item. // in every item.
Element root = element; Element root = element;
@ -88,20 +89,19 @@ public class W3CGeoGenerator implements ModuleGenerator {
element.addContent(pointElement); element.addContent(pointElement);
} }
GeoRSSModule geoRSSModule = (GeoRSSModule) module; final GeoRSSModule geoRSSModule = (GeoRSSModule) module;
AbstractGeometry geometry = geoRSSModule.getGeometry(); final AbstractGeometry geometry = geoRSSModule.getGeometry();
if (geometry instanceof Point) { if (geometry instanceof Point) {
Position pos = ((Point)geometry).getPosition(); final Position pos = ((Point) geometry).getPosition();
Element latElement = new Element("lat", GeoRSSModule.W3CGEO_NS); final Element latElement = new Element("lat", GeoRSSModule.W3CGEO_NS);
latElement.addContent(String.valueOf(pos.getLatitude())); latElement.addContent(String.valueOf(pos.getLatitude()));
pointElement.addContent(latElement); pointElement.addContent(latElement);
Element lngElement = new Element("long", GeoRSSModule.W3CGEO_NS); final Element lngElement = new Element("long", GeoRSSModule.W3CGEO_NS);
lngElement.addContent(String.valueOf(pos.getLongitude())); lngElement.addContent(String.valueOf(pos.getLongitude()));
pointElement.addContent(lngElement); pointElement.addContent(lngElement);
} } else {
else {
System.err.println("W3C Geo format can't handle geometries of type: " + geometry.getClass().getName()); System.err.println("W3C Geo format can't handle geometries of type: " + geometry.getClass().getName());
} }
} }

View file

@ -16,10 +16,8 @@
*/ */
package org.rometools.feed.module.georss; package org.rometools.feed.module.georss;
/** /**
* W3CGeoModuleImpl is the implementation of the {@link GeoRSSModule} Interface * W3CGeoModuleImpl is the implementation of the {@link GeoRSSModule} Interface for the W3C geo format.
* for the W3C geo format.
* *
* @author Marc Wick * @author Marc Wick
* @version $Id: W3CGeoModuleImpl.java,v 1.2 2007/04/18 09:59:29 marcwick Exp $ * @version $Id: W3CGeoModuleImpl.java,v 1.2 2007/04/18 09:59:29 marcwick Exp $
@ -31,7 +29,6 @@ public class W3CGeoModuleImpl extends GeoRSSModule {
super(GeoRSSModule.class, GeoRSSModule.GEORSS_W3CGEO_URI); super(GeoRSSModule.class, GeoRSSModule.GEORSS_W3CGEO_URI);
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* *

View file

@ -16,11 +16,12 @@
*/ */
package org.rometools.feed.module.georss; package org.rometools.feed.module.georss;
import org.jdom.Element; import org.jdom2.Element;
import org.rometools.feed.module.georss.geometries.Point;
import org.rometools.feed.module.georss.geometries.Position;
import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser; import com.sun.syndication.io.ModuleParser;
import org.rometools.feed.module.georss.geometries.*;
/** /**
* W3CGeoParser is a parser for the W3C geo format. * W3CGeoParser is a parser for the W3C geo format.
@ -40,26 +41,25 @@ public class W3CGeoParser implements ModuleParser {
return GeoRSSModule.GEORSS_W3CGEO_URI; return GeoRSSModule.GEORSS_W3CGEO_URI;
} }
static Module parseW3C(final Element element) {
static Module parseW3C(Element element) {
GeoRSSModule geoRSSModule = null; GeoRSSModule geoRSSModule = null;
// do we have an optional "Point" element ? // do we have an optional "Point" element ?
Element pointElement = element Element pointElement = element.getChild("Point", GeoRSSModule.W3CGEO_NS);
.getChild("Point", GeoRSSModule.W3CGEO_NS);
// we don't have an optional "Point" element // we don't have an optional "Point" element
if (pointElement == null) { if (pointElement == null) {
pointElement = element; pointElement = element;
} }
Element lat = pointElement.getChild("lat", GeoRSSModule.W3CGEO_NS); final Element lat = pointElement.getChild("lat", GeoRSSModule.W3CGEO_NS);
Element lng = pointElement.getChild("long", GeoRSSModule.W3CGEO_NS); Element lng = pointElement.getChild("long", GeoRSSModule.W3CGEO_NS);
if (lng == null) if (lng == null) {
lng = pointElement.getChild("lon", GeoRSSModule.W3CGEO_NS); lng = pointElement.getChild("lon", GeoRSSModule.W3CGEO_NS);
}
if (lat != null && lng != null) { if (lat != null && lng != null) {
geoRSSModule = new W3CGeoModuleImpl(); geoRSSModule = new W3CGeoModuleImpl();
Position pos = new Position(Double.parseDouble(lat.getText()), Double.parseDouble(lng.getText())); final Position pos = new Position(Double.parseDouble(lat.getText()), Double.parseDouble(lng.getText()));
geoRSSModule.setGeometry(new Point(pos)); geoRSSModule.setGeometry(new Point(pos));
} }
@ -69,10 +69,10 @@ public class W3CGeoParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom.Element) * @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/ */
public Module parse(Element element) { public Module parse(final Element element) {
Module geoRssModule = parseW3C(element); final Module geoRssModule = parseW3C(element);
return geoRssModule; return geoRssModule;
} }

View file

@ -11,6 +11,7 @@ package org.rometools.feed.module.georss.geometries;
/** /**
* Abstract base class for Curves (linear objects) * Abstract base class for Curves (linear objects)
*
* @author runaas * @author runaas
*/ */
public abstract class AbstractCurve extends AbstractGeometricPrimitive { public abstract class AbstractCurve extends AbstractGeometricPrimitive {

View file

@ -11,6 +11,7 @@ package org.rometools.feed.module.georss.geometries;
/** /**
* Abstract base class for geometric primitives (non-composite geometric objects) * Abstract base class for geometric primitives (non-composite geometric objects)
*
* @author runaas * @author runaas
*/ */
public abstract class AbstractGeometricPrimitive extends AbstractGeometry { public abstract class AbstractGeometricPrimitive extends AbstractGeometry {

View file

@ -24,13 +24,16 @@ public abstract class AbstractGeometry implements Cloneable, Serializable {
/** /**
* Make a deep copy of the geometric object * Make a deep copy of the geometric object
*
* @return A copy of the object * @return A copy of the object
*/ */
@Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return super.clone(); return super.clone();
} }
public boolean equals(Object obj) { @Override
public boolean equals(final Object obj) {
return obj != null && obj.getClass() == getClass(); return obj != null && obj.getClass() == getClass();
} }
} }

View file

@ -13,6 +13,7 @@ import java.io.Serializable;
/** /**
* Abstract base class for rings (closed linear objects used for polygon borders) * Abstract base class for rings (closed linear objects used for polygon borders)
*
* @author runaas * @author runaas
*/ */
public abstract class AbstractRing implements Cloneable, Serializable { public abstract class AbstractRing implements Cloneable, Serializable {
@ -21,6 +22,7 @@ public abstract class AbstractRing implements Cloneable, Serializable {
public AbstractRing() { public AbstractRing() {
} }
@Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
return super.clone(); return super.clone();
} }

View file

@ -11,6 +11,7 @@ package org.rometools.feed.module.georss.geometries;
/** /**
* Abstract base class for surface (area) objects * Abstract base class for surface (area) objects
*
* @author runaas * @author runaas
*/ */
public abstract class AbstractSurface extends AbstractGeometricPrimitive { public abstract class AbstractSurface extends AbstractGeometricPrimitive {

View file

@ -10,9 +10,8 @@
package org.rometools.feed.module.georss.geometries; package org.rometools.feed.module.georss.geometries;
/** /**
* Envelope, a bounding box spanned by an upper right and lower left corner point. * Envelope, a bounding box spanned by an upper right and lower left corner point. Note that if the box spans the -180 180 degree meridian the numerical value
* Note that if the box spans the -180 180 degree meridian the numerical value of the * of the minLongitude may be greater than the maxLongitude.
* minLongitude may be greater than the maxLongitude.
* *
* @author runaas * @author runaas
*/ */
@ -23,6 +22,7 @@ public class Envelope extends AbstractGeometry {
public Envelope() { public Envelope() {
minLatitude = minLongitude = maxLatitude = maxLongitude = Double.NaN; minLatitude = minLongitude = maxLatitude = maxLongitude = Double.NaN;
} }
/** /**
* Construct object from coordinate values * Construct object from coordinate values
* *
@ -31,7 +31,7 @@ public class Envelope extends AbstractGeometry {
* @param maxLatitude * @param maxLatitude
* @param maxLongitude * @param maxLongitude
*/ */
public Envelope(double minLatitude, double minLongitude, double maxLatitude, double maxLongitude) { public Envelope(final double minLatitude, final double minLongitude, final double maxLatitude, final double maxLongitude) {
this.minLatitude = minLatitude; this.minLatitude = minLatitude;
this.minLongitude = minLongitude; this.minLongitude = minLongitude;
this.maxLatitude = maxLatitude; this.maxLatitude = maxLatitude;
@ -69,28 +69,28 @@ public class Envelope extends AbstractGeometry {
/** /**
* @param v minimum longitude * @param v minimum longitude
*/ */
public void setMinLongitude(double v) { public void setMinLongitude(final double v) {
minLongitude = v; minLongitude = v;
} }
/** /**
* @param v minimum latitude * @param v minimum latitude
*/ */
public void setMinLatitude(double v) { public void setMinLatitude(final double v) {
minLatitude = v; minLatitude = v;
} }
/** /**
* @param v maximum longitude * @param v maximum longitude
*/ */
public void setMaxLongitude(double v) { public void setMaxLongitude(final double v) {
maxLongitude = v; maxLongitude = v;
} }
/** /**
* @param v maximum latitude * @param v maximum latitude
*/ */
public void setMaxLatitude(double v) { public void setMaxLatitude(final double v) {
maxLatitude = v; maxLatitude = v;
} }
} }

View file

@ -11,6 +11,7 @@ package org.rometools.feed.module.georss.geometries;
/** /**
* Linear object constructed by linear interpolation between points * Linear object constructed by linear interpolation between points
*
* @author runaas * @author runaas
*/ */
public final class LineString extends AbstractCurve { public final class LineString extends AbstractCurve {
@ -24,22 +25,27 @@ public final class LineString extends AbstractCurve {
/** /**
* Construct object from a position list * Construct object from a position list
*/ */
public LineString(PositionList posList) { public LineString(final PositionList posList) {
this.posList = posList; this.posList = posList;
} }
@Override
public Object clone() throws CloneNotSupportedException { public Object clone() throws CloneNotSupportedException {
LineString retval = (LineString)super.clone(); final LineString retval = (LineString) super.clone();
if (posList != null) if (posList != null) {
retval.posList = (PositionList) posList.clone(); retval.posList = (PositionList) posList.clone();
}
return retval; return retval;
} }
public boolean equals(Object obj) { @Override
if (this == obj) public boolean equals(final Object obj) {
if (this == obj) {
return true; return true;
if (!super.equals(obj)) }
if (!super.equals(obj)) {
return false; return false;
}
return getPositionList().equals(((LineString) obj).getPositionList()); return getPositionList().equals(((LineString) obj).getPositionList());
} }
@ -49,8 +55,9 @@ public final class LineString extends AbstractCurve {
* @return the positionlist * @return the positionlist
*/ */
public PositionList getPositionList() { public PositionList getPositionList() {
if (posList == null) if (posList == null) {
posList = new PositionList(); posList = new PositionList();
}
return posList; return posList;
} }
@ -59,7 +66,7 @@ public final class LineString extends AbstractCurve {
* *
* @param posList the new position list * @param posList the new position list
*/ */
public void setPositionList(PositionList posList) { public void setPositionList(final PositionList posList) {
this.posList = posList; this.posList = posList;
} }
} }

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