Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extGPE-gvSIG / src / org / gvsig / fmap / drivers / gpe / model / GPEMetadata.java @ 37960

History | View | Annotate | Download (2.61 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
 * 2011 Software Colaborativo (www.scolab.es)   development
26
 */
27

    
28
package org.gvsig.fmap.drivers.gpe.model;
29

    
30
import java.util.ArrayList;
31

    
32
import org.gvsig.gpe.containers.MetaData;
33

    
34
public class GPEMetadata {
35
        private GPEMetadata parentData = null;
36
        private ArrayList dataList = new ArrayList();
37
        private String tagType = null;
38
        private String tagData = null;
39

    
40
        /**
41
         * @return the tagType
42
         */
43
        public String getTagType() {
44
                return this.tagType;
45
        }
46

    
47
        /**
48
         * @param name
49
         *            the tagType to set
50
         */
51
        public void setTagType(String tagType) {
52
                this.tagType = tagType;
53
        }
54

    
55
        /**
56
         * @param name
57
         *            the tag data to set
58
         */
59
        public void setTagData(String tagData) {
60
                this.tagData = tagData;
61
        }
62

    
63
        /**
64
         * @param name
65
         *            the tag data to set
66
         */
67
        public String getTagData() {
68
                return tagData;
69
        }
70

    
71
        /**
72
         * @return the data list
73
         */
74
        public ArrayList getDataList() {
75
                return dataList;
76
        }
77

    
78
        /**
79
         * @return the metadata at position i
80
         * @param i
81
         *            Element position
82
         */
83
        public GPEMetadata getElementAt(int i) {
84
                return (GPEMetadata) dataList.get(i);
85
        }
86

    
87
        /**
88
         * @return the parent metadata
89
         */
90
        public GPEMetadata getParentData() {
91
                return parentData;
92
        }
93

    
94
        /**
95
         * @param parent
96
         *            metadata the parentElement to set
97
         */
98
        public void setParentData(Object parentData) {
99
                if (parentData != null) {
100
                        this.parentData = (GPEMetadata) parentData;
101
                        ((GPEMetadata) parentData).addChildData(this);
102
                }
103
        }
104

    
105
        /**
106
         * @param adds
107
         *            a child metadata
108
         */
109
        public void addChildData(GPEMetadata subData) {
110
                getDataList().add(subData);
111
        }
112

    
113
}