]> granicus.if.org Git - icu/commitdiff
ICU-8991 A new tool for building ISO 4217 currency numeric code mapping data.
authorYoshito Umaoka <y.umaoka@gmail.com>
Fri, 20 Jan 2012 05:23:37 +0000 (05:23 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Fri, 20 Jan 2012 05:23:37 +0000 (05:23 +0000)
X-SVN-Rev: 31235

.gitattributes
tools/currency/.classpath [new file with mode: 0644]
tools/currency/.project [new file with mode: 0644]
tools/currency/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
tools/currency/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
tools/currency/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
tools/currency/src/com/ibm/icu/dev/tool/currency/CurrencyDataEntry.java [new file with mode: 0644]
tools/currency/src/com/ibm/icu/dev/tool/currency/CurrencyDataParser.java [new file with mode: 0644]
tools/currency/src/com/ibm/icu/dev/tool/currency/Main.java [new file with mode: 0644]
tools/currency/src/com/ibm/icu/dev/tool/currency/NumericCodeData.java [new file with mode: 0644]

index c0bb002ff5cf3857859b35ca882fa167d3b564ad..ac9eec4caea83e82026fd08ace32ac96eebea4a3 100644 (file)
@@ -728,6 +728,11 @@ icu4j/tools/build/icu4j48.api2.gz -text
 icu4j/tools/build/manifest.stub -text
 icu4j/tools/misc/.settings/org.eclipse.core.resources.prefs -text
 icu4j/tools/misc/manifest.stub -text
+tools/currency/.classpath -text
+tools/currency/.project -text
+tools/currency/.settings/org.eclipse.core.resources.prefs -text
+tools/currency/.settings/org.eclipse.jdt.core.prefs -text
+tools/currency/.settings/org.eclipse.jdt.ui.prefs -text
 tools/multi/c/Makefile-c.inc -text
 tools/multi/c/patch/3_0 -text
 tools/multi/c/patch/3_2 -text
diff --git a/tools/currency/.classpath b/tools/currency/.classpath
new file mode 100644 (file)
index 0000000..17d748d
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+       <classpathentry kind="src" path="src"/>\r
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>\r
+       <classpathentry kind="output" path="out/bin"/>\r
+</classpath>\r
diff --git a/tools/currency/.project b/tools/currency/.project
new file mode 100644 (file)
index 0000000..d380ad1
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>currency-numeric</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.jdt.core.javabuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.jdt.core.javanature</nature>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/tools/currency/.settings/org.eclipse.core.resources.prefs b/tools/currency/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..2201c34
--- /dev/null
@@ -0,0 +1,3 @@
+#Fri Jan 20 00:09:53 EST 2012\r
+eclipse.preferences.version=1\r
+encoding/<project>=UTF-8\r
diff --git a/tools/currency/.settings/org.eclipse.jdt.core.prefs b/tools/currency/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..1dc7e58
--- /dev/null
@@ -0,0 +1,347 @@
+#Thu Jan 19 10:20:40 EST 2012\r
+eclipse.preferences.version=1\r
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6\r
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve\r
+org.eclipse.jdt.core.compiler.compliance=1.6\r
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate\r
+org.eclipse.jdt.core.compiler.debug.localVariable=generate\r
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate\r
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning\r
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore\r
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning\r
+org.eclipse.jdt.core.compiler.problem.deadCode=warning\r
+org.eclipse.jdt.core.compiler.problem.deprecation=warning\r
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled\r
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled\r
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning\r
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore\r
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning\r
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled\r
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore\r
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning\r
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning\r
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error\r
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning\r
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning\r
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore\r
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore\r
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore\r
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning\r
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore\r
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore\r
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore\r
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning\r
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore\r
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning\r
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning\r
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore\r
+org.eclipse.jdt.core.compiler.problem.nullReference=warning\r
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning\r
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore\r
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore\r
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore\r
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning\r
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore\r
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore\r
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled\r
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning\r
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled\r
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore\r
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning\r
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning\r
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore\r
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning\r
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore\r
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore\r
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore\r
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore\r
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled\r
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled\r
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled\r
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning\r
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning\r
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning\r
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore\r
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled\r
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled\r
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled\r
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning\r
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning\r
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning\r
+org.eclipse.jdt.core.compiler.source=1.6\r
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false\r
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16\r
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0\r
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16\r
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16\r
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16\r
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16\r
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0\r
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16\r
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16\r
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80\r
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0\r
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16\r
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0\r
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16\r
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16\r
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16\r
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16\r
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16\r
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16\r
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16\r
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16\r
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16\r
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1\r
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1\r
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0\r
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0\r
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1\r
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1\r
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1\r
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1\r
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0\r
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1\r
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1\r
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line\r
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line\r
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false\r
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false\r
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true\r
+org.eclipse.jdt.core.formatter.comment.format_header=false\r
+org.eclipse.jdt.core.formatter.comment.format_html=true\r
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true\r
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true\r
+org.eclipse.jdt.core.formatter.comment.format_source_code=true\r
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true\r
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true\r
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert\r
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert\r
+org.eclipse.jdt.core.formatter.comment.line_length=120\r
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true\r
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true\r
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false\r
+org.eclipse.jdt.core.formatter.compact_else_if=true\r
+org.eclipse.jdt.core.formatter.continuation_indentation=2\r
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2\r
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off\r
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on\r
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false\r
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true\r
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true\r
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true\r
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true\r
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true\r
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true\r
+org.eclipse.jdt.core.formatter.indent_empty_lines=false\r
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true\r
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true\r
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true\r
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false\r
+org.eclipse.jdt.core.formatter.indentation.size=4\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert\r
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert\r
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert\r
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert\r
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true\r
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true\r
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false\r
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false\r
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false\r
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false\r
+org.eclipse.jdt.core.formatter.lineSplit=120\r
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false\r
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false\r
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0\r
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1\r
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true\r
+org.eclipse.jdt.core.formatter.tabulation.char=space\r
+org.eclipse.jdt.core.formatter.tabulation.size=4\r
+org.eclipse.jdt.core.formatter.use_on_off_tags=false\r
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false\r
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true\r
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true\r
diff --git a/tools/currency/.settings/org.eclipse.jdt.ui.prefs b/tools/currency/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..72fef40
--- /dev/null
@@ -0,0 +1,10 @@
+#Thu Jan 19 10:20:39 EST 2012\r
+eclipse.preferences.version=1\r
+formatter_profile=_ICU4J Standard\r
+formatter_settings_version=12\r
+org.eclipse.jdt.ui.ignorelowercasenames=true\r
+org.eclipse.jdt.ui.importorder=java;javax;org;com;\r
+org.eclipse.jdt.ui.javadoc=true\r
+org.eclipse.jdt.ui.ondemandthreshold=99\r
+org.eclipse.jdt.ui.staticondemandthreshold=99\r
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n *******************************************************************************\r\n * Copyright (C) ${year}, International Business Machines Corporation and         *\r\n * others. All Rights Reserved.                                                *\r\n *******************************************************************************\r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>\r
diff --git a/tools/currency/src/com/ibm/icu/dev/tool/currency/CurrencyDataEntry.java b/tools/currency/src/com/ibm/icu/dev/tool/currency/CurrencyDataEntry.java
new file mode 100644 (file)
index 0000000..69dfc40
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 2012, International Business Machines Corporation and         *
+ * others. All Rights Reserved.                                                *
+ *******************************************************************************
+ */
+package com.ibm.icu.dev.tool.currency;
+
+/**
+ * Currency data entry corresponding to the XML data distributed by SIX Interbank Clearing
+ * (The ISO 4217 maintenance agency).
+ */
+public class CurrencyDataEntry {
+    private String entity;
+    private String currency;
+    private String alphabeticCode;
+    private Integer numericCode;
+    private Integer minorUnit;
+    private String withdrawalDate;
+    private String remark;
+    private boolean historic;
+
+    private CurrencyDataEntry(String entity, String currency, String alphabeticCode, Integer numericCode, Integer minorUnit, String withdrawalDate, String remark, boolean historic) {
+        this.entity = entity;
+        this.currency = currency;
+        this.alphabeticCode = alphabeticCode;
+        this.numericCode = numericCode;
+        this.minorUnit = minorUnit;
+        this.withdrawalDate = withdrawalDate;
+        this.remark = remark;
+        this.historic = historic;
+    }
+
+    public String entity() {
+        return entity;
+    }
+
+    public String currency() {
+        return currency;
+    }
+
+    public String alphabeticCode() {
+        return alphabeticCode;
+    }
+
+    public Integer numericCode() {
+        return numericCode;
+    }
+
+    public Integer minorUnit() {
+        return minorUnit;
+    }
+
+    public String withdrawalDate() {
+        return withdrawalDate;
+    }
+
+    public String remark() {
+        return remark;
+    }
+
+    public boolean historic() {
+        return historic;
+    }
+
+    public static class Builder {
+        private String entity_;
+        private String currency_;
+        private String alphabeticCode_;
+        private Integer numericCode_;
+        private Integer minorUnit_;
+
+        private String withdrawalDate_;
+        private String remark_;
+        private boolean historic_ = false;
+
+        public Builder setEntity(String entity) {
+            entity_ = entity;
+            return this;
+        }
+
+        public Builder setCurrency(String currency) {
+            currency_ = currency;
+            return this;
+        }
+
+        public Builder setAlphabeticCode(String alphabeticCode) {
+            alphabeticCode_ = alphabeticCode;
+            return this;
+        }
+
+        public Builder setNumericCode(String numericCode) {
+            try {
+                numericCode_ = Integer.parseInt(numericCode);
+            } catch (NumberFormatException e) {
+                // ignore
+            }
+            return this;
+        }
+
+        public Builder setMinorUnit(String minorUnit) {
+            try {
+                minorUnit_ = Integer.parseInt(minorUnit);
+            } catch (NumberFormatException e) {
+                // ignore
+            }
+            return this;
+        }
+
+        public Builder setWithdrawalDate(String withdrawalDate) {
+            withdrawalDate_ = withdrawalDate;
+            return this;
+        }
+
+        public Builder setRemark(String remark) {
+            remark_ = remark;
+            return this;
+        }
+
+        public Builder setHistoric() {
+            historic_ = true;
+            return this;
+        }
+
+        public CurrencyDataEntry build() {
+            return new CurrencyDataEntry(entity_, currency_, alphabeticCode_, numericCode_, minorUnit_, withdrawalDate_, remark_, historic_);
+        }
+
+        public Builder reset() {
+            entity_ = null;
+            currency_ = null;
+            alphabeticCode_ = null;
+            numericCode_ = null;
+            minorUnit_ = null;
+            withdrawalDate_ = null;
+            remark_ = null;
+            historic_ = false;
+            return this;
+        }
+    }
+}
diff --git a/tools/currency/src/com/ibm/icu/dev/tool/currency/CurrencyDataParser.java b/tools/currency/src/com/ibm/icu/dev/tool/currency/CurrencyDataParser.java
new file mode 100644 (file)
index 0000000..ad73d00
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 2012, International Business Machines Corporation and         *
+ * others. All Rights Reserved.                                                *
+ *******************************************************************************
+ */
+package com.ibm.icu.dev.tool.currency;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.LinkedList;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import com.ibm.icu.dev.tool.currency.CurrencyDataEntry.Builder;
+
+/**
+ * Parser for ISO 4217 data file in XML format distributed by SIX Interbank Clearing
+ * (The ISO 4217 maintenance agency).
+ */
+public class CurrencyDataParser {
+
+    public static Collection<CurrencyDataEntry> parse(File dataFile, boolean historic) throws IOException {
+        Collection<CurrencyDataEntry> result = null;
+        try {
+            SAXParserFactory factory = SAXParserFactory.newInstance();
+            SAXParser parser;
+            parser = factory.newSAXParser();
+            Handler handler = new Handler(historic);
+            parser.parse(new FileInputStream(dataFile), handler);
+            result = handler.getParsedISOCurrencies();
+        } catch (SAXException e) {
+            throw new RuntimeException(e);
+        } catch (ParserConfigurationException e) {
+            throw new RuntimeException(e);
+        }
+        return result;
+    }
+
+    private static class Handler extends DefaultHandler {
+        private enum ElementType {
+            ENTITY,
+            CURRENCY,
+            ALPHABETIC_CODE,
+            NUMERIC_CODE,
+            MINOR_UNIT,
+            WITHDRAWAL_DATE,
+            REMARK,
+            OTHER
+        };
+
+        Collection<CurrencyDataEntry> isoCurrencies = new LinkedList<CurrencyDataEntry>();
+        ElementType elem = ElementType.OTHER;
+        Builder currBld = new Builder();
+
+        private final boolean historic;
+        private final String currElemName;
+
+        public Handler(boolean historic) {
+            this.historic = historic;
+            currElemName = historic ? "ISO_CURRENCY_HISTORIC" : "ISO_CURRENCY";
+        }
+
+        public Collection<CurrencyDataEntry> getParsedISOCurrencies() {
+            return isoCurrencies;
+        }
+
+        public void startElement(String uri, String localName, String qName, Attributes attributes) {
+            if (qName.equals(currElemName)) {
+                currBld.reset();
+                elem = ElementType.OTHER;
+            } else {
+                try {
+                    elem = ElementType.valueOf(qName);
+                } catch (IllegalArgumentException e) {
+                    elem = ElementType.OTHER;
+                }
+            }
+        }
+
+        public void endElement(String uri, String localName, String qName) {
+            // emit a currency data
+            if (qName.equals(currElemName)) {
+                if (historic) {
+                    currBld.setHistoric();
+                }
+                isoCurrencies.add(currBld.build());
+                currBld.reset();
+            }
+            elem = ElementType.OTHER;
+        }
+
+        public void characters(char[] ch, int start, int length) {
+            switch (elem) {
+            case ENTITY:
+                currBld.setEntity(new String(ch, start, length).trim());
+                break;
+            case CURRENCY:
+                currBld.setCurrency(new String(ch, start, length).trim());
+                break;
+            case ALPHABETIC_CODE:
+                currBld.setAlphabeticCode(new String(ch, start, length).trim());
+                break;
+            case NUMERIC_CODE:
+                currBld.setNumericCode(new String(ch, start, length).trim());
+                break;
+            case MINOR_UNIT:
+                currBld.setMinorUnit(new String(ch, start, length).trim());
+                break;
+            case WITHDRAWAL_DATE:
+                currBld.setWithdrawalDate(new String(ch, start, length).trim());
+                break;
+            case REMARK:
+                currBld.setRemark(new String(ch, start, length).trim());
+                break;
+            default:
+                // NOOP
+                break;
+            }
+        }
+    }
+}
diff --git a/tools/currency/src/com/ibm/icu/dev/tool/currency/Main.java b/tools/currency/src/com/ibm/icu/dev/tool/currency/Main.java
new file mode 100644 (file)
index 0000000..6bbc1b6
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 2012, International Business Machines Corporation and         *
+ * others. All Rights Reserved.                                                *
+ *******************************************************************************
+ */
+package com.ibm.icu.dev.tool.currency;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.Collection;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.TreeSet;
+
+/**
+ * The tool used for ISO 4217 alpha3-numeric3 code mapping data maintenance.
+ * This code is used for synchronizing ICU alpha3-numeric3 mapping data with
+ * the data distributed by SIX Interbank Clearing.
+ */
+public class Main {
+    private enum Command {
+        CHECK,
+        PRINT,
+        BUILD,
+    };
+
+    private static final String RESNAME = "currencyNumericCodes";
+
+    public static void main(String... args) {
+        if (args.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        Command cmd = null;
+
+        // 1st argument must be command
+        if (args[0].equalsIgnoreCase(Command.CHECK.name())) {
+            if (args.length == 3) {
+                cmd = Command.CHECK;
+            }
+        } else if (args[0].equalsIgnoreCase(Command.PRINT.name())) {
+            if (args.length == 3) {
+                cmd = Command.PRINT;
+            }
+        } else if (args[0].equalsIgnoreCase(Command.BUILD.name())) {
+            if (args.length == 2) {
+                cmd = Command.BUILD;
+            }
+        }
+
+        if (cmd == null) {
+            printUsage();
+            System.exit(1);
+        }
+        int status = 0;
+
+        if (cmd == Command.BUILD) {
+            File outfile = new File(args[1], RESNAME + ".txt");
+            try {
+                OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(outfile), "UTF-8");
+                NumericCodeData.getDefaultInstance().writeResource(osw, RESNAME);
+            } catch (IOException e) {
+                e.printStackTrace();
+                status = 1;
+            }
+        } else {
+            // 2nd argument is current data xml file
+            // 3rd argument is historic data xml file
+            File currentXml = new File(args[1]);
+            File historicXml = new File(args[2]);
+            Collection<CurrencyDataEntry> currentDataEntries = null;
+            Collection<CurrencyDataEntry> historicDataEntries = null;
+
+            try {
+                currentDataEntries = CurrencyDataParser.parse(currentXml, false);
+                historicDataEntries = CurrencyDataParser.parse(historicXml, true);
+            } catch (IOException e) {
+                e.printStackTrace();
+                status = 1;
+            }
+
+            if (status == 0) {
+                NumericCodeData numCodeData = NumericCodeData.createInstance(currentDataEntries);
+                numCodeData.merge(NumericCodeData.createInstance(historicDataEntries));
+
+                if (cmd == Command.PRINT) {
+                    numCodeData.printArray();
+                } else {
+                    assert(cmd == Command.CHECK);
+                    boolean isOK = checkData(numCodeData);
+                    if (isOK) {
+                        System.out.println("[OK] ICU data is synchronized with the reference data");
+                    } else {
+                        status = 1;
+                    }
+                }
+            }
+        }
+
+        System.exit(status);
+    }
+
+    private static void printUsage() {
+        System.out.println("[Usage]");
+        System.out.println("");
+        System.out.println("  1) java com.ibm.icu.dev.tool.currency.Main check <currentXML> <historicXML>");
+        System.out.println("");
+        System.out.println("  Verifies the ICU data (table in NumericCodeData) with the reference data.");
+        System.out.println("");
+        System.out.println("  Argument(s):");
+        System.out.println("    <currentXML>  - Current currencies & funds data (Table A.1) in XML format");
+        System.out.println("    <historicXML> - Historic denominations data (Table A.3) in XML format");
+        System.out.println("");
+        System.out.println("  2) java com.ibm.icu.dev.tool.currency.Main print <currentXML> <historicXML>");
+        System.out.println("");
+        System.out.println("  Prints out the alpha-numeric code mapping imported from the reference data.");
+        System.out.println("");
+        System.out.println("  Argument(s):");
+        System.out.println("    <currentXML>  - Current currencies & funds data (Table A.1) in XML format");
+        System.out.println("    <historicXML> - Historic denominations data (Table A.3) in XML format");
+        System.out.println("");
+        System.out.println("  3) java com.ibm.icu.dev.tool.currency.Main build <outtxt>");
+        System.out.println("");
+        System.out.println("  Writes out the alpha-numeric in NumericCodeData into ICU resource bundle source");
+        System.out.println("  (.txt) format.");
+        System.out.println("");
+        System.out.println("  Argument(s):");
+        System.out.println("    <outdir>      - Output directory of the ICU resource bundle source (.txt) format");
+        System.out.println("");
+        System.out.println("[Note]");
+        System.out.println("  Reference XML files are distributed by the ISO 4217 maintenance agency at");
+        System.out.println("  [http://www.currency-iso.org/iso_index/iso_tables.htm].");
+    }
+
+    private static boolean checkData(NumericCodeData refData) {
+        boolean isOK = true;
+
+        SortedMap<String, String> icuMap = NumericCodeData.getDefaultInstance().getAlphaNumericCodeMap();
+        SortedMap<String, String> refMap = refData.getAlphaNumericCodeMap();
+
+        for (Entry<String, String> refEntry : refMap.entrySet()) {
+            String refAlpha = refEntry.getKey();
+            String refNumeric = refEntry.getValue();
+
+            String icuNumeric = icuMap.get(refAlpha);
+            if (icuNumeric == null) {
+                System.out.println("Missing alpha code in ICU map [" + refAlpha + "]");
+                isOK = false;
+            } else if (!icuNumeric.equals(refNumeric)) {
+                System.out.println("Numeric code mismatch [" + refAlpha + "] ICU=" + icuNumeric + " - Reference=" + refNumeric);
+                isOK = false;
+            }
+        }
+
+        Set<String> icuKeySet = icuMap.keySet();
+        Set<String> refKeySet = refMap.keySet();
+        if (!refKeySet.containsAll(icuKeySet)) {
+            isOK = false;
+            Set<String> tmp = new TreeSet<String>(icuKeySet);
+            tmp.removeAll(refKeySet);
+
+            StringBuilder buf = new StringBuilder();
+            for (String alpha : tmp) {
+                if (buf.length() != 0) {
+                    buf.append(", ");
+                }
+                buf.append(alpha);
+            }
+            
+            System.out.println("Codes not found in the reference data: " + buf);
+        }
+
+        return isOK;
+    }
+}
diff --git a/tools/currency/src/com/ibm/icu/dev/tool/currency/NumericCodeData.java b/tools/currency/src/com/ibm/icu/dev/tool/currency/NumericCodeData.java
new file mode 100644 (file)
index 0000000..15ddaf6
--- /dev/null
@@ -0,0 +1,374 @@
+/*
+ *******************************************************************************
+ * Copyright (C) 2012, International Business Machines Corporation and         *
+ * others. All Rights Reserved.                                                *
+ *******************************************************************************
+ */
+package com.ibm.icu.dev.tool.currency;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.GregorianCalendar;
+import java.util.Map.Entry;
+import java.util.SortedMap;
+import java.util.TimeZone;
+import java.util.TreeMap;
+
+/**
+ * Container of ISO 4217 alpha3 - numeric3 code mapping data
+ */
+public class NumericCodeData {
+    private SortedMap<String, String> _codeMap;
+
+    private NumericCodeData(SortedMap<String, String> codeMap) {
+        _codeMap = codeMap;
+    }
+
+    public static NumericCodeData getDefaultInstance() {
+        SortedMap<String, String> map = new TreeMap<String, String>();
+        for (String[] dataEntry : CODE_MAP_DATA) {
+            map.put(dataEntry[0], dataEntry[1]);
+        }
+        return new NumericCodeData(map);
+    }
+
+    public static NumericCodeData createInstance(Collection<CurrencyDataEntry> dataEntries) {
+        SortedMap<String, String> map = new TreeMap<String, String>();
+        for (CurrencyDataEntry dataEntry : dataEntries) {
+            String alphaCode = dataEntry.alphabeticCode();
+            Integer numCode = dataEntry.numericCode();
+            if (alphaCode == null || numCode == null) {
+                continue;
+            }
+            map.put(alphaCode, String.format("%03d", numCode));
+        }
+        return new NumericCodeData(map);
+    }
+
+    public NumericCodeData merge(NumericCodeData anotherData) {
+        SortedMap<String, String> codeMap = anotherData.getAlphaNumericCodeMap();
+        for (Entry<String, String> codeMapEntry : codeMap.entrySet()) {
+            String alphaCode = codeMapEntry.getKey();
+            String numCode = codeMapEntry.getValue();
+            if (!_codeMap.containsKey(alphaCode)) {
+                _codeMap.put(alphaCode, numCode);
+            } else {
+                String existingValue = _codeMap.get(alphaCode);
+                if (!existingValue.equals(numCode)) {
+                    throw new RuntimeException("Duplicated definition for " + alphaCode + ": value=" + existingValue + "/another value=" + numCode);
+                }
+            }
+        }
+        return this;
+    }
+
+    public SortedMap<String, String> getAlphaNumericCodeMap() {
+        return Collections.unmodifiableSortedMap(_codeMap);
+    }
+
+    public void printArray() {
+        for (Entry<String, String> entry : getAlphaNumericCodeMap().entrySet()) {
+            System.out.println("        {\"" + entry.getKey() + "\", \"" + entry.getValue() + "\"},");
+        }
+    }
+
+    public void writeResource(OutputStreamWriter osw, String resName) throws IOException {
+        GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
+
+        PrintWriter pw = new PrintWriter(osw, true);
+
+        // Header
+        pw.println("//---------------------------------------------------------");
+        pw.println(String.format("// Copyright (C) %1$tY, International Business Machines", cal));
+        pw.println("// Corporation and others.  All Rights Reserved.");
+        pw.println("//---------------------------------------------------------");
+        pw.println("// Build tool: com.ibm.icu.dev.tool.currency.NumericCodeData");
+        pw.println(String.format("// Build date: %1$tFT%1$tTZ", cal));
+        pw.println("//---------------------------------------------------------");
+        pw.println("// >> !!! >>   THIS IS A MACHINE-GENERATED FILE   << !!! <<");
+        pw.println("// >> !!! >>>            DO NOT EDIT             <<< !!! <<");
+        pw.println("//---------------------------------------------------------");
+        pw.println("");
+
+        // Resource root
+        pw.println(resName + ":table(nofallback){");
+
+        // Map data
+        pw.println("    codeMap{");
+
+        for (Entry<String, String> mapEntry : _codeMap.entrySet()) {
+            String alphaCode = mapEntry.getKey();
+            int numericCodeVal = Integer.parseInt(mapEntry.getValue());
+            pw.println(String.format("        %1$s:int{%2$d}", alphaCode, numericCodeVal));
+        }
+
+        pw.println("    }");
+
+        pw.println("}");
+    }
+
+    private static final String[][] CODE_MAP_DATA = {
+        {"ADP", "020"},
+        {"AED", "784"},
+        {"AFA", "004"},
+        {"AFN", "971"},
+        {"ALL", "008"},
+        {"AMD", "051"},
+        {"ANG", "532"},
+        {"AOA", "973"},
+        {"AON", "024"},
+        {"AOR", "982"},
+        {"ARA", "032"},
+        {"ARP", "032"},
+        {"ARS", "032"},
+        {"ATS", "040"},
+        {"AUD", "036"},
+        {"AWG", "533"},
+        {"AYM", "945"},
+        {"AZM", "031"},
+        {"AZN", "944"},
+        {"BAD", "070"},
+        {"BAM", "977"},
+        {"BBD", "052"},
+        {"BDT", "050"},
+        {"BEC", "993"},
+        {"BEF", "056"},
+        {"BEL", "992"},
+        {"BGL", "100"},
+        {"BGN", "975"},
+        {"BHD", "048"},
+        {"BIF", "108"},
+        {"BMD", "060"},
+        {"BND", "096"},
+        {"BOB", "068"},
+        {"BOV", "984"},
+        {"BRC", "076"},
+        {"BRE", "076"},
+        {"BRL", "986"},
+        {"BRN", "076"},
+        {"BRR", "987"},
+        {"BSD", "044"},
+        {"BTN", "064"},
+        {"BWP", "072"},
+        {"BYB", "112"},
+        {"BYR", "974"},
+        {"BZD", "084"},
+        {"CAD", "124"},
+        {"CDF", "976"},
+        {"CHC", "948"},
+        {"CHE", "947"},
+        {"CHF", "756"},
+        {"CHW", "948"},
+        {"CLF", "990"},
+        {"CLP", "152"},
+        {"CNY", "156"},
+        {"COP", "170"},
+        {"COU", "970"},
+        {"CRC", "188"},
+        {"CSD", "891"},
+        {"CSK", "200"},
+        {"CUC", "931"},
+        {"CUP", "192"},
+        {"CVE", "132"},
+        {"CYP", "196"},
+        {"CZK", "203"},
+        {"DDM", "278"},
+        {"DEM", "276"},
+        {"DJF", "262"},
+        {"DKK", "208"},
+        {"DOP", "214"},
+        {"DZD", "012"},
+        {"ECS", "218"},
+        {"ECV", "983"},
+        {"EEK", "233"},
+        {"EGP", "818"},
+        {"ERN", "232"},
+        {"ESA", "996"},
+        {"ESB", "995"},
+        {"ESP", "724"},
+        {"ETB", "230"},
+        {"EUR", "978"},
+        {"FIM", "246"},
+        {"FJD", "242"},
+        {"FKP", "238"},
+        {"FRF", "250"},
+        {"GBP", "826"},
+        {"GEK", "268"},
+        {"GEL", "981"},
+        {"GHC", "288"},
+        {"GHP", "939"},
+        {"GHS", "936"},
+        {"GIP", "292"},
+        {"GMD", "270"},
+        {"GNF", "324"},
+        {"GQE", "226"},
+        {"GRD", "300"},
+        {"GTQ", "320"},
+        {"GWP", "624"},
+        {"GYD", "328"},
+        {"HKD", "344"},
+        {"HNL", "340"},
+        {"HRD", "191"},
+        {"HRK", "191"},
+        {"HTG", "332"},
+        {"HUF", "348"},
+        {"IDR", "360"},
+        {"IEP", "372"},
+        {"ILS", "376"},
+        {"INR", "356"},
+        {"IQD", "368"},
+        {"IRR", "364"},
+        {"ISK", "352"},
+        {"ITL", "380"},
+        {"JMD", "388"},
+        {"JOD", "400"},
+        {"JPY", "392"},
+        {"KES", "404"},
+        {"KGS", "417"},
+        {"KHR", "116"},
+        {"KMF", "174"},
+        {"KPW", "408"},
+        {"KRW", "410"},
+        {"KWD", "414"},
+        {"KYD", "136"},
+        {"KZT", "398"},
+        {"LAK", "418"},
+        {"LBP", "422"},
+        {"LKR", "144"},
+        {"LRD", "430"},
+        {"LSL", "426"},
+        {"LTL", "440"},
+        {"LTT", "440"},
+        {"LUC", "989"},
+        {"LUF", "442"},
+        {"LUL", "988"},
+        {"LVL", "428"},
+        {"LVR", "428"},
+        {"LYD", "434"},
+        {"MAD", "504"},
+        {"MDL", "498"},
+        {"MGA", "969"},
+        {"MGF", "450"},
+        {"MKD", "807"},
+        {"MLF", "466"},
+        {"MMK", "104"},
+        {"MNT", "496"},
+        {"MOP", "446"},
+        {"MRO", "478"},
+        {"MTL", "470"},
+        {"MUR", "480"},
+        {"MVR", "462"},
+        {"MWK", "454"},
+        {"MXN", "484"},
+        {"MXV", "979"},
+        {"MYR", "458"},
+        {"MZM", "508"},
+        {"MZN", "943"},
+        {"NAD", "516"},
+        {"NGN", "566"},
+        {"NIO", "558"},
+        {"NLG", "528"},
+        {"NOK", "578"},
+        {"NPR", "524"},
+        {"NZD", "554"},
+        {"OMR", "512"},
+        {"PAB", "590"},
+        {"PEI", "604"},
+        {"PEN", "604"},
+        {"PES", "604"},
+        {"PGK", "598"},
+        {"PHP", "608"},
+        {"PKR", "586"},
+        {"PLN", "985"},
+        {"PLZ", "616"},
+        {"PTE", "620"},
+        {"PYG", "600"},
+        {"QAR", "634"},
+        {"ROL", "642"},
+        {"RON", "946"},
+        {"RSD", "941"},
+        {"RUB", "643"},
+        {"RUR", "810"},
+        {"RWF", "646"},
+        {"SAR", "682"},
+        {"SBD", "090"},
+        {"SCR", "690"},
+        {"SDD", "736"},
+        {"SDG", "938"},
+        {"SEK", "752"},
+        {"SGD", "702"},
+        {"SHP", "654"},
+        {"SIT", "705"},
+        {"SKK", "703"},
+        {"SLL", "694"},
+        {"SOS", "706"},
+        {"SRD", "968"},
+        {"SRG", "740"},
+        {"SSP", "728"},
+        {"STD", "678"},
+        {"SVC", "222"},
+        {"SYP", "760"},
+        {"SZL", "748"},
+        {"THB", "764"},
+        {"TJR", "762"},
+        {"TJS", "972"},
+        {"TMM", "795"},
+        {"TMT", "934"},
+        {"TND", "788"},
+        {"TOP", "776"},
+        {"TPE", "626"},
+        {"TRL", "792"},
+        {"TRY", "949"},
+        {"TTD", "780"},
+        {"TWD", "901"},
+        {"TZS", "834"},
+        {"UAH", "980"},
+        {"UAK", "804"},
+        {"UGX", "800"},
+        {"USD", "840"},
+        {"USN", "997"},
+        {"USS", "998"},
+        {"UYI", "940"},
+        {"UYU", "858"},
+        {"UZS", "860"},
+        {"VEB", "862"},
+        {"VEF", "937"},
+        {"VND", "704"},
+        {"VUV", "548"},
+        {"WST", "882"},
+        {"XAF", "950"},
+        {"XAG", "961"},
+        {"XAU", "959"},
+        {"XBA", "955"},
+        {"XBB", "956"},
+        {"XBC", "957"},
+        {"XBD", "958"},
+        {"XCD", "951"},
+        {"XDR", "960"},
+        {"XEU", "954"},
+        {"XOF", "952"},
+        {"XPD", "964"},
+        {"XPF", "953"},
+        {"XPT", "962"},
+        {"XSU", "994"},
+        {"XTS", "963"},
+        {"XUA", "965"},
+        {"XXX", "999"},
+        {"YDD", "720"},
+        {"YER", "886"},
+        {"YUM", "891"},
+        {"YUN", "890"},
+        {"ZAL", "991"},
+        {"ZAR", "710"},
+        {"ZMK", "894"},
+        {"ZRN", "180"},
+        {"ZRZ", "180"},
+        {"ZWD", "716"},
+        {"ZWL", "932"},
+        {"ZWN", "942"},
+        {"ZWR", "935"},
+    };
+}