java/dictionary-generator/src/cz/frantovo/telco/dictionary/Xmlns.java
author František Kučera <franta-hg@frantovo.cz>
Sun, 06 Oct 2024 20:02:11 +0200
changeset 157 7abf9048d38d
parent 151 a9f1ba451247
permissions -rw-r--r--
data: FXO and FXS modules on Digium/Asterisk analog telephony cards
franta-hg@15
     1
/**
franta-hg@15
     2
 * Free Telco Dictionary
franta-hg@15
     3
 * Copyright © 2013 František Kučera (frantovo.cz)
franta-hg@15
     4
 *
franta-hg@15
     5
 * This program is free software: you can redistribute it and/or modify
franta-hg@15
     6
 * it under the terms of the GNU General Public License as published by
franta-hg@151
     7
 * the Free Software Foundation, version 3 of the License.
franta-hg@15
     8
 *
franta-hg@15
     9
 * This program is distributed in the hope that it will be useful,
franta-hg@15
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@15
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@15
    12
 * GNU General Public License for more details.
franta-hg@15
    13
 *
franta-hg@15
    14
 * You should have received a copy of the GNU General Public License
franta-hg@15
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@15
    16
 */
franta-hg@15
    17
package cz.frantovo.telco.dictionary;
franta-hg@15
    18
franta-hg@15
    19
import java.util.HashMap;
franta-hg@15
    20
import java.util.Map;
franta-hg@15
    21
import javax.xml.namespace.NamespaceContext;
franta-hg@15
    22
franta-hg@15
    23
/**
franta-hg@15
    24
 * XML namespaces used in Telco dictionary
franta-hg@15
    25
 *
franta-hg@15
    26
 * @author Ing. František Kučera (frantovo.cz)
franta-hg@15
    27
 */
franta-hg@15
    28
public class Xmlns {
franta-hg@15
    29
franta-hg@15
    30
	public static final String DICTIONARY = "https://telco.frantovo.cz/xmlns/dictionary";
franta-hg@15
    31
franta-hg@15
    32
	public static NamespaceContext getNamespaceContext() {
franta-hg@15
    33
		Map<String, String> prefixMap = new HashMap<>();
franta-hg@15
    34
		prefixMap.put("d", DICTIONARY);
franta-hg@15
    35
		return new MappedNamespaceContext(prefixMap);
franta-hg@15
    36
	}
franta-hg@15
    37
franta-hg@15
    38
	private Xmlns() {
franta-hg@15
    39
	}
franta-hg@15
    40
}