< prev index next >

make/jdk/src/classes/build/tools/cldrconverter/LDMLParseHandler.java

Print this page
rev 55871 : 8215181: Accounting currency format support
Reviewed-by:
   1 /*
   2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 579                             break;
 580                         default:
 581                             pushIgnoredContainer(qName);
 582                             break;
 583                     }
 584                 }
 585             } else {
 586                 pushContainer(qName, attributes);
 587             }
 588             break;
 589         case "currencyFormatLength":
 590             if (attributes.getValue("type") == null) {
 591                 // skipping type="short" data
 592                 // for FormatData
 593                 pushContainer(qName, attributes);
 594             } else {
 595                 pushIgnoredContainer(qName);
 596             }
 597             break;
 598         case "currencyFormat":

 599             // for FormatData
 600             // copy string for later assembly into NumberPatterns
 601             if (attributes.getValue("type").equals("standard")) {

 602             pushStringEntry(qName, attributes, "NumberPatterns/currency");


 603             } else {
 604                 pushIgnoredContainer(qName);
 605             }

 606             break;
 607         case "percentFormat":
 608             // for FormatData
 609             // copy string for later assembly into NumberPatterns
 610             if (attributes.getValue("type").equals("standard")) {
 611             pushStringEntry(qName, attributes, "NumberPatterns/percent");
 612             } else {
 613                 pushIgnoredContainer(qName);
 614             }
 615             break;
 616         case "defaultNumberingSystem":
 617             // default numbering system if multiple numbering systems are used.
 618             pushStringEntry(qName, attributes, "DefaultNumberingSystem");
 619             break;
 620         case "symbols":
 621             // for FormatData
 622             // look up numberingSystems
 623             symbols: {
 624                 String script = attributes.getValue("numberSystem");
 625                 if (script == null) {


   1 /*
   2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 579                             break;
 580                         default:
 581                             pushIgnoredContainer(qName);
 582                             break;
 583                     }
 584                 }
 585             } else {
 586                 pushContainer(qName, attributes);
 587             }
 588             break;
 589         case "currencyFormatLength":
 590             if (attributes.getValue("type") == null) {
 591                 // skipping type="short" data
 592                 // for FormatData
 593                 pushContainer(qName, attributes);
 594             } else {
 595                 pushIgnoredContainer(qName);
 596             }
 597             break;
 598         case "currencyFormat":
 599             {
 600                 // for FormatData
 601                 // copy string for later assembly into NumberPatterns
 602                 String cfStyle = attributes.getValue("type");
 603                 if (cfStyle.equals("standard")) {
 604                     pushStringEntry(qName, attributes, "NumberPatterns/currency");
 605                 } else if (cfStyle.equals("accounting")) {
 606                     pushStringEntry(qName, attributes, "NumberPatterns/accounting");
 607                 } else {
 608                     pushIgnoredContainer(qName);
 609                 }
 610             }
 611             break;
 612         case "percentFormat":
 613             // for FormatData
 614             // copy string for later assembly into NumberPatterns
 615             if (attributes.getValue("type").equals("standard")) {
 616                 pushStringEntry(qName, attributes, "NumberPatterns/percent");
 617             } else {
 618                 pushIgnoredContainer(qName);
 619             }
 620             break;
 621         case "defaultNumberingSystem":
 622             // default numbering system if multiple numbering systems are used.
 623             pushStringEntry(qName, attributes, "DefaultNumberingSystem");
 624             break;
 625         case "symbols":
 626             // for FormatData
 627             // look up numberingSystems
 628             symbols: {
 629                 String script = attributes.getValue("numberSystem");
 630                 if (script == null) {


< prev index next >