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
627 if (script == null) {
628 // Has no script. Just ignore.
629 pushIgnoredContainer(qName);
630 break;
631 }
632
633 // Use keys as <script>."NumberElements/<symbol>"
634 currentNumberingSystem = script + ".";
635 String digits = CLDRConverter.handlerNumbering.get(script);
636 if (digits == null) {
637 pushIgnoredContainer(qName);
638 break;
639 }
640
641 addNumberingScript(script);
642 put(currentNumberingSystem + "NumberElements/zero", digits.substring(0, 1));
643 pushContainer(qName, attributes);
644 }
645 break;
646 case "decimal":
647 // for FormatData
648 // copy string for later assembly into NumberElements
649 if (currentContainer.getqName().equals("symbols")) {
650 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/decimal");
651 } else {
652 pushIgnoredContainer(qName);
653 }
654 break;
655 case "group":
656 // for FormatData
657 // copy string for later assembly into NumberElements
658 if (currentContainer.getqName().equals("symbols")) {
659 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/group");
660 } else {
661 pushIgnoredContainer(qName);
662 }
663 break;
664 case "list":
665 // for FormatData
666 // copy string for later assembly into NumberElements
667 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/list");
668 break;
669 case "percentSign":
670 // for FormatData
671 // copy string for later assembly into NumberElements
672 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/percent");
673 break;
674 case "nativeZeroDigit":
675 // for FormatData
676 // copy string for later assembly into NumberElements
677 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/zero");
678 break;
679 case "patternDigit":
|
1 /*
2 * Copyright (c) 2012, 2020, 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
627 if (script == null) {
628 // Has no script. Just ignore.
629 pushIgnoredContainer(qName);
630 break;
631 }
632
633 // Use keys as <script>."NumberElements/<symbol>"
634 currentNumberingSystem = script + ".";
635 String digits = CLDRConverter.handlerNumbering.get(script);
636 if (digits == null) {
637 pushIgnoredContainer(qName);
638 break;
639 }
640
641 addNumberingScript(script);
642 put(currentNumberingSystem + "NumberElements/zero", digits.substring(0, 1));
643 pushContainer(qName, attributes);
644 }
645 break;
646 case "decimal":
647 case "group":
648 case "currencyDecimal":
649 case "currencyGroup":
650 // for FormatData
651 // copy string for later assembly into NumberElements
652 if (currentContainer.getqName().equals("symbols")) {
653 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/" + qName);
654 } else {
655 pushIgnoredContainer(qName);
656 }
657 break;
658 case "list":
659 // for FormatData
660 // copy string for later assembly into NumberElements
661 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/list");
662 break;
663 case "percentSign":
664 // for FormatData
665 // copy string for later assembly into NumberElements
666 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/percent");
667 break;
668 case "nativeZeroDigit":
669 // for FormatData
670 // copy string for later assembly into NumberElements
671 pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/zero");
672 break;
673 case "patternDigit":
|