svnno****@sourc*****
svnno****@sourc*****
2007年 4月 22日 (日) 06:12:29 JST
Revision: 71 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=71 Author: shinsuke Date: 2007-04-22 06:12:29 +0900 (Sun, 22 Apr 2007) Log Message: ----------- moved from cvs. Added Paths: ----------- libraries/common-utils/trunk/.classpath libraries/common-utils/trunk/.project libraries/common-utils/trunk/.settings/ libraries/common-utils/trunk/.settings/org.eclipse.core.resources.prefs libraries/common-utils/trunk/.settings/org.eclipse.jdt.core.prefs libraries/common-utils/trunk/.settings/org.eclipse.jdt.ui.prefs libraries/common-utils/trunk/pom.xml libraries/common-utils/trunk/src/ libraries/common-utils/trunk/src/main/ libraries/common-utils/trunk/src/main/java/ libraries/common-utils/trunk/src/main/java/jp/ libraries/common-utils/trunk/src/main/java/jp/sf/ libraries/common-utils/trunk/src/main/java/jp/sf/pal/ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/io/ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/io/RegexpFilenameFilter.java libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/DateUtil.java libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/LocaleUtil.java -------------- next part -------------- Added: libraries/common-utils/trunk/.classpath =================================================================== --- libraries/common-utils/trunk/.classpath 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/.classpath 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,9 @@ +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"/> +</classpath> \ No newline at end of file Property changes on: libraries/common-utils/trunk/.classpath ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/common-utils/trunk/.project =================================================================== --- libraries/common-utils/trunk/.project 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/.project 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,14 @@ +<projectDescription> + <name>common-utils</name> + <comment/> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments/> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Property changes on: libraries/common-utils/trunk/.project ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/common-utils/trunk/.settings/org.eclipse.core.resources.prefs =================================================================== --- libraries/common-utils/trunk/.settings/org.eclipse.core.resources.prefs 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/.settings/org.eclipse.core.resources.prefs 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,3 @@ +#Sat Feb 04 04:18:24 JST 2006 +eclipse.preferences.version=1 +encoding/<project>=UTF-8 Added: libraries/common-utils/trunk/.settings/org.eclipse.jdt.core.prefs =================================================================== --- libraries/common-utils/trunk/.settings/org.eclipse.jdt.core.prefs 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/.settings/org.eclipse.jdt.core.prefs 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,261 @@ +#Thu Jun 08 15:03:10 JST 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.4 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false +org.eclipse.jdt.core.formatter.comment.format_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_source_code=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false Added: libraries/common-utils/trunk/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- libraries/common-utils/trunk/.settings/org.eclipse.jdt.ui.prefs 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/.settings/org.eclipse.jdt.ui.prefs 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,13 @@ +#Thu Jun 08 20:38:39 JST 2006 +eclipse.preferences.version=1 +formatter_settings_version=8 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates><template id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment" description\="Comment for getter method" context\="gettercomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment" description\="Comment for setter method" context\="settercomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment" description\="Comment for created constructors" context\="constructorcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment" description\="Comment for created Java files" context\="filecomment_context" enabled\="true" deleted\="false" autoinsert\="false">/*\r\n * Copyright 2005-2006 Portal Application Laboratory project.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, \r\n * either express or implied. See the License for the specific language\r\n * governing permissions and limitations under the License.\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment" description\="Comment for created types" context\="typecomment_context" enabled\="true" deleted\="false" autoinser "true">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment" description\="Comment for fields" context\="fieldcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * \r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment" description\="Comment for non-overriding methods" context\="methodcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment" description\="Comment for overriding methods" context\="overridecomment_context" enabled\="true" deleted\="false" autoinsert\="true">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype" description\="Newly created files" context\="newtype_context" enabled\="true" deleted\="false" autoinsert\="false">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock" description\="Code in new catch blocks" context\="catchblock_context" enabled\="true" deleted\="false" autoinsert\="true">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody" description\="Code in created method stubs" context\="methodbody_context" enabled\="true" deleted\="false" autoinsert\="true">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody" description\="Code in created constructor stubs" context\="constructorbody_context" enabled\="true" deleted\="false" autoinsert\="true">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template id\="org.eclipse.j ui.text.codetemplates.getterbody" name\="getterbody" description\="Code in created getters" context\="getterbody_context" enabled\="true" deleted\="false" autoinsert\="true">return ${field};</template><template id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody" description\="Code in created setters" context\="setterbody_context" enabled\="true" deleted\="false" autoinsert\="true">${field} \= ${param};</template></templates> Added: libraries/common-utils/trunk/pom.xml =================================================================== --- libraries/common-utils/trunk/pom.xml 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/pom.xml 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,140 @@ +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>jp.sf.pal</groupId> + <artifactId>common-utils</artifactId> + <packaging>jar</packaging> + <version>0.2-SNAPSHOT</version> + <name>common-utils</name> + <url>http://pal.sourceforge.jp/</url> + <inceptionYear>2005</inceptionYear> + <developers> + <developer> + <id>shinsuke</id> + <name>Shinsuke Sugaya</name> + <email>shinsuke_at_yahoo.co.jp</email> + <url>http://d.hatena.ne.jp/shinsuke_sugaya/</url> + <organization/> + <organizationUrl/> + <timezone>+9</timezone> + </developer> + </developers> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + <scm> + <connection>scm:cvs:pserver:anony****@cvs*****:/cvsroot/pal:libraries/faces-utils</connection> + <developerConnection>scm:cvs:pserver:anony****@cvs*****:/cvsroot/pal:libraries/faces-utils</developerConnection> + <url>http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/pal/libraries/faces-utils</url> + </scm> + <organization> + <name>Portal Application Laboratory</name> + <url>http://pal.sourceforge.jp/</url> + </organization> + <build> + <defaultGoal>validate</defaultGoal> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.4</source> + <target>1.4</target> + <encoding>UTF-8</encoding> + </configuration> + </plugin> + <plugin> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <updateReleaseInfo>true</updateReleaseInfo> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + <version>2.0-SNAPSHOT</version> + <executions> + <execution> + <goals> + <goal>clean</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> + <id>source-jar</id> + <phase>package</phase> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + <repositories> + <repository> + <id>maven.marevol.com</id> + <name>Maven2 Repository on marevol.com</name> + <url>http://www.marevol.com/maven2</url> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>people.apache.org m2-snapshot</id> + <url>http://people.apache.org/repo/m2-snapshot-repository</url> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <enabled>false</enabled> + </releases> + </pluginRepository> + <pluginRepository> + <id>snapshots.repository.codehaus.org</id> + <url>http://snapshots.repository.codehaus.org</url> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <enabled>false</enabled> + </releases> + </pluginRepository> + </pluginRepositories> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.3</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>portlet-api</groupId> + <artifactId>portlet-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <scope>provided</scope> + </dependency> + </dependencies> +</project> Property changes on: libraries/common-utils/trunk/pom.xml ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/io/RegexpFilenameFilter.java =================================================================== --- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/io/RegexpFilenameFilter.java 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/io/RegexpFilenameFilter.java 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,35 @@ +/* + * Copyright 2004-2007 The Portal Application Laboratory Team. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package jp.sf.pal.common.io; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; + +public class RegexpFilenameFilter implements FilenameFilter { + private Pattern pattern; + + public RegexpFilenameFilter(String regexpFileName) + throws PatternSyntaxException { + pattern = Pattern.compile(regexpFileName); + } + + public boolean accept(File dir, String name) { + return pattern.matcher(name).matches(); + } + +} Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/io/RegexpFilenameFilter.java ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/DateUtil.java =================================================================== --- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/DateUtil.java 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/DateUtil.java 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,234 @@ +/* + * Copyright 2004-2007 The Portal Application Laboratory Team. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package jp.sf.pal.common.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Calendar; +import java.util.Date; + +public class DateUtil { + /** + * Logger for this class + */ + private static final Log log = LogFactory.getLog(DateUtil.class); + + /** + * Allocates a Date object and initializes it so that it represents + * midnight, local time, at the beginning of the day specified by the year, + * month, and date arguments. + * + * @param year + * @param month + * @param date + * @return + */ + public static Date get(int year, int month, int date) { + if (log.isDebugEnabled()) { + log.debug("get(int, int, int) - : year=" + year + ", month=" + + month + ", date=" + date); + } + + Calendar cal = Calendar.getInstance(); + cal.set(year + 1900, month, date); + return cal.getTime(); + } + + /** + * Allocates a Date object and initializes it so that it represents the + * instant at the start of the minute specified by the year, month, date, + * hrs, and min arguments, in the local time zone. + * + * @param year + * @param month + * @param date + * @param hrs + * @param min + * @return + */ + public static Date get(int year, int month, int date, int hrs, int min) { + if (log.isDebugEnabled()) { + log.debug("get(int, int, int, int, int) - : year=" + year + + ", month=" + month + ", date=" + date + ", hrs=" + hrs + + ", min=" + min); + } + + Calendar cal = Calendar.getInstance(); + cal.set(year + 1900, month, date, hrs, min); + return cal.getTime(); + } + + /** + * Allocates a Date object and initializes it so that it represents the + * instant at the start of the second specified by the year, month, date, + * hrs, min, and sec arguments, in the local time zone. + * + * @param year + * @param month + * @param date + * @param hrs + * @param min + * @param sec + * @return + */ + public static Date get(int year, int month, int date, int hrs, int min, + int sec) { + if (log.isDebugEnabled()) { + log.debug("get(int, int, int, int, int, int) - : year=" + year + + ", month=" + month + ", date=" + date + ", hrs=" + hrs + + ", min=" + min + ", sec=" + sec); + } + + Calendar cal = Calendar.getInstance(); + cal.set(year + 1900, month, date, hrs, min, sec); + return cal.getTime(); + + } + + /** + * Allocates a Date object and initializes it so that it represents the + * instant at the start of the second specified by the year, month, date, + * hrs, min, sec and millisec arguments, in the local time zone. + * + * @param year + * @param month + * @param date + * @param hrs + * @param min + * @param sec + * @param millisec + * @return + */ + public static Date get(int year, int month, int date, int hrs, int min, + int sec, int millisec) { + if (log.isDebugEnabled()) { + log.debug("get(int, int, int, int, int, int) - : year=" + year + + ", month=" + month + ", date=" + date + ", hrs=" + hrs + + ", min=" + min + ", sec=" + sec + ", millisec=" + + millisec); + } + + Calendar cal = Calendar.getInstance(); + cal.set(year + 1900, month, date, hrs, min, sec); + cal.set(Calendar.MILLISECOND, millisec); + return cal.getTime(); + + } + + /** + * Returns a value that is the result of subtracting 1900 from the year that + * contains or begins with the instant in time represented by this Date + * object, as interpreted in the local time zone. + * + * @param d + * @return + */ + public static int getYear(Date d) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + return cal.get(Calendar.YEAR) - 1900; + } + + /** + * Returns a number representing the month that contains or begins with the + * instant in time represented by this Date object. The value returned is + * between 0 and 11, with the value 0 representing January. + * + * @param d + * @return + */ + public static int getMonth(Date d) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + return cal.get(Calendar.MONTH); + } + + /** + * Returns the day of the month represented by this Date object. The value + * returned is between 1 and 31 representing the day of the month that + * contains or begins with the instant in time represented by this Date + * object, as interpreted in the local time zone. + * + * @param d + * @return + */ + public static int getDate(Date d) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + return cal.get(Calendar.DAY_OF_MONTH); + } + + /** + * Returns the day of the week represented by this date. The returned value + * (0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = + * Friday, 6 = Saturday) represents the day of the week that contains or + * begins with the instant in time represented by this Date object, as + * interpreted in the local time zone. + * + * @param d + * @return + */ + public static int getDay(Date d) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + return cal.get(Calendar.DAY_OF_WEEK) - 1; + } + + /** + * Returns the hour represented by this Date object. The returned value is a + * number (0 through 23) representing the hour within the day that contains + * or begins with the instant in time represented by this Date object, as + * interpreted in the local time zone. + * + * @param d + * @return + */ + public static int getHours(Date d) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + return cal.get(Calendar.HOUR_OF_DAY); + } + + /** + * Returns the number of minutes past the hour represented by this date, as + * interpreted in the local time zone. The value returned is between 0 and + * 59. + * + * @param d + * @return + */ + public static int getMinutes(Date d) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + return cal.get(Calendar.MINUTE); + } + + /** + * Returns the number of seconds past the minute represented by this date. + * The value returned is between 0 and 61. The values 60 and 61 can only + * occur on those Java Virtual Machines that take leap seconds into account. + * + * @param d + * @return + */ + public static int getSeconds(Date d) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + return cal.get(Calendar.SECOND); + } + +} Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/DateUtil.java ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/LocaleUtil.java =================================================================== --- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/LocaleUtil.java 2007-04-21 21:10:25 UTC (rev 70) +++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/LocaleUtil.java 2007-04-21 21:12:29 UTC (rev 71) @@ -0,0 +1,113 @@ +/* + * Copyright 2004-2007 The Portal Application Laboratory Team. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package jp.sf.pal.common.util; + +import java.util.Locale; +import java.util.StringTokenizer; + +public class LocaleUtil { + private static final String DEFAULT_DELIM = "_"; + + public static Locale fallback(Locale locale1, Locale locale2) { + if (locale1 == null && locale2 == null) { + return null; + } + if ((locale1 == null && locale2 != null) + || (locale1 != null && locale2 == null)) { + return null; + } + if (locale1.equals(locale2)) { + return locale1; + } + + if (locale1.getLanguage() != null && locale1.getCountry() != null + && locale1.getLanguage().equals(locale2.getLanguage()) + && locale1.getCountry().equals(locale2.getCountry())) { + return new Locale(locale1.getLanguage(), locale2.getCountry()); + } + + if (locale1.getLanguage() != null + && locale1.getLanguage().equals(locale2.getLanguage())) { + return new Locale(locale1.getLanguage()); + } + + return null; + } + + public static String convert(Locale locale) { + return convert(locale, DEFAULT_DELIM); + } + + public static String convert(Locale locale, String delim) { + if (locale == null) { + return null; + } + String country = locale.getCountry(); + String language = locale.getLanguage(); + String variant = locale.getVariant(); + StringBuffer buffer = new StringBuffer(40); + if (language != null) { + buffer.append(language); + } + buffer.append(delim); + + if (country != null) { + buffer.append(country); + } + buffer.append(delim); + + if (variant != null) { + buffer.append(variant); + } + + return buffer.toString().trim(); + } + + public static Locale convert(String localeString) { + return convert(localeString, DEFAULT_DELIM); + } + + public static Locale convert(String localeString, String delim) { + if (localeString == null) { + return null; + } + StringTokenizer tokenizer = new StringTokenizer(localeString, + DEFAULT_DELIM); + + String language = tokenizer.nextToken().trim(); + String country = null; + String variant = null; + if (tokenizer.hasMoreTokens()) { + country = tokenizer.nextToken().trim(); + } + + if (tokenizer.hasMoreTokens()) { + variant = tokenizer.nextToken().trim(); + } + + if (country != null && language != null && variant != null) { + return new Locale(language, country, variant); + } else if (country != null && language != null) { + return new Locale(language, country); + } else if (language != null) { + return new Locale(language, ""); // JDK 1.3 compatibility + } else { + return null; + } + + } + +} Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/LocaleUtil.java ___________________________________________________________________ Name: svn:eol-style + native