Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extMetadata / src / org / gvsig / metadata / extended / registry / objects / MDElementDefinition.java @ 23727

History | View | Annotate | Download (2.59 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22

    
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 Geographic Information research group: http://www.geoinfo.uji.es
26
* Departamento de Lenguajes y Sistemas Inform?ticos (LSI)
27
* Universitat Jaume I   
28
* {{Task}}
29
*/
30

    
31

    
32

    
33
package org.gvsig.metadata.extended.registry.objects;
34

    
35
import java.util.HashMap;
36
import java.util.Map;
37

    
38

    
39
public class MDElementDefinition {
40
        
41
        private String name;
42
        private Enum type;
43
        private Boolean required;
44
        private Object defaultValue;
45
        private String description;
46
        private Map synonyms = new HashMap();
47
        
48
        public MDElementDefinition() {}
49
        
50
        public MDElementDefinition(String name, Enum type, Boolean required, Object defaultValue, String description) {
51
                this.name = name;
52
                this.type = type;
53
                this.required = required;
54
                this.defaultValue = defaultValue;
55
                this.description = description;
56
        }
57
        
58
        public String getName() {
59
                return this.name;
60
        }
61
        
62
        public Enum getType() {
63
                return this.type;
64
        }
65
        
66
        public Boolean isRequired() {
67
                return this.required;
68
        }
69
        
70
        public Object getDefaultValue() {
71
                return this.defaultValue;
72
        }
73
        
74
        public String getDescription() {
75
                return this.description;
76
        }
77
        
78
        public Object getSynonym(String name) {
79
                return synonyms.get(name);
80
        }
81
        
82
        public void setName(String name) {
83
                this.name = name;
84
        }
85
        
86
        public void setType(Enum type) {
87
                this.type = type;
88
        }
89
        
90
        public void setRequired(Boolean required) {
91
                this.required = required;
92
        }
93
        
94
        public void setDefaultValue(Object defaultValue) {
95
                this.defaultValue = defaultValue;
96
        }
97
        
98
        public void setDescription(String description) {
99
                this.description = description;
100
        }
101
        
102
        public void setSynonym(String name, Object synonym) {
103
                synonyms.put(name, synonym);
104
        }
105
}