make/src/classes/build/tools/cldrconverter/AbstractLDMLHandler.java

Print this page


   1 /*
   2  * Copyright (c) 2012, 2013, 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


 105     void pushIgnoredContainer(String qName) {
 106         currentContainer = new IgnoredContainer(qName, currentContainer);
 107     }
 108 
 109     void pushKeyContainer(String qName, Attributes attributes, String key) {
 110         if (!pushIfIgnored(qName, attributes)) {
 111             currentContainer = new KeyContainer(qName, currentContainer, key);
 112         }
 113     }
 114 
 115     /**
 116      * start an element that defines a string entry, with the value provided by the element's text.
 117      */
 118     void pushStringEntry(String qName, Attributes attributes, String key) {
 119         if (!pushIfIgnored(qName, attributes)) {
 120             currentContainer = new StringEntry(qName, currentContainer, key);
 121         }
 122     }
 123 
 124     /**









 125      * start an element that defines a string entry, with the value provided by an attribute value.
 126      */
 127     void pushStringEntry(String qName, Attributes attributes, String key, String value) {
 128         if (!pushIfIgnored(qName, attributes)) {
 129             currentContainer = new StringEntry(qName, currentContainer, key, value);
 130         }
 131     }
 132 
 133     void pushStringArrayEntry(String qName, Attributes attributes, String key, int length) {
 134         if (!pushIfIgnored(qName, attributes)) {
 135             currentContainer = new StringArrayEntry(qName, currentContainer, key, length);
 136         }
 137     }
 138 
 139     void pushStringArrayElement(String qName, Attributes attributes, int index) {
 140         if (!pushIfIgnored(qName, attributes)) {
 141             currentContainer = new StringArrayElement(qName, currentContainer, index);
 142         }
 143     }
 144 


   1 /*
   2  * Copyright (c) 2012, 2015, 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


 105     void pushIgnoredContainer(String qName) {
 106         currentContainer = new IgnoredContainer(qName, currentContainer);
 107     }
 108 
 109     void pushKeyContainer(String qName, Attributes attributes, String key) {
 110         if (!pushIfIgnored(qName, attributes)) {
 111             currentContainer = new KeyContainer(qName, currentContainer, key);
 112         }
 113     }
 114 
 115     /**
 116      * start an element that defines a string entry, with the value provided by the element's text.
 117      */
 118     void pushStringEntry(String qName, Attributes attributes, String key) {
 119         if (!pushIfIgnored(qName, attributes)) {
 120             currentContainer = new StringEntry(qName, currentContainer, key);
 121         }
 122     }
 123 
 124     /**
 125      * start an element that defines an alias entry, with the value provided by the element's alias.
 126      */
 127     void pushAliasEntry(String qName, Attributes attributes, String key) {
 128         if (!pushIfIgnored(qName, attributes)) {
 129             currentContainer = new AliasEntry(qName, currentContainer, key);
 130         }
 131     }
 132 
 133     /**
 134      * start an element that defines a string entry, with the value provided by an attribute value.
 135      */
 136     void pushStringEntry(String qName, Attributes attributes, String key, String value) {
 137         if (!pushIfIgnored(qName, attributes)) {
 138             currentContainer = new StringEntry(qName, currentContainer, key, value);
 139         }
 140     }
 141 
 142     void pushStringArrayEntry(String qName, Attributes attributes, String key, int length) {
 143         if (!pushIfIgnored(qName, attributes)) {
 144             currentContainer = new StringArrayEntry(qName, currentContainer, key, length);
 145         }
 146     }
 147 
 148     void pushStringArrayElement(String qName, Attributes attributes, int index) {
 149         if (!pushIfIgnored(qName, attributes)) {
 150             currentContainer = new StringArrayElement(qName, currentContainer, index);
 151         }
 152     }
 153