Statistics
| Revision:

root / trunk / libraries / libGPE / src / org / gvsig / gpe / GPEDefaults.java @ 11171

History | View | Annotate | Download (2.81 KB)

1
package org.gvsig.gpe;
2

    
3
import java.util.Properties;
4

    
5
import org.apache.xml.utils.NameSpace;
6

    
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
47
/* CVS MESSAGES:
48
 *
49
 * $Id: GPEDefaults.java 11171 2007-04-12 17:06:44Z jorpiell $
50
 * $Log$
51
 * Revision 1.2  2007-04-12 17:06:42  jorpiell
52
 * First GML writing tests
53
 *
54
 * Revision 1.1  2007/04/12 11:39:20  jorpiell
55
 * Add the GPEDefaults class
56
 *
57
 *
58
 */
59
/**
60
 * This class is used to add the properties that are used
61
 * by the GPE parsers.
62
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
63
 */
64
public class GPEDefaults {
65
        private static Properties properties = new Properties();
66
        public static final String DECIMAL = "decimal";
67
        public static final String COORDINATES_SEPARATOR = "coordinatesSeparator";
68
        public static final String TUPLES_SEPARATOR = "tuplesSeparator";
69
        public static final String NAMESPACE_PREFIX = "namespacePrefix";
70
        public static final String NAMESPACE_URI= "namespaceURI";
71
        public static final String XML_VERSION = "xmlVersion";
72
        public static final String XML_ENCODING = "xmlEncoding";
73
        
74
        static{
75
                properties.put(DECIMAL, ".");
76
                properties.put(COORDINATES_SEPARATOR, ",");
77
                properties.put(TUPLES_SEPARATOR, " ");
78
                properties.put(NAMESPACE_PREFIX, "cit");
79
                properties.put(NAMESPACE_URI, "http://www.gvsig.com/cit");
80
                properties.put(XML_VERSION, "1.0");
81
                properties.put(XML_ENCODING, "UTF-8");
82
        }
83
        
84
        /**
85
         * Gets a property
86
         * @param key
87
         * Property name
88
         * @return
89
         */
90
        public static String getProperty(String key){
91
                Object obj = properties.getProperty(key);
92
                if (obj == null){
93
                        return null;
94
                }
95
                return (String)obj;
96
        }
97
        
98
        /**
99
         * Sets a property
100
         * @param key
101
         * @param value
102
         */
103
        public static void setProperty(String key, Object value){
104
                properties.put(key, value);
105
        }
106
        
107
        
108
}