Statistics
| Revision:

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

History | View | Annotate | Download (4.57 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
package org.gvsig.metadata.extended.registry.objects;
33

    
34
import java.util.Map;
35

    
36

    
37

    
38
public class MDDefinition {
39
        private String id;
40
        private String name;
41
        private String description;
42
        private MDDefinition father;
43
        private Map<String, MDElementDefinition> elements;
44
        private boolean persisted, changed;
45
        
46

    
47
        public MDDefinition() {
48
                this.id = "";
49
                this.name = "";
50
                this.description = "";
51
                this.father = null;
52
                this.elements = null;
53
                this.persisted = false;
54
                this.changed = false;
55
        }
56
//        
57
//        public MDDefinition(String name, String description) {
58
//                this.id = "";
59
//                this.name = name;
60
//                this.description = description;
61
//                this.father = null;
62
//                this.elements = null;
63
//                this.persisted = false;
64
//                this.changed = true;
65
//        }
66
        
67
        public MDDefinition(String id, String name, String description) {
68
                this.id = id;
69
                this.name = name;
70
                this.description = description;
71
                this.father = null;
72
                this.elements = null;
73
                this.persisted = false;
74
                this.changed = true;
75
        }
76
        
77
//        public MDDefinition(String name, String description, Map<String, MDElementDefinition> elements) {
78
//                this.id = "";
79
//                this.name = name;
80
//                this.description = description;
81
//                this.father = null;
82
//                this.elements = elements;
83
//                this.persisted = false;
84
//                this.changed = true;
85
//        }
86
//        
87
//        public MDDefinition(String name, String description, MDDefinition father, Map<String, MDElementDefinition> elements, boolean persisted, boolean changed) {
88
//                this.id = "";
89
//                this.name = name;
90
//                this.description = description;
91
//                this.father = father;
92
//                this.elements = elements;
93
//                this.persisted = persisted;
94
//                this.changed = changed;
95
//        }
96
//        
97
//        public MDDefinition(String id, String name, String description, MDDefinition father, Map<String, MDElementDefinition> elements) {
98
//                this.id = id;
99
//                this.name = name;
100
//                this.description = description;
101
//                this.father = father;
102
//                this.elements = elements;
103
//                this.persisted = true;
104
//                this.changed = false;
105
//        }
106
        
107
        /**
108
         * @return the id
109
         */
110
        public String getId() {
111
                return id;
112
        }
113
        
114
        public String getName() {
115
                return this.name;
116
        }
117

    
118
        public String getDescription() {
119
                return this.description;
120
        }
121

    
122
        /**
123
         * @return the elements
124
         */
125
        public Map<String, MDElementDefinition> getElements() {
126
                return elements;
127
        }
128
        
129
        /**
130
         * @return the father
131
         */
132
        public MDDefinition getFather() {
133
                return father;
134
        }
135
        
136
        public void setName(String name) {
137
                this.name = name;
138
                this.changed = true;
139
        }
140
        
141
        public void setDescription(String description) {
142
                this.description = description;
143
                this.changed = true;
144
        }
145

    
146
        /**
147
         * @param elements the elements to set
148
         */
149
        public void setElements(Map<String, MDElementDefinition> elements) {
150
                this.elements = elements;
151
                this.changed = true;
152
        }
153

    
154
        /**
155
         * @param father the father to set
156
         */
157
        public void setFather(MDDefinition father) {
158
                this.father = father;
159
                this.changed = true;
160
        }
161

    
162
        /**
163
         * @param id the id to set
164
         */
165
        protected void setId(String id) {
166
                this.id = id;
167
        }
168

    
169
        /**
170
         * @return the changed
171
         */
172
        public boolean isChanged() {
173
                return changed;
174
        }
175

    
176
        /**
177
         * @param changed the changed to set
178
         */
179
        public void setChanged(boolean changed) {
180
                this.changed = changed;
181
        }
182

    
183
        /**
184
         * @return the persisted
185
         */
186
        public boolean isPersisted() {
187
                return persisted;
188
        }
189

    
190
        /**
191
         * @param persisted the persisted to set
192
         */
193
        public void setPersisted(boolean persisted) {
194
                this.persisted = persisted;
195
        }
196

    
197
}